Changeset View
Changeset View
Standalone View
Standalone View
src/qml/ContextView.qml
Show All 23 Lines | |||||
24 | 24 | | |||
25 | import org.kde.elisa 1.0 | 25 | import org.kde.elisa 1.0 | ||
26 | 26 | | |||
27 | FocusScope { | 27 | FocusScope { | ||
28 | id: topItem | 28 | id: topItem | ||
29 | 29 | | |||
30 | property var viewType | 30 | property var viewType | ||
31 | property int databaseId: 0 | 31 | property int databaseId: 0 | ||
32 | property var trackType | ||||
32 | property alias title: titleLabel.text | 33 | property alias title: titleLabel.text | ||
33 | property string albumName: '' | 34 | property string albumName: '' | ||
34 | property string artistName: '' | 35 | property string artistName: '' | ||
35 | property url albumArtUrl: '' | 36 | property url albumArtUrl: '' | ||
36 | property string fileUrl: '' | 37 | property string fileUrl: '' | ||
37 | 38 | | |||
38 | TrackContextMetaDataModel { | 39 | TrackContextMetaDataModel { | ||
39 | id: metaDataModel | 40 | id: metaDataModel | ||
▲ Show 20 Lines • Show All 213 Lines • ▼ Show 20 Line(s) | 249 | LabelWithToolTip { | |||
253 | text: fileUrl | 254 | text: fileUrl | ||
254 | elide: Text.ElideLeft | 255 | elide: Text.ElideLeft | ||
255 | } | 256 | } | ||
256 | ] | 257 | ] | ||
257 | } | 258 | } | ||
258 | } | 259 | } | ||
259 | 260 | | |||
260 | onDatabaseIdChanged: { | 261 | onDatabaseIdChanged: { | ||
261 | metaDataModel.initializeByTrackId(databaseId) | 262 | metaDataModel.initializeById(trackType, databaseId) | ||
262 | } | 263 | } | ||
263 | 264 | | |||
264 | Connections { | 265 | Connections { | ||
265 | target: elisa | 266 | target: elisa | ||
266 | 267 | | |||
267 | onMusicManagerChanged: { | 268 | onMusicManagerChanged: { | ||
268 | metaDataModel.initializeByTrackId(databaseId) | 269 | metaDataModel.initializeById(trackType, databaseId) | ||
269 | } | 270 | } | ||
270 | } | 271 | } | ||
271 | 272 | | |||
272 | Component.onCompleted: { | 273 | Component.onCompleted: { | ||
273 | if (elisa.musicManager) { | 274 | if (elisa.musicManager) { | ||
274 | metaDataModel.initializeByTrackId(databaseId) | 275 | metaDataModel.initializeById(trackType, databaseId) | ||
275 | } | 276 | } | ||
276 | } | 277 | } | ||
277 | } | 278 | } |