Changeset View
Changeset View
Standalone View
Standalone View
qmlUiKirigami/AlbumView.qml
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | 59 | contextualActions: [ | |||
---|---|---|---|---|---|
67 | Kirigami.Action { | 67 | Kirigami.Action { | ||
68 | iconName: "edit-select-none" | 68 | iconName: "edit-select-none" | ||
69 | text: i18n("Deselect All") | 69 | text: i18n("Deselect All") | ||
70 | tooltip: i18n("De-selects all the selected images") | 70 | tooltip: i18n("De-selects all the selected images") | ||
71 | enabled: model.hasSelectedImages | 71 | enabled: model.hasSelectedImages | ||
72 | onTriggered: model.clearSelections() | 72 | onTriggered: model.clearSelections() | ||
73 | }, | 73 | }, | ||
74 | Kirigami.Action { | 74 | Kirigami.Action { | ||
75 | iconName: "emblem-shared-symbolic" | ||||
76 | text: i18n("Share") | ||||
77 | tooltip: i18n("Share the selected images") | ||||
78 | enabled: model.hasSelectedImages | ||||
79 | onTriggered: { | ||||
80 | shareMenu.sheetOpen = true | ||||
81 | shareMenu.inputData = { | ||||
82 | "urls": model.selectedImages(), | ||||
83 | "mimeType": "image/" | ||||
84 | } | ||||
85 | } | ||||
86 | }, | ||||
87 | Kirigami.Action { | ||||
75 | iconName: "group-delete" | 88 | iconName: "group-delete" | ||
76 | text: i18n("Delete Selection") | 89 | text: i18n("Delete Selection") | ||
77 | tooltip: i18n("Move selected items to trash") | 90 | tooltip: i18n("Move selected items to trash") | ||
78 | enabled: model.hasSelectedImages | 91 | enabled: model.hasSelectedImages | ||
79 | onTriggered: model.deleteSelection() | 92 | onTriggered: model.deleteSelection() | ||
80 | } | 93 | } | ||
81 | 94 | | |||
82 | ] | 95 | ] | ||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
128 | onCollectionSelected: pageStack.push( Qt.resolvedUrl("AlbumView.qml"), { "model": selectedModel, "title": i18n(cover)}) | 141 | onCollectionSelected: pageStack.push( Qt.resolvedUrl("AlbumView.qml"), { "model": selectedModel, "title": i18n(cover)}) | ||
129 | onFolderSelected: pageStack.push( Qt.resolvedUrl("AlbumView.qml"), { "model": selectedModel, "title": i18n(cover)}) | 142 | onFolderSelected: pageStack.push( Qt.resolvedUrl("AlbumView.qml"), { "model": selectedModel, "title": i18n(cover)}) | ||
130 | onImageSelected: { | 143 | onImageSelected: { | ||
131 | currentImage.model = model.sourceModel | 144 | currentImage.model = model.sourceModel | ||
132 | currentImage.index = currentIndex | 145 | currentImage.index = currentIndex | ||
133 | imageViewer.state = "open"; | 146 | imageViewer.state = "open"; | ||
134 | } | 147 | } | ||
135 | 148 | | |||
149 | ShareDialog { | ||||
150 | id: shareMenu | ||||
151 | inputData: { urls: [] } | ||||
152 | sheetOpen: false | ||||
153 | onFinished: { | ||||
154 | if (error==0 && output.url !== "") { | ||||
155 | console.assert(output.url !== undefined); | ||||
156 | var resultUrl = output.url; | ||||
157 | console.log("Received", resultUrl) | ||||
158 | notificationManager.showNotification( true, resultUrl); | ||||
159 | } else { | ||||
160 | notificationManager.showNotification( false); | ||||
161 | } | ||||
162 | } | ||||
163 | } | ||||
136 | } | 164 | } |