Commit 283328fb authored by kempe's avatar kempe

Added setting to select player layout

parent daa0206d
...@@ -65,7 +65,8 @@ DISTFILES += \ ...@@ -65,7 +65,8 @@ DISTFILES += \
qml/components/audioplayer/SleepTimerSwitch.qml \ qml/components/audioplayer/SleepTimerSwitch.qml \
qml/components/sleeptimer/SleepTimerDialogForm.ui.qml \ qml/components/sleeptimer/SleepTimerDialogForm.ui.qml \
qml/components/sleeptimer/SleepTimerDialog.qml \ qml/components/sleeptimer/SleepTimerDialog.qml \
qml/components/sleeptimer/SleepTimer.qml qml/components/sleeptimer/SleepTimer.qml \
qml/components/listmodels/PlayerLayoutListModel.qml
OTHER_FILES += \ OTHER_FILES += \
rpm/harbour-received.changes.in \ rpm/harbour-received.changes.in \
......
import QtQuick 2.0
ListModel {
id: model
ListElement { title: qsTr("Original player"); fileName: "DockedAudioPlayer" }
ListElement { title: qsTr("Smal player"); fileName: "DockedAudioPlayerSmal" }
}
...@@ -18,6 +18,11 @@ SettingsPageForm { ...@@ -18,6 +18,11 @@ SettingsPageForm {
radioAPI.setApiBaseUrl() radioAPI.setApiBaseUrl()
} }
onPlayerLayoutChanged: {
settings.setValue("playerLayout", fileName)
console.log("Changing layout to", fileName)
}
Component.onCompleted: { Component.onCompleted: {
for (var i = 0; i < apiLanguageModel.count; i++) { for (var i = 0; i < apiLanguageModel.count; i++) {
var item = apiLanguageModel.get(i) var item = apiLanguageModel.get(i)
......
...@@ -6,6 +6,7 @@ Page { ...@@ -6,6 +6,7 @@ Page {
id: settingsPage id: settingsPage
signal apiLanguageChanged(string title, string url) signal apiLanguageChanged(string title, string url)
signal playerLayoutChanged(string fileName)
property alias aboutAction: aboutAction property alias aboutAction: aboutAction
property alias buttonResetDb: buttonResetDb property alias buttonResetDb: buttonResetDb
...@@ -39,6 +40,36 @@ Page { ...@@ -39,6 +40,36 @@ Page {
title: qsTr("Settings") title: qsTr("Settings")
} }
SectionHeader {
text: qsTr("Basic Options")
}
ComboBox {
id: playerLayoutComboBox
label: qsTr("Player layout")
menu: ContextMenu {
id: playerLayoutComboBoxMenu
Repeater {
model: PlayerLayoutListModel { id: playerLayoutModel }
MenuItem {
id: playerLayout
text: model.title
Connections {
target: playerLayout
onClicked: playerLayoutChanged(model.fileName)
}
}
}
}
}
SectionHeader {
text: qsTr("API Options")
}
ComboBox { ComboBox {
id: apiLanguageComboBox id: apiLanguageComboBox
label: qsTr("API Language:") label: qsTr("API Language:")
......
...@@ -184,6 +184,17 @@ ...@@ -184,6 +184,17 @@
<translation>Buscar</translation> <translation>Buscar</translation>
</message> </message>
</context> </context>
<context>
<name>PlayerLayoutListModel</name>
<message>
<source>Original player</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Smal player</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>SettingsPage</name> <name>SettingsPage</name>
<message> <message>
...@@ -229,6 +240,18 @@ ...@@ -229,6 +240,18 @@
<source>&lt;p&gt;&lt;b&gt;API Language:&lt;/b&gt; Sets the endpoint to be used for API calls e.g. rad.io for English and radio.de for German&lt;/p&gt;</source> <source>&lt;p&gt;&lt;b&gt;API Language:&lt;/b&gt; Sets the endpoint to be used for API calls e.g. rad.io for English and radio.de for German&lt;/p&gt;</source>
<translation>&lt;p&gt;&lt;b&gt;Idioma API:&lt;/b&gt; Especifica el endpoint usado en las llamadas API, p.e. rad.io para inglés y radio.de para alemán&lt;/p&gt;</translation> <translation>&lt;p&gt;&lt;b&gt;Idioma API:&lt;/b&gt; Especifica el endpoint usado en las llamadas API, p.e. rad.io para inglés y radio.de para alemán&lt;/p&gt;</translation>
</message> </message>
<message>
<source>Player layout</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>API Options</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Basic Options</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>StationsListContextMenu</name> <name>StationsListContextMenu</name>
......
...@@ -184,6 +184,17 @@ ...@@ -184,6 +184,17 @@
<translation>Sök</translation> <translation>Sök</translation>
</message> </message>
</context> </context>
<context>
<name>PlayerLayoutListModel</name>
<message>
<source>Original player</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Smal player</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>SettingsPage</name> <name>SettingsPage</name>
<message> <message>
...@@ -229,6 +240,18 @@ ...@@ -229,6 +240,18 @@
<source>&lt;p&gt;&lt;b&gt;API Language:&lt;/b&gt; Sets the endpoint to be used for API calls e.g. rad.io for English and radio.de for German&lt;/p&gt;</source> <source>&lt;p&gt;&lt;b&gt;API Language:&lt;/b&gt; Sets the endpoint to be used for API calls e.g. rad.io for English and radio.de for German&lt;/p&gt;</source>
<translation>&lt;p&gt;&lt;b&gt;API språk:&lt;/b&gt; Bestämmer vilken domän som ska användas vid API anrop, t.ex. rad.io för engelska och radio.de för tyska&lt;/p&gt;</translation> <translation>&lt;p&gt;&lt;b&gt;API språk:&lt;/b&gt; Bestämmer vilken domän som ska användas vid API anrop, t.ex. rad.io för engelska och radio.de för tyska&lt;/p&gt;</translation>
</message> </message>
<message>
<source>Player layout</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>API Options</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Basic Options</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>StationsListContextMenu</name> <name>StationsListContextMenu</name>
......
...@@ -184,6 +184,17 @@ ...@@ -184,6 +184,17 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>PlayerLayoutListModel</name>
<message>
<source>Original player</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Smal player</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>SettingsPage</name> <name>SettingsPage</name>
<message> <message>
...@@ -229,6 +240,18 @@ ...@@ -229,6 +240,18 @@
<source>&lt;p&gt;&lt;b&gt;API Language:&lt;/b&gt; Sets the endpoint to be used for API calls e.g. rad.io for English and radio.de for German&lt;/p&gt;</source> <source>&lt;p&gt;&lt;b&gt;API Language:&lt;/b&gt; Sets the endpoint to be used for API calls e.g. rad.io for English and radio.de for German&lt;/p&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Player layout</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>API Options</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Basic Options</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>StationsListContextMenu</name> <name>StationsListContextMenu</name>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment