summaryrefslogtreecommitdiffstats
path: root/util/qt3d/assetviewer/qml/Widgets/ColorSelector.qml
diff options
context:
space:
mode:
authordpope <daniel.pope@nokia.com>2012-02-03 15:45:25 +1000
committerRohan McGovern <rohan.mcgovern@nokia.com>2012-02-10 07:24:48 +0100
commitbc66ec0bc5f548a72d21557d529f2d03c7417f09 (patch)
tree53aa0444fc698cde712fb8e0486e3da1a56f853d /util/qt3d/assetviewer/qml/Widgets/ColorSelector.qml
parent98451b5e136af38b00b008ae58ec8243c981eee4 (diff)
Deprecation of the qt/quick3d repository.HEADmaster
Change-Id: I271146636615ab16f79ad3e66985076e2bd7a95c Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
Diffstat (limited to 'util/qt3d/assetviewer/qml/Widgets/ColorSelector.qml')
-rw-r--r--util/qt3d/assetviewer/qml/Widgets/ColorSelector.qml72
1 files changed, 0 insertions, 72 deletions
diff --git a/util/qt3d/assetviewer/qml/Widgets/ColorSelector.qml b/util/qt3d/assetviewer/qml/Widgets/ColorSelector.qml
deleted file mode 100644
index a55a743f..00000000
--- a/util/qt3d/assetviewer/qml/Widgets/ColorSelector.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-import QtQuick 1.0
-
-Item {
- id: select
- property real sat: 1.0
- property real val: 1.0
- width: parent.width
- height: parent.height
-
- Binding {
- target: handle; property: "x"
- value: select.sat * select.width
- }
- Binding {
- target: select; property: "sat"
- value: handle.x/width
- }
-
- Binding {
- target: handle; property: "y"
- value: (1.0 - select.val) * select.height
- }
- Binding {
- target: select; property: "val"
- value: 1.0 - handle.y/height
- }
-
- Item {
- id: handle
- width: 20
- height: width
- x: 0.0; y: 0.0
-
- Rectangle {
- x: -width/2
- y: x
- width: parent.width-2
- height: width
- radius: width/2
-
- border.color: "white"
- color: "transparent"
- }
- Rectangle {
- x: -width/2
- y: x
- width: parent.width
- height: width
- radius: width/2
-
- border.width: 2
- border.color: "black"
- color: "transparent"
- }
- }
-
- MouseArea {
- anchors.fill: parent
- function mouseEvent(mouse) {
- if (mouse.buttons & Qt.LeftButton) {
- handle.x = Math.max(0, Math.min(height, mouse.x))
- handle.y = Math.max(0, Math.min(height, mouse.y))
- }
- }
- onPressed: mouseEvent(mouse);
- onPositionChanged: mouseEvent(mouse);
- hoverEnabled: true
- onEntered: handle.opacity = 0.5;
- onExited: { if (!pressed) handle.opacity = 1.0 }
- onReleased: { if (!containsMouse) handle.opacity = 1.0 }
- }
-}