Add register groups settings page

This commit is contained in:
2023-02-18 16:09:51 +01:00
parent cafc79e3fb
commit 36990980a4
5 changed files with 96 additions and 33 deletions

View File

@ -34,6 +34,7 @@ qt_add_qml_module(applightcontrol
Vector3DField.qml
DmxSlider.qml
StatusBar.qml
RegisterGroupsSettingsPage.qml
)
set_target_properties(applightcontrol PROPERTIES

View File

@ -13,6 +13,8 @@ Item {
property alias masterBlue: masterBlue.value
property alias masterWhite: masterWhite.value
property bool needsRegler: true
Button {
anchors.top: parent.top
anchors.right: parent.right
@ -85,37 +87,4 @@ Item {
Layout.fillHeight: true
}
}
Flickable {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
height: 300
contentWidth: theFlow.width
contentHeight: theFlow.height
flickableDirection: Flickable.HorizontalFlick
RowLayout {
id: theFlow
height: parent.height
spacing: 5
Repeater {
model: devicesModel
delegate: LightSliderPane {
light: model
//Layout.fillHeight: true
height: theFlow.height
}
}
}
}
}

View File

@ -82,6 +82,77 @@ ApplicationWindow {
}
}
Flickable {
id: test
z: 98
x: 0
height: 300
y: window.height - height
width: window.width
property bool active: typeof stackview.currentItem.needsRegler == 'boolean' ? stackview.currentItem.needsRegler : false
states: State {
name: "invisible"
when: !test.active
PropertyChanges {
target: test
y: window.height
}
}
transitions: [
Transition {
from: "invisible"
to: ""
reversible: false
ParallelAnimation {
NumberAnimation {
properties: "y"
duration: 1000
easing.type: Easing.OutBounce
}
}
},
Transition {
from: ""
to: "invisible"
reversible: false
ParallelAnimation {
NumberAnimation {
properties: "y"
duration: 1000
easing.type: Easing.OutBounce
}
}
}
]
contentWidth: theFlow.width
contentHeight: theFlow.height
flickableDirection: Flickable.HorizontalFlick
RowLayout {
id: theFlow
height: parent.height
spacing: 5
Repeater {
model: devicesModel
delegate: LightSliderPane {
light: model
//Layout.fillHeight: true
height: theFlow.height
}
}
}
}
Button {
id: closeButton

View File

@ -0,0 +1,5 @@
import QtQuick
Item {
property bool needsRegler: true
}

View File

@ -43,5 +43,22 @@ Item {
}
}
}
Button {
id: button2
text: qsTr("Register\nGroups")
Layout.preferredWidth: 100
Layout.preferredHeight: 100
onClicked: stackview.push(registerGroupsSettingsPage)
Component {
id: registerGroupsSettingsPage
RegisterGroupsSettingsPage {
}
}
}
}
}