diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-05-14 01:32:57 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-05-16 23:42:12 (GMT) |
commit | 82d0b03c4f81c2832975d548917c03dbaddeee72 (patch) | |
tree | cb2d7ae0c7c8c5870f4c9439453c938a9423afad /examples/declarative/modelviews/listview/content | |
parent | 0aca20bf669ef7e7702ee96d0d0676392cfd1b72 (diff) | |
download | Qt-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')
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 Binary files differnew file mode 100644 index 0000000..f29d84b --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/add.png diff --git a/examples/declarative/modelviews/listview/content/pics/archive-insert.png b/examples/declarative/modelviews/listview/content/pics/archive-insert.png Binary files differnew file mode 100644 index 0000000..b706248 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/archive-insert.png diff --git a/examples/declarative/modelviews/listview/content/pics/archive-remove.png b/examples/declarative/modelviews/listview/content/pics/archive-remove.png Binary files differnew file mode 100644 index 0000000..9640f6b --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/archive-remove.png diff --git a/examples/declarative/modelviews/listview/content/pics/button-pressed.png b/examples/declarative/modelviews/listview/content/pics/button-pressed.png Binary files differnew file mode 100644 index 0000000..e434d32 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/button-pressed.png diff --git a/examples/declarative/modelviews/listview/content/pics/button.png b/examples/declarative/modelviews/listview/content/pics/button.png Binary files differnew file mode 100644 index 0000000..56a63ce --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/button.png diff --git a/examples/declarative/modelviews/listview/content/pics/del.png b/examples/declarative/modelviews/listview/content/pics/del.png Binary files differnew file mode 100644 index 0000000..1d753a3 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/del.png diff --git a/examples/declarative/modelviews/listview/content/pics/fruit-salad.jpg b/examples/declarative/modelviews/listview/content/pics/fruit-salad.jpg Binary files differnew file mode 100644 index 0000000..da5a6b1 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/fruit-salad.jpg diff --git a/examples/declarative/modelviews/listview/content/pics/go-down.png b/examples/declarative/modelviews/listview/content/pics/go-down.png Binary files differnew file mode 100644 index 0000000..63331a5 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/go-down.png diff --git a/examples/declarative/modelviews/listview/content/pics/go-up.png b/examples/declarative/modelviews/listview/content/pics/go-up.png Binary files differnew file mode 100644 index 0000000..4459024 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/go-up.png diff --git a/examples/declarative/modelviews/listview/content/pics/hamburger.jpg b/examples/declarative/modelviews/listview/content/pics/hamburger.jpg Binary files differnew file mode 100644 index 0000000..d0a15be --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/hamburger.jpg diff --git a/examples/declarative/modelviews/listview/content/pics/lemonade.jpg b/examples/declarative/modelviews/listview/content/pics/lemonade.jpg Binary files differnew file mode 100644 index 0000000..db445c9 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/lemonade.jpg diff --git a/examples/declarative/modelviews/listview/content/pics/list-add.png b/examples/declarative/modelviews/listview/content/pics/list-add.png Binary files differnew file mode 100644 index 0000000..e029787 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/list-add.png diff --git a/examples/declarative/modelviews/listview/content/pics/list-remove.png b/examples/declarative/modelviews/listview/content/pics/list-remove.png Binary files differnew file mode 100644 index 0000000..2bb1a59 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/list-remove.png diff --git a/examples/declarative/modelviews/listview/content/pics/moreDown.png b/examples/declarative/modelviews/listview/content/pics/moreDown.png Binary files differnew file mode 100644 index 0000000..31a35d5 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/moreDown.png diff --git a/examples/declarative/modelviews/listview/content/pics/moreUp.png b/examples/declarative/modelviews/listview/content/pics/moreUp.png Binary files differnew file mode 100644 index 0000000..fefb9c9 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/moreUp.png diff --git a/examples/declarative/modelviews/listview/content/pics/pancakes.jpg b/examples/declarative/modelviews/listview/content/pics/pancakes.jpg Binary files differnew file mode 100644 index 0000000..60c4396 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/pancakes.jpg diff --git a/examples/declarative/modelviews/listview/content/pics/trash.png b/examples/declarative/modelviews/listview/content/pics/trash.png Binary files differnew file mode 100644 index 0000000..2042595 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/trash.png diff --git a/examples/declarative/modelviews/listview/content/pics/vegetable-soup.jpg b/examples/declarative/modelviews/listview/content/pics/vegetable-soup.jpg Binary files differnew file mode 100644 index 0000000..9dce332 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/pics/vegetable-soup.jpg |