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.
134 lines
2.8 KiB
134 lines
2.8 KiB
3 years ago
|
import QtQuick 2.0
|
||
|
import QtQuick.Controls 2.13
|
||
|
import QtGraphicalEffects 1.13
|
||
|
|
||
|
import "qrc:/const"
|
||
|
|
||
|
Item {
|
||
|
id: control
|
||
|
|
||
|
property var longBut: 70 //Const.macroButton
|
||
|
property var shortBut: 32 //Const.microButton
|
||
|
property var margin: 10 //Const.margin
|
||
|
|
||
|
property alias leftDown: leftBut.down
|
||
|
property alias rightDown: rightBut.down
|
||
|
property alias topDown: topBut.down
|
||
|
property alias bottomDown: bottomBut.down
|
||
|
|
||
|
property alias topLeftDown: topLeftBut.down
|
||
|
property alias topRightDown: topRightBut.down
|
||
|
property alias bottomLeftDown: bottomLeftBut.down
|
||
|
property alias bottomRightDown: bottomRightBut.down
|
||
|
|
||
|
property var leftColor
|
||
|
property var rightColor
|
||
|
property var topColor
|
||
|
property var bottomColor
|
||
|
|
||
|
property var topLeftColor
|
||
|
property var topRightColor
|
||
|
property var bottomLeftColor
|
||
|
property var bottomRightColor
|
||
|
|
||
|
width: longBut + shortBut + 2 * margin
|
||
|
height: width
|
||
|
|
||
|
|
||
|
NeuButton {
|
||
|
enabled: false
|
||
|
anchors.centerIn: parent
|
||
|
width: longBut + shortBut + 2 * margin + 115
|
||
|
height: width
|
||
|
}
|
||
|
|
||
|
LightRing {
|
||
|
colorMode: 0
|
||
|
anchors.centerIn: parent
|
||
|
width: longBut + shortBut - margin
|
||
|
height: width
|
||
|
thickness: 10
|
||
|
}
|
||
|
|
||
|
NeuLight {
|
||
|
id: leftBut
|
||
|
anchors.right: parent.left
|
||
|
anchors.verticalCenter: parent.verticalCenter
|
||
|
implicitWidth: shortBut
|
||
|
implicitHeight: longBut
|
||
|
colorMode: leftColor
|
||
|
visibleGlow: false
|
||
|
}
|
||
|
|
||
|
NeuLight {
|
||
|
id: rightBut
|
||
|
anchors.left: parent.right
|
||
|
anchors.verticalCenter: parent.verticalCenter
|
||
|
implicitWidth: shortBut
|
||
|
implicitHeight: longBut
|
||
|
colorMode: rightColor
|
||
|
visibleGlow: false
|
||
|
}
|
||
|
|
||
|
NeuLight {
|
||
|
id: topBut
|
||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||
|
anchors.bottom: parent.top
|
||
|
implicitWidth: longBut
|
||
|
implicitHeight: shortBut
|
||
|
colorMode: topColor
|
||
|
visibleGlow: false
|
||
|
}
|
||
|
|
||
|
NeuLight {
|
||
|
id: bottomBut
|
||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||
|
anchors.top: parent.bottom
|
||
|
implicitWidth: longBut
|
||
|
implicitHeight: shortBut
|
||
|
colorMode: bottomColor
|
||
|
visibleGlow: false
|
||
|
}
|
||
|
|
||
|
NeuLight {
|
||
|
id: topLeftBut
|
||
|
anchors.verticalCenter: parent.top
|
||
|
anchors.horizontalCenter: parent.left
|
||
|
implicitWidth: shortBut
|
||
|
implicitHeight: shortBut
|
||
|
colorMode: topLeftColor
|
||
|
visibleGlow: false
|
||
|
}
|
||
|
|
||
|
NeuLight {
|
||
|
id: topRightBut
|
||
|
anchors.verticalCenter: parent.top
|
||
|
anchors.horizontalCenter: parent.right
|
||
|
implicitWidth: shortBut
|
||
|
implicitHeight: shortBut
|
||
|
colorMode: topRightColor
|
||
|
visibleGlow: false
|
||
|
}
|
||
|
|
||
|
NeuLight {
|
||
|
id: bottomLeftBut
|
||
|
anchors.verticalCenter: parent.bottom
|
||
|
anchors.horizontalCenter: parent.left
|
||
|
implicitWidth: shortBut
|
||
|
implicitHeight: shortBut
|
||
|
colorMode: bottomLeftColor
|
||
|
visibleGlow: false
|
||
|
}
|
||
|
|
||
|
NeuLight {
|
||
|
id: bottomRightBut
|
||
|
anchors.verticalCenter: parent.bottom
|
||
|
anchors.horizontalCenter: parent.right
|
||
|
implicitWidth: shortBut
|
||
|
implicitHeight: shortBut
|
||
|
colorMode: bottomRightColor
|
||
|
visibleGlow: false
|
||
|
}
|
||
|
}
|
||
|
|