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.
 
 
 
 

77 lines
1.7 KiB

import QtQuick 2.0
import QtQuick.Controls 2.13
import QtGraphicalEffects 1.13
import "qrc:/const"
ModeBgOption {
id: modeBackground
property var image: "qrc:/icons/topLeft/utils.png"
property var imageOption: "qrc:/icons/topLeft/utils.png"
property bool down: mainKnob.down
property bool increase: incButton.down
property bool decrease: decButton.down
property var led: 1
property var ledOption: 0
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
}
NeuImage {
id: option
image: parent.imageOption
anchors.right: parent.right
anchors.rightMargin: Const.microLightThickness
y: Const.microLightThickness
colorMode: parent.ledOption
implicitWidth: Const.microButton
implicitHeight: Const.microButton
}
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
}
}
}