Changeset View
Changeset View
Standalone View
Standalone View
src/qml/NavigationActionBar.qml
Show All 24 Lines | 24 | ColumnLayout { | |||
---|---|---|---|---|---|
25 | id: navigationBar | 25 | id: navigationBar | ||
26 | 26 | | |||
27 | spacing: 0 | 27 | spacing: 0 | ||
28 | 28 | | |||
29 | property string mainTitle | 29 | property string mainTitle | ||
30 | property string secondaryTitle | 30 | property string secondaryTitle | ||
31 | property url image | 31 | property url image | ||
32 | property bool allowArtistNavigation: false | 32 | property bool allowArtistNavigation: false | ||
33 | property bool showEnqueueButton: true | ||||
34 | property bool showCreateRadioButton | ||||
33 | 35 | | |||
34 | property string labelText | 36 | property string labelText | ||
35 | property bool showRating: true | 37 | property bool showRating: true | ||
36 | property alias filterText: filterTextInput.text | 38 | property alias filterText: filterTextInput.text | ||
37 | property alias filterRating: ratingFilter.starRating | 39 | property alias filterRating: ratingFilter.starRating | ||
38 | property bool enableGoBack: true | 40 | property bool enableGoBack: true | ||
39 | property bool expandedFilterView | 41 | property bool expandedFilterView | ||
40 | property bool enableSorting: true | 42 | property bool enableSorting: true | ||
41 | property bool sortOrder | 43 | property bool sortOrder | ||
42 | 44 | | |||
43 | 45 | | |||
44 | signal enqueue(); | 46 | signal enqueue(); | ||
45 | signal replaceAndPlay(); | 47 | signal replaceAndPlay(); | ||
48 | signal createRadio(); | ||||
46 | signal goBack(); | 49 | signal goBack(); | ||
47 | signal showArtist(); | 50 | signal showArtist(); | ||
48 | signal sort(var order); | 51 | signal sort(var order); | ||
49 | 52 | | |||
50 | Action { | 53 | Action { | ||
51 | id: goPreviousAction | 54 | id: goPreviousAction | ||
52 | text: i18nc("navigate back in the views stack", "Back") | 55 | text: i18nc("navigate back in the views stack", "Back") | ||
53 | icon.name: (Qt.application.layoutDirection == Qt.RightToLeft) ? "go-next" : "go-previous" | 56 | icon.name: (Qt.application.layoutDirection == Qt.RightToLeft) ? "go-next" : "go-previous" | ||
Show All 11 Lines | |||||
65 | Action { | 68 | Action { | ||
66 | id: enqueueAction | 69 | id: enqueueAction | ||
67 | text: i18nc("Add current list to playlist", "Enqueue") | 70 | text: i18nc("Add current list to playlist", "Enqueue") | ||
68 | icon.name: "list-add" | 71 | icon.name: "list-add" | ||
69 | onTriggered: enqueue() | 72 | onTriggered: enqueue() | ||
70 | } | 73 | } | ||
71 | 74 | | |||
72 | Action { | 75 | Action { | ||
76 | id: createRadioAction | ||||
77 | text: i18nc("Create a new radio", "Create a radio") | ||||
78 | icon.name: "media-track-add-amarok" | ||||
79 | onTriggered: createRadio() | ||||
80 | } | ||||
81 | | ||||
82 | Action { | ||||
73 | id: showFilterAction | 83 | id: showFilterAction | ||
74 | text: !navigationBar.expandedFilterView ? i18nc("Show filters in the navigation bar", "Show Search Options") : i18nc("Hide filters in the navigation bar", "Hide Search Options") | 84 | text: !navigationBar.expandedFilterView ? i18nc("Show filters in the navigation bar", "Show Search Options") : i18nc("Hide filters in the navigation bar", "Hide Search Options") | ||
75 | icon.name: 'search' | 85 | icon.name: 'search' | ||
76 | checkable: true | 86 | checkable: true | ||
77 | checked: expandedFilterView | 87 | checked: expandedFilterView | ||
78 | onTriggered: persistentSettings.expandedFilterView = !persistentSettings.expandedFilterView | 88 | onTriggered: persistentSettings.expandedFilterView = !persistentSettings.expandedFilterView | ||
79 | } | 89 | } | ||
80 | 90 | | |||
▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Line(s) | 160 | LabelWithToolTip { | |||
156 | text: secondaryTitle | 166 | text: secondaryTitle | ||
157 | font.pointSize: elisaTheme.defaultFontPointSize | 167 | font.pointSize: elisaTheme.defaultFontPointSize | ||
158 | elide: Text.ElideRight | 168 | elide: Text.ElideRight | ||
159 | 169 | | |||
160 | visible: secondaryTitle !== "" | 170 | visible: secondaryTitle !== "" | ||
161 | } | 171 | } | ||
162 | }, | 172 | }, | ||
163 | FlatButtonWithToolTip { | 173 | FlatButtonWithToolTip { | ||
174 | action: createRadioAction | ||||
175 | objectName: 'createRadioButton' | ||||
176 | | ||||
177 | icon.height: elisaTheme.smallControlButtonSize | ||||
178 | icon.width: elisaTheme.smallControlButtonSize | ||||
179 | | ||||
180 | focus: true | ||||
181 | | ||||
182 | visible: showCreateRadioButton | ||||
183 | }, | ||||
184 | FlatButtonWithToolTip { | ||||
164 | action: enqueueAction | 185 | action: enqueueAction | ||
165 | objectName: 'enqueueButton' | 186 | objectName: 'enqueueButton' | ||
166 | 187 | | |||
167 | icon.height: elisaTheme.smallControlButtonSize | 188 | icon.height: elisaTheme.smallControlButtonSize | ||
168 | icon.width: elisaTheme.smallControlButtonSize | 189 | icon.width: elisaTheme.smallControlButtonSize | ||
169 | 190 | | |||
170 | focus: true | 191 | focus: true | ||
192 | | ||||
193 | visible: !showCreateRadioButton | ||||
171 | }, | 194 | }, | ||
172 | FlatButtonWithToolTip { | 195 | FlatButtonWithToolTip { | ||
173 | action: replaceAndPlayAction | 196 | action: replaceAndPlayAction | ||
174 | objectName: 'replaceAndPlayButton' | 197 | objectName: 'replaceAndPlayButton' | ||
175 | 198 | | |||
176 | icon.height: elisaTheme.smallControlButtonSize | 199 | icon.height: elisaTheme.smallControlButtonSize | ||
177 | icon.width: elisaTheme.smallControlButtonSize | 200 | icon.width: elisaTheme.smallControlButtonSize | ||
201 | | ||||
202 | visible: !showCreateRadioButton | ||||
178 | }, | 203 | }, | ||
179 | FlatButtonWithToolTip { | 204 | FlatButtonWithToolTip { | ||
180 | action: showArtistAction | 205 | action: showArtistAction | ||
181 | objectName: 'showArtistButton' | 206 | objectName: 'showArtistButton' | ||
182 | 207 | | |||
183 | icon.height: elisaTheme.smallControlButtonSize | 208 | icon.height: elisaTheme.smallControlButtonSize | ||
184 | icon.width: elisaTheme.smallControlButtonSize | 209 | icon.width: elisaTheme.smallControlButtonSize | ||
185 | 210 | | |||
186 | visible: allowArtistNavigation | 211 | visible: allowArtistNavigation && !showCreateRadioButton | ||
187 | }, | 212 | }, | ||
188 | FlatButtonWithToolTip { | 213 | FlatButtonWithToolTip { | ||
189 | action: sortAction | 214 | action: sortAction | ||
190 | objectName: 'sortAscendingButton' | 215 | objectName: 'sortAscendingButton' | ||
191 | 216 | | |||
192 | icon.height: elisaTheme.smallControlButtonSize | 217 | icon.height: elisaTheme.smallControlButtonSize | ||
193 | icon.width: elisaTheme.smallControlButtonSize | 218 | icon.width: elisaTheme.smallControlButtonSize | ||
194 | 219 | | |||
195 | visible: enableSorting | 220 | visible: enableSorting && !showCreateRadioButton | ||
196 | }, | 221 | }, | ||
197 | FlatButtonWithToolTip { | 222 | FlatButtonWithToolTip { | ||
198 | action: showFilterAction | 223 | action: showFilterAction | ||
199 | objectName: 'showFilterButton' | 224 | objectName: 'showFilterButton' | ||
200 | 225 | | |||
201 | icon.height: elisaTheme.smallControlButtonSize | 226 | icon.height: elisaTheme.smallControlButtonSize | ||
202 | icon.width: elisaTheme.smallControlButtonSize | 227 | icon.width: elisaTheme.smallControlButtonSize | ||
228 | | ||||
229 | visible: !showCreateRadioButton | ||||
203 | } | 230 | } | ||
204 | ] | 231 | ] | ||
205 | } | 232 | } | ||
206 | 233 | | |||
207 | HeaderFooterToolbar { | 234 | HeaderFooterToolbar { | ||
208 | type: "header" | 235 | type: "header" | ||
209 | id: filterRow | 236 | id: filterRow | ||
210 | 237 | | |||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |