Changeset View
Changeset View
Standalone View
Standalone View
src/qml/GridBrowserView.qml
Show All 28 Lines | |||||
29 | 29 | | |||
30 | FocusScope { | 30 | FocusScope { | ||
31 | id: gridView | 31 | id: gridView | ||
32 | 32 | | |||
33 | property bool isSubPage: false | 33 | property bool isSubPage: false | ||
34 | property string mainTitle | 34 | property string mainTitle | ||
35 | property string secondaryTitle | 35 | property string secondaryTitle | ||
36 | property url image | 36 | property url image | ||
37 | property alias model: contentDirectoryView.model | 37 | property alias contentModel: contentDirectoryView.model | ||
38 | property bool showRating: true | 38 | property bool showRating: true | ||
39 | property bool delegateDisplaySecondaryText: true | 39 | property bool delegateDisplaySecondaryText: true | ||
40 | 40 | | |||
41 | property var tempMediaPlayList | | |||
42 | property var tempMediaControl | | |||
43 | | ||||
44 | signal enqueue(var data) | | |||
45 | signal replaceAndPlay(var data) | | |||
46 | signal open(var innerMainTitle, var innerSecondaryTitle, var innerImage, var databaseId) | 41 | signal open(var innerMainTitle, var innerSecondaryTitle, var innerImage, var databaseId) | ||
47 | signal goBack() | 42 | signal goBack() | ||
48 | 43 | | |||
49 | SystemPalette { | 44 | SystemPalette { | ||
50 | id: myPalette | 45 | id: myPalette | ||
51 | colorGroup: SystemPalette.Active | 46 | colorGroup: SystemPalette.Active | ||
52 | } | 47 | } | ||
53 | 48 | | |||
Show All 15 Lines | 57 | NavigationActionBar { | |||
69 | 64 | | |||
70 | height: elisaTheme.navigationBarHeight | 65 | height: elisaTheme.navigationBarHeight | ||
71 | Layout.preferredHeight: height | 66 | Layout.preferredHeight: height | ||
72 | Layout.minimumHeight: height | 67 | Layout.minimumHeight: height | ||
73 | Layout.maximumHeight: height | 68 | Layout.maximumHeight: height | ||
74 | Layout.fillWidth: true | 69 | Layout.fillWidth: true | ||
75 | 70 | | |||
76 | Binding { | 71 | Binding { | ||
77 | target: model | 72 | target: contentModel | ||
78 | property: 'filterText' | 73 | property: 'filterText' | ||
79 | value: navigationBar.filterText | 74 | value: navigationBar.filterText | ||
80 | } | 75 | } | ||
81 | 76 | | |||
82 | Binding { | 77 | Binding { | ||
83 | target: model | 78 | target: contentModel | ||
84 | property: 'filterRating' | 79 | property: 'filterRating' | ||
85 | value: navigationBar.filterRating | 80 | value: navigationBar.filterRating | ||
86 | } | 81 | } | ||
87 | 82 | | |||
88 | onEnqueue: model.enqueueToPlayList(tempMediaPlayList) | 83 | onEnqueue: contentModel.enqueueToPlayList() | ||
89 | 84 | | |||
90 | onReplaceAndPlay: { | 85 | onReplaceAndPlay:contentModel.replaceAndPlayOfPlayList() | ||
91 | tempMediaPlayList.clearPlayList() | | |||
92 | model.enqueueToPlayList(tempMediaPlayList) | | |||
93 | tempMediaControl.ensurePlay() | | |||
94 | } | | |||
95 | 86 | | |||
96 | onGoBack: gridView.goBack() | 87 | onGoBack: gridView.goBack() | ||
97 | } | 88 | } | ||
98 | 89 | | |||
99 | Rectangle { | 90 | Rectangle { | ||
100 | color: myPalette.base | 91 | color: myPalette.base | ||
101 | 92 | | |||
102 | Layout.fillHeight: true | 93 | Layout.fillHeight: true | ||
Show All 26 Lines | 115 | delegate: GridBrowserDelegate { | |||
129 | 120 | | |||
130 | mainText: model.display | 121 | mainText: model.display | ||
131 | secondaryText: model.secondaryText | 122 | secondaryText: model.secondaryText | ||
132 | imageUrl: model.imageUrl | 123 | imageUrl: model.imageUrl | ||
133 | shadowForImage: model.shadowForImage | 124 | shadowForImage: model.shadowForImage | ||
134 | containerData: model.containerData | 125 | containerData: model.containerData | ||
135 | delegateDisplaySecondaryText: gridView.delegateDisplaySecondaryText | 126 | delegateDisplaySecondaryText: gridView.delegateDisplaySecondaryText | ||
136 | 127 | | |||
137 | onEnqueue: gridView.enqueue(data) | 128 | onEnqueue: contentModel.mediaPlayList.enqueue(data) | ||
138 | onReplaceAndPlay: gridView.replaceAndPlay(data) | 129 | onReplaceAndPlay: contentModel.mediaPlayList.replaceAndPlay(data) | ||
139 | onOpen: gridView.open(model.display, model.secondaryText, model.imageUrl, model.databaseId) | 130 | onOpen: gridView.open(model.display, model.secondaryText, model.imageUrl, model.databaseId) | ||
140 | onSelected: { | 131 | onSelected: { | ||
141 | forceActiveFocus() | 132 | forceActiveFocus() | ||
142 | contentDirectoryView.currentIndex = model.index | 133 | contentDirectoryView.currentIndex = model.index | ||
143 | } | 134 | } | ||
144 | } | 135 | } | ||
145 | } | 136 | } | ||
146 | } | 137 | } | ||
147 | } | 138 | } | ||
148 | } | 139 | } | ||
149 | } | 140 | } |