4526aedcc8
Make the GUI reflect that even the most basic printer settings may be unavailable
33 lines
699 B
QML
33 lines
699 B
QML
import QtQuick 2.0
|
|
import Sailfish.Silica 1.0
|
|
import "../pages/utils.js" as Utils
|
|
|
|
Setting {
|
|
property var choices
|
|
|
|
ValueButton {
|
|
enabled: valid
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
label: prettyName
|
|
value: Utils.ippName(name, choice ? choice : default_choice)
|
|
onClicked: parent.clicked()
|
|
}
|
|
|
|
property var menu: ContextMenu {
|
|
id: menu
|
|
enabled: valid
|
|
Repeater {
|
|
model: choices
|
|
MenuItem {
|
|
text: Utils.ippName(name, choices[index])
|
|
onClicked:
|
|
{
|
|
choice = choices[index];
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|