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