92 lines
2.8 KiB
QML
92 lines
2.8 KiB
QML
import QtQuick 2.0
|
|
import QtQml 2.2
|
|
import Sailfish.Silica 1.0
|
|
import QtQuick.LocalStorage 2.0
|
|
import QtGraphicalEffects 1.0
|
|
import "../helpers/db.js" as Favorites
|
|
|
|
Dialog {
|
|
id: settingsDialog
|
|
|
|
Column {
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
spacing: Theme.paddingMedium
|
|
|
|
DialogHeader {}
|
|
|
|
Label {
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: Theme.paddingLarge
|
|
color: Theme.highlightColor
|
|
font.pixelSize: Theme.fontSizeLarge
|
|
text: qsTr("Player settings")
|
|
}
|
|
|
|
Separator {
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: Theme.paddingMedium
|
|
color: Theme.highlightColor
|
|
}
|
|
|
|
ComboBox {
|
|
id: appStart
|
|
width: parent.width
|
|
label: qsTr("Auto play")
|
|
anchors.margins: Theme.paddingLarge
|
|
description: qsTr("What to do when AllRadio2 starts")
|
|
currentIndex: Favorites.getSetting("appStart",0)
|
|
menu: ContextMenu {
|
|
MenuItem { text: qsTr("Off") }
|
|
MenuItem { text: qsTr("Last played") }
|
|
MenuItem { text: qsTr("Random favorite") }
|
|
}
|
|
}
|
|
Label {
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: Theme.paddingLarge
|
|
color: Theme.highlightColor
|
|
font.pixelSize: Theme.fontSizeLarge
|
|
text: qsTr("Server settings")
|
|
}
|
|
|
|
Separator {
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: Theme.paddingMedium
|
|
color: Theme.highlightColor
|
|
}
|
|
|
|
ComboBox {
|
|
id: serverL
|
|
width: parent.width
|
|
anchors.margins: Theme.paddingLarge
|
|
label: qsTr("Connected to")
|
|
description: qsTr("Available servers (just information, won't change server yet!)")
|
|
currentIndex: radioBrowser.serverIndex
|
|
menu : ContextMenu {
|
|
id: contextMenu
|
|
Repeater {
|
|
model: radioBrowser.serversModel
|
|
delegate: MenuItem {
|
|
text: server
|
|
onClicked: radioBrowser.connectServer(currentIndex)//{radioBrowser.server = serverUrl;radioBrowser.serverIndex=currentIndex;}//console.log("***"+serverUrl)
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/* menu: ContextMenu {
|
|
MenuItem { text: qsTr("None") }
|
|
MenuItem { text: qsTr("Last played") }
|
|
MenuItem { text: qsTr("Random favorite") }
|
|
}*/
|
|
}
|
|
}
|
|
|
|
onAccepted: Favorites.setSetting("appStart",appStart.currentIndex)
|
|
|
|
}
|
|
|