2019-12-01 22:27:00 +03:00
|
|
|
import QtQuick 2.0
|
|
|
|
import Sailfish.Silica 1.0
|
|
|
|
|
|
|
|
Item {
|
2020-11-23 22:57:02 +03:00
|
|
|
height: button.height + menu.height
|
2020-11-23 20:34:38 +03:00
|
|
|
width: parent.width
|
2019-12-01 22:27:00 +03:00
|
|
|
|
|
|
|
property string name
|
|
|
|
property string prettyName
|
|
|
|
property int tag
|
2020-06-16 20:51:29 +03:00
|
|
|
property bool valid: false
|
2019-12-01 22:27:00 +03:00
|
|
|
|
|
|
|
property var choice
|
|
|
|
property var default_choice
|
2020-11-23 22:29:59 +03:00
|
|
|
|
2019-12-01 22:27:00 +03:00
|
|
|
signal clicked()
|
2020-11-23 22:29:59 +03:00
|
|
|
onClicked: menu.open(this)
|
2019-12-01 22:27:00 +03:00
|
|
|
|
2020-11-23 22:57:02 +03:00
|
|
|
property alias displayValue: button.value
|
|
|
|
|
|
|
|
ValueButton {
|
|
|
|
id: button
|
|
|
|
enabled: valid
|
|
|
|
label: prettyName
|
|
|
|
onClicked: parent.clicked()
|
|
|
|
}
|
2019-12-01 22:27:00 +03:00
|
|
|
property var menu
|
|
|
|
|
|
|
|
}
|