Changeset View
Changeset View
Standalone View
Standalone View
src/qml/ContentView.qml
Show First 20 Lines • Show All 125 Lines • ▼ Show 20 Line(s) | 121 | onSwitchOneAlbumView: { | |||
---|---|---|---|---|---|
126 | browseStackView.push(albumView, { | 126 | browseStackView.push(albumView, { | ||
127 | viewType: viewType, | 127 | viewType: viewType, | ||
128 | mainTitle: mainTitle, | 128 | mainTitle: mainTitle, | ||
129 | secondaryTitle: secondaryTitle, | 129 | secondaryTitle: secondaryTitle, | ||
130 | image: imageUrl, | 130 | image: imageUrl, | ||
131 | databaseId: databaseId, | 131 | databaseId: databaseId, | ||
132 | stackView: browseStackView, | 132 | stackView: browseStackView, | ||
133 | opacity: 0, | 133 | opacity: 0, | ||
134 | }) | 134 | }) | ||
mgallien: This is too specific.
Please add or modify existing fields to have generic properties that… | |||||
135 | } | 135 | } | ||
136 | 136 | | |||
137 | onSwitchAllTracksView: { | 137 | onSwitchAllTracksView: { | ||
138 | listViews.setCurrentIndex(pageModel.indexFromViewType(viewType)) | 138 | listViews.setCurrentIndex(pageModel.indexFromViewType(viewType)) | ||
139 | 139 | | |||
140 | while(browseStackView.depth > expectedDepth) { | 140 | while(browseStackView.depth > expectedDepth) { | ||
141 | browseStackView.pop() | 141 | browseStackView.pop() | ||
142 | } | 142 | } | ||
Show All 18 Lines | 154 | onSwitchFilesBrowserView: { | |||
161 | browseStackView.push(filesBrowserView, { | 161 | browseStackView.push(filesBrowserView, { | ||
162 | viewType: viewType, | 162 | viewType: viewType, | ||
163 | mainTitle: mainTitle, | 163 | mainTitle: mainTitle, | ||
164 | image: imageUrl, | 164 | image: imageUrl, | ||
165 | opacity: 0, | 165 | opacity: 0, | ||
166 | }) | 166 | }) | ||
167 | } | 167 | } | ||
168 | 168 | | |||
169 | onSwitchRadiosView: { | ||||
170 | listViews.setCurrentIndex(pageModel.indexFromViewType(viewType)) | ||||
171 | | ||||
172 | while(browseStackView.depth > expectedDepth) { | ||||
173 | browseStackView.pop() | ||||
174 | } | ||||
175 | | ||||
176 | browseStackView.push(radiosView, { | ||||
177 | viewType: viewType, | ||||
178 | mainTitle: mainTitle, | ||||
179 | image: imageUrl, | ||||
180 | modelType: dataType, | ||||
181 | stackView: browseStackView, | ||||
182 | opacity: 0, | ||||
183 | }) | ||||
184 | } | ||||
185 | | ||||
169 | onPopOneView: { | 186 | onPopOneView: { | ||
170 | if (browseStackView.depth > 2) { | 187 | if (browseStackView.depth > 2) { | ||
171 | browseStackView.pop() } | 188 | browseStackView.pop() } | ||
172 | } | 189 | } | ||
173 | } | 190 | } | ||
174 | 191 | | |||
175 | ViewsModel { | 192 | ViewsModel { | ||
176 | id: pageModel | 193 | id: pageModel | ||
▲ Show 20 Lines • Show All 375 Lines • ▼ Show 20 Line(s) | 568 | Component { | |||
552 | id: albumView | 569 | id: albumView | ||
553 | 570 | | |||
554 | AlbumView { | 571 | AlbumView { | ||
555 | StackView.onActivated: viewManager.viewIsLoaded(viewType) | 572 | StackView.onActivated: viewManager.viewIsLoaded(viewType) | ||
556 | } | 573 | } | ||
557 | } | 574 | } | ||
558 | 575 | | |||
559 | Component { | 576 | Component { | ||
577 | id: radiosView | ||||
578 | | ||||
579 | RadiosView { | ||||
580 | StackView.onActivated: viewManager.viewIsLoaded(viewType) | ||||
581 | } | ||||
582 | } | ||||
583 | | ||||
584 | Component { | ||||
560 | id: filesBrowserView | 585 | id: filesBrowserView | ||
561 | 586 | | |||
562 | FileBrowserView { | 587 | FileBrowserView { | ||
563 | StackView.onActivated: viewManager.viewIsLoaded(viewType) | 588 | StackView.onActivated: viewManager.viewIsLoaded(viewType) | ||
564 | } | 589 | } | ||
565 | } | 590 | } | ||
566 | } | 591 | } | ||
The dataListView should be sufficient for this, no need to define a new component astippich: The dataListView should be sufficient for this, no need to define a new component |
This is too specific.
Please add or modify existing fields to have generic properties that could be usable in other contexts.
For example, I am working again on UPnP/DLNA support and would probably need some special handling for tracks where the file is an http URL instead of a local file. This is a shared need with online radios.