summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-22 08:24:05 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-22 08:24:05 (GMT)
commite2f90ecdde9550986df1539aa88eb5fc41d939e1 (patch)
tree354e192d83d1ed695373f085faa3a448e2599713 /doc/src/declarative
parent69b1784edb6dd82f26100d0e539bfa8a65bdd35d (diff)
parent33eb76f050b45718d87926a8ff7afc89d6201c16 (diff)
downloadQt-e2f90ecdde9550986df1539aa88eb5fc41d939e1.zip
Qt-e2f90ecdde9550986df1539aa88eb5fc41d939e1.tar.gz
Qt-e2f90ecdde9550986df1539aa88eb5fc41d939e1.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-qml: Replace QmlList* and QList* support with a single QmlListProperty type Rename MouseRegion -> MouseArea Update QmlChanges with animation API changes. Document the default velocity of EaseFollow Remove use of unexprted private classes. Fix compile error on Solaris Increase durations when testing Behaviors. Add cached path rounded rect painting benchmark. Remove use of direct event posting. Use QTest::keyClick() for keys.
Diffstat (limited to 'doc/src/declarative')
-rw-r--r--doc/src/declarative/advtutorial1.qdoc2
-rw-r--r--doc/src/declarative/animation.qdoc4
-rw-r--r--doc/src/declarative/basictypes.qdoc2
-rw-r--r--doc/src/declarative/elements.qdoc2
-rw-r--r--doc/src/declarative/example-slideswitch.qdoc6
-rw-r--r--doc/src/declarative/extending-examples.qdoc14
-rw-r--r--doc/src/declarative/extending.qdoc2
-rw-r--r--doc/src/declarative/focus.qdoc2
-rw-r--r--doc/src/declarative/qmldebugging.qdoc2
-rw-r--r--doc/src/declarative/qmlintro.qdoc8
-rw-r--r--doc/src/declarative/qmlmodels.qdoc2
-rw-r--r--doc/src/declarative/qmlstates.qdoc2
-rw-r--r--doc/src/declarative/qtbinding.qdoc8
-rw-r--r--doc/src/declarative/scope.qdoc2
-rw-r--r--doc/src/declarative/tutorial2.qdoc4
-rw-r--r--doc/src/declarative/tutorial3.qdoc2
16 files changed, 32 insertions, 32 deletions
diff --git a/doc/src/declarative/advtutorial1.qdoc b/doc/src/declarative/advtutorial1.qdoc
index 9c6ea71..2c99819 100644
--- a/doc/src/declarative/advtutorial1.qdoc
+++ b/doc/src/declarative/advtutorial1.qdoc
@@ -56,7 +56,7 @@ button and room to display the score. The one thing you may not recognize here
is the \l SystemPalette item. This item provides access to the Qt system palette
and is used to make the button look more like a system button (for exact native
feel you would use a \l QPushButton). Since we want a fully functional button,
-we use the QML elements Text and MouseRegion inside a Rectangle to assemble a
+we use the QML elements Text and MouseArea inside a Rectangle to assemble a
button. Below is the code which we wrote to do this:
\snippet declarative/tutorials/samegame/samegame1/Button.qml 0
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index 1acc111..d80c3fa 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -110,7 +110,7 @@ PropertyAnimation {
Image {
id: image
source: "image.png"
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onPressed: animation.start()
}
@@ -251,7 +251,7 @@ State {
\o Update x from a script
\qml
-MouseRegion {
+MouseArea {
....
onClicked: redRect.x = 24;
}
diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc
index 16e0c2e..a260812 100644
--- a/doc/src/declarative/basictypes.qdoc
+++ b/doc/src/declarative/basictypes.qdoc
@@ -294,7 +294,7 @@
Actions are used like this:
\qml
- MouseRegion { onClicked: MyItem.myaction.trigger() }
+ MouseArea { onClicked: MyItem.myaction.trigger() }
State { name: "enabled"; when: MyItem.myaction.enabled == true }
Text { text: MyItem.someaction.text }
\endqml
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index e8fb1e7..682a2ac 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -126,7 +126,7 @@ The following table lists the QML elements provided by the Qt Declarative module
\o
\list
-\o \l MouseRegion
+\o \l MouseArea
\o \l FocusScope
\endlist
diff --git a/doc/src/declarative/example-slideswitch.qdoc b/doc/src/declarative/example-slideswitch.qdoc
index 79b362e..d1b1066 100644
--- a/doc/src/declarative/example-slideswitch.qdoc
+++ b/doc/src/declarative/example-slideswitch.qdoc
@@ -84,15 +84,15 @@ the text will only be visible when the switch is on.
\snippet examples/declarative/slideswitch/content/Switch.qml 4
First, we create the background image of the switch.
-In order for the switch to toggle when the user clicks on the background, we add a \l{MouseRegion} as a child item of the image.
-A \c MouseRegion has a \c onClicked property that is triggered when the item is clicked. For the moment we will just call a
+In order for the switch to toggle when the user clicks on the background, we add a \l{MouseArea} as a child item of the image.
+A \c MouseArea has a \c onClicked property that is triggered when the item is clicked. For the moment we will just call a
\c toggle() function. We will see what this function does in a moment.
\snippet examples/declarative/slideswitch/content/Switch.qml 5
Then, we place the image of the knob on top of the background.
The interaction here is a little more complex. We want the knob to move with the finger when it is clicked. That is what the \c drag
-property of the \c MouseRegion is for. We also want to toggle the switch if the knob is released between state. We handle this case
+property of the \c MouseArea is for. We also want to toggle the switch if the knob is released between state. We handle this case
in the \c dorelease() function that is called in the \c onReleased property.
\section2 States
diff --git a/doc/src/declarative/extending-examples.qdoc b/doc/src/declarative/extending-examples.qdoc
index c569ee0..b84ae0e 100644
--- a/doc/src/declarative/extending-examples.qdoc
+++ b/doc/src/declarative/extending-examples.qdoc
@@ -105,15 +105,15 @@ The BirthdayParty class is declared like this:
\snippet examples/declarative/extending/properties/birthdayparty.h 3
The class contains a member to store the celebrant object, and also a
-QmlConcreteList<Person *> member.
+QList<Person *> member.
In QML, the type of a list properties - and the guests property is a list of
-people - are all of type QmlList<T *>*. QmlList is an abstract list interface
-that allows a developer to react to QML accessing and modifying the contents of
-the list. This is useful for implementing "virtual lists" or other advanced
-scenarios, but can't be used directly for the common case of just wanting a
-regular list of things. For this a concrete implementation, QmlConcreteList, is
-provided and that is used here.
+people - are all of type QmlListProperty<T>. QmlListProperty is simple value
+type that contains a set of function pointers. QML calls these function
+pointers whenever it needs to read from, write to or otherwise interact with
+the list. In addition to concrete lists like the people list used in this
+example, the use of QmlListProperty allows for "virtual lists" and other advanced
+scenarios.
\section2 Define the BirthdayParty
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index e9a7803..0456f3f 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -169,7 +169,7 @@ for assignment to appropriately typed properties.
The guests property is a list of \c Person objects. Properties that are lists
of objects or Qt interfaces are also declared with the Q_PROPERTY() macro, just
-like other properties. List properties must have the type \c {QmlList<T *>*}.
+like other properties. List properties must have the type \c {QmlListProperty<T>}.
As with object properties, the type \a T must be registered with QML.
The guest property declaration looks like this:
diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc
index bfbb6af..6459a2e 100644
--- a/doc/src/declarative/focus.qdoc
+++ b/doc/src/declarative/focus.qdoc
@@ -263,7 +263,7 @@ Rectangle {
FocusScope {
id: page; width: 240; height: 25
MyWidget { focus: true }
- MouseRegion { anchors.fill: parent; onClicked: { page.focus = true } }
+ MouseArea { anchors.fill: parent; onClicked: { page.focus = true } }
}
\endcode
\endtable
diff --git a/doc/src/declarative/qmldebugging.qdoc b/doc/src/declarative/qmldebugging.qdoc
index c11ff1f..56bd7d2 100644
--- a/doc/src/declarative/qmldebugging.qdoc
+++ b/doc/src/declarative/qmldebugging.qdoc
@@ -50,7 +50,7 @@
\qml
Rectangle {
width: 200; height: 200
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: console.log("clicked")
}
diff --git a/doc/src/declarative/qmlintro.qdoc b/doc/src/declarative/qmlintro.qdoc
index 11a286f..b353e44 100644
--- a/doc/src/declarative/qmlintro.qdoc
+++ b/doc/src/declarative/qmlintro.qdoc
@@ -326,11 +326,11 @@ Item {
\section2 Signal Handlers
Signal handlers allow actions to be taken in reponse to an event. For instance,
-the \l MouseRegion element has signal handlers to handle mouse press, release
+the \l MouseArea element has signal handlers to handle mouse press, release
and click:
\code
-MouseRegion {
+MouseArea {
onPressed: console.log("mouse button pressed")
}
\endcode
@@ -338,10 +338,10 @@ MouseRegion {
All signal handlers begin with \e "on".
Some signal handlers include an optional parameter, for example
-the MouseRegion onPressed signal handler has a \e mouse parameter:
+the MouseArea onPressed signal handler has a \e mouse parameter:
\code
-MouseRegion {
+MouseArea {
acceptedButtons: Qt.LeftButton | Qt.RightButton
onPressed: if (mouse.button == Qt.RightButton) console.log("Right mouse button pressed")
}
diff --git a/doc/src/declarative/qmlmodels.qdoc b/doc/src/declarative/qmlmodels.qdoc
index 39a09bd..6b28243 100644
--- a/doc/src/declarative/qmlmodels.qdoc
+++ b/doc/src/declarative/qmlmodels.qdoc
@@ -258,7 +258,7 @@ dataList.append(new DataObject("Item 3", "blue"));
dataList.append(new DataObject("Item 4", "yellow"));
QmlContext *ctxt = view.rootContext();
-ctxt->setContextProperty("myModel", QVariant::fromValue(&dataList));
+ctxt->setContextProperty("myModel", QVariant::fromValue(dataList));
\endcode
The properties of the object may then be accessed in the delegate:
diff --git a/doc/src/declarative/qmlstates.qdoc b/doc/src/declarative/qmlstates.qdoc
index 36a2479..2118c2b 100644
--- a/doc/src/declarative/qmlstates.qdoc
+++ b/doc/src/declarative/qmlstates.qdoc
@@ -94,7 +94,7 @@ Item {
}
]
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: myItem.state = 'moved'
}
diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc
index 7857d48..732ff86 100644
--- a/doc/src/declarative/qtbinding.qdoc
+++ b/doc/src/declarative/qtbinding.qdoc
@@ -212,7 +212,7 @@ Rectangle {
text: "Hello Colorful World!"
}
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: {
palette.text = "blue";
@@ -255,7 +255,7 @@ the following types:
\o QVariant
\endlist
-This example toggles the "LED Blinker" when the MouseRegion is clicked:
+This example toggles the "LED Blinker" when the MouseArea is clicked:
\table
\row
@@ -291,7 +291,7 @@ int main(int argc, char **argv)
import Qt 4.6
Rectangle {
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: {
if (ledBlinker.isRunning())
@@ -315,7 +315,7 @@ is to have a "running" property. This leads to much nicer QML code:
import Qt 4.6
Rectangle {
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: ledBlinker.running = !ledBlinker.running
}
diff --git a/doc/src/declarative/scope.qdoc b/doc/src/declarative/scope.qdoc
index 5486afd..f709335 100644
--- a/doc/src/declarative/scope.qdoc
+++ b/doc/src/declarative/scope.qdoc
@@ -317,7 +317,7 @@ Rectangle {
anchors.centerIn: parent
text: root.text
}
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: buttonClicked(text)
}
diff --git a/doc/src/declarative/tutorial2.qdoc b/doc/src/declarative/tutorial2.qdoc
index 4e11f7c..e6391b4 100644
--- a/doc/src/declarative/tutorial2.qdoc
+++ b/doc/src/declarative/tutorial2.qdoc
@@ -87,10 +87,10 @@ In this case the rectangle will have the same size as its parent (see \l{anchor-
\snippet examples/declarative/tutorials/helloworld/Cell.qml 3
-In order to change the color of the text when clicking on a cell, we create a \l MouseRegion element with
+In order to change the color of the text when clicking on a cell, we create a \l MouseArea element with
the same size as its parent.
-A \l MouseRegion defines a signal called \e clicked.
+A \l MouseArea defines a signal called \e clicked.
When this signal is triggered we want to emit our own \e clicked signal with the color as parameter.
\section2 The main QML file
diff --git a/doc/src/declarative/tutorial3.qdoc b/doc/src/declarative/tutorial3.qdoc
index 323395e..8293ef8 100644
--- a/doc/src/declarative/tutorial3.qdoc
+++ b/doc/src/declarative/tutorial3.qdoc
@@ -58,7 +58,7 @@ Here is the QML code:
\snippet examples/declarative/tutorials/helloworld/tutorial3.qml 2
First, we create a new \e down state for our text element.
-This state will be activated when the \l MouseRegion is pressed, and deactivated when it is released.
+This state will be activated when the \l MouseArea is pressed, and deactivated when it is released.
The \e down state includes a set of property changes from our implicit \e {default state}
(the items as they were initially defined in the QML).