2018-03-19 22:32:23 +00:00
|
|
|
import QtQuick 2.4
|
2017-12-15 15:42:36 +00:00
|
|
|
import "."
|
|
|
|
|
|
|
|
SettingControl {
|
|
|
|
id: root
|
|
|
|
property alias choices: popup.model
|
|
|
|
property alias displayRole: popup.displayRole
|
|
|
|
|
|
|
|
property alias selectedIndex: popup.currentIndex
|
|
|
|
property int defaultIndex: 0
|
|
|
|
|
|
|
|
// alias for save+restore
|
|
|
|
property alias value: popup.currentIndex
|
|
|
|
property alias defaultValue: root.defaultIndex
|
|
|
|
|
2018-06-22 11:09:35 +00:00
|
|
|
implicitHeight: popup.height + Style.margin + description.height
|
2017-12-15 15:42:36 +00:00
|
|
|
|
|
|
|
PopupChoice {
|
|
|
|
id: popup
|
|
|
|
label: root.label
|
|
|
|
enabled: root.enabled
|
|
|
|
width: root.width
|
|
|
|
}
|
|
|
|
|
|
|
|
SettingDescription {
|
|
|
|
id: description
|
|
|
|
enabled: root.enabled
|
|
|
|
text: root.description
|
|
|
|
anchors.top: popup.bottom
|
|
|
|
anchors.topMargin: Style.margin
|
|
|
|
width: root.width
|
|
|
|
}
|
2020-04-10 18:09:54 +00:00
|
|
|
|
|
|
|
function setValue(newValue)
|
|
|
|
{
|
|
|
|
popup.currentIndex = newValue;
|
|
|
|
}
|
2017-12-15 15:42:36 +00:00
|
|
|
}
|