summaryrefslogtreecommitdiffstats
path: root/src/declarative/util
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-02-22 05:10:37 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-02-22 05:10:37 (GMT)
commit1ad3918809ea6c4ac3c1b185581f1c8e76f02aca (patch)
tree79c712286b530383b90ef426a560bed93208b1d5 /src/declarative/util
parentbffef59bcefd73a5474f3c3052c951977b60eb27 (diff)
downloadQt-1ad3918809ea6c4ac3c1b185581f1c8e76f02aca.zip
Qt-1ad3918809ea6c4ac3c1b185581f1c8e76f02aca.tar.gz
Qt-1ad3918809ea6c4ac3c1b185581f1c8e76f02aca.tar.bz2
Rename MouseRegion -> MouseArea
Diffstat (limited to 'src/declarative/util')
-rw-r--r--src/declarative/util/qmlanimation.cpp8
-rw-r--r--src/declarative/util/qmlconnection.cpp6
-rw-r--r--src/declarative/util/qmllistmodel.cpp2
-rw-r--r--src/declarative/util/qmlpropertychanges.cpp4
4 files changed, 10 insertions, 10 deletions
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp
index 82bd33e..d7ddfce 100644
--- a/src/declarative/util/qmlanimation.cpp
+++ b/src/declarative/util/qmlanimation.cpp
@@ -176,7 +176,7 @@ QmlAbstractAnimation::QmlAbstractAnimation(QmlAbstractAnimationPrivate &dd, QObj
The \c running property can be set to declaratively control whether or not
an animation is running. The following example will animate a rectangle
- whenever the \l MouseRegion is pressed.
+ whenever the \l MouseArea is pressed.
\code
Rectangle {
@@ -185,7 +185,7 @@ QmlAbstractAnimation::QmlAbstractAnimation(QmlAbstractAnimationPrivate &dd, QObj
running: myMouse.pressed
from: 0; to: 100
}
- MouseRegion { id: myMouse }
+ MouseArea { id: myMouse }
}
\endcode
@@ -1794,7 +1794,7 @@ void QmlPropertyAnimationPrivate::convertVariant(QVariant &variant, int type)
Fade out \c theObject when clicked:
\qml
- MouseRegion {
+ MouseArea {
anchors.fill: theObject
onClicked: PropertyAnimation { target: theObject; property: "opacity"; to: 0 }
}
@@ -2214,7 +2214,7 @@ void QmlPropertyAnimation::setProperties(const QString &prop)
color: Qt.rgba(0,0,1)
//need to explicitly specify target and property
NumberAnimation { id: theAnim; target: theRect; property: "x" to: 500 }
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: theAnim.start()
}
diff --git a/src/declarative/util/qmlconnection.cpp b/src/declarative/util/qmlconnection.cpp
index 9bec3bb..3d04aaf 100644
--- a/src/declarative/util/qmlconnection.cpp
+++ b/src/declarative/util/qmlconnection.cpp
@@ -72,7 +72,7 @@ public:
"on<Signal>" handler that reacts when a signal is received, like this:
\qml
- MouseRegion {
+ MouseArea {
onClicked: { foo(x+123,y+456) }
}
\endqml
@@ -94,7 +94,7 @@ public:
like this:
\qml
- MouseRegion {
+ MouseArea {
Connection {
signal: "clicked(x,y)"
script: { foo(x+123,y+456) }
@@ -106,7 +106,7 @@ public:
the sender of the signal, and the script is the default attribute:
\qml
- MouseRegion {
+ MouseArea {
id: mr
}
...
diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp
index af41dfd..8fda3ae 100644
--- a/src/declarative/util/qmllistmodel.cpp
+++ b/src/declarative/util/qmllistmodel.cpp
@@ -188,7 +188,7 @@ static void dump(ModelNode *node, int ind);
Text { text: '$'+cost; anchors.right: parent.right }
// Double the price when clicked.
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: fruitModel.set(index, "cost", cost*2)
}
diff --git a/src/declarative/util/qmlpropertychanges.cpp b/src/declarative/util/qmlpropertychanges.cpp
index 84f1e9a..068cb4d 100644
--- a/src/declarative/util/qmlpropertychanges.cpp
+++ b/src/declarative/util/qmlpropertychanges.cpp
@@ -83,7 +83,7 @@ QT_BEGIN_NAMESPACE
}
}
- MouseRegion { anchors.fill: parent; onClicked: myText.state = 'myState' }
+ MouseArea { anchors.fill: parent; onClicked: myText.state = 'myState' }
}
\endqml
@@ -91,7 +91,7 @@ QT_BEGIN_NAMESPACE
\qml
PropertyChanges {
- target: myMouseRegion
+ target: myMouseArea
onClicked: doSomethingDifferent()
}
\endqml