summaryrefslogtreecommitdiffstats
path: root/examples/declarative
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-21 06:29:13 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-21 06:29:13 (GMT)
commit9b8fcaa5e9b6fe348df40683e4c8a72e4ba95c89 (patch)
tree49f6a311faf226e665e5f0f6167784a958ada5fa /examples/declarative
parent1c4846bc35613f388fda28841e19c3a9cbc8c11f (diff)
parentaeadd5ae059b182b5bc3da1537b3193bf725c243 (diff)
downloadQt-9b8fcaa5e9b6fe348df40683e4c8a72e4ba95c89.zip
Qt-9b8fcaa5e9b6fe348df40683e4c8a72e4ba95c89.tar.gz
Qt-9b8fcaa5e9b6fe348df40683e4c8a72e4ba95c89.tar.bz2
Merge branch 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: Make dynamicscene example embeddeable in another graphics scene Some minor example fixes Update docs with correct property name Fix incorrect merge Work around rendering bug in Rectangle. Remove warnings. Test e75088323ae15604139ddfd66b85cc3b8d43abeb Add XmlListModel::errorString() Fix dynamicscene example Update old keyword in docs
Diffstat (limited to 'examples/declarative')
-rw-r--r--examples/declarative/README41
-rw-r--r--examples/declarative/toys/README37
-rw-r--r--examples/declarative/toys/dial-example/content/Dial.qml (renamed from examples/declarative/toys/dial/content/Dial.qml)0
-rw-r--r--examples/declarative/toys/dial-example/content/background.png (renamed from examples/declarative/toys/dial/content/background.png)bin35876 -> 35876 bytes
-rw-r--r--examples/declarative/toys/dial-example/content/needle.png (renamed from examples/declarative/toys/dial/content/needle.png)bin342 -> 342 bytes
-rw-r--r--examples/declarative/toys/dial-example/content/needle_shadow.png (renamed from examples/declarative/toys/dial/content/needle_shadow.png)bin632 -> 632 bytes
-rw-r--r--examples/declarative/toys/dial-example/content/overlay.png (renamed from examples/declarative/toys/dial/content/overlay.png)bin3564 -> 3564 bytes
-rw-r--r--examples/declarative/toys/dial-example/dial-example.qml (renamed from examples/declarative/toys/dial/dial-example.qml)0
-rw-r--r--examples/declarative/toys/dial-example/dial.qmlproject (renamed from examples/declarative/toys/dial/dial.qmlproject)0
-rw-r--r--examples/declarative/toys/dynamicscene/dynamicscene.qml10
-rw-r--r--examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml9
-rw-r--r--examples/declarative/toys/dynamicscene/qml/itemCreation.js4
12 files changed, 95 insertions, 6 deletions
diff --git a/examples/declarative/README b/examples/declarative/README
new file mode 100644
index 0000000..9e0f4c4
--- /dev/null
+++ b/examples/declarative/README
@@ -0,0 +1,41 @@
+The Qt Declarative module provides the ability to specify and implement
+your UI declaratively, using the Qt Meta-Object Language(QML). This
+language is very expressive and human readable, and can be used by
+designers to actually implement their UI vision. QML UIs can integrate
+with C++ code in many ways, including being loaded as a part of a C++ UI
+and loading data models from C++ and interacting with them.
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory. But most can also be viewed directly with the
+QML viewer utility, without requiring compilation.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/declarative/toys/README b/examples/declarative/toys/README
new file mode 100644
index 0000000..7fd7eb0
--- /dev/null
+++ b/examples/declarative/toys/README
@@ -0,0 +1,37 @@
+These pure QML examples create complete components to demonstrate
+some of what can be easily done using just a few QML files.
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory. They can also be viewed directly with the
+QML viewer utility, without requiring compilation.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/declarative/toys/dial/content/Dial.qml b/examples/declarative/toys/dial-example/content/Dial.qml
index 6f24801..6f24801 100644
--- a/examples/declarative/toys/dial/content/Dial.qml
+++ b/examples/declarative/toys/dial-example/content/Dial.qml
diff --git a/examples/declarative/toys/dial/content/background.png b/examples/declarative/toys/dial-example/content/background.png
index 75d555d..75d555d 100644
--- a/examples/declarative/toys/dial/content/background.png
+++ b/examples/declarative/toys/dial-example/content/background.png
Binary files differ
diff --git a/examples/declarative/toys/dial/content/needle.png b/examples/declarative/toys/dial-example/content/needle.png
index 2d19f75..2d19f75 100644
--- a/examples/declarative/toys/dial/content/needle.png
+++ b/examples/declarative/toys/dial-example/content/needle.png
Binary files differ
diff --git a/examples/declarative/toys/dial/content/needle_shadow.png b/examples/declarative/toys/dial-example/content/needle_shadow.png
index 8d8a928..8d8a928 100644
--- a/examples/declarative/toys/dial/content/needle_shadow.png
+++ b/examples/declarative/toys/dial-example/content/needle_shadow.png
Binary files differ
diff --git a/examples/declarative/toys/dial/content/overlay.png b/examples/declarative/toys/dial-example/content/overlay.png
index 3860a7b..3860a7b 100644
--- a/examples/declarative/toys/dial/content/overlay.png
+++ b/examples/declarative/toys/dial-example/content/overlay.png
Binary files differ
diff --git a/examples/declarative/toys/dial/dial-example.qml b/examples/declarative/toys/dial-example/dial-example.qml
index 900954f..900954f 100644
--- a/examples/declarative/toys/dial/dial-example.qml
+++ b/examples/declarative/toys/dial-example/dial-example.qml
diff --git a/examples/declarative/toys/dial/dial.qmlproject b/examples/declarative/toys/dial-example/dial.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/toys/dial/dial.qmlproject
+++ b/examples/declarative/toys/dial-example/dial.qmlproject
diff --git a/examples/declarative/toys/dynamicscene/dynamicscene.qml b/examples/declarative/toys/dynamicscene/dynamicscene.qml
index 52c7c1e..2aa15e5 100644
--- a/examples/declarative/toys/dynamicscene/dynamicscene.qml
+++ b/examples/declarative/toys/dynamicscene/dynamicscene.qml
@@ -8,7 +8,8 @@ Item {
property int activeSuns: 0
//This is a desktop-sized example
- width: 1024; height: 512
+ width: 800; height: 480
+
//This is the message box that pops up when there's an error
Rectangle {
@@ -79,7 +80,7 @@ Item {
Rectangle {
id: toolbox
- width: 480
+ width: 380
color: activePalette.window
anchors { right: parent.right; top: parent.top; bottom: parent.bottom }
@@ -132,7 +133,7 @@ Item {
Text { text: "Arbitrary QML:" }
Rectangle {
- width: 460; height: 240
+ width: 360; height: 240
TextEdit {
id: qmlText
@@ -140,8 +141,9 @@ Item {
readOnly: false
focusOnPress: true
font.pixelSize: 14
+ wrapMode: TextEdit.WordWrap
- text: "import Qt 4.7\nImage {\n id: smile\n x: 500 * Math.random()\n y: 200 * Math.random() \n source: 'images/face-smile.png'\n\n NumberAnimation on opacity { \n to: 0; duration: 1500\n }\n\n Component.onCompleted: smile.destroy(1500);\n}"
+ text: "import Qt 4.7\nImage {\n id: smile\n x: 360 * Math.random()\n y: 180 * Math.random() \n source: 'images/face-smile.png'\n NumberAnimation on opacity { \n to: 0; duration: 1500\n }\n Component.onCompleted: smile.destroy(1500);\n}"
}
}
diff --git a/examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml b/examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml
new file mode 100644
index 0000000..de096ad
--- /dev/null
+++ b/examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml
@@ -0,0 +1,9 @@
+import Qt 4.7
+
+Image {
+ property bool created: false
+ property string image
+
+ source: image
+
+}
diff --git a/examples/declarative/toys/dynamicscene/qml/itemCreation.js b/examples/declarative/toys/dynamicscene/qml/itemCreation.js
index f92dd15..e74f7b0 100644
--- a/examples/declarative/toys/dynamicscene/qml/itemCreation.js
+++ b/examples/declarative/toys/dynamicscene/qml/itemCreation.js
@@ -5,7 +5,7 @@ var posnInWindow;
function startDrag(mouse)
{
- posnInWindow = paletteItem.mapToItem(null, 0, 0);
+ posnInWindow = paletteItem.mapToItem(window, 0, 0);
startingMouse = { x: mouse.x, y: mouse.y }
loadComponent();
}
@@ -36,7 +36,7 @@ function createItem() {
} else if (itemComponent.status == Component.Error) {
draggedItem = null;
console.log("error creating component");
- console.log(component.errorString());
+ console.log(itemComponent.errorString());
}
}