summaryrefslogtreecommitdiffstats
path: root/examples/declarative/modelviews/listview/content
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-05-14 01:32:57 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-05-16 23:42:12 (GMT)
commit82d0b03c4f81c2832975d548917c03dbaddeee72 (patch)
treecb2d7ae0c7c8c5870f4c9439453c938a9423afad /examples/declarative/modelviews/listview/content
parent0aca20bf669ef7e7702ee96d0d0676392cfd1b72 (diff)
downloadQt-82d0b03c4f81c2832975d548917c03dbaddeee72.zip
Qt-82d0b03c4f81c2832975d548917c03dbaddeee72.tar.gz
Qt-82d0b03c4f81c2832975d548917c03dbaddeee72.tar.bz2
Restructure the examples. They are now organized into various
subdirectories to make it easier to locate examples for certain features (e.g. animation) and to distinguish between different types of examples (e.g. very basic examples vs complex demo-like examples).
Diffstat (limited to 'examples/declarative/modelviews/listview/content')
-rw-r--r--examples/declarative/modelviews/listview/content/ClickAutoRepeating.qml31
-rw-r--r--examples/declarative/modelviews/listview/content/MediaButton.qml35
-rw-r--r--examples/declarative/modelviews/listview/content/pics/add.pngbin0 -> 1577 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/archive-insert.pngbin0 -> 896 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/archive-remove.pngbin0 -> 1074 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/button-pressed.pngbin0 -> 571 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/button.pngbin0 -> 564 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/del.pngbin0 -> 1661 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/fruit-salad.jpgbin0 -> 17952 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/go-down.pngbin0 -> 892 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/go-up.pngbin0 -> 929 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/hamburger.jpgbin0 -> 8572 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/lemonade.jpgbin0 -> 6645 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/list-add.pngbin0 -> 907 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/list-remove.pngbin0 -> 498 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/moreDown.pngbin0 -> 217 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/moreUp.pngbin0 -> 212 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/pancakes.jpgbin0 -> 9163 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/trash.pngbin0 -> 989 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/vegetable-soup.jpgbin0 -> 8639 bytes
20 files changed, 66 insertions, 0 deletions
diff --git a/examples/declarative/modelviews/listview/content/ClickAutoRepeating.qml b/examples/declarative/modelviews/listview/content/ClickAutoRepeating.qml
new file mode 100644
index 0000000..f65c2b3
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/ClickAutoRepeating.qml
@@ -0,0 +1,31 @@
+import Qt 4.7
+
+Item {
+ id: page
+ property int repeatdelay: 300
+ property int repeatperiod: 75
+ property bool isPressed: false
+
+ signal pressed
+ signal released
+ signal clicked
+
+ SequentialAnimation on isPressed {
+ running: false
+ id: autoRepeat
+ PropertyAction { target: page; property: "isPressed"; value: true }
+ ScriptAction { script: page.pressed() }
+ ScriptAction { script: page.clicked() }
+ PauseAnimation { duration: repeatdelay }
+ SequentialAnimation {
+ loops: Animation.Infinite
+ ScriptAction { script: page.clicked() }
+ PauseAnimation { duration: repeatperiod }
+ }
+ }
+ MouseArea {
+ anchors.fill: parent
+ onPressed: autoRepeat.start()
+ onReleased: { autoRepeat.stop(); parent.isPressed = false; page.released() }
+ }
+}
diff --git a/examples/declarative/modelviews/listview/content/MediaButton.qml b/examples/declarative/modelviews/listview/content/MediaButton.qml
new file mode 100644
index 0000000..a625b4c
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/MediaButton.qml
@@ -0,0 +1,35 @@
+import Qt 4.7
+
+Item {
+ property variant text
+ signal clicked
+
+ id: container
+ Image {
+ id: normal
+ source: "pics/button.png"
+ }
+ Image {
+ id: pressed
+ source: "pics/button-pressed.png"
+ opacity: 0
+ }
+ MouseArea {
+ id: clickRegion
+ anchors.fill: normal
+ onClicked: { container.clicked(); }
+ }
+ Text {
+ font.bold: true
+ color: "white"
+ anchors.centerIn: normal
+ text: container.text
+ }
+ width: normal.width
+
+ states: State {
+ name: "Pressed"
+ when: clickRegion.pressed == true
+ PropertyChanges { target: pressed; opacity: 1 }
+ }
+}
diff --git a/examples/declarative/modelviews/listview/content/pics/add.png b/examples/declarative/modelviews/listview/content/pics/add.png
new file mode 100644
index 0000000..f29d84b
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/add.png
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/archive-insert.png b/examples/declarative/modelviews/listview/content/pics/archive-insert.png
new file mode 100644
index 0000000..b706248
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/archive-insert.png
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/archive-remove.png b/examples/declarative/modelviews/listview/content/pics/archive-remove.png
new file mode 100644
index 0000000..9640f6b
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/archive-remove.png
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/button-pressed.png b/examples/declarative/modelviews/listview/content/pics/button-pressed.png
new file mode 100644
index 0000000..e434d32
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/button-pressed.png
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/button.png b/examples/declarative/modelviews/listview/content/pics/button.png
new file mode 100644
index 0000000..56a63ce
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/button.png
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/del.png b/examples/declarative/modelviews/listview/content/pics/del.png
new file mode 100644
index 0000000..1d753a3
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/del.png
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/fruit-salad.jpg b/examples/declarative/modelviews/listview/content/pics/fruit-salad.jpg
new file mode 100644
index 0000000..da5a6b1
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/fruit-salad.jpg
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/go-down.png b/examples/declarative/modelviews/listview/content/pics/go-down.png
new file mode 100644
index 0000000..63331a5
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/go-down.png
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/go-up.png b/examples/declarative/modelviews/listview/content/pics/go-up.png
new file mode 100644
index 0000000..4459024
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/go-up.png
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/hamburger.jpg b/examples/declarative/modelviews/listview/content/pics/hamburger.jpg
new file mode 100644
index 0000000..d0a15be
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/hamburger.jpg
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/lemonade.jpg b/examples/declarative/modelviews/listview/content/pics/lemonade.jpg
new file mode 100644
index 0000000..db445c9
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/lemonade.jpg
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/list-add.png b/examples/declarative/modelviews/listview/content/pics/list-add.png
new file mode 100644
index 0000000..e029787
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/list-add.png
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/list-remove.png b/examples/declarative/modelviews/listview/content/pics/list-remove.png
new file mode 100644
index 0000000..2bb1a59
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/list-remove.png
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/moreDown.png b/examples/declarative/modelviews/listview/content/pics/moreDown.png
new file mode 100644
index 0000000..31a35d5
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/moreDown.png
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/moreUp.png b/examples/declarative/modelviews/listview/content/pics/moreUp.png
new file mode 100644
index 0000000..fefb9c9
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/moreUp.png
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/pancakes.jpg b/examples/declarative/modelviews/listview/content/pics/pancakes.jpg
new file mode 100644
index 0000000..60c4396
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/pancakes.jpg
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/trash.png b/examples/declarative/modelviews/listview/content/pics/trash.png
new file mode 100644
index 0000000..2042595
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/trash.png
Binary files differ
diff --git a/examples/declarative/modelviews/listview/content/pics/vegetable-soup.jpg b/examples/declarative/modelviews/listview/content/pics/vegetable-soup.jpg
new file mode 100644
index 0000000..9dce332
--- /dev/null
+++ b/examples/declarative/modelviews/listview/content/pics/vegetable-soup.jpg
Binary files differ