Changeset View
Changeset View
Standalone View
Standalone View
src/qml/MediaPlayListView.qml
Show All 15 Lines | |||||
16 | */ | 16 | */ | ||
17 | 17 | | |||
18 | import QtQuick 2.5 | 18 | import QtQuick 2.5 | ||
19 | import QtQuick.Controls 2.2 | 19 | import QtQuick.Controls 2.2 | ||
20 | import QtQuick.Controls 1.3 as Controls1 | 20 | import QtQuick.Controls 1.3 as Controls1 | ||
21 | import QtQuick.Layouts 1.1 | 21 | import QtQuick.Layouts 1.1 | ||
22 | import QtQuick.Window 2.2 | 22 | import QtQuick.Window 2.2 | ||
23 | import Qt.labs.platform 1.0 as PlatformDialog | 23 | import Qt.labs.platform 1.0 as PlatformDialog | ||
24 | import org.kde.kirigami 2.5 as Kirigami | ||||
24 | import org.kde.elisa 1.0 | 25 | import org.kde.elisa 1.0 | ||
25 | 26 | | |||
26 | FocusScope { | 27 | FocusScope { | ||
27 | property StackView parentStackView | 28 | property StackView parentStackView | ||
28 | 29 | | |||
29 | property int placeholderHeight: elisaTheme.dragDropPlaceholderHeight | 30 | property int placeholderHeight: elisaTheme.dragDropPlaceholderHeight | ||
30 | 31 | | |||
31 | signal startPlayback() | 32 | signal startPlayback() | ||
▲ Show 20 Lines • Show All 132 Lines • ▼ Show 20 Line(s) | 162 | ColumnLayout { | |||
164 | visible: elisa.mediaPlayList ? elisa.mediaPlayList.tracksCount === 0 : true | 165 | visible: elisa.mediaPlayList ? elisa.mediaPlayList.tracksCount === 0 : true | ||
165 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter | 166 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter | ||
166 | Layout.fillHeight: true | 167 | Layout.fillHeight: true | ||
167 | Layout.fillWidth: true | 168 | Layout.fillWidth: true | ||
168 | 169 | | |||
169 | Item { Layout.fillHeight: true } | 170 | Item { Layout.fillHeight: true } | ||
170 | 171 | | |||
171 | Image { | 172 | Image { | ||
172 | Layout.alignment: Qt.AlignHCenter | 173 | Layout.alignment: Qt.AlignHCenter | ||
mgallien: Please fix the typo. | |||||
173 | 174 | | |||
174 | width: elisaTheme.gridDelegateWidth * 5 | 175 | width: elisaTheme.gridDelegateWidth * 5 | ||
175 | height: elisaTheme.gridDelegateWidth * 5 | 176 | height: elisaTheme.gridDelegateWidth * 5 | ||
176 | 177 | | |||
177 | source: elisaTheme.playlistIcon | 178 | source: elisaTheme.playlistIcon | ||
178 | opacity: 0.25 | 179 | opacity: 0.25 | ||
179 | 180 | | |||
180 | sourceSize { | 181 | sourceSize { | ||
Show All 24 Lines | 200 | Label { | |||
205 | 206 | | |||
206 | wrapMode: Text.WordWrap | 207 | wrapMode: Text.WordWrap | ||
207 | 208 | | |||
208 | horizontalAlignment: Text.AlignHCenter | 209 | horizontalAlignment: Text.AlignHCenter | ||
209 | text: i18nc("Text shown when play list is empty", "Add some songs to get started. You can browse your music using the views on the left.") | 210 | text: i18nc("Text shown when play list is empty", "Add some songs to get started. You can browse your music using the views on the left.") | ||
210 | } | 211 | } | ||
211 | 212 | | |||
212 | Item { Layout.fillHeight: true } | 213 | Item { Layout.fillHeight: true } | ||
213 | | ||||
214 | } | 214 | } | ||
215 | 215 | | |||
216 | PlayListBasicView { | 216 | PlayListBasicView { | ||
217 | id: playListView | 217 | id: playListView | ||
218 | 218 | | |||
219 | Layout.fillWidth: true | 219 | Layout.fillWidth: true | ||
220 | Layout.fillHeight: true | 220 | Layout.fillHeight: true | ||
221 | 221 | | |||
222 | playListModel: elisa.mediaPlayList | 222 | playListModel: elisa.mediaPlayList | ||
223 | 223 | | |||
224 | focus: true | 224 | focus: true | ||
225 | 225 | | |||
226 | onStartPlayback: topItem.startPlayback() | 226 | onStartPlayback: topItem.startPlayback() | ||
227 | 227 | | |||
228 | onPausePlayback: topItem.pausePlayback() | 228 | onPausePlayback: topItem.pausePlayback() | ||
229 | 229 | | |||
230 | onDisplayError: topItem.displayError(errorText) | 230 | onDisplayError: topItem.displayError(errorText) | ||
231 | 231 | | |||
232 | } | 232 | } | ||
233 | | ||||
234 | Kirigami.InlineMessage { | ||||
235 | | ||||
236 | Connections { | ||||
237 | target: elisa.mediaPlayList | ||||
238 | onDisplayUndoInline: undoClear.visible = true | ||||
239 | } | ||||
240 | | ||||
241 | Connections { | ||||
242 | target: elisa.mediaPlayList | ||||
243 | onHideUndoInline: undoClear.visible = false | ||||
244 | } | ||||
245 | | ||||
246 | id: undoClear | ||||
247 | | ||||
248 | text: i18nc("Playlist cleared", "Playlist cleared") | ||||
249 | type: Kirigami.MessageType.Information | ||||
250 | showCloseButton: true | ||||
251 | Layout.topMargin: 5 | ||||
252 | Layout.fillWidth: true | ||||
253 | Layout.rightMargin: elisaTheme.layoutHorizontalMargin | ||||
254 | Layout.leftMargin: elisaTheme.layoutHorizontalMargin | ||||
255 | | ||||
256 | actions: [ | ||||
257 | Kirigami.Action { | ||||
258 | text: i18nc("Undo", "Undo") | ||||
259 | icon.name: "dialog-cancel" | ||||
260 | onTriggered: elisa.mediaPlayList.undoClearPlayList() | ||||
261 | } | ||||
262 | ] | ||||
263 | } | ||||
233 | } | 264 | } | ||
234 | } | 265 | } | ||
235 | 266 | | |||
236 | 267 | |
Please fix the typo.