• 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
Page.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 
31 Item {
32  id: root
33 
38  property string title
39 
44  property int leftPadding: Units.gridUnit
45 
50  property int topPadding: Units.gridUnit
51 
56  property int rightPadding: Units.gridUnit
57 
62  property int bottomPadding: Units.gridUnit
63 
68  default property alias contentData: container.data
69 
79  property Flickable flickable
80 
124  //TODO: remove
125  property alias contextualActions: actionsGroup.contextualActions
126 
146  //TODO: remove
147  property alias mainAction: actionsGroup.main
148 
168  //TODO: remove
169  property alias leftAction: actionsGroup.left
170 
190  //TODO: remove
191  property alias rightAction: actionsGroup.right
192 
211  readonly property alias actions: actionsGroup
212 
213  PageActionPropertyGroup {
214  id: actionsGroup
215  }
216 
225  property Item background
226 
227  onBackgroundChanged: {
228  background.z = -1;
229  background.parent = root;
230  background.anchors.fill = root;
231  }
232 
241  signal backRequested(var event);
242 
243  Item {
244  id: container
245  onChildrenChanged: {
246  //NOTE: make sure OverlaySheets are directly under the root
247  //so they are over all the contents and don't have margins
248  //TODO: OverlayDrawers as well?
249  //search for an OverlaySheet, unfortunately have to blind test properties
250  //as there is no way to get the classname from qml objects
251  for (var i = children.length -1; i >= 0; --i) {
252  var child = children[i];
253  if (child.toString().indexOf("OverlaySheet") === 0) {
254  child.parent = root;
255  }
256  }
257  }
258  anchors {
259  fill: parent
260  leftMargin: leftPadding
261  topMargin: topPadding + (applicationWindow === undefined || applicationWindow().wideScreen ? 0 : applicationWindow().header.height)
262  rightMargin: rightPadding
263  bottomMargin: bottomPadding
264  }
265  }
266 
267  Loader {
268  z: 9999
269  parent: root
270  anchors {
271  left: parent.left
272  right: parent.right
273  bottom: parent.bottom
274  }
275  height: item ? item.height : 0
276  source: applicationWindow().header && applicationWindow().header.toString().indexOf("ToolBarApplicationHeader") !== 0 ? Qt.resolvedUrl("./private/ActionButton.qml") : ""
277  }
278 
279  Layout.fillWidth: true
280 }
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