Add master sliders
This commit is contained in:
@ -32,6 +32,7 @@ qt_add_qml_module(applightcontrol
|
|||||||
DeviceTypesSettingsPage.qml
|
DeviceTypesSettingsPage.qml
|
||||||
DevicesSettingsPage.qml
|
DevicesSettingsPage.qml
|
||||||
Vector3DField.qml
|
Vector3DField.qml
|
||||||
|
DmxSlider.qml
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(applightcontrol PROPERTIES
|
set_target_properties(applightcontrol PROPERTIES
|
||||||
|
8
DmxSlider.qml
Normal file
8
DmxSlider.qml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import QtQuick.Controls.Material
|
||||||
|
|
||||||
|
Slider {
|
||||||
|
from: 0
|
||||||
|
to: 255
|
||||||
|
snapMode: Slider.SnapAlways
|
||||||
|
stepSize: 1
|
||||||
|
}
|
131
HomePage.qml
131
HomePage.qml
@ -4,13 +4,104 @@ import QtQuick.Layouts
|
|||||||
|
|
||||||
import com.büro 1.0
|
import com.büro 1.0
|
||||||
|
|
||||||
RowLayout {
|
Item {
|
||||||
Item {
|
id: homePage
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
|
|
||||||
Flow {
|
property alias masterDimmer: masterDimmer.value
|
||||||
anchors.fill: parent
|
property alias masterRed: masterRed.value
|
||||||
|
property alias masterGreen: masterGreen.value
|
||||||
|
property alias masterBlue: masterBlue.value
|
||||||
|
property alias masterWhite: masterWhite.value
|
||||||
|
|
||||||
|
Button {
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.right: parent.right
|
||||||
|
width: 100
|
||||||
|
height: 100
|
||||||
|
|
||||||
|
text: qsTr('Settings')
|
||||||
|
|
||||||
|
onClicked: stackview.push(settingsPage)
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: settingsPage
|
||||||
|
|
||||||
|
SettingsPage {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
GridLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
columns: 2
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("Alle Dimmer:")
|
||||||
|
}
|
||||||
|
|
||||||
|
DmxSlider {
|
||||||
|
id: masterDimmer
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("Alle Rot:")
|
||||||
|
}
|
||||||
|
|
||||||
|
DmxSlider {
|
||||||
|
id: masterRed
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("Alle Grün:")
|
||||||
|
}
|
||||||
|
|
||||||
|
DmxSlider {
|
||||||
|
id: masterGreen
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("Alle Blau:")
|
||||||
|
}
|
||||||
|
|
||||||
|
DmxSlider {
|
||||||
|
id: masterBlue
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("Alle Weiß:")
|
||||||
|
}
|
||||||
|
|
||||||
|
DmxSlider {
|
||||||
|
id: masterWhite
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
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
|
spacing: 5
|
||||||
|
|
||||||
@ -20,33 +111,11 @@ RowLayout {
|
|||||||
delegate: LightSliderPane {
|
delegate: LightSliderPane {
|
||||||
light: model
|
light: model
|
||||||
|
|
||||||
height: 250
|
//Layout.fillHeight: true
|
||||||
|
|
||||||
|
height: theFlow.height
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
Layout.preferredWidth: 100
|
|
||||||
Layout.fillHeight: true
|
|
||||||
|
|
||||||
Button {
|
|
||||||
Layout.preferredHeight: 100
|
|
||||||
|
|
||||||
text: qsTr('Settings')
|
|
||||||
|
|
||||||
onClicked: stackview.push(settingsPage)
|
|
||||||
|
|
||||||
Component {
|
|
||||||
id: settingsPage
|
|
||||||
|
|
||||||
SettingsPage {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
Layout.fillHeight: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,8 @@ ApplicationWindow {
|
|||||||
|
|
||||||
Material.elevation: 6
|
Material.elevation: 6
|
||||||
|
|
||||||
|
z: 999
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
@ -6,14 +6,12 @@ import QtQuick.VirtualKeyboard
|
|||||||
|
|
||||||
import com.büro 1.0
|
import com.büro 1.0
|
||||||
|
|
||||||
|
|
||||||
Pane {
|
Pane {
|
||||||
property variant light
|
property variant light
|
||||||
|
|
||||||
Material.elevation: 6
|
Material.elevation: 6
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@ -43,19 +41,35 @@ Pane {
|
|||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
Slider {
|
DmxSlider {
|
||||||
id: slider
|
id: slider
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
||||||
orientation: Qt.Vertical
|
orientation: Qt.Vertical
|
||||||
from: 0
|
|
||||||
to: 255
|
|
||||||
|
|
||||||
snapMode: Slider.SnapAlways
|
|
||||||
stepSize: 1
|
|
||||||
|
|
||||||
onValueChanged: __controller.setChannel(registerAddress, value)
|
onValueChanged: __controller.setChannel(registerAddress, value)
|
||||||
|
|
||||||
|
Binding on value {
|
||||||
|
value: homePage.masterDimmer
|
||||||
|
when: model.registerType === DeviceTypeRegisterType.Dimmer
|
||||||
|
}
|
||||||
|
Binding on value {
|
||||||
|
value: homePage.masterRed
|
||||||
|
when: model.registerType === DeviceTypeRegisterType.Red
|
||||||
|
}
|
||||||
|
Binding on value {
|
||||||
|
value: homePage.masterGreen
|
||||||
|
when: model.registerType === DeviceTypeRegisterType.Green
|
||||||
|
}
|
||||||
|
Binding on value {
|
||||||
|
value: homePage.masterBlue
|
||||||
|
when: model.registerType === DeviceTypeRegisterType.Blue
|
||||||
|
}
|
||||||
|
Binding on value {
|
||||||
|
value: homePage.masterWhite
|
||||||
|
when: model.registerType === DeviceTypeRegisterType.White
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
@ -31,25 +31,48 @@ DmxController::DmxController(QObject *parent) :
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
.id=2,
|
.id=2,
|
||||||
.name="RGB Strahler"
|
.name="RGB Strahler",
|
||||||
|
.registers {
|
||||||
|
DeviceTypeRegisterConfig { .type = DeviceTypeRegisterType::Red },
|
||||||
|
DeviceTypeRegisterConfig { .type = DeviceTypeRegisterType::Green },
|
||||||
|
DeviceTypeRegisterConfig { .type = DeviceTypeRegisterType::Blue }
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.id=3,
|
.id=3,
|
||||||
.name="Nebelmaschine"
|
.name="Nebelmaschine",
|
||||||
|
.registers {
|
||||||
|
DeviceTypeRegisterConfig { .type = DeviceTypeRegisterType::Dimmer }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
.devices {
|
.devices {
|
||||||
{ .id=0, .name="Lampe 1", .deviceTypeId=1, .address=32, .position{1,0,0} },
|
{ .id=0, .name="Test 1", .deviceTypeId=1, .address=32, .position{1,0,0} },
|
||||||
{ .id=1, .name="Lampe 2", .deviceTypeId=1, .address=0, .position{2,0,0} },
|
{ .id=1, .name="Lampe 1", .deviceTypeId=2, .address=1, .position{2,0,0} },
|
||||||
{ .id=2, .name="Lampe 3", .deviceTypeId=1, .address=7, .position{3,0,0} },
|
{ .id=1, .name="Lampe 2", .deviceTypeId=2, .address=4, .position{2,0,0} },
|
||||||
{ .id=3, .name="Lampe 4", .deviceTypeId=1, .address=14 },
|
{ .id=2, .name="Lampe 3", .deviceTypeId=2, .address=7, .position{3,0,0} },
|
||||||
{ .id=4, .name="Moving Head 1", .deviceTypeId=0, .address=40 },
|
{ .id=3, .name="Lampe 4", .deviceTypeId=2, .address=10 },
|
||||||
{ .id=5, .name="Moving Head 2", .deviceTypeId=0, .address=43 },
|
{ .id=4, .name="Lampe 5", .deviceTypeId=2, .address=13 },
|
||||||
{ .id=6, .name="Moving Head 3", .deviceTypeId=0, .address=46 },
|
{ .id=5, .name="Lampe 6", .deviceTypeId=2, .address=16 },
|
||||||
{ .id=7, .name="Moving Head 4", .deviceTypeId=0, .address=49 },
|
{ .id=6, .name="Lampe 7", .deviceTypeId=2, .address=19 },
|
||||||
{ .id=8, .name="Test 1", .deviceTypeId=2, .address=70 },
|
{ .id=7, .name="Lampe 8", .deviceTypeId=2, .address=22 },
|
||||||
{ .id=9, .name="Test 2", .deviceTypeId=2, .address=72 },
|
{ .id=8, .name="Lampe 9", .deviceTypeId=2, .address=25 },
|
||||||
{ .id=10, .name="Nebelmaschine", .deviceTypeId=3, .address=80 }
|
{ .id=9, .name="Lampe 10", .deviceTypeId=2, .address=28 },
|
||||||
|
{ .id=1, .name="Lampe 11", .deviceTypeId=2, .address=31 },
|
||||||
|
{ .id=1, .name="Lampe 12", .deviceTypeId=2, .address=34 },
|
||||||
|
{ .id=2, .name="Lampe 13", .deviceTypeId=2, .address=37 },
|
||||||
|
{ .id=3, .name="Lampe 14", .deviceTypeId=2, .address=40 },
|
||||||
|
{ .id=4, .name="Lampe 15", .deviceTypeId=2, .address=43 },
|
||||||
|
{ .id=5, .name="Lampe 16", .deviceTypeId=2, .address=46 },
|
||||||
|
{ .id=6, .name="Lampe 17", .deviceTypeId=2, .address=49 },
|
||||||
|
{ .id=7, .name="Lampe 18", .deviceTypeId=2, .address=52 },
|
||||||
|
{ .id=8, .name="Lampe 19", .deviceTypeId=2, .address=55 },
|
||||||
|
{ .id=9, .name="Lampe 20", .deviceTypeId=2, .address=58 },
|
||||||
|
{ .id=10, .name="Nebelmaschine", .deviceTypeId=3, .address=90 },
|
||||||
|
{ .id=11, .name="Moving Head 1", .deviceTypeId=0, .address=40 },
|
||||||
|
{ .id=12, .name="Moving Head 2", .deviceTypeId=0, .address=43 },
|
||||||
|
{ .id=13, .name="Moving Head 3", .deviceTypeId=0, .address=46 },
|
||||||
|
{ .id=14, .name="Moving Head 4", .deviceTypeId=0, .address=49 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -1 +1,12 @@
|
|||||||
#include "lightproject.h"
|
#include "lightproject.h"
|
||||||
|
|
||||||
|
#include <QCoreApplication>
|
||||||
|
#include <QQmlEngine>
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
void registerDenShit()
|
||||||
|
{
|
||||||
|
qmlRegisterUncreatableMetaObject(hilfe::staticMetaObject, "com.büro", 1, 0, "DeviceTypeRegisterType", "lass es du depp");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Q_COREAPP_STARTUP_FUNCTION(registerDenShit)
|
||||||
|
Reference in New Issue
Block a user