Changeset View
Changeset View
Standalone View
Standalone View
src/touch/qml/main.qml
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 43 | contextDrawer: Kirigami.ContextDrawer { | |||
---|---|---|---|---|---|
44 | id: contextDrawer | 44 | id: contextDrawer | ||
45 | } | 45 | } | ||
46 | 46 | | |||
47 | globalDrawer: Kirigami.GlobalDrawer { | 47 | globalDrawer: Kirigami.GlobalDrawer { | ||
48 | title: "Kookbook" | 48 | title: "Kookbook" | ||
49 | titleIcon: ":/appicon.svg" | 49 | titleIcon: ":/appicon.svg" | ||
50 | actions: [ | 50 | actions: [ | ||
51 | Kirigami.Action { | 51 | Kirigami.Action { | ||
52 | text: "Refresh" | 52 | text: qsTr("Refresh") | ||
53 | iconName: "view-refresh" | 53 | iconName: "view-refresh" | ||
54 | onTriggered: { | 54 | onTriggered: { | ||
55 | scanner.refresh() | 55 | scanner.refresh() | ||
56 | showPassiveNotification("Refreshing") | 56 | showPassiveNotification(qsTr("Refreshing")) | ||
57 | } | 57 | } | ||
58 | }, | 58 | }, | ||
59 | Kirigami.Action { | 59 | Kirigami.Action { | ||
60 | text: "Open cookbook" | 60 | text: qsTr("Open cookbook") | ||
61 | iconName: "document-open-folder" | 61 | iconName: "document-open-folder" | ||
62 | onTriggered: { | 62 | onTriggered: { | ||
63 | if (root.pageStack.depth > 1) { | ||||
63 | root.pageStack.pop(null) | 64 | root.pageStack.pop(null) | ||
65 | } | ||||
64 | var newItem = root.pageStack.push(Qt.resolvedUrl("SelectFolder.qml")) | 66 | var newItem = root.pageStack.push(Qt.resolvedUrl("SelectFolder.qml")) | ||
65 | newItem.selected.connect(function (path) { | 67 | newItem.selected.connect(function (path) { | ||
66 | scanner.rootPath = path | 68 | scanner.rootPath = path | ||
69 | if (root.pageStack.depth > 1) { | ||||
67 | root.pageStack.pop(null) | 70 | root.pageStack.pop(null) | ||
68 | showPassiveNotification("Scanning") | 71 | } | ||
72 | showPassiveNotification(qsTr("Scanning")) | ||||
69 | }) | 73 | }) | ||
70 | } | 74 | } | ||
71 | 75 | | |||
72 | }, | 76 | }, | ||
73 | Kirigami.Action { | 77 | Kirigami.Action { | ||
74 | text: "Home" | 78 | text: qsTr("Home") | ||
75 | iconName: "go-home" | 79 | iconName: "go-home" | ||
76 | onTriggered: { | 80 | onTriggered: { | ||
81 | if (root.pageStack.depth > 1) { | ||||
77 | root.pageStack.pop(null) | 82 | root.pageStack.pop(null) | ||
78 | } | 83 | } | ||
84 | } | ||||
79 | }, | 85 | }, | ||
80 | Kirigami.Action { | 86 | Kirigami.Action { | ||
81 | text: "Help" | 87 | text: qsTr("Help") | ||
82 | iconName: "help-contents" | 88 | iconName: "help-contents" | ||
83 | onTriggered: root.pageStack.push(Qt.resolvedUrl("Help.qml")) | 89 | onTriggered: root.pageStack.push(Qt.resolvedUrl("Help.qml")) | ||
84 | } | 90 | } | ||
85 | ] | 91 | ] | ||
86 | } | 92 | } | ||
87 | 93 | | |||
88 | pageStack.initialPage: MainPage{ | 94 | pageStack.initialPage: MainPage{ | ||
89 | id: mainPage | 95 | id: mainPage | ||
90 | scanner: root.scanner | 96 | scanner: root.scanner | ||
91 | } | 97 | } | ||
92 | 98 | | |||
93 | } | 99 | } |