diff --git a/CMakeLists.txt b/CMakeLists.txt index 28768e8..cb54a66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,7 @@ qt_add_qml_module(applightcontrol Vector3DField.qml DmxSlider.qml StatusBar.qml + RegisterGroupsSettingsPage.qml ) set_target_properties(applightcontrol PROPERTIES diff --git a/HomePage.qml b/HomePage.qml index 8086db3..88eeea7 100644 --- a/HomePage.qml +++ b/HomePage.qml @@ -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 - } - } - } - } } diff --git a/LightControlWindow.qml b/LightControlWindow.qml index 6b71455..70b8dbd 100644 --- a/LightControlWindow.qml +++ b/LightControlWindow.qml @@ -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 diff --git a/RegisterGroupsSettingsPage.qml b/RegisterGroupsSettingsPage.qml new file mode 100644 index 0000000..254d88b --- /dev/null +++ b/RegisterGroupsSettingsPage.qml @@ -0,0 +1,5 @@ +import QtQuick + +Item { + property bool needsRegler: true +} diff --git a/SettingsPage.qml b/SettingsPage.qml index f07f7a3..62b8ac7 100644 --- a/SettingsPage.qml +++ b/SettingsPage.qml @@ -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 { + } + } + } } }