r19000 by craig - Save some better QML tests

scribus-commit scribus-commit at lists.scribus.net
Fri Apr 4 13:16:41 UTC 2014


Author: craig
Date: Fri Apr  4 13:16:41 2014
New Revision: 19000

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19000
Log:
Save some better QML tests

Modified:
    trunk/Scribus/scribus/ui/qml/qtq_test1.qml

Modified: trunk/Scribus/scribus/ui/qml/qtq_test1.qml
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19000&path=/trunk/Scribus/scribus/ui/qml/qtq_test1.qml
==============================================================================
--- trunk/Scribus/scribus/ui/qml/qtq_test1.qml (original)
+++ trunk/Scribus/scribus/ui/qml/qtq_test1.qml Fri Apr  4 13:16:41 2014
@@ -1,26 +1,199 @@
-/*
-import QtQuick 2.1
-import QtQuick.Controls 1.0
+import QtQuick 2.2
+import QtQuick.Controls 1.1
+import QtQuick.Controls.Styles 1.1
 import QtQuick.Layouts 1.0
-import QtQuick.Dialogs 1.0
-import QtQuick.Window 2.1
-*/
-import QtQuick 2.0
 
-Rectangle {
-	width: 360
-	height: 360
-	Text {
-		anchors.centerIn: parent
-		text: "Hello World"
-	}
-	MouseArea {
-		anchors.fill: parent
-		onClicked: {
-			Qt.quit();
-		}
-	}
-}
+ApplicationWindow {
+    width: 360
+    height: 360
+    menuBar:MenuBar {
+        Menu {
+            title: "File"
+            MenuItem { text: "Open..." }
+            MenuItem { text: "Close" }
+        }
+
+        Menu {
+            title: "Edit"
+            MenuItem { text: "Cut" }
+            MenuItem { text: "Copy" }
+            MenuItem { text: "Paste" }
+        }
+    }
+    Text {
+        text: qsTr("Hello World")
+        anchors.centerIn: parent
+    }
+    MouseArea {
+        anchors.rightMargin: 0
+        anchors.bottomMargin: 0
+        anchors.leftMargin: 0
+        anchors.topMargin: 0
+        anchors.fill: parent
+        onClicked: {
+            Qt.quit();
+        }
+
+        CheckBox {
+            x: 54
+            y: 70
+            text: "My new checkbox"
+            style: CheckBoxStyle {
+                indicator: Rectangle {
+                        implicitWidth: 10
+                        implicitHeight: 10
+                        radius: 1
+                        border.color: control.activeFocus ? "darkblue" : "gray"
+                        border.width: 1
+                        Rectangle {
+                            visible: control.checked
+                            color: "#555"
+                            border.color: "#333"
+                            radius: 1
+                            anchors.margins: 2
+                            anchors.fill: parent
+                        }
+                }
+                label: Text {
+                    text: "Hello world"
+                    font.pixelSize: 10
+                    color: "black"
+                }
+            }
+        }
+
+        CheckBox {
+            x: 204
+            y: 70
+            text: "My second checkbox"
+            style: CheckBoxStyle {
+                indicator: Rectangle {
+                        implicitWidth: 10
+                        implicitHeight: 10
+                        radius: 1
+                        border.color: control.activeFocus ? "darkblue" : "gray"
+                        border.width: 1
+                        Rectangle {
+                            visible: control.checked
+                            color: "#555"
+                            border.color: "#333"
+                            radius: 1
+                            anchors.margins: 2
+                            anchors.fill: parent
+                        }
+                }
+                label: Text {
+                    text: "Hello world"
+                    font.pixelSize: 10
+                    color: "black"
+                }
+            }
+        }
+
+        Label {
+            id: label1
+            x: 20
+            y: 20
+            text: qsTr("X:")
+            font.pixelSize: 10
+        }
+        SpinBox {
+            id: xSpinBox
+            x: 40
+            y: 18
+            font.pixelSize: 10
+            decimals:2
+            style: SpinBoxStyle{
+                background: Rectangle {
+                    implicitWidth: 60
+                    implicitHeight: 15
+                    border.color: "gray"
+                    radius: 2
+                }
+            }
+        }
+
+        Label {
+            id: label2
+            x: 20
+            y: 40
+            text: qsTr("Y:")
+            font.pixelSize: 10
+        }
+        SpinBox {
+            id: ySpinBox
+            x: 40
+            y: 38
+            font.pixelSize: 10
+            decimals:2
+            style: SpinBoxStyle{
+                background: Rectangle {
+                    implicitWidth: 60
+                    implicitHeight: 15
+                    border.color: "gray"
+                    radius: 2
+                }
+            }
+        }
+
+        Label {
+            id: labelW
+            x: 120
+            y: 40
+            text: qsTr("W:")
+            font.pixelSize: 10
+        }
+        SpinBox {
+            id: wSpinBox
+            x: 140
+            y: 38
+            font.pixelSize: 10
+            decimals:2
+            style: SpinBoxStyle{
+                background: Rectangle {
+                    implicitWidth: 60
+                    implicitHeight: 15
+                    border.color: "gray"
+                    radius: 2
+                }
+            }
+        }
+
+        Label {
+            id: labelH
+            x: 120
+            y: 20
+            text: qsTr("H:")
+            font.pixelSize: 10
+        }
+        SpinBox {
+            id: hSpinBox
+            x: 140
+            y: 18
+            font.pixelSize: 10
+            decimals:2
+            style: SpinBoxStyle{
+                background: Rectangle {
+                    implicitWidth: 60
+                    implicitHeight: 15
+                    border.color: "gray"
+                    radius: 2
+                }
+            }
+        }
 
 
+        ComboBox {
+            id: comboBox1
+            x: 54
+            y: 105
+            style: ComboBoxStyle{
+                //background: Rectangle {
+                //    implicitWidth: 60
+                //    implicitHeight: 15
+                //}
+            }
+        }
 
+    }
+}




More information about the scribus-commit mailing list