summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-23 04:27:54 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-23 04:27:54 (GMT)
commit2a93f7ce631702ec17b87e23d7efa8a0ae6f5458 (patch)
treeafb8d35c97140c6bb83118339f883613b945d5f7
parent8ac4581718767c498192cdffdfc97211d0030e7b (diff)
parentd07d71ff11c522cd5401e97b3231b037c38bbd9f (diff)
downloadQt-2a93f7ce631702ec17b87e23d7efa8a0ae6f5458.zip
Qt-2a93f7ce631702ec17b87e23d7efa8a0ae6f5458.tar.gz
Qt-2a93f7ce631702ec17b87e23d7efa8a0ae6f5458.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r--doc/src/declarative/qtdeclarative.qdoc32
-rw-r--r--examples/declarative/slideswitch/Switch.qml58
-rw-r--r--examples/declarative/slideswitch/content/Switch.qml63
-rw-r--r--examples/declarative/slideswitch/content/background.svg (renamed from examples/declarative/slideswitch/background.svg)0
-rw-r--r--examples/declarative/slideswitch/content/knob.svg (renamed from examples/declarative/slideswitch/knob.svg)0
-rw-r--r--examples/declarative/slideswitch/slideswitch.qml (renamed from examples/declarative/slideswitch/display.qml)5
-rw-r--r--tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp1
7 files changed, 82 insertions, 77 deletions
diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc
index ea8e198..e46cbab 100644
--- a/doc/src/declarative/qtdeclarative.qdoc
+++ b/doc/src/declarative/qtdeclarative.qdoc
@@ -45,29 +45,29 @@
\ingroup modules
\brief The Qt Declarative module provides a declarative framework for building
-highly dynamic, custom UIs
+highly dynamic, custom user interfaces.
-Qt Declarative aids programmers and designers in building the animation rich,
-highly fluid user interfaces that are becoming common in portable consumer
-electronics devices, such as mobile phones, media players, set-top boxes and
-netbooks. The Qt Declarative module provides an engine for interpreting the
-declarative QML language, and a rich set of \l {QML Elements} that can be used
+Qt Declarative aids programmers and designers in building the animation rich,
+highly fluid user interfaces that are becoming common in portable consumer
+electronics devices, such as mobile phones, media players, set-top boxes and
+netbooks. The Qt Declarative module provides an engine for interpreting the
+declarative QML language, and a rich set of \l {QML Elements}{QML elements} that can be used
from QML.
QML is an extension to \l {http://www.ecma-international.org/publications/standards/Ecma-262.htm}
-{ECMAScript}, that provides a mechanism to declaratively build an object tree
-of \l {QML Elements}. QML improves the integration between ECMAScript and Qt's
-existing QObject based type system, adds support for automatic
-\l {Property Binding}s and provides \l {Network Transparency} at the language
+{ECMAScript}, that provides a mechanism to declaratively build an object tree
+of QML elements. QML improves the integration between ECMAScript and Qt's
+existing QObject based type system, adds support for automatic
+\l {Property Binding}{property bindings} and provides \l {Network Transparency}{network transparency} at the language
level.
-The \l {QML Elements} are a sophisticated set of graphical and behavioral building
-blocks. \l {QML Elements} are combined together in \l {QML Documents} to build components
-ranging in complexity from simple pushbuttons and sliders, to complete
-internet-enabled applications like a \l {http://www.flickr.com}{flickr} photo browser.
+The QML elements are a sophisticated set of graphical and behavioral building
+blocks. These different elements are combined together in \l {QML Documents}{QML documents} to build components
+ranging in complexity from simple buttons and sliders, to complete
+internet-enabled applications like a \l {http://www.flickr.com}{Flickr} photo browser.
Qt Declarative builds on \l {QML for Qt programmers}{Qt's existing strengths}.
-QML can be be used to incrementally extend an existing application or to build
+QML can be be used to incrementally extend an existing application or to build
completely new applications. QML is fully \l {Extending QML}{extensible from C++}.
\section1 Getting Started:
@@ -76,7 +76,7 @@ completely new applications. QML is fully \l {Extending QML}{extensible from C+
\o \l {Tutorial}{Tutorial: 'Hello World'}
\o \l {advtutorial.html}{Tutorial: 'Same Game'}
\o \l {QML Examples and Walkthroughs}
-\o \l {Using QML in C++ Applications}
+\o \l {Using QML in C++ Applications}
\endlist
\section1 Core QML Features:
diff --git a/examples/declarative/slideswitch/Switch.qml b/examples/declarative/slideswitch/Switch.qml
deleted file mode 100644
index 4e13976..0000000
--- a/examples/declarative/slideswitch/Switch.qml
+++ /dev/null
@@ -1,58 +0,0 @@
-import Qt 4.6
-
-Item {
- id: mySwitch
- width: groove.width; height: groove.height
-
- property var on
-
- Script {
-
- function toggle() {
- if(mySwitch.state == "On")
- mySwitch.state = "Off";
- else
- mySwitch.state = "On";
- }
- function dorelease() {
- if(knob.x == 1) {
- if(mySwitch.state == "Off")
- return;
- }
-
- if(knob.x == 78) {
- if(mySwitch.state == "On")
- return;
- }
-
- toggle();
- }
-
- }
- Image { id: groove; source: "background.svg" }
- MouseRegion { anchors.fill: groove; onClicked: { toggle() } }
- Image { id: knob; source: "knob.svg"; x: 1; y: 2 }
- MouseRegion {
- anchors.fill: knob
- onClicked: { toggle() }
- onReleased: { dorelease() }
- drag.target: knob; drag.axis: "XAxis"; drag.minimumX: 1; drag.maximumX: 78
- }
- states: [
- State {
- name: "On"
- PropertyChanges { target: knob; x: 78 }
- PropertyChanges { target: mySwitch; on: true }
- },
- State {
- name: "Off"
- PropertyChanges { target: knob; x: 1 }
- PropertyChanges { target: mySwitch; on: false }
- }
- ]
- transitions: [
- Transition {
- NumberAnimation { matchProperties: "x"; easing: "easeInOutQuad"; duration: 200 }
- }
- ]
-}
diff --git a/examples/declarative/slideswitch/content/Switch.qml b/examples/declarative/slideswitch/content/Switch.qml
new file mode 100644
index 0000000..b65936a
--- /dev/null
+++ b/examples/declarative/slideswitch/content/Switch.qml
@@ -0,0 +1,63 @@
+import Qt 4.6
+
+Item {
+ id: mySwitch
+ width: background.width; height: background.height
+
+ property bool on: false
+
+ Script {
+ function toggle() {
+ if (mySwitch.state == "On")
+ mySwitch.state = "Off";
+ else
+ mySwitch.state = "On";
+ }
+
+ function dorelease() {
+ if (knob.x == 1) {
+ if (mySwitch.state == "Off")
+ return;
+ }
+
+ if (knob.x == 78) {
+ if (mySwitch.state == "On")
+ return;
+ }
+ toggle();
+ }
+ }
+
+ Image {
+ id: background; source: "background.svg"
+ MouseRegion { anchors.fill: parent; onClicked: toggle() }
+ }
+
+ Image {
+ id: knob; source: "knob.svg"; x: 1; y: 2
+
+ MouseRegion {
+ anchors.fill: parent
+ drag.target: knob; drag.axis: "XAxis"; drag.minimumX: 1; drag.maximumX: 78
+ onClicked: toggle()
+ onReleased: dorelease()
+ }
+ }
+
+ states: [
+ State {
+ name: "On"
+ PropertyChanges { target: knob; x: 78 }
+ PropertyChanges { target: mySwitch; on: true }
+ },
+ State {
+ name: "Off"
+ PropertyChanges { target: knob; x: 1 }
+ PropertyChanges { target: mySwitch; on: false }
+ }
+ ]
+
+ transitions: Transition {
+ NumberAnimation { matchProperties: "x"; easing: "easeInOutQuad"; duration: 200 }
+ }
+}
diff --git a/examples/declarative/slideswitch/background.svg b/examples/declarative/slideswitch/content/background.svg
index f920d3e..f920d3e 100644
--- a/examples/declarative/slideswitch/background.svg
+++ b/examples/declarative/slideswitch/content/background.svg
diff --git a/examples/declarative/slideswitch/knob.svg b/examples/declarative/slideswitch/content/knob.svg
index fb69337..fb69337 100644
--- a/examples/declarative/slideswitch/knob.svg
+++ b/examples/declarative/slideswitch/content/knob.svg
diff --git a/examples/declarative/slideswitch/display.qml b/examples/declarative/slideswitch/slideswitch.qml
index 346ffb1..9b46cd1 100644
--- a/examples/declarative/slideswitch/display.qml
+++ b/examples/declarative/slideswitch/slideswitch.qml
@@ -1,9 +1,10 @@
import Qt 4.6
+import "content"
Rectangle {
color: "white"
- width: 150
- height: 150
+ width: 400; height: 250
+
Switch {
anchors.centerIn: parent
}
diff --git a/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
index 92b2c1a..1481dae 100644
--- a/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
+++ b/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
@@ -993,7 +993,6 @@ void tst_QMetaObjectBuilder::serialize()
QMetaObjectBuilder builder;
builder.setClassName("Test");
builder.addProperty("foo", "int");
- builder.setSuperClass(0);
QByteArray data;
QDataStream stream(&data, QIODevice::WriteOnly | QIODevice::Append);