harbour-seaprint/qml/components/ChoiceSetting.qml
Anton Thomasson 4526aedcc8 Disable unsupported settings
Make the GUI reflect that even the most basic printer settings may be
unavailable
2020-02-17 19:58:46 +01:00

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];
}
}
}
}
}