From 3d2614498be2de804e86d73527be5e26e88d3b7b Mon Sep 17 00:00:00 2001 From: Sam Gateau Date: Mon, 4 Mar 2019 18:07:02 -0800 Subject: [PATCH] ANd fuck --- .../developer/utilities/lib/prop/PropBool.qml | 35 +++++++ .../utilities/lib/prop/PropGroup.qml | 60 ++++++++++++ .../utilities/lib/prop/style/Global.qml | 44 +++++++++ .../utilities/lib/prop/style/PiComboBox.qml | 98 +++++++++++++++++++ .../utilities/lib/prop/style/PiLabel.qml | 25 +++++ .../utilities/lib/prop/style/PiSplitter.qml | 21 ++++ .../utilities/lib/prop/style/PiText.qml | 24 +++++ 7 files changed, 307 insertions(+) create mode 100644 scripts/developer/utilities/lib/prop/PropBool.qml create mode 100644 scripts/developer/utilities/lib/prop/PropGroup.qml create mode 100644 scripts/developer/utilities/lib/prop/style/Global.qml create mode 100644 scripts/developer/utilities/lib/prop/style/PiComboBox.qml create mode 100644 scripts/developer/utilities/lib/prop/style/PiLabel.qml create mode 100644 scripts/developer/utilities/lib/prop/style/PiSplitter.qml create mode 100644 scripts/developer/utilities/lib/prop/style/PiText.qml diff --git a/scripts/developer/utilities/lib/prop/PropBool.qml b/scripts/developer/utilities/lib/prop/PropBool.qml new file mode 100644 index 0000000000..e355398375 --- /dev/null +++ b/scripts/developer/utilities/lib/prop/PropBool.qml @@ -0,0 +1,35 @@ +// +// PropBool.qml +// +// Created by Sam Gateau on 3/2/2019 +// Copyright 2019 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.7 +import controlsUit 1.0 as HifiControls + +PropItem { + Global { id: global } + id: root + + property alias valueVar : checkboxControl.checked + + Component.onCompleted: { + valueVar = root.valueVarGetter(); + } + + HifiControls.CheckBox { + id: checkboxControl + + anchors.left: root.splitter.right + anchors.verticalCenter: root.verticalCenter + width: root.width * global.valueAreaWidthScale + height: global.slimHeight + + checked: root.valueVar + onCheckedChanged: { root.valueVarSetter(checked); } + } +} \ No newline at end of file diff --git a/scripts/developer/utilities/lib/prop/PropGroup.qml b/scripts/developer/utilities/lib/prop/PropGroup.qml new file mode 100644 index 0000000000..39294743b6 --- /dev/null +++ b/scripts/developer/utilities/lib/prop/PropGroup.qml @@ -0,0 +1,60 @@ +// +// PropGroup.qml +// +// Created by Sam Gateau on 3/2/2019 +// Copyright 2019 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html +// + +import QtQuick 2.7 + +Item { + Global { id: global } + id: root + + // Prop Group is designed to author an array of ProItems, they are defined with an array of the tuplets describing each individual item: + // [ ..., PropItemInfo, ...] + // PropItemInfo { + // "type": "PropXXXX", "object": object, "property": "propName" + // } + // + property var propItems: [] + + + property var label: "group" + + Column { + id: column + anchors.left: parent.left + anchors.right: parent.right + + PropLabel { + anchors.left: parent.left + anchors.right: parent.right + text: root.label + } + + + Component.onCompleted: { + var component = Qt.createComponent("PropBool.qml"); + component.label = "Test"; + for (var i=0; i