Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.1
- import QtQuick.Controls 2.0 as QQC2
- import org.kde.kirigami 2.0 as Kirigami
- import libcloudstorage 1.0
- Kirigami.ApplicationWindow {
- id: root
- header: Kirigami.ApplicationHeader {}
- CloudContext {
- id: cloud
- }
- globalDrawer: Kirigami.GlobalDrawer {
- title: "Cloud Browser"
- titleIcon: "applications-graphics"
- actions: [
- Kirigami.Action {
- Component {
- id: cloud_entry
- Kirigami.Action { }
- }
- function providers() {
- var lst = [], i;
- for (i = 0; i < cloud.providers.length; i++) {
- var prop = {
- //iconSource: "qrc://resources/" + cloud.providers[i] + ".png",
- iconSource: "qrc:/resources/directory.png",
- text: cloud.providers[i]
- };
- lst.push(cloud_entry.createObject(provider_action, prop));
- }
- return lst;
- }
- id: provider_action
- text: "Add Cloud Provider"
- iconSource: "qrc:/resources/directory.png"
- children: providers()
- }
- ]
- }
- // contextDrawer: Kirigami.ContextDrawer {
- // id: contextDrawer
- // }
- //pageStack.initialPage: mainPageComponent
- /*Component {
- id: mainPageComponent
- Kirigami.ScrollablePage {
- title: "Hello"
- actions {
- main: Kirigami.Action {
- iconName: sheet.sheetOpen ? "dialog-cancel" : "document-edit"
- onTriggered: {
- print("Action button in buttons page clicked");
- sheet.sheetOpen = !sheet.sheetOpen
- }
- }
- left: Kirigami.Action {
- iconName: "go-previous"
- onTriggered: {
- print("Left action triggered")
- }
- }
- right: Kirigami.Action {
- iconName: "go-next"
- onTriggered: {
- print("Right action triggered")
- }
- }
- contextualActions: [
- Kirigami.Action {
- text:"Action for buttons"
- iconName: "bookmarks"
- onTriggered: print("Action 1 clicked")
- },
- Kirigami.Action {
- text:"Action 2"
- iconName: "folder"
- enabled: false
- },
- Kirigami.Action {
- text: "Action for Sheet"
- visible: sheet.sheetOpen
- }
- ]
- }
- Kirigami.OverlaySheet {
- id: sheet
- onSheetOpenChanged: page.actions.main.checked = sheetOpen
- QQC2.Label {
- wrapMode: Text.WordWrap
- text: "Lorem ipsum dolor sit amet"
- }
- }
- //Page contents...
- }
- } */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement