• Skip to content
  • Skip to link menu
Brand

API Documentation

  1. KDE API Reference
  2. Kirigami
  • KDE Home
  • Contact Us

Quick Links

Skip menu "Kirigami"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List
  • Related Pages

Class Picker

About

QtQuick plugins to build user interfaces based on the KDE UX guidelines

Maintainer
Marco Martin
Supported platforms
Android, Linux
Community
IRC: #plasma on Freenode
Mailing list: plasma-devel
Use with CMake
find_package(KF5Kirigami)
target_link_libraries(yourapp KF5::Kirigami)
Clone
git clone git://anongit.kde.org/kirigami1.git
Browse source
Kirigami on cgit.kde.org

Kirigami

  • src
  • controls
ScrollablePage.qml
1 /*
2  * Copyright 2015 Marco Martin <mart@kde.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Library General Public License as
6  * published by the Free Software Foundation; either version 2, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Library General Public License for more details
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
20 import QtQuick 2.1
21 import QtQuick.Layouts 1.2
22 import org.kde.kirigami 1.0
23 import "private"
24 
62 Page {
63  id: root
64 
72  property alias refreshing: scrollView.refreshing
73 
79  property alias supportsRefreshing: scrollView.supportsRefreshing
80 
85  property alias flickable: scrollView.flickableItem
86 
92  default property alias contentItem: scrollView.contentItem
93 
98  property alias leftPadding: scrollView.leftPadding
99 
104  property alias topPadding: scrollView.topPadding
105 
110  property alias rightPadding: scrollView.rightPadding
111 
116  property alias bottomPadding: scrollView.bottomPadding
117 
118  children: [
119  RefreshableScrollView {
120  id: scrollView
121  topPadding: (applicationWindow() && applicationWindow().header ? applicationWindow().header.preferredHeight : 0) + (contentItem == flickable ? 0 : Units.gridUnit)
122  leftPadding: contentItem == flickable ? 0 : Units.gridUnit
123  rightPadding: contentItem == flickable ? 0 : Units.gridUnit
124  bottomPadding: contentItem == flickable ? 0 : Units.gridUnit
125  anchors {
126  fill: parent
127  }
128  },
129 
130  Item {
131  id: overlay
132  anchors.fill: parent
133  property Item oldContentItem
134  }
135  ]
136 
137  //HACK to get the contentItem as the last one, all the other eventual items as an overlay
138  //no idea if is the way the user expects
139  onContentItemChanged: {
140  if (overlay.oldContentItem) {
141  overlay.oldContentItem.parent = overlay
142  }
143  overlay.oldContentItem = root.contentItem
144  }
145 }
org::kde::kirigami::Page::leftPadding
int leftPadding
leftPadding: int default contents padding at left
Definition: Page.qml:40
org::kde::kirigami::RefreshableScrollView
RefreshableScrollView is a scroll view for any Flickable that supports the "scroll down to refresh" b...
Definition: RefreshableScrollView.qml:62
org::kde::kirigami::Page
Page is a container for all the app pages: everything pushed to the ApplicationWindow stackView shoul...
Definition: Page.qml:29
org::kde::kirigami::Units::gridUnit
int gridUnit
The fundamental unit of space that should be used for sizes, expressed in pixels. ...
Definition: controls/Units.qml:31
org::kde::kirigami::Units
Definition: controls/Units.qml:24
This file is part of the KDE documentation.
Documentation copyright © 1996-2017 The KDE developers.
Generated on Fri Feb 17 2017 11:09:23 by doxygen 1.8.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal