diff options
Diffstat (limited to 'util/qt3d/assetviewer/qml/Widgets')
-rw-r--r-- | util/qt3d/assetviewer/qml/Widgets/BlenderToggle.qml | 48 | ||||
-rw-r--r-- | util/qt3d/assetviewer/qml/Widgets/Checkered.qml | 27 | ||||
-rw-r--r-- | util/qt3d/assetviewer/qml/Widgets/ColorSelector.qml | 72 | ||||
-rw-r--r-- | util/qt3d/assetviewer/qml/Widgets/ColorWidget.qml | 37 | ||||
-rw-r--r-- | util/qt3d/assetviewer/qml/Widgets/HSVColor.qml | 15 | ||||
-rw-r--r-- | util/qt3d/assetviewer/qml/Widgets/InputBox.qml | 39 | ||||
-rw-r--r-- | util/qt3d/assetviewer/qml/Widgets/ModelViewportResize.qml | 30 | ||||
-rw-r--r-- | util/qt3d/assetviewer/qml/Widgets/SliderHandle.qml | 76 | ||||
-rw-r--r-- | util/qt3d/assetviewer/qml/Widgets/ZoomControls.qml | 41 | ||||
-rw-r--r-- | util/qt3d/assetviewer/qml/Widgets/images/grow.png | bin | 252 -> 0 bytes | |||
-rw-r--r-- | util/qt3d/assetviewer/qml/Widgets/images/shrink.png | bin | 249 -> 0 bytes | |||
-rw-r--r-- | util/qt3d/assetviewer/qml/Widgets/images/zoomin.png | bin | 187 -> 0 bytes | |||
-rw-r--r-- | util/qt3d/assetviewer/qml/Widgets/images/zoomout.png | bin | 155 -> 0 bytes |
13 files changed, 0 insertions, 385 deletions
diff --git a/util/qt3d/assetviewer/qml/Widgets/BlenderToggle.qml b/util/qt3d/assetviewer/qml/Widgets/BlenderToggle.qml deleted file mode 100644 index a9258fc8..00000000 --- a/util/qt3d/assetviewer/qml/Widgets/BlenderToggle.qml +++ /dev/null @@ -1,48 +0,0 @@ -import QtQuick 1.0 -import Qt3D 1.0 -import AssetViewer 1.0 - -Rectangle { - anchors.topMargin: 15 - anchors.leftMargin: 15 - border.width: 1 - border.color: "#191919" - radius: 8 - height: 20 - color: "#999999" - - property alias buttonText: text.text - property alias imageSrc: img.source - property alias textColor: text.color - - signal clicked - - - Image { - id: img - anchors.left: parent.left - anchors.leftMargin: 5 - anchors.verticalCenter: parent.verticalCenter - } - - Text { - id: text - anchors.fill: parent - font.pixelSize: 12 - anchors.left: img.left - anchors.leftMargin: 5 - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - } - - MouseArea { - anchors.fill: parent - onClicked: parent.clicked() - onPressed: parent.color = "#646464" - onReleased: parent.color = "#999999" - hoverEnabled: true - onEntered: parent.color = "#BEBEBE" - onExited: parent.color = "#999999" - } -} - diff --git a/util/qt3d/assetviewer/qml/Widgets/Checkered.qml b/util/qt3d/assetviewer/qml/Widgets/Checkered.qml deleted file mode 100644 index 49bf1d82..00000000 --- a/util/qt3d/assetviewer/qml/Widgets/Checkered.qml +++ /dev/null @@ -1,27 +0,0 @@ -import QtQuick 1.0 - -Grid { - property variant color1: "#FFFFFF" - property variant color2: "#BBBBBB" - property variant cellSize: 10 - width: 20 - height: parent.height - clip: true - - rows: height/cellSize - columns: width/cellSize - Repeater { - model: parent.rows * parent.columns - Rectangle { - width: cellSize; height: cellSize; - color: { - var check; - if (columns%2) check = index; - else check = Math.floor(index/columns)%2 + index; - - if (check%2) return color1; - else return color2; - } - } - } -} 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 } - } -} diff --git a/util/qt3d/assetviewer/qml/Widgets/ColorWidget.qml b/util/qt3d/assetviewer/qml/Widgets/ColorWidget.qml deleted file mode 100644 index f60ff1b0..00000000 --- a/util/qt3d/assetviewer/qml/Widgets/ColorWidget.qml +++ /dev/null @@ -1,37 +0,0 @@ -import QtQuick 1.0 - -Item { - id: colorWidget - width: parent.width; height: 16 - - property variant targetColor - property alias text: flatText.text - - Rectangle { - height: 2 - anchors { - left: parent.left; right: flatSet.right - bottom: parent.bottom - rightMargin: flatSet.width/2 - } - color: colorWidget.targetColor.color - } - Text { - id: flatText - anchors { top: parent.top; left: parent.left } - text:"Color" - color: "white" - } - BlenderToggle { - id: flatSet - width: 32 - anchors { right: parent.right } - height: parent.height - buttonText: "Set" - radius: 6 - onClicked: { - colorPicker.setTarget(colorWidget.targetColor); - colorPicker.visible = true - } - } -} diff --git a/util/qt3d/assetviewer/qml/Widgets/HSVColor.qml b/util/qt3d/assetviewer/qml/Widgets/HSVColor.qml deleted file mode 100644 index 9e137428..00000000 --- a/util/qt3d/assetviewer/qml/Widgets/HSVColor.qml +++ /dev/null @@ -1,15 +0,0 @@ -import QtQuick 1.0 -import "../ColorUtils.js" as ColorUtils - -Item { - property real hue: 0.0 - property real sat: 0.0 - property real val: 1.0 - property real alpha: 1.0 - property color color: ColorUtils.hsvToColor(hue, sat, val, alpha) - property int red: rgb[0] - property int green: rgb[1] - property int blue: rgb[2] - - property variant rgb: ColorUtils.hsvToRgb(hue, sat, val) -} diff --git a/util/qt3d/assetviewer/qml/Widgets/InputBox.qml b/util/qt3d/assetviewer/qml/Widgets/InputBox.qml deleted file mode 100644 index d3d31837..00000000 --- a/util/qt3d/assetviewer/qml/Widgets/InputBox.qml +++ /dev/null @@ -1,39 +0,0 @@ -import QtQuick 1.0 - -Item { - id: textInput - width: 60 - height: 20 - property alias label: lbl.text - property alias input: inputBox - -// Binding { -// target: textInput; property: "value" -// value: inputBox.text -// } -// Binding { -// target: inputBox; property: "text" -// value: { var result = textInput.value*100; return Math.round(result)/100 } -// } - - Text { - id: lbl - color: "lightgray" - anchors.left: parent.left - } - - Rectangle { - border.color: "gray" - color: "transparent" - width: 40 - height: inputBox.height - anchors.right: parent.right - TextInput { - id: inputBox - anchors { fill: parent; leftMargin: 5 } - color: "white" - text: { var result = textInput.value*100; return Math.round(result)/100 } - selectByMouse: true; readOnly: true - } - } -} diff --git a/util/qt3d/assetviewer/qml/Widgets/ModelViewportResize.qml b/util/qt3d/assetviewer/qml/Widgets/ModelViewportResize.qml deleted file mode 100644 index 96e8a2d6..00000000 --- a/util/qt3d/assetviewer/qml/Widgets/ModelViewportResize.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 1.0 -import Qt3D 1.0 -import AssetViewer 1.0 - -Rectangle { - radius: 4 - border.width: 1 - border.color: "#191919" - width: 16 + 2 - height: 16 + 2 - color: "#999999" - - Image { - id: img - source: mainwindow.state !== "3Views" ? "images/shrink.png" : "images/grow.png" - x: 2 - y: 2 - MouseArea { - anchors.fill: parent - onClicked: { - if (view.stateName) { - if (mainwindow.state !== "3Views") - mainwindow.state = "3Views" - else - mainwindow.state = view.stateName - } - } - } - } -} diff --git a/util/qt3d/assetviewer/qml/Widgets/SliderHandle.qml b/util/qt3d/assetviewer/qml/Widgets/SliderHandle.qml deleted file mode 100644 index 9f72cabc..00000000 --- a/util/qt3d/assetviewer/qml/Widgets/SliderHandle.qml +++ /dev/null @@ -1,76 +0,0 @@ -import QtQuick 1.0 - -Item { - id: slider - width: parent.width - height: parent.height - property real value: 0.0 - property bool inverted: false - property bool horizontal: false - - signal changed; - - Binding { - target: slider; property: "value" - value: { - var res; - var pos = horizontal ? handle.x : handle.y; - var delta = horizontal ? width-handle.width : height-handle.height; - res = pos/delta; - return inverted ? 1-res : res - } - } - Binding { - target: handle; property: "y" - value: { - var res = inverted ? 1 - slider.value : slider.value - if (!horizontal) return res*(height-handle.height); - } - } - Binding { - target: handle; property: "x" - value: { - var res = inverted ? 1 - slider.value : slider.value - if (horizontal) return res*(width-handle.width); - } - } - - Rectangle { - id: handle - width: 8 + (horizontal ? 0 : parent.width) - height: 8 + (!horizontal ? 0 : parent.height) - anchors.horizontalCenter: horizontal ? undefined : parent.horizontalCenter - anchors.verticalCenter: !horizontal ? undefined : parent.verticalCenter - radius: 2 - Behavior on opacity { - NumberAnimation { easing.type: Easing.InOutQuad; duration: 80 } - } - gradient: Gradient { - GradientStop { position: 0.0; color: "#FFFFFF" } - GradientStop { position: 1.0; color: "#FFFFFF" } - } - border.width: 1 - border.color: "darkgray" - onXChanged: slider.changed() - onYChanged: slider.changed() - } - - MouseArea { - id: mouseArea - anchors.fill: parent - function mouseEvent(mouse) { - if (mouse.buttons & Qt.LeftButton) { - if (horizontal) - handle.x = Math.max(0, Math.min(width-handle.width, mouse.x-handle.width/2)) - else - handle.y = Math.max(0, Math.min(height-handle.height, mouse.y-handle.height/2)); - } - } - 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 } - } -} diff --git a/util/qt3d/assetviewer/qml/Widgets/ZoomControls.qml b/util/qt3d/assetviewer/qml/Widgets/ZoomControls.qml deleted file mode 100644 index 7ad01ce0..00000000 --- a/util/qt3d/assetviewer/qml/Widgets/ZoomControls.qml +++ /dev/null @@ -1,41 +0,0 @@ -import QtQuick 1.0 -import Qt3D 1.0 -import AssetViewer 1.0 - -Rectangle { - radius: 4 - border.width: 1 - border.color: "#191919" - width: 16 + 2 - height: 16 + 2 + 16 + 2 - color: "#999999" - - signal zoomIn() - signal zoomOut() - - Image { - id: imgIn - source: "images/zoomin.png" - x: 2 - y: 2 - MouseArea { - anchors.fill: parent - onClicked: { - zoomIn() - } - } - } - - Image { - id: imgOut - source: "images/zoomout.png" - x: 2 - y: 20 - MouseArea { - anchors.fill: parent - onClicked: { - zoomOut() - } - } - } -} diff --git a/util/qt3d/assetviewer/qml/Widgets/images/grow.png b/util/qt3d/assetviewer/qml/Widgets/images/grow.png Binary files differdeleted file mode 100644 index df154010..00000000 --- a/util/qt3d/assetviewer/qml/Widgets/images/grow.png +++ /dev/null diff --git a/util/qt3d/assetviewer/qml/Widgets/images/shrink.png b/util/qt3d/assetviewer/qml/Widgets/images/shrink.png Binary files differdeleted file mode 100644 index 285d3a9d..00000000 --- a/util/qt3d/assetviewer/qml/Widgets/images/shrink.png +++ /dev/null diff --git a/util/qt3d/assetviewer/qml/Widgets/images/zoomin.png b/util/qt3d/assetviewer/qml/Widgets/images/zoomin.png Binary files differdeleted file mode 100644 index e4434a07..00000000 --- a/util/qt3d/assetviewer/qml/Widgets/images/zoomin.png +++ /dev/null diff --git a/util/qt3d/assetviewer/qml/Widgets/images/zoomout.png b/util/qt3d/assetviewer/qml/Widgets/images/zoomout.png Binary files differdeleted file mode 100644 index 4c853bc6..00000000 --- a/util/qt3d/assetviewer/qml/Widgets/images/zoomout.png +++ /dev/null |