summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-08-19 01:50:35 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-08-19 01:50:35 (GMT)
commitb3c992c9b53d8f1630bdbc7472a29910f11ee035 (patch)
tree7074cf1a94ee556809c2b9db8a604be3fa8e4f9e /examples
parent1a226c81b7461b793fb94df5817701caef9c2014 (diff)
downloadQt-b3c992c9b53d8f1630bdbc7472a29910f11ee035.zip
Qt-b3c992c9b53d8f1630bdbc7472a29910f11ee035.tar.gz
Qt-b3c992c9b53d8f1630bdbc7472a29910f11ee035.tar.bz2
API improvements for MouseRegion and Drag
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/dial/dial.qml2
-rw-r--r--examples/declarative/minehunt/Description.qml2
-rw-r--r--examples/declarative/mouseregion/mouse.qml3
-rw-r--r--examples/declarative/slideswitch/Switch.qml2
-rw-r--r--examples/declarative/velocity/Day.qml2
5 files changed, 6 insertions, 5 deletions
diff --git a/examples/declarative/dial/dial.qml b/examples/declarative/dial/dial.qml
index 75bd9b1..75bd65c 100644
--- a/examples/declarative/dial/dial.qml
+++ b/examples/declarative/dial/dial.qml
@@ -26,7 +26,7 @@ Rect {
}
MouseRegion {
anchors.fill: parent
- drag.target: parent; drag.axis: "x"; drag.minimumX: 2; drag.maximumX: 128
+ drag.target: parent; drag.axis: "XAxis"; drag.minimumX: 2; drag.maximumX: 128
}
}
}
diff --git a/examples/declarative/minehunt/Description.qml b/examples/declarative/minehunt/Description.qml
index cf02bff..2bc182f 100644
--- a/examples/declarative/minehunt/Description.qml
+++ b/examples/declarative/minehunt/Description.qml
@@ -7,7 +7,7 @@ Item {
MouseRegion {
anchors.fill: parent
drag.target: Page
- drag.axis: "xy"
+ drag.axis: "XandYAxis"
drag.minimumX: 0
drag.maximumX: 1000
drag.minimumY: 0
diff --git a/examples/declarative/mouseregion/mouse.qml b/examples/declarative/mouseregion/mouse.qml
index 34c6e66..0cb8bb9 100644
--- a/examples/declarative/mouseregion/mouse.qml
+++ b/examples/declarative/mouseregion/mouse.qml
@@ -8,6 +8,7 @@ Rect {
color: "red"
Text { text: "Click"; anchors.centerIn: parent }
MouseRegion {
+ hoverEnabled: true
onPressed: { print('press (x: ' + mouse.x + ' y: ' + mouse.y + ' button: ' + (mouse.button == Qt.RightButton ? 'right' : 'left') + ' Shift: ' + (mouse.modifiers & Qt.ShiftModifier ? 'true' : 'false') + ')') }
onReleased: { print('release (x: ' + mouse.x + ' y: ' + mouse.y + ' isClick: ' + mouse.isClick + ' wasHeld: ' + mouse.wasHeld + ')') }
onClicked: { print('click (x: ' + mouse.x + ' y: ' + mouse.y + ' wasHeld: ' + mouse.wasHeld + ')') }
@@ -24,7 +25,7 @@ Rect {
Text { text: "Drag"; anchors.centerIn: parent }
MouseRegion {
drag.target: parent
- drag.axis: "x"
+ drag.axis: "XAxis"
drag.minimumX: 0
drag.maximumX: 150
onPressed: { print('press') }
diff --git a/examples/declarative/slideswitch/Switch.qml b/examples/declarative/slideswitch/Switch.qml
index b5de9ec..b476be2 100644
--- a/examples/declarative/slideswitch/Switch.qml
+++ b/examples/declarative/slideswitch/Switch.qml
@@ -36,7 +36,7 @@ Item {
anchors.fill: Knob
onClicked: { toggle() }
onReleased: { dorelease() }
- drag.target: Knob; drag.axis: "x"; drag.minimumX: 1; drag.maximumX: 78
+ drag.target: Knob; drag.axis: "XAxis"; drag.minimumX: 1; drag.maximumX: 78
}
states: [
State {
diff --git a/examples/declarative/velocity/Day.qml b/examples/declarative/velocity/Day.qml
index c959b0c..d67eabe 100644
--- a/examples/declarative/velocity/Day.qml
+++ b/examples/declarative/velocity/Day.qml
@@ -70,7 +70,7 @@ Rect {
onClicked: { MyText.focus = true }
anchors.fill: parent
drag.target: StickyPage
- drag.axis: "xy"
+ drag.axis: "XandYAxis"
drag.minimumY: 0
drag.maximumY: 500
drag.minimumX: 0