summaryrefslogtreecommitdiffstats
path: root/examples/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative')
-rw-r--r--examples/declarative/anchors/anchor-changes.qml2
-rw-r--r--examples/declarative/animations/easing.qml2
-rw-r--r--examples/declarative/behaviours/MyRect.qml2
-rw-r--r--examples/declarative/behaviours/SideRect.qml2
-rw-r--r--examples/declarative/behaviours/test.qml2
-rw-r--r--examples/declarative/connections/content/Button.qml2
-rw-r--r--examples/declarative/dial/dial.qml2
-rw-r--r--examples/declarative/dynamic/qml/Button.qml2
-rw-r--r--examples/declarative/dynamic/qml/PaletteItem.qml2
-rw-r--r--examples/declarative/effects/effects.qml4
-rw-r--r--examples/declarative/layouts/Button.qml2
-rw-r--r--examples/declarative/listview/content/ClickAutoRepeating.qml2
-rw-r--r--examples/declarative/listview/content/MediaButton.qml2
-rw-r--r--examples/declarative/listview/dynamic.qml12
-rw-r--r--examples/declarative/listview/itemlist.qml2
-rw-r--r--examples/declarative/listview/recipes.qml2
-rw-r--r--examples/declarative/mouseregion/mouse.qml4
-rw-r--r--examples/declarative/parallax/qml/ParallaxView.qml2
-rw-r--r--examples/declarative/searchbox/SearchBox.qml4
-rw-r--r--examples/declarative/slideswitch/content/Switch.qml4
-rw-r--r--examples/declarative/states/states.qml6
-rw-r--r--examples/declarative/states/transitions.qml6
-rw-r--r--examples/declarative/tabwidget/TabWidget.qml2
-rw-r--r--examples/declarative/tic-tac-toe/content/TicTac.qml2
-rw-r--r--examples/declarative/tutorials/helloworld/Cell.qml2
-rw-r--r--examples/declarative/tutorials/helloworld/tutorial3.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/Button.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/Button.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Button.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Dialog.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/samegame.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/Button.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/samegame.qml2
-rw-r--r--examples/declarative/velocity/Day.qml2
-rw-r--r--examples/declarative/webview/content/FieldText.qml6
-rw-r--r--examples/declarative/webview/evalandattach.html2
-rw-r--r--examples/declarative/webview/evalandattach.qml2
-rw-r--r--examples/declarative/workerscript/workerscript.qml4
-rw-r--r--examples/declarative/xmldata/yahoonews.qml2
-rw-r--r--examples/declarative/xmlhttprequest/test.qml2
41 files changed, 57 insertions, 57 deletions
diff --git a/examples/declarative/anchors/anchor-changes.qml b/examples/declarative/anchors/anchor-changes.qml
index f6fd35d..99ca3db 100644
--- a/examples/declarative/anchors/anchor-changes.qml
+++ b/examples/declarative/anchors/anchor-changes.qml
@@ -25,7 +25,7 @@ Item {
Text { text: "Bottom"; anchors.bottom: parent.bottom }
}
- MouseRegion {
+ MouseArea {
anchors.fill: content
onPressed: window.state = "FullScreen"
onReleased: window.state = ""
diff --git a/examples/declarative/animations/easing.qml b/examples/declarative/animations/easing.qml
index 59e9b17..9b5bcc6 100644
--- a/examples/declarative/animations/easing.qml
+++ b/examples/declarative/animations/easing.qml
@@ -68,7 +68,7 @@ Rectangle {
border.color: "White"; border.width: 2
height: 32; width: 32; radius: 8; anchors.verticalCenter: parent.verticalCenter
- MouseRegion {
+ MouseArea {
onClicked: if (rect.state == '') rect.state = "right"; else rect.state = ''
anchors.fill: parent
}
diff --git a/examples/declarative/behaviours/MyRect.qml b/examples/declarative/behaviours/MyRect.qml
index a272e1f..caf0d83 100644
--- a/examples/declarative/behaviours/MyRect.qml
+++ b/examples/declarative/behaviours/MyRect.qml
@@ -6,7 +6,7 @@ Rectangle {
width: 100
height: 100
id: page
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: { bluerect.parent = page; bluerect.x=0 }
}
diff --git a/examples/declarative/behaviours/SideRect.qml b/examples/declarative/behaviours/SideRect.qml
index c7c7ebf..63b7db2 100644
--- a/examples/declarative/behaviours/SideRect.qml
+++ b/examples/declarative/behaviours/SideRect.qml
@@ -9,7 +9,7 @@ Rectangle {
width: 75; height: 50
radius: 5
border.width: 10; border.color: "white";
- MouseRegion {
+ MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: { focusRect.x = myRect.x; focusRect.y = myRect.y; focusRect.text = myRect.text }
diff --git a/examples/declarative/behaviours/test.qml b/examples/declarative/behaviours/test.qml
index 1869c45..fc3f4bf 100644
--- a/examples/declarative/behaviours/test.qml
+++ b/examples/declarative/behaviours/test.qml
@@ -5,7 +5,7 @@ Rectangle {
width: 800
height: 600
id: page
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: { bluerect.parent = page; console.log(mouseX); bluerect.x = mouseX; }
}
diff --git a/examples/declarative/connections/content/Button.qml b/examples/declarative/connections/content/Button.qml
index 1d46acc..0e33c78 100644
--- a/examples/declarative/connections/content/Button.qml
+++ b/examples/declarative/connections/content/Button.qml
@@ -8,5 +8,5 @@ Item {
signal clicked
Image { id: icon }
- MouseRegion { anchors.fill: icon; onClicked: button.clicked() }
+ MouseArea { anchors.fill: icon; onClicked: button.clicked() }
}
diff --git a/examples/declarative/dial/dial.qml b/examples/declarative/dial/dial.qml
index c7b7659..3aed70e 100644
--- a/examples/declarative/dial/dial.qml
+++ b/examples/declarative/dial/dial.qml
@@ -26,7 +26,7 @@ Rectangle {
GradientStop { position: 0.0; color: "#424242" }
GradientStop { position: 1.0; color: "black" }
}
- MouseRegion {
+ MouseArea {
anchors.fill: parent
drag.target: parent; drag.axis: "XAxis"; drag.minimumX: 2; drag.maximumX: container.width - 32
}
diff --git a/examples/declarative/dynamic/qml/Button.qml b/examples/declarative/dynamic/qml/Button.qml
index cf2ffa7..757e295 100644
--- a/examples/declarative/dynamic/qml/Button.qml
+++ b/examples/declarative/dynamic/qml/Button.qml
@@ -19,6 +19,6 @@ Rectangle {
color: if(!mr.pressed){activePalette.button;}else{activePalette.dark;}
}
}
- MouseRegion { id:mr; anchors.fill: parent; onClicked: container.clicked() }
+ MouseArea { id:mr; anchors.fill: parent; onClicked: container.clicked() }
Text { id: text; anchors.centerIn:parent; font.pointSize: 10; text: parent.text; color: activePalette.buttonText }
}
diff --git a/examples/declarative/dynamic/qml/PaletteItem.qml b/examples/declarative/dynamic/qml/PaletteItem.qml
index bb6036d..8a9a9ee 100644
--- a/examples/declarative/dynamic/qml/PaletteItem.qml
+++ b/examples/declarative/dynamic/qml/PaletteItem.qml
@@ -4,7 +4,7 @@ GenericItem {
id: itemButton
property string file
Script { source: "itemCreation.js" }
- MouseRegion {
+ MouseArea {
anchors.fill: parent;
onPressed: startDrag(mouse);
onPositionChanged: moveDrag(mouse);
diff --git a/examples/declarative/effects/effects.qml b/examples/declarative/effects/effects.qml
index 51658ff..0674433 100644
--- a/examples/declarative/effects/effects.qml
+++ b/examples/declarative/effects/effects.qml
@@ -20,7 +20,7 @@ Rectangle {
}
}
- MouseRegion { anchors.fill: parent; onClicked: blurEffect.running = !blurEffect.running }
+ MouseArea { anchors.fill: parent; onClicked: blurEffect.running = !blurEffect.running }
}
Text { text: "Blur"; anchors.top: blur.bottom; anchors.horizontalCenter: blur.horizontalCenter }
@@ -36,7 +36,7 @@ Rectangle {
offset.y: NumberAnimation { id: dropShadowEffect; from: 0; to: 10; duration: 1000; running: false; repeat: true; }
}
- MouseRegion { anchors.fill: parent; onClicked: dropShadowEffect.running = !dropShadowEffect.running }
+ MouseArea { anchors.fill: parent; onClicked: dropShadowEffect.running = !dropShadowEffect.running }
}
Image {
diff --git a/examples/declarative/layouts/Button.qml b/examples/declarative/layouts/Button.qml
index 44d0c7b..0bdb9fc 100644
--- a/examples/declarative/layouts/Button.qml
+++ b/examples/declarative/layouts/Button.qml
@@ -7,7 +7,7 @@ Rectangle { border.color: "black"; color: "steelblue"; radius: 5; width: pix.wid
Image { id: pix; x: 5; y:5; source: parent.icon}
Text { id: textelement; text: page.text; color: "white"; x:pix.width+pix.x+3; anchors.verticalCenter: pix.verticalCenter;}
- MouseRegion{ id:mr; anchors.fill: parent; onClicked: {parent.focus = true; page.clicked()}}
+ MouseArea{ id:mr; anchors.fill: parent; onClicked: {parent.focus = true; page.clicked()}}
states:
State{ name:"pressed"; when:mr.pressed
diff --git a/examples/declarative/listview/content/ClickAutoRepeating.qml b/examples/declarative/listview/content/ClickAutoRepeating.qml
index be37b50..0850f4e 100644
--- a/examples/declarative/listview/content/ClickAutoRepeating.qml
+++ b/examples/declarative/listview/content/ClickAutoRepeating.qml
@@ -23,7 +23,7 @@ Item {
PauseAnimation { duration: repeatperiod }
}
}
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onPressed: autoRepeat.start()
onReleased: { autoRepeat.stop(); parent.isPressed = false; page.released() }
diff --git a/examples/declarative/listview/content/MediaButton.qml b/examples/declarative/listview/content/MediaButton.qml
index 1c88844..e9065c1 100644
--- a/examples/declarative/listview/content/MediaButton.qml
+++ b/examples/declarative/listview/content/MediaButton.qml
@@ -14,7 +14,7 @@ Item {
source: "pics/button-pressed.png"
opacity: 0
}
- MouseRegion {
+ MouseArea {
id: clickRegion
anchors.fill: normal
onClicked: { container.clicked(); }
diff --git a/examples/declarative/listview/dynamic.qml b/examples/declarative/listview/dynamic.qml
index dd898f9..81550d7 100644
--- a/examples/declarative/listview/dynamic.qml
+++ b/examples/declarative/listview/dynamic.qml
@@ -57,10 +57,10 @@ Rectangle {
Column {
id: moveButtons; x: 5; width: childrenRect.width; anchors.verticalCenter: parent.verticalCenter
Image { source: "content/pics/go-up.png"
- MouseRegion { anchors.fill: parent; onClicked: fruitModel.move(index,index-1,1) }
+ MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index-1,1) }
}
Image { source: "content/pics/go-down.png"
- MouseRegion { anchors.fill: parent; onClicked: fruitModel.move(index,index+1,1) }
+ MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index+1,1) }
}
}
@@ -93,7 +93,7 @@ Rectangle {
Image {
id: removeButton; source: "content/pics/archive-remove.png"
anchors { verticalCenter: parent.verticalCenter; right: parent.right; rightMargin: 10 }
- MouseRegion { anchors.fill:parent; onClicked: fruitModel.remove(index) }
+ MouseArea { anchors.fill:parent; onClicked: fruitModel.remove(index) }
}
}
}
@@ -131,7 +131,7 @@ Rectangle {
spacing: 8
id: buttons
Image { source: "content/pics/archive-insert.png"
- MouseRegion { anchors.fill: parent;
+ MouseArea { anchors.fill: parent;
onClicked: {
fruitModel.append({
"name":"Pizza Margarita",
@@ -142,7 +142,7 @@ Rectangle {
}
}
Image { source: "content/pics/archive-insert.png"
- MouseRegion { anchors.fill: parent;
+ MouseArea { anchors.fill: parent;
onClicked: {
fruitModel.insert(0,{
"name":"Pizza Supreme",
@@ -153,7 +153,7 @@ Rectangle {
}
}
Image { source: "content/pics/archive-remove.png"
- MouseRegion { anchors.fill: parent; onClicked: fruitModel.clear() }
+ MouseArea { anchors.fill: parent; onClicked: fruitModel.clear() }
}
}
}
diff --git a/examples/declarative/listview/itemlist.qml b/examples/declarative/listview/itemlist.qml
index 6392153..54981b7 100644
--- a/examples/declarative/listview/itemlist.qml
+++ b/examples/declarative/listview/itemlist.qml
@@ -51,7 +51,7 @@ Rectangle {
Rectangle {
width: 5; height: 5
radius: 3
- MouseRegion { width: 20; height: 20; anchors.centerIn: parent; onClicked: view.currentIndex = index }
+ MouseArea { width: 20; height: 20; anchors.centerIn: parent; onClicked: view.currentIndex = index }
color: view.currentIndex == index ? "blue" : "white"
}
}
diff --git a/examples/declarative/listview/recipes.qml b/examples/declarative/listview/recipes.qml
index 3410f56..f848be0 100644
--- a/examples/declarative/listview/recipes.qml
+++ b/examples/declarative/listview/recipes.qml
@@ -32,7 +32,7 @@ Rectangle {
// This mouse region covers the entire delegate.
// When clicked it changes mode to 'Details'. If we are already
// in Details mode, then no change will happen.
- MouseRegion {
+ MouseArea {
id: pageMouse
anchors.fill: parent
onClicked: wrapper.state = 'Details';
diff --git a/examples/declarative/mouseregion/mouse.qml b/examples/declarative/mouseregion/mouse.qml
index d07d471..9191f8a 100644
--- a/examples/declarative/mouseregion/mouse.qml
+++ b/examples/declarative/mouseregion/mouse.qml
@@ -7,7 +7,7 @@ Rectangle {
width: 50; height: 50
color: "red"
Text { text: "Click"; anchors.centerIn: parent }
- MouseRegion {
+ MouseArea {
hoverEnabled: true
acceptedButtons: Qt.LeftButton | Qt.RightButton
onPressed: { console.log('press (x: ' + mouse.x + ' y: ' + mouse.y + ' button: ' + (mouse.button == Qt.RightButton ? 'right' : 'left') + ' Shift: ' + (mouse.modifiers & Qt.ShiftModifier ? 'true' : 'false') + ')') }
@@ -24,7 +24,7 @@ Rectangle {
y: 100; width: 50; height: 50
color: "blue"
Text { text: "Drag"; anchors.centerIn: parent }
- MouseRegion {
+ MouseArea {
drag.target: parent
drag.axis: "XAxis"
drag.minimumX: 0
diff --git a/examples/declarative/parallax/qml/ParallaxView.qml b/examples/declarative/parallax/qml/ParallaxView.qml
index f10d374..811891b 100644
--- a/examples/declarative/parallax/qml/ParallaxView.qml
+++ b/examples/declarative/parallax/qml/ParallaxView.qml
@@ -58,7 +58,7 @@ Item {
transformOrigin: "Center"
}
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: { root.currentIndex = index }
}
diff --git a/examples/declarative/searchbox/SearchBox.qml b/examples/declarative/searchbox/SearchBox.qml
index 7077a11..524b652 100644
--- a/examples/declarative/searchbox/SearchBox.qml
+++ b/examples/declarative/searchbox/SearchBox.qml
@@ -23,7 +23,7 @@ FocusScope {
text: "Type something..."; color: "gray"; font.italic: true
}
- MouseRegion { anchors.fill: parent; onClicked: focusScope.focus = true }
+ MouseArea { anchors.fill: parent; onClicked: focusScope.focus = true }
TextInput {
id: textInput
@@ -38,7 +38,7 @@ FocusScope {
anchors.verticalCenter: parent.verticalCenter
source: "images/edit-clear-locationbar-rtl.png"; opacity: 0
- MouseRegion { anchors.fill: parent; onClicked: { textInput.text = ''; focusScope.focus = true } }
+ MouseArea { anchors.fill: parent; onClicked: { textInput.text = ''; focusScope.focus = true } }
}
states: State {
diff --git a/examples/declarative/slideswitch/content/Switch.qml b/examples/declarative/slideswitch/content/Switch.qml
index c7f1c24..930f471 100644
--- a/examples/declarative/slideswitch/content/Switch.qml
+++ b/examples/declarative/slideswitch/content/Switch.qml
@@ -32,7 +32,7 @@ Item {
//![4]
Image {
id: background; source: "background.svg"
- MouseRegion { anchors.fill: parent; onClicked: toggle() }
+ MouseArea { anchors.fill: parent; onClicked: toggle() }
}
//![4]
@@ -40,7 +40,7 @@ Item {
Image {
id: knob; source: "knob.svg"; x: 1; y: 2
- MouseRegion {
+ MouseArea {
anchors.fill: parent
drag.target: knob; drag.axis: "XAxis"; drag.minimumX: 1; drag.maximumX: 78
onClicked: toggle()
diff --git a/examples/declarative/states/states.qml b/examples/declarative/states/states.qml
index 6f6b40f..89f2421 100644
--- a/examples/declarative/states/states.qml
+++ b/examples/declarative/states/states.qml
@@ -10,7 +10,7 @@ Rectangle {
anchors { left: parent.left; top: parent.top; leftMargin: 10; topMargin: 20 }
width: 64; height: 64; radius: 6
color: "Transparent"; border.color: "Gray"
- MouseRegion { anchors.fill: parent; onClicked: page.state = '' }
+ MouseArea { anchors.fill: parent; onClicked: page.state = '' }
}
// Another target region. Clicking in here sets the state to 'Position1'
@@ -19,7 +19,7 @@ Rectangle {
anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 20 }
width: 64; height: 64; radius: 6
color: "Transparent"; border.color: "Gray"
- MouseRegion { anchors.fill: parent; onClicked: page.state = 'Position1' }
+ MouseArea { anchors.fill: parent; onClicked: page.state = 'Position1' }
}
// Another target region. Clicking in here sets the state to 'Position2'
@@ -28,7 +28,7 @@ Rectangle {
anchors { left: parent.left; bottom: parent.bottom; leftMargin: 10; bottomMargin: 20 }
width: 64; height: 64; radius: 6
color: "Transparent"; border.color: "Gray"
- MouseRegion { anchors.fill: parent; onClicked: page.state = 'Position2' }
+ MouseArea { anchors.fill: parent; onClicked: page.state = 'Position2' }
}
// The image which will be moved when my state changes
diff --git a/examples/declarative/states/transitions.qml b/examples/declarative/states/transitions.qml
index ba97d9be..48d5f60 100644
--- a/examples/declarative/states/transitions.qml
+++ b/examples/declarative/states/transitions.qml
@@ -10,7 +10,7 @@ Rectangle {
anchors { left: parent.left; top: parent.top; leftMargin: 10; topMargin: 20 }
width: 64; height: 64; radius: 6
color: "Transparent"; border.color: "Gray"
- MouseRegion { anchors.fill: parent; onClicked: page.state = '' }
+ MouseArea { anchors.fill: parent; onClicked: page.state = '' }
}
// Another target region. Clicking in here sets the state to 'Position1'
@@ -19,7 +19,7 @@ Rectangle {
anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 20 }
width: 64; height: 64; radius: 6
color: "Transparent"; border.color: "Gray"
- MouseRegion { anchors.fill: parent; onClicked: page.state = 'Position1' }
+ MouseArea { anchors.fill: parent; onClicked: page.state = 'Position1' }
}
// Another target region. Clicking in here sets the state to 'Position2'
@@ -28,7 +28,7 @@ Rectangle {
anchors { left: parent.left; bottom: parent.bottom; leftMargin: 10; bottomMargin: 20 }
width: 64; height: 64; radius: 6
color: "Transparent"; border.color: "Gray"
- MouseRegion { anchors.fill: parent; onClicked: page.state = 'Position2' }
+ MouseArea { anchors.fill: parent; onClicked: page.state = 'Position2' }
}
// The image which will be moved when my state changes
diff --git a/examples/declarative/tabwidget/TabWidget.qml b/examples/declarative/tabwidget/TabWidget.qml
index c56f41e..f0dfee8 100644
--- a/examples/declarative/tabwidget/TabWidget.qml
+++ b/examples/declarative/tabwidget/TabWidget.qml
@@ -25,7 +25,7 @@ Item {
text: stack.children[index].title
elide: Text.ElideRight
}
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: page.current = index
}
diff --git a/examples/declarative/tic-tac-toe/content/TicTac.qml b/examples/declarative/tic-tac-toe/content/TicTac.qml
index eb80743..ccb7b78 100644
--- a/examples/declarative/tic-tac-toe/content/TicTac.qml
+++ b/examples/declarative/tic-tac-toe/content/TicTac.qml
@@ -13,7 +13,7 @@ Item {
anchors.centerIn: parent
}
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: parent.clicked()
}
diff --git a/examples/declarative/tutorials/helloworld/Cell.qml b/examples/declarative/tutorials/helloworld/Cell.qml
index c38b40e..de4f3bb 100644
--- a/examples/declarative/tutorials/helloworld/Cell.qml
+++ b/examples/declarative/tutorials/helloworld/Cell.qml
@@ -23,7 +23,7 @@ Item {
//![2]
//![3]
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: container.clicked(container.color)
}
diff --git a/examples/declarative/tutorials/helloworld/tutorial3.qml b/examples/declarative/tutorials/helloworld/tutorial3.qml
index 107b066..9eaa009 100644
--- a/examples/declarative/tutorials/helloworld/tutorial3.qml
+++ b/examples/declarative/tutorials/helloworld/tutorial3.qml
@@ -14,7 +14,7 @@ Rectangle {
transformOrigin: Item.Center
//![1]
- MouseRegion { id: mouseRegion; anchors.fill: parent }
+ MouseArea { id: mouseRegion; anchors.fill: parent }
//![1]
//![2]
diff --git a/examples/declarative/tutorials/samegame/samegame1/Button.qml b/examples/declarative/tutorials/samegame/samegame1/Button.qml
index 85e6777..2e31ff8 100644
--- a/examples/declarative/tutorials/samegame/samegame1/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame1/Button.qml
@@ -18,7 +18,7 @@ Rectangle {
GradientStop { position: 1.0; color: activePalette.button }
}
- MouseRegion { id: mr; anchors.fill: parent; onClicked: container.clicked() }
+ MouseArea { id: mr; anchors.fill: parent; onClicked: container.clicked() }
Text {
id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText
diff --git a/examples/declarative/tutorials/samegame/samegame2/Button.qml b/examples/declarative/tutorials/samegame/samegame2/Button.qml
index 63cd555..6629302 100644
--- a/examples/declarative/tutorials/samegame/samegame2/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame2/Button.qml
@@ -17,7 +17,7 @@ Rectangle {
GradientStop { position: 1.0; color: activePalette.button }
}
- MouseRegion { id: mr; anchors.fill: parent; onClicked: container.clicked() }
+ MouseArea { id: mr; anchors.fill: parent; onClicked: container.clicked() }
Text {
id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText
diff --git a/examples/declarative/tutorials/samegame/samegame3/Button.qml b/examples/declarative/tutorials/samegame/samegame3/Button.qml
index 63cd555..6629302 100644
--- a/examples/declarative/tutorials/samegame/samegame3/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/Button.qml
@@ -17,7 +17,7 @@ Rectangle {
GradientStop { position: 1.0; color: activePalette.button }
}
- MouseRegion { id: mr; anchors.fill: parent; onClicked: container.clicked() }
+ MouseArea { id: mr; anchors.fill: parent; onClicked: container.clicked() }
Text {
id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText
diff --git a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml
index 96dc246..9d35832 100644
--- a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml
@@ -18,6 +18,6 @@ Rectangle {
NumberAnimation { duration: 1000 }
}
Text { id: myText; anchors.centerIn: parent; text: "Hello World!" }
- MouseRegion { id: mr; anchors.fill: parent; onClicked: forceClose(); }
+ MouseArea { id: mr; anchors.fill: parent; onClicked: forceClose(); }
}
//![0]
diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.qml b/examples/declarative/tutorials/samegame/samegame3/samegame.qml
index 8bdb428..c616397 100644
--- a/examples/declarative/tutorials/samegame/samegame3/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/samegame.qml
@@ -27,7 +27,7 @@ Rectangle {
width: parent.width - (parent.width % tileSize);
height: parent.height - (parent.height % tileSize);
- MouseRegion {
+ MouseArea {
id: gameMR
anchors.fill: parent; onClicked: handleClick(mouse.x,mouse.y);
}
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml
index 63cd555..6629302 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml
@@ -17,7 +17,7 @@ Rectangle {
GradientStop { position: 1.0; color: activePalette.button }
}
- MouseRegion { id: mr; anchors.fill: parent; onClicked: container.clicked() }
+ MouseArea { id: mr; anchors.fill: parent; onClicked: container.clicked() }
Text {
id: txtItem; text: container.text; anchors.centerIn: container; color: activePalette.buttonText
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
index 3371d53..ed9fd32 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
@@ -17,5 +17,5 @@ Rectangle {
NumberAnimation { duration: 1000 }
}
Text { id: myText; anchors.centerIn: parent; text: "Hello World!" }
- MouseRegion { id: mr; anchors.fill: parent; onClicked: forceClose(); }
+ MouseArea { id: mr; anchors.fill: parent; onClicked: forceClose(); }
}
diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/declarative/tutorials/samegame/samegame4/samegame.qml
index 19b929f..a228e60 100644
--- a/examples/declarative/tutorials/samegame/samegame4/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/samegame.qml
@@ -27,7 +27,7 @@ Rectangle {
width: parent.width - (parent.width % getTileSize());
height: parent.height - (parent.height % getTileSize());
- MouseRegion {
+ MouseArea {
id: gameMR
anchors.fill: parent; onClicked: handleClick(mouse.x,mouse.y);
}
diff --git a/examples/declarative/velocity/Day.qml b/examples/declarative/velocity/Day.qml
index 030fa13..c39f99b 100644
--- a/examples/declarative/velocity/Day.qml
+++ b/examples/declarative/velocity/Day.qml
@@ -48,7 +48,7 @@ Rectangle {
x: stickyImage.x
width: stickyImage.width * stickyImage.scale
height: stickyImage.height * stickyImage.scale
- MouseRegion {
+ MouseArea {
id: mouse
onClicked: { myText.focus = true }
anchors.fill: parent
diff --git a/examples/declarative/webview/content/FieldText.qml b/examples/declarative/webview/content/FieldText.qml
index b1c1938..19b6acc 100644
--- a/examples/declarative/webview/content/FieldText.qml
+++ b/examples/declarative/webview/content/FieldText.qml
@@ -93,17 +93,17 @@ Item {
}
}
- MouseRegion {
+ MouseArea {
anchors.fill: cancelIcon
onClicked: { reset() }
}
- MouseRegion {
+ MouseArea {
anchors.fill: confirmIcon
onClicked: { confirm() }
}
- MouseRegion {
+ MouseArea {
id: editRegion
anchors.fill: textEdit
onClicked: { edit() }
diff --git a/examples/declarative/webview/evalandattach.html b/examples/declarative/webview/evalandattach.html
index c0992bb..48a1c33 100644
--- a/examples/declarative/webview/evalandattach.html
+++ b/examples/declarative/webview/evalandattach.html
@@ -1,7 +1,7 @@
<body bgcolor=gray onload="ftext.confirmed.connect (ftext_confirmed); ">
<script>
do_it = function () {var oPressed = document.getElementById('pressed');
- oPressed.innerHTML = 'MouseRegion in QML clicked!';};
+ oPressed.innerHTML = 'MouseArea in QML clicked!';};
ftext_confirmed = function () { statusText1.text = ftext.text; var oT = document.getElementById('htmlTextInput'); oT.value = ftext.text }
</script>
<table border=1>
diff --git a/examples/declarative/webview/evalandattach.qml b/examples/declarative/webview/evalandattach.qml
index 1b211c9..94301cd 100644
--- a/examples/declarative/webview/evalandattach.qml
+++ b/examples/declarative/webview/evalandattach.qml
@@ -21,7 +21,7 @@ Item {
anchors.right: parent.right
}
- MouseRegion {
+ MouseArea {
anchors.fill: teksti
onClicked: { webView.evaluateJavaScript ("do_it()") }
}
diff --git a/examples/declarative/workerscript/workerscript.qml b/examples/declarative/workerscript/workerscript.qml
index e36d4d4..0566f1f 100644
--- a/examples/declarative/workerscript/workerscript.qml
+++ b/examples/declarative/workerscript/workerscript.qml
@@ -20,7 +20,7 @@ Rectangle {
anchors.leftMargin: 20
color: "red"
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: myWorker.sendMessage( { rectangle: "red", x: mouse.x, y: mouse.y } );
}
@@ -32,7 +32,7 @@ Rectangle {
anchors.rightMargin: 20
color: "blue"
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: myWorker.sendMessage( { rectangle: "blue", x: mouse.x, y: mouse.y } );
}
diff --git a/examples/declarative/xmldata/yahoonews.qml b/examples/declarative/xmldata/yahoonews.qml
index 23463c2..b80e29c 100644
--- a/examples/declarative/xmldata/yahoonews.qml
+++ b/examples/declarative/xmldata/yahoonews.qml
@@ -22,7 +22,7 @@ Rectangle {
id: delegate
height: wrapper.height + 10
- MouseRegion {
+ MouseArea {
anchors.fill: wrapper
onPressed: delegate.ListView.view.currentIndex = index;
onClicked: if (wrapper.state == 'Details') wrapper.state = ''; else wrapper.state = 'Details';
diff --git a/examples/declarative/xmlhttprequest/test.qml b/examples/declarative/xmlhttprequest/test.qml
index 18e328b..15ac54b 100644
--- a/examples/declarative/xmlhttprequest/test.qml
+++ b/examples/declarative/xmlhttprequest/test.qml
@@ -3,7 +3,7 @@ import Qt 4.6
Rectangle {
width: 800; height: 600
- MouseRegion {
+ MouseArea {
anchors.fill: parent
onClicked: {