From d4bf033f4f16d811040ddb44a5bccc882e738c48 Mon Sep 17 00:00:00 2001 From: Be Date: Mon, 27 Sep 2021 14:54:14 -0500 Subject: move res/skins/QMLDemo to res/qml --- res/qml/HotcueButton.qml | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 res/qml/HotcueButton.qml (limited to 'res/qml/HotcueButton.qml') diff --git a/res/qml/HotcueButton.qml b/res/qml/HotcueButton.qml new file mode 100644 index 0000000000..4aa2d1a691 --- /dev/null +++ b/res/qml/HotcueButton.qml @@ -0,0 +1,51 @@ +import "." as Skin +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import "Theme" + +Skin.Button { + id: root + + property int hotcueNumber // required + property string group // required + + text: hotcueNumber + width: playButton.height + height: playButton.height + activeColor: hotcue.color + highlight: hotcue.isSet + + Hotcue { + id: hotcue + + group: root.group + hotcueNumber: root.hotcueNumber + activate: root.down + onIsSetChanged: { + if (!isSet) + popup.close(); + + } + } + + HotcuePopup { + id: popup + + hotcue: hotcue + } + + MouseArea { + id: mousearea + + anchors.fill: parent + acceptedButtons: Qt.RightButton + onClicked: { + if (hotcue.isSet) { + popup.x = mouse.x; + popup.y = mouse.y; + popup.open(); + } + } + } + +} -- cgit v1.2.3