forked from Sepanta/console-emulator
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.4 KiB
64 lines
1.4 KiB
3 years ago
|
import QtQuick 2.0
|
||
|
import QtQuick.Controls 2.13
|
||
|
import QtGraphicalEffects 1.13
|
||
|
|
||
|
import "qrc:/const"
|
||
|
|
||
|
ModeBg {
|
||
|
id: modeBackground
|
||
|
|
||
|
property var image: "qrc:/icons/topLeft/utils.png"
|
||
|
|
||
|
property var down: mainKnob.down
|
||
|
property var increase: incButton.down
|
||
|
property var decrease: decButton.down
|
||
|
|
||
|
property var led: 1
|
||
|
|
||
|
property var stepInc
|
||
|
property var stepDec
|
||
|
|
||
|
LightRing {
|
||
|
id: lightRing
|
||
|
colorMode: parent.led
|
||
|
anchors.verticalCenter: mainKnob.verticalCenter
|
||
|
anchors.horizontalCenter: mainKnob.horizontalCenter
|
||
|
width: Const.macroButton + 2 * thickness
|
||
|
indicator: true
|
||
|
}
|
||
|
|
||
|
Knob {
|
||
|
id: mainKnob
|
||
|
image: parent.image
|
||
|
x: Const.microButton / 2 + Const.margin
|
||
|
anchors.bottom: parent.bottom
|
||
|
anchors.bottomMargin: x
|
||
|
}
|
||
|
|
||
|
Knob {
|
||
|
id: decButton
|
||
|
anchors.verticalCenter: mainKnob.verticalCenter
|
||
|
anchors.right: mainKnob.left
|
||
|
anchors.rightMargin: Const.margin
|
||
|
implicitWidth: Const.microButton
|
||
|
implicitHeight: Const.microButton
|
||
|
onPressed: {
|
||
|
lightRing.timeFactor = - stepDec
|
||
|
lightRing.angle = lightRing.angle + Const.rotateStep * stepDec
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Knob {
|
||
|
id: incButton
|
||
|
anchors.verticalCenter: mainKnob.verticalCenter
|
||
|
anchors.left: mainKnob.right
|
||
|
anchors.leftMargin: Const.margin
|
||
|
implicitWidth: Const.microButton
|
||
|
implicitHeight: Const.microButton
|
||
|
onPressed: {
|
||
|
lightRing.timeFactor = stepInc
|
||
|
lightRing.angle = lightRing.angle + Const.rotateStep * stepInc
|
||
|
}
|
||
|
}
|
||
|
}
|