diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/declarative/advtutorial1.qdoc | 2 | ||||
-rw-r--r-- | doc/src/declarative/animation.qdoc | 4 | ||||
-rw-r--r-- | doc/src/declarative/basictypes.qdoc | 2 | ||||
-rw-r--r-- | doc/src/declarative/elements.qdoc | 2 | ||||
-rw-r--r-- | doc/src/declarative/example-slideswitch.qdoc | 6 | ||||
-rw-r--r-- | doc/src/declarative/focus.qdoc | 2 | ||||
-rw-r--r-- | doc/src/declarative/qmldebugging.qdoc | 2 | ||||
-rw-r--r-- | doc/src/declarative/qmlintro.qdoc | 8 | ||||
-rw-r--r-- | doc/src/declarative/qmlstates.qdoc | 2 | ||||
-rw-r--r-- | doc/src/declarative/qtbinding.qdoc | 8 | ||||
-rw-r--r-- | doc/src/declarative/scope.qdoc | 2 | ||||
-rw-r--r-- | doc/src/declarative/tutorial2.qdoc | 4 | ||||
-rw-r--r-- | doc/src/declarative/tutorial3.qdoc | 2 | ||||
-rw-r--r-- | doc/src/snippets/declarative/drag.qml | 2 | ||||
-rw-r--r-- | doc/src/snippets/declarative/mouseregion.qml | 4 |
15 files changed, 26 insertions, 26 deletions
diff --git a/doc/src/declarative/advtutorial1.qdoc b/doc/src/declarative/advtutorial1.qdoc index 90bac1b..611a65d 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 cfc100d..6f98cc1 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 86485d0..a5c0d8c 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 e3323c2..826d483 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 c731d4a..faadfea 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/focus.qdoc b/doc/src/declarative/focus.qdoc index bb9e1a4..392837d 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 97bc2f8..265dd0e 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 0a503d7..6cb691a 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/qmlstates.qdoc b/doc/src/declarative/qmlstates.qdoc index 867c714..a916ce8 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 8b9909e..0f1195c 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 470e8f6..8716c77 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 3e92e37..ee72ae8 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 e4d7995..bcf5f74 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). diff --git a/doc/src/snippets/declarative/drag.qml b/doc/src/snippets/declarative/drag.qml index 8735d0c..8e5b599 100644 --- a/doc/src/snippets/declarative/drag.qml +++ b/doc/src/snippets/declarative/drag.qml @@ -6,7 +6,7 @@ Rectangle { Image { id: pic; source: "qtlogo-64.png"; anchors.verticalCenter: parent.verticalCenter opacity: (600.0-pic.x) / 600; - MouseRegion { + MouseArea { anchors.fill: parent drag.target: pic drag.axis: "XAxis" diff --git a/doc/src/snippets/declarative/mouseregion.qml b/doc/src/snippets/declarative/mouseregion.qml index 67857f5..79f8f8f 100644 --- a/doc/src/snippets/declarative/mouseregion.qml +++ b/doc/src/snippets/declarative/mouseregion.qml @@ -4,13 +4,13 @@ Rectangle { width: 200; height: 100 HorizontalLayout { //! [0] Rectangle { width: 100; height: 100; color: "green" - MouseRegion { anchors.fill: parent; onClicked: { parent.color = 'red' } } + MouseArea { anchors.fill: parent; onClicked: { parent.color = 'red' } } } //! [0] //! [1] Rectangle { width: 100; height: 100; color: "green" - MouseRegion { + MouseArea { anchors.fill: parent acceptedButtons: Qt.LeftButton | Qt.RightButton onClicked: { |