2019-12-01 22:27:00 +03:00
|
|
|
import QtQuick 2.0
|
|
|
|
import Sailfish.Silica 1.0
|
2020-01-03 15:37:51 +03:00
|
|
|
import "../pages/utils.js" as Utils
|
2019-12-01 22:27:00 +03:00
|
|
|
|
|
|
|
Setting {
|
|
|
|
property var choices
|
|
|
|
|
|
|
|
ValueButton {
|
|
|
|
enabled: valid
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
label: prettyName
|
2020-01-03 15:37:51 +03:00
|
|
|
value: Utils.ippName(name, choice ? choice : default_choice)
|
2019-12-01 22:27:00 +03:00
|
|
|
onClicked: parent.clicked()
|
|
|
|
}
|
|
|
|
|
|
|
|
property var menu: ContextMenu {
|
|
|
|
id: menu
|
2020-02-17 21:58:46 +03:00
|
|
|
enabled: valid
|
2019-12-01 22:27:00 +03:00
|
|
|
Repeater {
|
|
|
|
model: choices
|
|
|
|
MenuItem {
|
2020-01-03 15:37:51 +03:00
|
|
|
text: Utils.ippName(name, choices[index])
|
2019-12-01 22:27:00 +03:00
|
|
|
onClicked:
|
|
|
|
{
|
|
|
|
choice = choices[index];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|