diff options
author | artoka <arto.katajasalo@digia.com> | 2011-11-17 14:49:48 (GMT) |
---|---|---|
committer | Casper van Donderen <casper.vandonderen@nokia.com> | 2011-11-17 14:58:16 (GMT) |
commit | ee9307f9679953ab15d29756cd7fde930ac9080b (patch) | |
tree | 2a065083385e22eb3e470664b30434b181754df3 /examples | |
parent | b3919f7bd1cf1732155a7eec0becdf2e4ff157da (diff) | |
download | Qt-ee9307f9679953ab15d29756cd7fde930ac9080b.zip Qt-ee9307f9679953ab15d29756cd7fde930ac9080b.tar.gz Qt-ee9307f9679953ab15d29756cd7fde930ac9080b.tar.bz2 |
Modelview examples modifications.
modelviews\listview dynamiclist, expandingdelegates, highlight,
hightlightranges and sections example modifications
Modified the examples to use centralized qmlapplicationviewer,
removed duplicate files and modified project files according to
the changes.
Merge-request: 2719
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/modelviews/listview/content/PetsModel.qml | 98 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/content/PressAndHoldButton.qml | 82 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/content/RecipesModel.qml | 129 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/content/TextButton.qml | 78 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/content/pics/arrow-down.png | bin | 594 -> 0 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/content/pics/arrow-up.png | bin | 692 -> 0 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/content/pics/list-delete.png | bin | 831 -> 0 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/content/pics/minus-sign.png | bin | 250 -> 0 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/content/pics/plus-sign.png | bin | 462 -> 0 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist.qml | 203 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/dynamiclist.pro | 4 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/dynamiclist.qmlproject (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/listview.qmlproject) | 6 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/main.cpp | 2 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/PetsModel.qml (renamed from examples/declarative/modelviews/listview/sections/qml/content/PetsModel.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/PressAndHoldButton.qml (renamed from examples/declarative/modelviews/listview/sections/qml/content/PressAndHoldButton.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/RecipesModel.qml (renamed from examples/declarative/modelviews/listview/sections/qml/content/RecipesModel.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/TextButton.qml (renamed from examples/declarative/modelviews/listview/sections/qml/content/TextButton.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/arrow-down.png (renamed from examples/declarative/modelviews/listview/sections/qml/content/pics/arrow-down.png) | bin | 594 -> 594 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/arrow-up.png (renamed from examples/declarative/modelviews/listview/sections/qml/content/pics/arrow-up.png) | bin | 692 -> 692 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/fruit-salad.jpg (renamed from examples/declarative/modelviews/listview/sections/qml/content/pics/fruit-salad.jpg) | bin | 17952 -> 17952 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/hamburger.jpg (renamed from examples/declarative/modelviews/listview/sections/qml/content/pics/hamburger.jpg) | bin | 8572 -> 8572 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/lemonade.jpg (renamed from examples/declarative/modelviews/listview/sections/qml/content/pics/lemonade.jpg) | bin | 6645 -> 6645 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/list-delete.png (renamed from examples/declarative/modelviews/listview/sections/qml/content/pics/list-delete.png) | bin | 831 -> 831 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/minus-sign.png (renamed from examples/declarative/modelviews/listview/sections/qml/content/pics/minus-sign.png) | bin | 250 -> 250 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/moreDown.png (renamed from examples/declarative/modelviews/listview/sections/qml/content/pics/moreDown.png) | bin | 217 -> 217 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/moreUp.png (renamed from examples/declarative/modelviews/listview/sections/qml/content/pics/moreUp.png) | bin | 212 -> 212 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/pancakes.jpg (renamed from examples/declarative/modelviews/listview/sections/qml/content/pics/pancakes.jpg) | bin | 9163 -> 9163 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/plus-sign.png (renamed from examples/declarative/modelviews/listview/sections/qml/content/pics/plus-sign.png) | bin | 462 -> 462 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/vegetable-soup.jpg (renamed from examples/declarative/modelviews/listview/sections/qml/content/pics/vegetable-soup.jpg) | bin | 8639 -> 8639 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/dynamiclist.qml (renamed from examples/declarative/modelviews/listview/sections/qml/dynamiclist.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/expandingdelegates.qml (renamed from examples/declarative/modelviews/listview/sections/qml/expandingdelegates.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/highlight.qml (renamed from examples/declarative/modelviews/listview/sections/qml/highlight.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/highlightranges.qml (renamed from examples/declarative/modelviews/listview/sections/qml/highlightranges.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/sections.qml (renamed from examples/declarative/modelviews/listview/sections/qml/sections.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qmlapplicationviewer/qmlapplicationviewer.cpp | 197 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qmlapplicationviewer/qmlapplicationviewer.h | 79 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/dynamiclist/qmlapplicationviewer/qmlapplicationviewer.pri | 154 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates.qml | 202 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.pro | 4 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.qmlproject | 16 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/main.cpp | 2 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/PetsModel.qml (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/PetsModel.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/PressAndHoldButton.qml (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/PressAndHoldButton.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/RecipesModel.qml (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/RecipesModel.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/TextButton.qml (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/TextButton.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/arrow-down.png (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/pics/arrow-down.png) | bin | 594 -> 594 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/arrow-up.png (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/pics/arrow-up.png) | bin | 692 -> 692 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/fruit-salad.jpg (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/pics/fruit-salad.jpg) | bin | 17952 -> 17952 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/hamburger.jpg (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/pics/hamburger.jpg) | bin | 8572 -> 8572 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/lemonade.jpg (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/pics/lemonade.jpg) | bin | 6645 -> 6645 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/list-delete.png (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/pics/list-delete.png) | bin | 831 -> 831 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/minus-sign.png (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/pics/minus-sign.png) | bin | 250 -> 250 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/moreDown.png (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/pics/moreDown.png) | bin | 217 -> 217 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/moreUp.png (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/pics/moreUp.png) | bin | 212 -> 212 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/pancakes.jpg (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/pics/pancakes.jpg) | bin | 9163 -> 9163 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/plus-sign.png (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/pics/plus-sign.png) | bin | 462 -> 462 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/vegetable-soup.jpg (renamed from examples/declarative/modelviews/listview/highlightranges/qml/content/pics/vegetable-soup.jpg) | bin | 8639 -> 8639 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/dynamiclist.qml (renamed from examples/declarative/modelviews/listview/highlightranges/qml/dynamiclist.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/expandingdelegates.qml (renamed from examples/declarative/modelviews/listview/highlightranges/qml/expandingdelegates.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/highlight.qml (renamed from examples/declarative/modelviews/listview/highlightranges/qml/highlight.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/highlightranges.qml (renamed from examples/declarative/modelviews/listview/highlightranges/qml/highlightranges.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/sections.qml (renamed from examples/declarative/modelviews/listview/highlightranges/qml/sections.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qmlapplicationviewer/qmlapplicationviewer.cpp | 197 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qmlapplicationviewer/qmlapplicationviewer.h | 79 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/expandingdelegates/qmlapplicationviewer/qmlapplicationviewer.pri | 154 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight.qml | 99 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/highlight.pro | 4 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/highlight.qmlproject (renamed from examples/declarative/modelviews/listview/highlight/qml/listview.qmlproject) | 6 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/main.cpp | 2 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/PetsModel.qml (renamed from examples/declarative/modelviews/listview/highlight/qml/content/PetsModel.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/PressAndHoldButton.qml (renamed from examples/declarative/modelviews/listview/highlight/qml/content/PressAndHoldButton.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/RecipesModel.qml (renamed from examples/declarative/modelviews/listview/highlight/qml/content/RecipesModel.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/TextButton.qml (renamed from examples/declarative/modelviews/listview/highlight/qml/content/TextButton.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/arrow-down.png (renamed from examples/declarative/modelviews/listview/highlight/qml/content/pics/arrow-down.png) | bin | 594 -> 594 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/arrow-up.png (renamed from examples/declarative/modelviews/listview/highlight/qml/content/pics/arrow-up.png) | bin | 692 -> 692 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/fruit-salad.jpg (renamed from examples/declarative/modelviews/listview/highlight/qml/content/pics/fruit-salad.jpg) | bin | 17952 -> 17952 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/hamburger.jpg (renamed from examples/declarative/modelviews/listview/highlight/qml/content/pics/hamburger.jpg) | bin | 8572 -> 8572 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/lemonade.jpg (renamed from examples/declarative/modelviews/listview/highlight/qml/content/pics/lemonade.jpg) | bin | 6645 -> 6645 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/list-delete.png (renamed from examples/declarative/modelviews/listview/highlight/qml/content/pics/list-delete.png) | bin | 831 -> 831 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/minus-sign.png (renamed from examples/declarative/modelviews/listview/highlight/qml/content/pics/minus-sign.png) | bin | 250 -> 250 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/moreDown.png (renamed from examples/declarative/modelviews/listview/highlight/qml/content/pics/moreDown.png) | bin | 217 -> 217 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/moreUp.png (renamed from examples/declarative/modelviews/listview/highlight/qml/content/pics/moreUp.png) | bin | 212 -> 212 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/pancakes.jpg (renamed from examples/declarative/modelviews/listview/highlight/qml/content/pics/pancakes.jpg) | bin | 9163 -> 9163 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/plus-sign.png (renamed from examples/declarative/modelviews/listview/highlight/qml/content/pics/plus-sign.png) | bin | 462 -> 462 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/vegetable-soup.jpg (renamed from examples/declarative/modelviews/listview/highlight/qml/content/pics/vegetable-soup.jpg) | bin | 8639 -> 8639 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/dynamiclist.qml (renamed from examples/declarative/modelviews/listview/highlight/qml/dynamiclist.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/expandingdelegates.qml (renamed from examples/declarative/modelviews/listview/highlight/qml/expandingdelegates.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/highlight.qml (renamed from examples/declarative/modelviews/listview/highlight/qml/highlight.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/highlightranges.qml (renamed from examples/declarative/modelviews/listview/highlight/qml/highlightranges.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qml/highlight/sections.qml (renamed from examples/declarative/modelviews/listview/highlight/qml/sections.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qmlapplicationviewer/qmlapplicationviewer.cpp | 197 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qmlapplicationviewer/qmlapplicationviewer.h | 79 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlight/qmlapplicationviewer/qmlapplicationviewer.pri | 154 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges.qml | 122 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/highlightranges.pro | 4 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/highlightranges.qmlproject (renamed from examples/declarative/modelviews/listview/highlightranges/qml/listview.qmlproject) | 6 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/main.cpp | 2 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/PetsModel.qml (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/PetsModel.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/PressAndHoldButton.qml (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/PressAndHoldButton.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/RecipesModel.qml (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/RecipesModel.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/TextButton.qml (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/TextButton.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/arrow-down.png (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/arrow-down.png) | bin | 594 -> 594 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/arrow-up.png (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/arrow-up.png) | bin | 692 -> 692 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/fruit-salad.jpg (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/fruit-salad.jpg) | bin | 17952 -> 17952 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/hamburger.jpg (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/hamburger.jpg) | bin | 8572 -> 8572 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/lemonade.jpg (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/lemonade.jpg) | bin | 6645 -> 6645 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/list-delete.png (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/list-delete.png) | bin | 831 -> 831 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/minus-sign.png (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/minus-sign.png) | bin | 250 -> 250 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/moreDown.png (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/moreDown.png) | bin | 217 -> 217 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/moreUp.png (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/moreUp.png) | bin | 212 -> 212 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/pancakes.jpg (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/pancakes.jpg) | bin | 9163 -> 9163 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/plus-sign.png (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/plus-sign.png) | bin | 462 -> 462 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/vegetable-soup.jpg (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/vegetable-soup.jpg) | bin | 8639 -> 8639 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/dynamiclist.qml (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/dynamiclist.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/expandingdelegates.qml (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/highlight.qml (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/highlight.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/highlightranges.qml (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/highlightranges.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/sections.qml (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/sections.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qmlapplicationviewer/qmlapplicationviewer.cpp | 197 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qmlapplicationviewer/qmlapplicationviewer.h | 79 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/highlightranges/qmlapplicationviewer/qmlapplicationviewer.pri | 154 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/listview.qmlproject | 16 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections.qml | 87 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/main.cpp | 2 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/listview.qmlproject | 16 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/PetsModel.qml (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/PetsModel.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/PressAndHoldButton.qml (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/PressAndHoldButton.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/RecipesModel.qml (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/RecipesModel.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/TextButton.qml (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/TextButton.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/pics/arrow-down.png (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/arrow-down.png) | bin | 594 -> 594 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/pics/arrow-up.png (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/arrow-up.png) | bin | 692 -> 692 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/pics/fruit-salad.jpg (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/fruit-salad.jpg) | bin | 17952 -> 17952 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/pics/hamburger.jpg (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/hamburger.jpg) | bin | 8572 -> 8572 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/pics/lemonade.jpg (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/lemonade.jpg) | bin | 6645 -> 6645 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/pics/list-delete.png (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/list-delete.png) | bin | 831 -> 831 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/pics/minus-sign.png (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/minus-sign.png) | bin | 250 -> 250 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/pics/moreDown.png (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/moreDown.png) | bin | 217 -> 217 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/pics/moreUp.png (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/moreUp.png) | bin | 212 -> 212 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/pics/pancakes.jpg (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/pancakes.jpg) | bin | 9163 -> 9163 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/pics/plus-sign.png (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/plus-sign.png) | bin | 462 -> 462 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/content/pics/vegetable-soup.jpg (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/vegetable-soup.jpg) | bin | 8639 -> 8639 bytes | |||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/dynamiclist.qml (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/dynamiclist.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/expandingdelegates.qml (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/expandingdelegates.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/highlight.qml (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/highlight.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/highlightranges.qml (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/highlightranges.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qml/sections/sections.qml (renamed from examples/declarative/modelviews/listview/dynamiclist/qml/sections.qml) | 0 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qmlapplicationviewer/qmlapplicationviewer.cpp | 197 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qmlapplicationviewer/qmlapplicationviewer.h | 79 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/qmlapplicationviewer/qmlapplicationviewer.pri | 154 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/sections.pro | 4 | ||||
-rw-r--r-- | examples/declarative/modelviews/listview/sections/sections.qmlproject (renamed from examples/declarative/modelviews/listview/expandingdelegates/qml/listview.qmlproject) | 6 |
151 files changed, 43 insertions, 3309 deletions
diff --git a/examples/declarative/modelviews/listview/content/PetsModel.qml b/examples/declarative/modelviews/listview/content/PetsModel.qml deleted file mode 100644 index d7375a7..0000000 --- a/examples/declarative/modelviews/listview/content/PetsModel.qml +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 1.0 - -ListModel { - ListElement { - name: "Polly" - type: "Parrot" - age: 12 - size: "Small" - } - ListElement { - name: "Penny" - type: "Turtle" - age: 4 - size: "Small" - } - ListElement { - name: "Warren" - type: "Rabbit" - age: 2 - size: "Small" - } - ListElement { - name: "Spot" - type: "Dog" - age: 9 - size: "Medium" - } - ListElement { - name: "Schrödinger" - type: "Cat" - age: 2 - size: "Medium" - } - ListElement { - name: "Joey" - type: "Kangaroo" - age: 1 - size: "Medium" - } - ListElement { - name: "Kimba" - type: "Bunny" - age: 65 - size: "Large" - } - ListElement { - name: "Rover" - type: "Dog" - age: 5 - size: "Large" - } - ListElement { - name: "Tiny" - type: "Elephant" - age: 15 - size: "Large" - } -} diff --git a/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml b/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml deleted file mode 100644 index b79b5cb..0000000 --- a/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 1.0 - -Image { - id: container - - property int repeatDelay: 300 - property int repeatDuration: 75 - property bool pressed: false - - signal clicked - - scale: pressed ? 0.9 : 1 - - function release() { - autoRepeatClicks.stop() - container.pressed = false - } - - SequentialAnimation on pressed { - id: autoRepeatClicks - running: false - - PropertyAction { target: container; property: "pressed"; value: true } - ScriptAction { script: container.clicked() } - PauseAnimation { duration: repeatDelay } - - SequentialAnimation { - loops: Animation.Infinite - ScriptAction { script: container.clicked() } - PauseAnimation { duration: repeatDuration } - } - } - - MouseArea { - anchors.fill: parent - - onPressed: autoRepeatClicks.start() - onReleased: container.release() - onCanceled: container.release() - } -} - diff --git a/examples/declarative/modelviews/listview/content/RecipesModel.qml b/examples/declarative/modelviews/listview/content/RecipesModel.qml deleted file mode 100644 index 893d639..0000000 --- a/examples/declarative/modelviews/listview/content/RecipesModel.qml +++ /dev/null @@ -1,129 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 1.0 - -ListModel { - ListElement { - title: "Pancakes" - picture: "content/pics/pancakes.jpg" - ingredients: "<html> - <ul> - <li> 1 cup (150g) self-raising flour - <li> 1 tbs caster sugar - <li> 3/4 cup (185ml) milk - <li> 1 egg - </ul> - </html>" - method: "<html> - <ol> - <li> Sift flour and sugar together into a bowl. Add a pinch of salt. - <li> Beat milk and egg together, then add to dry ingredients. Beat until smooth. - <li> Pour mixture into a pan on medium heat and cook until bubbles appear on the surface. - <li> Turn over and cook other side until golden. - </ol> - </html>" - } - ListElement { - title: "Fruit Salad" - picture: "content/pics/fruit-salad.jpg" - ingredients: "* Seasonal Fruit" - method: "* Chop fruit and place in a bowl." - } - ListElement { - title: "Vegetable Soup" - picture: "content/pics/vegetable-soup.jpg" - ingredients: "<html> - <ul> - <li> 1 onion - <li> 1 turnip - <li> 1 potato - <li> 1 carrot - <li> 1 head of celery - <li> 1 1/2 litres of water - </ul> - </html>" - method: "<html> - <ol> - <li> Chop vegetables. - <li> Boil in water until vegetables soften. - <li> Season with salt and pepper to taste. - </ol> - </html>" - } - ListElement { - title: "Hamburger" - picture: "content/pics/hamburger.jpg" - ingredients: "<html> - <ul> - <li> 500g minced beef - <li> Seasoning - <li> lettuce, tomato, onion, cheese - <li> 1 hamburger bun for each burger - </ul> - </html>" - method: "<html> - <ol> - <li> Mix the beef, together with seasoning, in a food processor. - <li> Shape the beef into burgers. - <li> Grill the burgers for about 5 mins on each side (until cooked through) - <li> Serve each burger on a bun with ketchup, cheese, lettuce, tomato and onion. - </ol> - </html>" - } - ListElement { - title: "Lemonade" - picture: "content/pics/lemonade.jpg" - ingredients: "<html> - <ul> - <li> 1 cup Lemon Juice - <li> 1 cup Sugar - <li> 6 Cups of Water (2 cups warm water, 4 cups cold water) - </ul> - </html>" - method: "<html> - <ol> - <li> Pour 2 cups of warm water into a pitcher and stir in sugar until it dissolves. - <li> Pour in lemon juice, stir again, and add 4 cups of cold water. - <li> Chill or serve over ice cubes. - </ol> - </html>" - } -} diff --git a/examples/declarative/modelviews/listview/content/TextButton.qml b/examples/declarative/modelviews/listview/content/TextButton.qml deleted file mode 100644 index 9eef671..0000000 --- a/examples/declarative/modelviews/listview/content/TextButton.qml +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 1.0 - -Rectangle { - id: container - - property alias text: label.text - - signal clicked - - width: label.width + 20; height: label.height + 6 - smooth: true - radius: 10 - - gradient: Gradient { - GradientStop { id: gradientStop; position: 0.0; color: palette.light } - GradientStop { position: 1.0; color: palette.button } - } - - SystemPalette { id: palette } - - MouseArea { - id: mouseArea - anchors.fill: parent - onClicked: { container.clicked() } - } - - Text { - id: label - anchors.centerIn: parent - } - - states: State { - name: "pressed" - when: mouseArea.pressed - PropertyChanges { target: gradientStop; color: palette.dark } - } -} - diff --git a/examples/declarative/modelviews/listview/content/pics/arrow-down.png b/examples/declarative/modelviews/listview/content/pics/arrow-down.png Binary files differdeleted file mode 100644 index 29d1d44..0000000 --- a/examples/declarative/modelviews/listview/content/pics/arrow-down.png +++ /dev/null diff --git a/examples/declarative/modelviews/listview/content/pics/arrow-up.png b/examples/declarative/modelviews/listview/content/pics/arrow-up.png Binary files differdeleted file mode 100644 index e437312..0000000 --- a/examples/declarative/modelviews/listview/content/pics/arrow-up.png +++ /dev/null diff --git a/examples/declarative/modelviews/listview/content/pics/list-delete.png b/examples/declarative/modelviews/listview/content/pics/list-delete.png Binary files differdeleted file mode 100644 index df2a147..0000000 --- a/examples/declarative/modelviews/listview/content/pics/list-delete.png +++ /dev/null diff --git a/examples/declarative/modelviews/listview/content/pics/minus-sign.png b/examples/declarative/modelviews/listview/content/pics/minus-sign.png Binary files differdeleted file mode 100644 index d6f233d..0000000 --- a/examples/declarative/modelviews/listview/content/pics/minus-sign.png +++ /dev/null diff --git a/examples/declarative/modelviews/listview/content/pics/plus-sign.png b/examples/declarative/modelviews/listview/content/pics/plus-sign.png Binary files differdeleted file mode 100644 index 40df113..0000000 --- a/examples/declarative/modelviews/listview/content/pics/plus-sign.png +++ /dev/null diff --git a/examples/declarative/modelviews/listview/dynamiclist.qml b/examples/declarative/modelviews/listview/dynamiclist.qml deleted file mode 100644 index 350a337..0000000 --- a/examples/declarative/modelviews/listview/dynamiclist.qml +++ /dev/null @@ -1,203 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 1.0 -import "content" - -// This example shows how items can be dynamically added to and removed from -// a ListModel, and how these list modifications can be animated. - -Rectangle { - id: container - width: 500; height: 400 - color: "#343434" - - // The model: - ListModel { - id: fruitModel - - ListElement { - name: "Apple"; cost: 2.45 - attributes: [ - ListElement { description: "Core" }, - ListElement { description: "Deciduous" } - ] - } - ListElement { - name: "Banana"; cost: 1.95 - attributes: [ - ListElement { description: "Tropical" }, - ListElement { description: "Seedless" } - ] - } - ListElement { - name: "Cumquat"; cost: 3.25 - attributes: [ - ListElement { description: "Citrus" } - ] - } - ListElement { - name: "Durian"; cost: 9.95 - attributes: [ - ListElement { description: "Tropical" }, - ListElement { description: "Smelly" } - ] - } - } - - // The delegate for each fruit in the model: - Component { - id: listDelegate - - Item { - id: delegateItem - width: listView.width; height: 55 - clip: true - - Row { - anchors.verticalCenter: parent.verticalCenter - spacing: 10 - - Column { - Image { - source: "content/pics/arrow-up.png" - MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index, index-1, 1) } - } - Image { source: "content/pics/arrow-down.png" - MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index, index+1, 1) } - } - } - - Column { - anchors.verticalCenter: parent.verticalCenter - - Text { - text: name - font.pixelSize: 15 - color: "white" - } - Row { - spacing: 5 - Repeater { - model: attributes - Text { text: description; color: "White" } - } - } - } - } - - Row { - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - spacing: 10 - - PressAndHoldButton { - anchors.verticalCenter: parent.verticalCenter - source: "content/pics/plus-sign.png" - onClicked: fruitModel.setProperty(index, "cost", cost + 0.25) - } - - Text { - id: costText - anchors.verticalCenter: parent.verticalCenter - text: '$' + Number(cost).toFixed(2) - font.pixelSize: 15 - color: "white" - font.bold: true - } - - PressAndHoldButton { - anchors.verticalCenter: parent.verticalCenter - source: "content/pics/minus-sign.png" - onClicked: fruitModel.setProperty(index, "cost", Math.max(0,cost-0.25)) - } - - Image { - source: "content/pics/list-delete.png" - MouseArea { anchors.fill:parent; onClicked: fruitModel.remove(index) } - } - } - - // Animate adding and removing of items: - - ListView.onAdd: SequentialAnimation { - PropertyAction { target: delegateItem; property: "height"; value: 0 } - NumberAnimation { target: delegateItem; property: "height"; to: 55; duration: 250; easing.type: Easing.InOutQuad } - } - - ListView.onRemove: SequentialAnimation { - PropertyAction { target: delegateItem; property: "ListView.delayRemove"; value: true } - NumberAnimation { target: delegateItem; property: "height"; to: 0; duration: 250; easing.type: Easing.InOutQuad } - - // Make sure delayRemove is set back to false so that the item can be destroyed - PropertyAction { target: delegateItem; property: "ListView.delayRemove"; value: false } - } - } - } - - // The view: - ListView { - id: listView - anchors.fill: parent; anchors.margins: 20 - model: fruitModel - delegate: listDelegate - } - - Row { - anchors { left: parent.left; bottom: parent.bottom; margins: 20 } - spacing: 10 - - TextButton { - text: "Add an item" - onClicked: { - fruitModel.append({ - "name": "Pizza Margarita", - "cost": 5.95, - "attributes": [{"description": "Cheese"}, {"description": "Tomato"}] - }) - } - } - - TextButton { - text: "Remove all items" - onClicked: fruitModel.clear() - } - } -} - diff --git a/examples/declarative/modelviews/listview/dynamiclist/dynamiclist.pro b/examples/declarative/modelviews/listview/dynamiclist/dynamiclist.pro index 39b1ad1..9d8a3fe 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/dynamiclist.pro +++ b/examples/declarative/modelviews/listview/dynamiclist/dynamiclist.pro @@ -1,5 +1,5 @@ # Add more folders to ship with the application, here -folder_01.source = qml +folder_01.source = qml/dynamic folder_01.target = qml DEPLOYMENTFOLDERS = folder_01 @@ -35,5 +35,5 @@ symbian:TARGET.UID3 = 0xE49D962F SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(qmlapplicationviewer/qmlapplicationviewer.pri) +include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/listview.qmlproject b/examples/declarative/modelviews/listview/dynamiclist/dynamiclist.qmlproject index d4909f8..14b7b95 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/listview.qmlproject +++ b/examples/declarative/modelviews/listview/dynamiclist/dynamiclist.qmlproject @@ -3,13 +3,13 @@ import QmlProject 1.0 Project { /* Include .qml, .js, and image files from current directory and subdirectories */ QmlFiles { - directory: "." + directory: "qml/dynamic" } JavaScriptFiles { - directory: "." + directory: "qml/dynamic" } ImageFiles { - directory: "." + directory: "qml/dynamic" } /* List of plugin directories passed to QML runtime */ // importPaths: [ " ../exampleplugin " ] diff --git a/examples/declarative/modelviews/listview/dynamiclist/main.cpp b/examples/declarative/modelviews/listview/dynamiclist/main.cpp index 757b113..fad1426 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/main.cpp +++ b/examples/declarative/modelviews/listview/dynamiclist/main.cpp @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) QmlApplicationViewer viewer; viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto); - viewer.setMainQmlFile(QLatin1String("qml/qml/dynamiclist.qml")); + viewer.setMainQmlFile(QLatin1String("qml/dynamic/dynamiclist.qml")); viewer.showExpanded(); return app.exec(); diff --git a/examples/declarative/modelviews/listview/sections/qml/content/PetsModel.qml b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/PetsModel.qml index 5220763..5220763 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/PetsModel.qml +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/PetsModel.qml diff --git a/examples/declarative/modelviews/listview/sections/qml/content/PressAndHoldButton.qml b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/PressAndHoldButton.qml index d6808a4..d6808a4 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/PressAndHoldButton.qml +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/PressAndHoldButton.qml diff --git a/examples/declarative/modelviews/listview/sections/qml/content/RecipesModel.qml b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/RecipesModel.qml index 6056b90..6056b90 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/RecipesModel.qml +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/RecipesModel.qml diff --git a/examples/declarative/modelviews/listview/sections/qml/content/TextButton.qml b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/TextButton.qml index f26d775..f26d775 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/TextButton.qml +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/TextButton.qml diff --git a/examples/declarative/modelviews/listview/sections/qml/content/pics/arrow-down.png b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/arrow-down.png Binary files differindex 29d1d44..29d1d44 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/pics/arrow-down.png +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/arrow-down.png diff --git a/examples/declarative/modelviews/listview/sections/qml/content/pics/arrow-up.png b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/arrow-up.png Binary files differindex e437312..e437312 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/pics/arrow-up.png +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/arrow-up.png diff --git a/examples/declarative/modelviews/listview/sections/qml/content/pics/fruit-salad.jpg b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/fruit-salad.jpg Binary files differindex da5a6b1..da5a6b1 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/pics/fruit-salad.jpg +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/fruit-salad.jpg diff --git a/examples/declarative/modelviews/listview/sections/qml/content/pics/hamburger.jpg b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/hamburger.jpg Binary files differindex d0a15be..d0a15be 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/pics/hamburger.jpg +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/hamburger.jpg diff --git a/examples/declarative/modelviews/listview/sections/qml/content/pics/lemonade.jpg b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/lemonade.jpg Binary files differindex db445c9..db445c9 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/pics/lemonade.jpg +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/lemonade.jpg diff --git a/examples/declarative/modelviews/listview/sections/qml/content/pics/list-delete.png b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/list-delete.png Binary files differindex df2a147..df2a147 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/pics/list-delete.png +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/list-delete.png diff --git a/examples/declarative/modelviews/listview/sections/qml/content/pics/minus-sign.png b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/minus-sign.png Binary files differindex d6f233d..d6f233d 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/pics/minus-sign.png +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/minus-sign.png diff --git a/examples/declarative/modelviews/listview/sections/qml/content/pics/moreDown.png b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/moreDown.png Binary files differindex 31a35d5..31a35d5 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/pics/moreDown.png +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/moreDown.png diff --git a/examples/declarative/modelviews/listview/sections/qml/content/pics/moreUp.png b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/moreUp.png Binary files differindex fefb9c9..fefb9c9 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/pics/moreUp.png +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/moreUp.png diff --git a/examples/declarative/modelviews/listview/sections/qml/content/pics/pancakes.jpg b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/pancakes.jpg Binary files differindex 60c4396..60c4396 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/pics/pancakes.jpg +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/pancakes.jpg diff --git a/examples/declarative/modelviews/listview/sections/qml/content/pics/plus-sign.png b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/plus-sign.png Binary files differindex 40df113..40df113 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/pics/plus-sign.png +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/plus-sign.png diff --git a/examples/declarative/modelviews/listview/sections/qml/content/pics/vegetable-soup.jpg b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/vegetable-soup.jpg Binary files differindex 9dce332..9dce332 100644 --- a/examples/declarative/modelviews/listview/sections/qml/content/pics/vegetable-soup.jpg +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/content/pics/vegetable-soup.jpg diff --git a/examples/declarative/modelviews/listview/sections/qml/dynamiclist.qml b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/dynamiclist.qml index f25f0fa..f25f0fa 100644 --- a/examples/declarative/modelviews/listview/sections/qml/dynamiclist.qml +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/dynamiclist.qml diff --git a/examples/declarative/modelviews/listview/sections/qml/expandingdelegates.qml b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/expandingdelegates.qml index bd3d3a9..bd3d3a9 100644 --- a/examples/declarative/modelviews/listview/sections/qml/expandingdelegates.qml +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/expandingdelegates.qml diff --git a/examples/declarative/modelviews/listview/sections/qml/highlight.qml b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/highlight.qml index 249c73b..249c73b 100644 --- a/examples/declarative/modelviews/listview/sections/qml/highlight.qml +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/highlight.qml diff --git a/examples/declarative/modelviews/listview/sections/qml/highlightranges.qml b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/highlightranges.qml index 58d37a3..58d37a3 100644 --- a/examples/declarative/modelviews/listview/sections/qml/highlightranges.qml +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/highlightranges.qml diff --git a/examples/declarative/modelviews/listview/sections/qml/sections.qml b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/sections.qml index 3248899..3248899 100644 --- a/examples/declarative/modelviews/listview/sections/qml/sections.qml +++ b/examples/declarative/modelviews/listview/dynamiclist/qml/dynamic/sections.qml diff --git a/examples/declarative/modelviews/listview/dynamiclist/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/declarative/modelviews/listview/dynamiclist/qmlapplicationviewer/qmlapplicationviewer.cpp deleted file mode 100644 index 411a04c..0000000 --- a/examples/declarative/modelviews/listview/dynamiclist/qmlapplicationviewer/qmlapplicationviewer.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// checksum 0x28c7 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#include "qmlapplicationviewer.h" - -#include <QtCore/QCoreApplication> -#include <QtCore/QDir> -#include <QtCore/QFileInfo> -#include <QtDeclarative/QDeclarativeComponent> -#include <QtDeclarative/QDeclarativeEngine> -#include <QtDeclarative/QDeclarativeContext> - -#if defined(QMLJSDEBUGGER) -#include <qt_private/qdeclarativedebughelper_p.h> -#endif - -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) -#include <jsdebuggeragent.h> -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) -#include <qdeclarativeviewobserver.h> -#endif - -#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK) -#include <eikenv.h> -#include <eikappui.h> -#include <aknenv.h> -#include <aknappui.h> -#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK - -#if defined(QMLJSDEBUGGER) - -// Enable debugging before any QDeclarativeEngine is created -struct QmlJsDebuggingEnabler -{ - QmlJsDebuggingEnabler() - { - QDeclarativeDebugHelper::enableDebugging(); - } -}; - -// Execute code in constructor before first QDeclarativeEngine is instantiated -static QmlJsDebuggingEnabler enableDebuggingHelper; - -#endif // QMLJSDEBUGGER - -class QmlApplicationViewerPrivate -{ - QString mainQmlFile; - friend class QmlApplicationViewer; - static QString adjustPath(const QString &path); -}; - -QString QmlApplicationViewerPrivate::adjustPath(const QString &path) -{ -#ifdef Q_OS_UNIX -#ifdef Q_OS_MAC - if (!QDir::isAbsolutePath(path)) - return QCoreApplication::applicationDirPath() - + QLatin1String("/../Resources/") + path; -#else - const QString pathInShareDir = QCoreApplication::applicationDirPath() - + QLatin1String("/../share/") - + QFileInfo(QCoreApplication::applicationFilePath()).fileName() - + QLatin1Char('/') + path; - if (QFileInfo(pathInShareDir).exists()) - return pathInShareDir; -#endif -#endif - return path; -} - -QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) : - QDeclarativeView(parent), - m_d(new QmlApplicationViewerPrivate) -{ - connect(engine(), SIGNAL(quit()), SLOT(close())); - setResizeMode(QDeclarativeView::SizeRootObjectToView); -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) - new QmlJSDebugger::JSDebuggerAgent(engine()); -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) - new QmlJSDebugger::QDeclarativeViewObserver(this, parent); -#endif -} - -QmlApplicationViewer::~QmlApplicationViewer() -{ - delete m_d; -} - -void QmlApplicationViewer::setMainQmlFile(const QString &file) -{ - m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file); - setSource(QUrl::fromLocalFile(m_d->mainQmlFile)); -} - -void QmlApplicationViewer::addImportPath(const QString &path) -{ - engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path)); -} - -void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) -{ -#ifdef Q_OS_SYMBIAN - if (orientation != ScreenOrientationAuto) { -#if defined(ORIENTATIONLOCK) - const CAknAppUiBase::TAppUiOrientation uiOrientation = - (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait - : CAknAppUi::EAppUiOrientationLandscape; - CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi()); - TRAPD(error, - if (appUi) - appUi->SetOrientationL(uiOrientation); - ); - Q_UNUSED(error) -#else // ORIENTATIONLOCK - qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation."); -#endif // ORIENTATIONLOCK - } -#elif defined(Q_WS_MAEMO_5) - Qt::WidgetAttribute attribute; - switch (orientation) { - case ScreenOrientationLockPortrait: - attribute = Qt::WA_Maemo5PortraitOrientation; - break; - case ScreenOrientationLockLandscape: - attribute = Qt::WA_Maemo5LandscapeOrientation; - break; - case ScreenOrientationAuto: - default: - attribute = Qt::WA_Maemo5AutoOrientation; - break; - } - setAttribute(attribute, true); -#else // Q_OS_SYMBIAN - Q_UNUSED(orientation); -#endif // Q_OS_SYMBIAN -} - -void QmlApplicationViewer::showExpanded() -{ -#ifdef Q_OS_SYMBIAN - showFullScreen(); -#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) - showMaximized(); -#else - show(); -#endif -} diff --git a/examples/declarative/modelviews/listview/dynamiclist/qmlapplicationviewer/qmlapplicationviewer.h b/examples/declarative/modelviews/listview/dynamiclist/qmlapplicationviewer/qmlapplicationviewer.h deleted file mode 100644 index f5b24b0..0000000 --- a/examples/declarative/modelviews/listview/dynamiclist/qmlapplicationviewer/qmlapplicationviewer.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// checksum 0x5a59 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#ifndef QMLAPPLICATIONVIEWER_H -#define QMLAPPLICATIONVIEWER_H - -#include <QtDeclarative/QDeclarativeView> - -class QmlApplicationViewer : public QDeclarativeView -{ - Q_OBJECT - -public: - enum ScreenOrientation { - ScreenOrientationLockPortrait, - ScreenOrientationLockLandscape, - ScreenOrientationAuto - }; - - explicit QmlApplicationViewer(QWidget *parent = 0); - virtual ~QmlApplicationViewer(); - - void setMainQmlFile(const QString &file); - void addImportPath(const QString &path); - void setOrientation(ScreenOrientation orientation); - void showExpanded(); - -private: - class QmlApplicationViewerPrivate *m_d; -}; - -#endif // QMLAPPLICATIONVIEWER_H diff --git a/examples/declarative/modelviews/listview/dynamiclist/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/declarative/modelviews/listview/dynamiclist/qmlapplicationviewer/qmlapplicationviewer.pri deleted file mode 100644 index 1c0c7ed..0000000 --- a/examples/declarative/modelviews/listview/dynamiclist/qmlapplicationviewer/qmlapplicationviewer.pri +++ /dev/null @@ -1,154 +0,0 @@ -# checksum 0x3dc8 version 0x2000a -# This file was generated by the Qt Quick Application wizard of Qt Creator. -# The code below adds the QmlApplicationViewer to the project and handles the -# activation of QML debugging. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -QT += declarative - -SOURCES += $$PWD/qmlapplicationviewer.cpp -HEADERS += $$PWD/qmlapplicationviewer.h -INCLUDEPATH += $$PWD - -defineTest(minQtVersion) { - maj = $$1 - min = $$2 - patch = $$3 - isEqual(QT_MAJOR_VERSION, $$maj) { - isEqual(QT_MINOR_VERSION, $$min) { - isEqual(QT_PATCH_VERSION, $$patch) { - return(true) - } - greaterThan(QT_PATCH_VERSION, $$patch) { - return(true) - } - } - greaterThan(QT_MINOR_VERSION, $$min) { - return(true) - } - } - return(false) -} - -contains(DEFINES, QMLJSDEBUGGER) { - CONFIG(debug, debug|release) { - !minQtVersion(4, 7, 1) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("This library requires Qt 4.7.1 or newer.") - warning() - DEFINES -= QMLJSDEBUGGER - } else:isEmpty(QMLJSDEBUGGER_PATH) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("Please specify its location on the qmake command line, eg") - warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger") - warning() - DEFINES -= QMLJSDEBUGGER - } else { - include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) - } - } else { - DEFINES -= QMLJSDEBUGGER - } -} -# This file was generated by an application wizard of Qt Creator. -# The code below handles deployment to Symbian and Maemo, aswell as copying -# of the application data to shadow build directories on desktop. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -defineTest(qtcAddDeployment) { -for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemsources = $${item}.sources - $$itemsources = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath= $$eval($${deploymentfolder}.target) - export($$itemsources) - export($$itempath) - DEPLOYMENT += $$item -} - -MAINPROFILEPWD = $$PWD - -symbian { - ICON = $${TARGET}.svg - TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 - contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone - contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices -} else:win32 { - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - source = $$eval($${deploymentfolder}.source) - pathSegments = $$split(source, /) - sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments) - copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\) - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } -} else:unix { - maemo5 { - installPrefix = /opt/usr - desktopfile.path = /usr/share/applications/hildon - } else { - installPrefix = /usr/local - desktopfile.path = /usr/share/applications - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - macx { - target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) - } else { - target = $$OUT_PWD/$$eval($${deploymentfolder}.target) - } - copyCommand += && $(MKDIR) $$target - copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } - } - for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemfiles = $${item}.files - $$itemfiles = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target) - export($$itemfiles) - export($$itempath) - INSTALLS += $$item - } - icon.files = $${TARGET}.png - icon.path = /usr/share/icons/hicolor/64x64/apps - desktopfile.files = $${TARGET}.desktop - target.path = $${installPrefix}/bin - export(icon.files) - export(icon.path) - export(desktopfile.files) - export(desktopfile.path) - export(target.path) - INSTALLS += desktopfile icon target -} - -export (ICON) -export (INSTALLS) -export (DEPLOYMENT) -export (TARGET.EPOCHEAPSIZE) -export (TARGET.CAPABILITY) -export (LIBS) -export (QMAKE_EXTRA_TARGETS) -} diff --git a/examples/declarative/modelviews/listview/expandingdelegates.qml b/examples/declarative/modelviews/listview/expandingdelegates.qml deleted file mode 100644 index d961aba..0000000 --- a/examples/declarative/modelviews/listview/expandingdelegates.qml +++ /dev/null @@ -1,202 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 1.0 -import "content" - -// This example illustrates expanding a list item to show a more detailed view. - -Rectangle { - id: page - width: 400; height: 240 - color: "black" - - // Delegate for the recipes. This delegate has two modes: - // 1. List mode (default), which just shows the picture and title of the recipe. - // 2. Details mode, which also shows the ingredients and method. - Component { - id: recipeDelegate - - Item { - id: recipe - - // Create a property to contain the visibility of the details. - // We can bind multiple element's opacity to this one property, - // rather than having a "PropertyChanges" line for each element we - // want to fade. - property real detailsOpacity : 0 - - width: listView.width - height: 70 - - // A simple rounded rectangle for the background - Rectangle { - id: background - x: 2; y: 2; width: parent.width - x*2; height: parent.height - y*2 - color: "ivory" - border.color: "orange" - radius: 5 - } - - // 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. - MouseArea { - anchors.fill: parent - onClicked: recipe.state = 'Details'; - } - - // Lay out the page: picture, title and ingredients at the top, and method at the - // bottom. Note that elements that should not be visible in the list - // mode have their opacity set to recipe.detailsOpacity. - Row { - id: topLayout - x: 10; y: 10; height: recipeImage.height; width: parent.width - spacing: 10 - - Image { - id: recipeImage - width: 50; height: 50 - source: picture - } - - Column { - width: background.width - recipeImage.width - 20; height: recipeImage.height - spacing: 5 - - Text { - text: title - font.bold: true; font.pointSize: 16 - } - - Text { - text: "Ingredients" - font.pointSize: 12; font.bold: true - opacity: recipe.detailsOpacity - } - - Text { - text: ingredients - wrapMode: Text.WordWrap - width: parent.width - opacity: recipe.detailsOpacity - } - } - } - - Item { - id: details - x: 10; width: parent.width - 20 - anchors { top: topLayout.bottom; topMargin: 10; bottom: parent.bottom; bottomMargin: 10 } - opacity: recipe.detailsOpacity - - Text { - id: methodTitle - anchors.top: parent.top - text: "Method" - font.pointSize: 12; font.bold: true - } - - Flickable { - id: flick - width: parent.width - anchors { top: methodTitle.bottom; bottom: parent.bottom } - contentHeight: methodText.height - clip: true - - Text { id: methodText; text: method; wrapMode: Text.WordWrap; width: details.width } - } - - Image { - anchors { right: flick.right; top: flick.top } - source: "content/pics/moreUp.png" - opacity: flick.atYBeginning ? 0 : 1 - } - - Image { - anchors { right: flick.right; bottom: flick.bottom } - source: "content/pics/moreDown.png" - opacity: flick.atYEnd ? 0 : 1 - } - } - - // A button to close the detailed view, i.e. set the state back to default (''). - TextButton { - y: 10 - anchors { right: background.right; rightMargin: 10 } - opacity: recipe.detailsOpacity - text: "Close" - - onClicked: recipe.state = ''; - } - - states: State { - name: "Details" - - PropertyChanges { target: background; color: "white" } - PropertyChanges { target: recipeImage; width: 130; height: 130 } // Make picture bigger - PropertyChanges { target: recipe; detailsOpacity: 1; x: 0 } // Make details visible - PropertyChanges { target: recipe; height: listView.height } // Fill the entire list area with the detailed view - - // Move the list so that this item is at the top. - PropertyChanges { target: recipe.ListView.view; explicit: true; contentY: recipe.y } - - // Disallow flicking while we're in detailed view - PropertyChanges { target: recipe.ListView.view; interactive: false } - } - - transitions: Transition { - // Make the state changes smooth - ParallelAnimation { - ColorAnimation { property: "color"; duration: 500 } - NumberAnimation { duration: 300; properties: "detailsOpacity,x,contentY,height,width" } - } - } - } - } - - // The actual list - ListView { - id: listView - anchors.fill: parent - model: RecipesModel {} - delegate: recipeDelegate - } -} diff --git a/examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.pro b/examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.pro index 59f0554..e9bbc65 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.pro +++ b/examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.pro @@ -1,5 +1,5 @@ # Add more folders to ship with the application, here -folder_01.source = qml +folder_01.source = qml/expandingdelegates folder_01.target = qml DEPLOYMENTFOLDERS = folder_01 @@ -35,5 +35,5 @@ symbian:TARGET.UID3 = 0xEEA16F93 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(qmlapplicationviewer/qmlapplicationviewer.pri) +include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.qmlproject b/examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.qmlproject new file mode 100644 index 0000000..5fa8ae9 --- /dev/null +++ b/examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "qml/expandingdelegates" + } + JavaScriptFiles { + directory: "qml/expandingdelegates" + } + ImageFiles { + directory: "qml/expandingdelegates" + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/examples/declarative/modelviews/listview/expandingdelegates/main.cpp b/examples/declarative/modelviews/listview/expandingdelegates/main.cpp index b411dff..f141eb0 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/main.cpp +++ b/examples/declarative/modelviews/listview/expandingdelegates/main.cpp @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) QmlApplicationViewer viewer; viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto); - viewer.setMainQmlFile(QLatin1String("qml/qml/expandingdelegates.qml")); + viewer.setMainQmlFile(QLatin1String("qml/expandingdelegates/expandingdelegates.qml")); viewer.showExpanded(); return app.exec(); diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/PetsModel.qml b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/PetsModel.qml index 5220763..5220763 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/PetsModel.qml +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/PetsModel.qml diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/PressAndHoldButton.qml b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/PressAndHoldButton.qml index d6808a4..d6808a4 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/PressAndHoldButton.qml +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/PressAndHoldButton.qml diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/RecipesModel.qml b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/RecipesModel.qml index 6056b90..6056b90 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/RecipesModel.qml +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/RecipesModel.qml diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/TextButton.qml b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/TextButton.qml index f26d775..f26d775 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/TextButton.qml +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/TextButton.qml diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/arrow-down.png b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/arrow-down.png Binary files differindex 29d1d44..29d1d44 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/arrow-down.png +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/arrow-down.png diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/arrow-up.png b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/arrow-up.png Binary files differindex e437312..e437312 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/arrow-up.png +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/arrow-up.png diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/fruit-salad.jpg b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/fruit-salad.jpg Binary files differindex da5a6b1..da5a6b1 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/fruit-salad.jpg +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/fruit-salad.jpg diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/hamburger.jpg b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/hamburger.jpg Binary files differindex d0a15be..d0a15be 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/hamburger.jpg +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/hamburger.jpg diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/lemonade.jpg b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/lemonade.jpg Binary files differindex db445c9..db445c9 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/lemonade.jpg +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/lemonade.jpg diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/list-delete.png b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/list-delete.png Binary files differindex df2a147..df2a147 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/list-delete.png +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/list-delete.png diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/minus-sign.png b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/minus-sign.png Binary files differindex d6f233d..d6f233d 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/minus-sign.png +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/minus-sign.png diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/moreDown.png b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/moreDown.png Binary files differindex 31a35d5..31a35d5 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/moreDown.png +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/moreDown.png diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/moreUp.png b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/moreUp.png Binary files differindex fefb9c9..fefb9c9 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/moreUp.png +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/moreUp.png diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/pancakes.jpg b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/pancakes.jpg Binary files differindex 60c4396..60c4396 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/pancakes.jpg +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/pancakes.jpg diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/plus-sign.png b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/plus-sign.png Binary files differindex 40df113..40df113 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/plus-sign.png +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/plus-sign.png diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/vegetable-soup.jpg b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/vegetable-soup.jpg Binary files differindex 9dce332..9dce332 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/content/pics/vegetable-soup.jpg +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/content/pics/vegetable-soup.jpg diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/dynamiclist.qml b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/dynamiclist.qml index f25f0fa..f25f0fa 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/dynamiclist.qml +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/dynamiclist.qml diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/expandingdelegates.qml b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/expandingdelegates.qml index bd3d3a9..bd3d3a9 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/expandingdelegates.qml +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/expandingdelegates.qml diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/highlight.qml b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/highlight.qml index 249c73b..249c73b 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/highlight.qml +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/highlight.qml diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges.qml b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/highlightranges.qml index 58d37a3..58d37a3 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges.qml +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/highlightranges.qml diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/sections.qml b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/sections.qml index 3248899..3248899 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/sections.qml +++ b/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates/sections.qml diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/declarative/modelviews/listview/expandingdelegates/qmlapplicationviewer/qmlapplicationviewer.cpp deleted file mode 100644 index 411a04c..0000000 --- a/examples/declarative/modelviews/listview/expandingdelegates/qmlapplicationviewer/qmlapplicationviewer.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// checksum 0x28c7 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#include "qmlapplicationviewer.h" - -#include <QtCore/QCoreApplication> -#include <QtCore/QDir> -#include <QtCore/QFileInfo> -#include <QtDeclarative/QDeclarativeComponent> -#include <QtDeclarative/QDeclarativeEngine> -#include <QtDeclarative/QDeclarativeContext> - -#if defined(QMLJSDEBUGGER) -#include <qt_private/qdeclarativedebughelper_p.h> -#endif - -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) -#include <jsdebuggeragent.h> -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) -#include <qdeclarativeviewobserver.h> -#endif - -#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK) -#include <eikenv.h> -#include <eikappui.h> -#include <aknenv.h> -#include <aknappui.h> -#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK - -#if defined(QMLJSDEBUGGER) - -// Enable debugging before any QDeclarativeEngine is created -struct QmlJsDebuggingEnabler -{ - QmlJsDebuggingEnabler() - { - QDeclarativeDebugHelper::enableDebugging(); - } -}; - -// Execute code in constructor before first QDeclarativeEngine is instantiated -static QmlJsDebuggingEnabler enableDebuggingHelper; - -#endif // QMLJSDEBUGGER - -class QmlApplicationViewerPrivate -{ - QString mainQmlFile; - friend class QmlApplicationViewer; - static QString adjustPath(const QString &path); -}; - -QString QmlApplicationViewerPrivate::adjustPath(const QString &path) -{ -#ifdef Q_OS_UNIX -#ifdef Q_OS_MAC - if (!QDir::isAbsolutePath(path)) - return QCoreApplication::applicationDirPath() - + QLatin1String("/../Resources/") + path; -#else - const QString pathInShareDir = QCoreApplication::applicationDirPath() - + QLatin1String("/../share/") - + QFileInfo(QCoreApplication::applicationFilePath()).fileName() - + QLatin1Char('/') + path; - if (QFileInfo(pathInShareDir).exists()) - return pathInShareDir; -#endif -#endif - return path; -} - -QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) : - QDeclarativeView(parent), - m_d(new QmlApplicationViewerPrivate) -{ - connect(engine(), SIGNAL(quit()), SLOT(close())); - setResizeMode(QDeclarativeView::SizeRootObjectToView); -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) - new QmlJSDebugger::JSDebuggerAgent(engine()); -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) - new QmlJSDebugger::QDeclarativeViewObserver(this, parent); -#endif -} - -QmlApplicationViewer::~QmlApplicationViewer() -{ - delete m_d; -} - -void QmlApplicationViewer::setMainQmlFile(const QString &file) -{ - m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file); - setSource(QUrl::fromLocalFile(m_d->mainQmlFile)); -} - -void QmlApplicationViewer::addImportPath(const QString &path) -{ - engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path)); -} - -void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) -{ -#ifdef Q_OS_SYMBIAN - if (orientation != ScreenOrientationAuto) { -#if defined(ORIENTATIONLOCK) - const CAknAppUiBase::TAppUiOrientation uiOrientation = - (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait - : CAknAppUi::EAppUiOrientationLandscape; - CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi()); - TRAPD(error, - if (appUi) - appUi->SetOrientationL(uiOrientation); - ); - Q_UNUSED(error) -#else // ORIENTATIONLOCK - qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation."); -#endif // ORIENTATIONLOCK - } -#elif defined(Q_WS_MAEMO_5) - Qt::WidgetAttribute attribute; - switch (orientation) { - case ScreenOrientationLockPortrait: - attribute = Qt::WA_Maemo5PortraitOrientation; - break; - case ScreenOrientationLockLandscape: - attribute = Qt::WA_Maemo5LandscapeOrientation; - break; - case ScreenOrientationAuto: - default: - attribute = Qt::WA_Maemo5AutoOrientation; - break; - } - setAttribute(attribute, true); -#else // Q_OS_SYMBIAN - Q_UNUSED(orientation); -#endif // Q_OS_SYMBIAN -} - -void QmlApplicationViewer::showExpanded() -{ -#ifdef Q_OS_SYMBIAN - showFullScreen(); -#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) - showMaximized(); -#else - show(); -#endif -} diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qmlapplicationviewer/qmlapplicationviewer.h b/examples/declarative/modelviews/listview/expandingdelegates/qmlapplicationviewer/qmlapplicationviewer.h deleted file mode 100644 index f5b24b0..0000000 --- a/examples/declarative/modelviews/listview/expandingdelegates/qmlapplicationviewer/qmlapplicationviewer.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// checksum 0x5a59 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#ifndef QMLAPPLICATIONVIEWER_H -#define QMLAPPLICATIONVIEWER_H - -#include <QtDeclarative/QDeclarativeView> - -class QmlApplicationViewer : public QDeclarativeView -{ - Q_OBJECT - -public: - enum ScreenOrientation { - ScreenOrientationLockPortrait, - ScreenOrientationLockLandscape, - ScreenOrientationAuto - }; - - explicit QmlApplicationViewer(QWidget *parent = 0); - virtual ~QmlApplicationViewer(); - - void setMainQmlFile(const QString &file); - void addImportPath(const QString &path); - void setOrientation(ScreenOrientation orientation); - void showExpanded(); - -private: - class QmlApplicationViewerPrivate *m_d; -}; - -#endif // QMLAPPLICATIONVIEWER_H diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/declarative/modelviews/listview/expandingdelegates/qmlapplicationviewer/qmlapplicationviewer.pri deleted file mode 100644 index 1c0c7ed..0000000 --- a/examples/declarative/modelviews/listview/expandingdelegates/qmlapplicationviewer/qmlapplicationviewer.pri +++ /dev/null @@ -1,154 +0,0 @@ -# checksum 0x3dc8 version 0x2000a -# This file was generated by the Qt Quick Application wizard of Qt Creator. -# The code below adds the QmlApplicationViewer to the project and handles the -# activation of QML debugging. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -QT += declarative - -SOURCES += $$PWD/qmlapplicationviewer.cpp -HEADERS += $$PWD/qmlapplicationviewer.h -INCLUDEPATH += $$PWD - -defineTest(minQtVersion) { - maj = $$1 - min = $$2 - patch = $$3 - isEqual(QT_MAJOR_VERSION, $$maj) { - isEqual(QT_MINOR_VERSION, $$min) { - isEqual(QT_PATCH_VERSION, $$patch) { - return(true) - } - greaterThan(QT_PATCH_VERSION, $$patch) { - return(true) - } - } - greaterThan(QT_MINOR_VERSION, $$min) { - return(true) - } - } - return(false) -} - -contains(DEFINES, QMLJSDEBUGGER) { - CONFIG(debug, debug|release) { - !minQtVersion(4, 7, 1) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("This library requires Qt 4.7.1 or newer.") - warning() - DEFINES -= QMLJSDEBUGGER - } else:isEmpty(QMLJSDEBUGGER_PATH) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("Please specify its location on the qmake command line, eg") - warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger") - warning() - DEFINES -= QMLJSDEBUGGER - } else { - include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) - } - } else { - DEFINES -= QMLJSDEBUGGER - } -} -# This file was generated by an application wizard of Qt Creator. -# The code below handles deployment to Symbian and Maemo, aswell as copying -# of the application data to shadow build directories on desktop. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -defineTest(qtcAddDeployment) { -for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemsources = $${item}.sources - $$itemsources = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath= $$eval($${deploymentfolder}.target) - export($$itemsources) - export($$itempath) - DEPLOYMENT += $$item -} - -MAINPROFILEPWD = $$PWD - -symbian { - ICON = $${TARGET}.svg - TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 - contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone - contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices -} else:win32 { - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - source = $$eval($${deploymentfolder}.source) - pathSegments = $$split(source, /) - sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments) - copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\) - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } -} else:unix { - maemo5 { - installPrefix = /opt/usr - desktopfile.path = /usr/share/applications/hildon - } else { - installPrefix = /usr/local - desktopfile.path = /usr/share/applications - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - macx { - target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) - } else { - target = $$OUT_PWD/$$eval($${deploymentfolder}.target) - } - copyCommand += && $(MKDIR) $$target - copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } - } - for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemfiles = $${item}.files - $$itemfiles = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target) - export($$itemfiles) - export($$itempath) - INSTALLS += $$item - } - icon.files = $${TARGET}.png - icon.path = /usr/share/icons/hicolor/64x64/apps - desktopfile.files = $${TARGET}.desktop - target.path = $${installPrefix}/bin - export(icon.files) - export(icon.path) - export(desktopfile.files) - export(desktopfile.path) - export(target.path) - INSTALLS += desktopfile icon target -} - -export (ICON) -export (INSTALLS) -export (DEPLOYMENT) -export (TARGET.EPOCHEAPSIZE) -export (TARGET.CAPABILITY) -export (LIBS) -export (QMAKE_EXTRA_TARGETS) -} diff --git a/examples/declarative/modelviews/listview/highlight.qml b/examples/declarative/modelviews/listview/highlight.qml deleted file mode 100644 index e9e269f..0000000 --- a/examples/declarative/modelviews/listview/highlight.qml +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This example shows how to create your own highlight delegate for a ListView -// that uses a SpringAnimation to provide custom movement when the -// highlight bar is moved between items. - -import QtQuick 1.0 -import "content" - -Rectangle { - width: 200; height: 300 - - // Define a delegate component. A component will be - // instantiated for each visible item in the list. - Component { - id: petDelegate - Item { - id: wrapper - width: 200; height: 55 - Column { - Text { text: 'Name: ' + name } - Text { text: 'Type: ' + type } - Text { text: 'Age: ' + age } - } - // indent the item if it is the current item - states: State { - name: "Current" - when: wrapper.ListView.isCurrentItem - PropertyChanges { target: wrapper; x: 20 } - } - transitions: Transition { - NumberAnimation { properties: "x"; duration: 200 } - } - } - } - - // Define a highlight with customised movement between items. - Component { - id: highlightBar - Rectangle { - width: 200; height: 50 - color: "#FFFF88" - y: listView.currentItem.y; - Behavior on y { SpringAnimation { spring: 2; damping: 0.1 } } - } - } - - ListView { - id: listView - width: 200; height: parent.height - - model: PetsModel {} - delegate: petDelegate - focus: true - - // Set the highlight delegate. Note we must also set highlightFollowsCurrentItem - // to false so the highlight delegate can control how the highlight is moved. - highlight: highlightBar - highlightFollowsCurrentItem: false - } -} diff --git a/examples/declarative/modelviews/listview/highlight/highlight.pro b/examples/declarative/modelviews/listview/highlight/highlight.pro index 60ae50c..a0a5c01 100644 --- a/examples/declarative/modelviews/listview/highlight/highlight.pro +++ b/examples/declarative/modelviews/listview/highlight/highlight.pro @@ -1,5 +1,5 @@ # Add more folders to ship with the application, here -folder_01.source = qml +folder_01.source = qml/highlight folder_01.target = qml DEPLOYMENTFOLDERS = folder_01 @@ -35,5 +35,5 @@ symbian:TARGET.UID3 = 0xE9439941 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(qmlapplicationviewer/qmlapplicationviewer.pri) +include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/listview/highlight/qml/listview.qmlproject b/examples/declarative/modelviews/listview/highlight/highlight.qmlproject index d4909f8..a1ac231 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/listview.qmlproject +++ b/examples/declarative/modelviews/listview/highlight/highlight.qmlproject @@ -3,13 +3,13 @@ import QmlProject 1.0 Project { /* Include .qml, .js, and image files from current directory and subdirectories */ QmlFiles { - directory: "." + directory: "qml/highlight" } JavaScriptFiles { - directory: "." + directory: "qml/highlight" } ImageFiles { - directory: "." + directory: "qml/highlight" } /* List of plugin directories passed to QML runtime */ // importPaths: [ " ../exampleplugin " ] diff --git a/examples/declarative/modelviews/listview/highlight/main.cpp b/examples/declarative/modelviews/listview/highlight/main.cpp index 7b8cdf2..ed02580 100644 --- a/examples/declarative/modelviews/listview/highlight/main.cpp +++ b/examples/declarative/modelviews/listview/highlight/main.cpp @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) QmlApplicationViewer viewer; viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait); - viewer.setMainQmlFile(QLatin1String("qml/qml/highlight.qml")); + viewer.setMainQmlFile(QLatin1String("qml/highlight/highlight.qml")); viewer.showExpanded(); return app.exec(); diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/PetsModel.qml b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/PetsModel.qml index 5220763..5220763 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/PetsModel.qml +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/PetsModel.qml diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/PressAndHoldButton.qml b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/PressAndHoldButton.qml index d6808a4..d6808a4 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/PressAndHoldButton.qml +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/PressAndHoldButton.qml diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/RecipesModel.qml b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/RecipesModel.qml index 6056b90..6056b90 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/RecipesModel.qml +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/RecipesModel.qml diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/TextButton.qml b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/TextButton.qml index f26d775..f26d775 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/TextButton.qml +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/TextButton.qml diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/pics/arrow-down.png b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/arrow-down.png Binary files differindex 29d1d44..29d1d44 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/pics/arrow-down.png +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/arrow-down.png diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/pics/arrow-up.png b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/arrow-up.png Binary files differindex e437312..e437312 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/pics/arrow-up.png +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/arrow-up.png diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/pics/fruit-salad.jpg b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/fruit-salad.jpg Binary files differindex da5a6b1..da5a6b1 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/pics/fruit-salad.jpg +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/fruit-salad.jpg diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/pics/hamburger.jpg b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/hamburger.jpg Binary files differindex d0a15be..d0a15be 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/pics/hamburger.jpg +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/hamburger.jpg diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/pics/lemonade.jpg b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/lemonade.jpg Binary files differindex db445c9..db445c9 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/pics/lemonade.jpg +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/lemonade.jpg diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/pics/list-delete.png b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/list-delete.png Binary files differindex df2a147..df2a147 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/pics/list-delete.png +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/list-delete.png diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/pics/minus-sign.png b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/minus-sign.png Binary files differindex d6f233d..d6f233d 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/pics/minus-sign.png +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/minus-sign.png diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/pics/moreDown.png b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/moreDown.png Binary files differindex 31a35d5..31a35d5 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/pics/moreDown.png +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/moreDown.png diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/pics/moreUp.png b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/moreUp.png Binary files differindex fefb9c9..fefb9c9 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/pics/moreUp.png +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/moreUp.png diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/pics/pancakes.jpg b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/pancakes.jpg Binary files differindex 60c4396..60c4396 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/pics/pancakes.jpg +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/pancakes.jpg diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/pics/plus-sign.png b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/plus-sign.png Binary files differindex 40df113..40df113 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/pics/plus-sign.png +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/plus-sign.png diff --git a/examples/declarative/modelviews/listview/highlight/qml/content/pics/vegetable-soup.jpg b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/vegetable-soup.jpg Binary files differindex 9dce332..9dce332 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/content/pics/vegetable-soup.jpg +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/content/pics/vegetable-soup.jpg diff --git a/examples/declarative/modelviews/listview/highlight/qml/dynamiclist.qml b/examples/declarative/modelviews/listview/highlight/qml/highlight/dynamiclist.qml index f25f0fa..f25f0fa 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/dynamiclist.qml +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/dynamiclist.qml diff --git a/examples/declarative/modelviews/listview/highlight/qml/expandingdelegates.qml b/examples/declarative/modelviews/listview/highlight/qml/highlight/expandingdelegates.qml index bd3d3a9..bd3d3a9 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/expandingdelegates.qml +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/expandingdelegates.qml diff --git a/examples/declarative/modelviews/listview/highlight/qml/highlight.qml b/examples/declarative/modelviews/listview/highlight/qml/highlight/highlight.qml index 249c73b..249c73b 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/highlight.qml +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/highlight.qml diff --git a/examples/declarative/modelviews/listview/highlight/qml/highlightranges.qml b/examples/declarative/modelviews/listview/highlight/qml/highlight/highlightranges.qml index 58d37a3..58d37a3 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/highlightranges.qml +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/highlightranges.qml diff --git a/examples/declarative/modelviews/listview/highlight/qml/sections.qml b/examples/declarative/modelviews/listview/highlight/qml/highlight/sections.qml index 3248899..3248899 100644 --- a/examples/declarative/modelviews/listview/highlight/qml/sections.qml +++ b/examples/declarative/modelviews/listview/highlight/qml/highlight/sections.qml diff --git a/examples/declarative/modelviews/listview/highlight/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/declarative/modelviews/listview/highlight/qmlapplicationviewer/qmlapplicationviewer.cpp deleted file mode 100644 index 411a04c..0000000 --- a/examples/declarative/modelviews/listview/highlight/qmlapplicationviewer/qmlapplicationviewer.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// checksum 0x28c7 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#include "qmlapplicationviewer.h" - -#include <QtCore/QCoreApplication> -#include <QtCore/QDir> -#include <QtCore/QFileInfo> -#include <QtDeclarative/QDeclarativeComponent> -#include <QtDeclarative/QDeclarativeEngine> -#include <QtDeclarative/QDeclarativeContext> - -#if defined(QMLJSDEBUGGER) -#include <qt_private/qdeclarativedebughelper_p.h> -#endif - -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) -#include <jsdebuggeragent.h> -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) -#include <qdeclarativeviewobserver.h> -#endif - -#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK) -#include <eikenv.h> -#include <eikappui.h> -#include <aknenv.h> -#include <aknappui.h> -#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK - -#if defined(QMLJSDEBUGGER) - -// Enable debugging before any QDeclarativeEngine is created -struct QmlJsDebuggingEnabler -{ - QmlJsDebuggingEnabler() - { - QDeclarativeDebugHelper::enableDebugging(); - } -}; - -// Execute code in constructor before first QDeclarativeEngine is instantiated -static QmlJsDebuggingEnabler enableDebuggingHelper; - -#endif // QMLJSDEBUGGER - -class QmlApplicationViewerPrivate -{ - QString mainQmlFile; - friend class QmlApplicationViewer; - static QString adjustPath(const QString &path); -}; - -QString QmlApplicationViewerPrivate::adjustPath(const QString &path) -{ -#ifdef Q_OS_UNIX -#ifdef Q_OS_MAC - if (!QDir::isAbsolutePath(path)) - return QCoreApplication::applicationDirPath() - + QLatin1String("/../Resources/") + path; -#else - const QString pathInShareDir = QCoreApplication::applicationDirPath() - + QLatin1String("/../share/") - + QFileInfo(QCoreApplication::applicationFilePath()).fileName() - + QLatin1Char('/') + path; - if (QFileInfo(pathInShareDir).exists()) - return pathInShareDir; -#endif -#endif - return path; -} - -QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) : - QDeclarativeView(parent), - m_d(new QmlApplicationViewerPrivate) -{ - connect(engine(), SIGNAL(quit()), SLOT(close())); - setResizeMode(QDeclarativeView::SizeRootObjectToView); -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) - new QmlJSDebugger::JSDebuggerAgent(engine()); -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) - new QmlJSDebugger::QDeclarativeViewObserver(this, parent); -#endif -} - -QmlApplicationViewer::~QmlApplicationViewer() -{ - delete m_d; -} - -void QmlApplicationViewer::setMainQmlFile(const QString &file) -{ - m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file); - setSource(QUrl::fromLocalFile(m_d->mainQmlFile)); -} - -void QmlApplicationViewer::addImportPath(const QString &path) -{ - engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path)); -} - -void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) -{ -#ifdef Q_OS_SYMBIAN - if (orientation != ScreenOrientationAuto) { -#if defined(ORIENTATIONLOCK) - const CAknAppUiBase::TAppUiOrientation uiOrientation = - (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait - : CAknAppUi::EAppUiOrientationLandscape; - CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi()); - TRAPD(error, - if (appUi) - appUi->SetOrientationL(uiOrientation); - ); - Q_UNUSED(error) -#else // ORIENTATIONLOCK - qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation."); -#endif // ORIENTATIONLOCK - } -#elif defined(Q_WS_MAEMO_5) - Qt::WidgetAttribute attribute; - switch (orientation) { - case ScreenOrientationLockPortrait: - attribute = Qt::WA_Maemo5PortraitOrientation; - break; - case ScreenOrientationLockLandscape: - attribute = Qt::WA_Maemo5LandscapeOrientation; - break; - case ScreenOrientationAuto: - default: - attribute = Qt::WA_Maemo5AutoOrientation; - break; - } - setAttribute(attribute, true); -#else // Q_OS_SYMBIAN - Q_UNUSED(orientation); -#endif // Q_OS_SYMBIAN -} - -void QmlApplicationViewer::showExpanded() -{ -#ifdef Q_OS_SYMBIAN - showFullScreen(); -#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) - showMaximized(); -#else - show(); -#endif -} diff --git a/examples/declarative/modelviews/listview/highlight/qmlapplicationviewer/qmlapplicationviewer.h b/examples/declarative/modelviews/listview/highlight/qmlapplicationviewer/qmlapplicationviewer.h deleted file mode 100644 index f5b24b0..0000000 --- a/examples/declarative/modelviews/listview/highlight/qmlapplicationviewer/qmlapplicationviewer.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// checksum 0x5a59 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#ifndef QMLAPPLICATIONVIEWER_H -#define QMLAPPLICATIONVIEWER_H - -#include <QtDeclarative/QDeclarativeView> - -class QmlApplicationViewer : public QDeclarativeView -{ - Q_OBJECT - -public: - enum ScreenOrientation { - ScreenOrientationLockPortrait, - ScreenOrientationLockLandscape, - ScreenOrientationAuto - }; - - explicit QmlApplicationViewer(QWidget *parent = 0); - virtual ~QmlApplicationViewer(); - - void setMainQmlFile(const QString &file); - void addImportPath(const QString &path); - void setOrientation(ScreenOrientation orientation); - void showExpanded(); - -private: - class QmlApplicationViewerPrivate *m_d; -}; - -#endif // QMLAPPLICATIONVIEWER_H diff --git a/examples/declarative/modelviews/listview/highlight/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/declarative/modelviews/listview/highlight/qmlapplicationviewer/qmlapplicationviewer.pri deleted file mode 100644 index 1c0c7ed..0000000 --- a/examples/declarative/modelviews/listview/highlight/qmlapplicationviewer/qmlapplicationviewer.pri +++ /dev/null @@ -1,154 +0,0 @@ -# checksum 0x3dc8 version 0x2000a -# This file was generated by the Qt Quick Application wizard of Qt Creator. -# The code below adds the QmlApplicationViewer to the project and handles the -# activation of QML debugging. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -QT += declarative - -SOURCES += $$PWD/qmlapplicationviewer.cpp -HEADERS += $$PWD/qmlapplicationviewer.h -INCLUDEPATH += $$PWD - -defineTest(minQtVersion) { - maj = $$1 - min = $$2 - patch = $$3 - isEqual(QT_MAJOR_VERSION, $$maj) { - isEqual(QT_MINOR_VERSION, $$min) { - isEqual(QT_PATCH_VERSION, $$patch) { - return(true) - } - greaterThan(QT_PATCH_VERSION, $$patch) { - return(true) - } - } - greaterThan(QT_MINOR_VERSION, $$min) { - return(true) - } - } - return(false) -} - -contains(DEFINES, QMLJSDEBUGGER) { - CONFIG(debug, debug|release) { - !minQtVersion(4, 7, 1) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("This library requires Qt 4.7.1 or newer.") - warning() - DEFINES -= QMLJSDEBUGGER - } else:isEmpty(QMLJSDEBUGGER_PATH) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("Please specify its location on the qmake command line, eg") - warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger") - warning() - DEFINES -= QMLJSDEBUGGER - } else { - include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) - } - } else { - DEFINES -= QMLJSDEBUGGER - } -} -# This file was generated by an application wizard of Qt Creator. -# The code below handles deployment to Symbian and Maemo, aswell as copying -# of the application data to shadow build directories on desktop. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -defineTest(qtcAddDeployment) { -for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemsources = $${item}.sources - $$itemsources = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath= $$eval($${deploymentfolder}.target) - export($$itemsources) - export($$itempath) - DEPLOYMENT += $$item -} - -MAINPROFILEPWD = $$PWD - -symbian { - ICON = $${TARGET}.svg - TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 - contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone - contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices -} else:win32 { - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - source = $$eval($${deploymentfolder}.source) - pathSegments = $$split(source, /) - sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments) - copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\) - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } -} else:unix { - maemo5 { - installPrefix = /opt/usr - desktopfile.path = /usr/share/applications/hildon - } else { - installPrefix = /usr/local - desktopfile.path = /usr/share/applications - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - macx { - target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) - } else { - target = $$OUT_PWD/$$eval($${deploymentfolder}.target) - } - copyCommand += && $(MKDIR) $$target - copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } - } - for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemfiles = $${item}.files - $$itemfiles = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target) - export($$itemfiles) - export($$itempath) - INSTALLS += $$item - } - icon.files = $${TARGET}.png - icon.path = /usr/share/icons/hicolor/64x64/apps - desktopfile.files = $${TARGET}.desktop - target.path = $${installPrefix}/bin - export(icon.files) - export(icon.path) - export(desktopfile.files) - export(desktopfile.path) - export(target.path) - INSTALLS += desktopfile icon target -} - -export (ICON) -export (INSTALLS) -export (DEPLOYMENT) -export (TARGET.EPOCHEAPSIZE) -export (TARGET.CAPABILITY) -export (LIBS) -export (QMAKE_EXTRA_TARGETS) -} diff --git a/examples/declarative/modelviews/listview/highlightranges.qml b/examples/declarative/modelviews/listview/highlightranges.qml deleted file mode 100644 index cad40e7..0000000 --- a/examples/declarative/modelviews/listview/highlightranges.qml +++ /dev/null @@ -1,122 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 1.0 -import "content" - -Rectangle { - id: root - property int current: 0 - width: 600; height: 300 - - // This example shows the same model in three different ListView items, - // with different highlight ranges. The highlight ranges are set by the - // preferredHighlightBegin and preferredHighlightEnd properties in ListView. - // - // The first ListView does not set a highlight range, so its currentItem - // can move freely within the visible area. If it moves outside the - // visible area, the view is automatically scrolled to keep the current - // item visible. - // - // The second ListView sets a highlight range which attempts to keep the - // current item within the the bounds of the range. However, - // items will not scroll beyond the beginning or end of the view, - // forcing the highlight to move outside the range at the ends. - // - // The third ListView sets the highlightRangeMode to StrictlyEnforceRange - // and sets a range smaller than the height of an item. This - // forces the current item to change when the view is flicked, - // since the highlight is unable to move. - // - // All ListViews bind their currentIndex to the root.current property. - // The first ListView sets root.current whenever its currentIndex changes - // due to keyboard interaction. - // Flicking the third ListView with the mouse also changes root.current. - - ListView { - id: list1 - width: 200; height: parent.height - model: PetsModel {} - delegate: petDelegate - - highlight: Rectangle { color: "lightsteelblue" } - currentIndex: root.current - onCurrentIndexChanged: root.current = currentIndex - focus: true - } - - ListView { - id: list2 - x: list1.width - width: 200; height: parent.height - model: PetsModel {} - delegate: petDelegate - - highlight: Rectangle { color: "yellow" } - currentIndex: root.current - preferredHighlightBegin: 80; preferredHighlightEnd: 220 - highlightRangeMode: ListView.ApplyRange - } - - ListView { - id: list3 - x: list1.width + list2.width - width: 200; height: parent.height - model: PetsModel {} - delegate: petDelegate - - highlight: Rectangle { color: "yellow" } - currentIndex: root.current - onCurrentIndexChanged: root.current = currentIndex - preferredHighlightBegin: 125; preferredHighlightEnd: 125 - highlightRangeMode: ListView.StrictlyEnforceRange - } - - // The delegate for each list - Component { - id: petDelegate - Column { - width: 200 - Text { text: 'Name: ' + name } - Text { text: 'Type: ' + type } - Text { text: 'Age: ' + age } - } - } -} diff --git a/examples/declarative/modelviews/listview/highlightranges/highlightranges.pro b/examples/declarative/modelviews/listview/highlightranges/highlightranges.pro index 4dd178f..f86e6c7 100644 --- a/examples/declarative/modelviews/listview/highlightranges/highlightranges.pro +++ b/examples/declarative/modelviews/listview/highlightranges/highlightranges.pro @@ -1,5 +1,5 @@ # Add more folders to ship with the application, here -folder_01.source = qml +folder_01.source = qml/highlightranges folder_01.target = qml DEPLOYMENTFOLDERS = folder_01 @@ -35,5 +35,5 @@ symbian:TARGET.UID3 = 0xE7A0AE23 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(qmlapplicationviewer/qmlapplicationviewer.pri) +include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/listview/highlightranges/qml/listview.qmlproject b/examples/declarative/modelviews/listview/highlightranges/highlightranges.qmlproject index d4909f8..2688410 100644 --- a/examples/declarative/modelviews/listview/highlightranges/qml/listview.qmlproject +++ b/examples/declarative/modelviews/listview/highlightranges/highlightranges.qmlproject @@ -3,13 +3,13 @@ import QmlProject 1.0 Project { /* Include .qml, .js, and image files from current directory and subdirectories */ QmlFiles { - directory: "." + directory: "qml/highlightranges" } JavaScriptFiles { - directory: "." + directory: "qml/highlightranges" } ImageFiles { - directory: "." + directory: "qml/highlightranges" } /* List of plugin directories passed to QML runtime */ // importPaths: [ " ../exampleplugin " ] diff --git a/examples/declarative/modelviews/listview/highlightranges/main.cpp b/examples/declarative/modelviews/listview/highlightranges/main.cpp index fad8f0c..81810db 100644 --- a/examples/declarative/modelviews/listview/highlightranges/main.cpp +++ b/examples/declarative/modelviews/listview/highlightranges/main.cpp @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) QmlApplicationViewer viewer; viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape); - viewer.setMainQmlFile(QLatin1String("qml/qml/highlightranges.qml")); + viewer.setMainQmlFile(QLatin1String("qml/highlightranges/highlightranges.qml")); viewer.showExpanded(); return app.exec(); diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/PetsModel.qml b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/PetsModel.qml index 5220763..5220763 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/PetsModel.qml +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/PetsModel.qml diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/PressAndHoldButton.qml b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/PressAndHoldButton.qml index d6808a4..d6808a4 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/PressAndHoldButton.qml +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/PressAndHoldButton.qml diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/RecipesModel.qml b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/RecipesModel.qml index 6056b90..6056b90 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/RecipesModel.qml +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/RecipesModel.qml diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/TextButton.qml b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/TextButton.qml index f26d775..f26d775 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/TextButton.qml +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/TextButton.qml diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/arrow-down.png b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/arrow-down.png Binary files differindex 29d1d44..29d1d44 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/arrow-down.png +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/arrow-down.png diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/arrow-up.png b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/arrow-up.png Binary files differindex e437312..e437312 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/arrow-up.png +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/arrow-up.png diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/fruit-salad.jpg b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/fruit-salad.jpg Binary files differindex da5a6b1..da5a6b1 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/fruit-salad.jpg +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/fruit-salad.jpg diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/hamburger.jpg b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/hamburger.jpg Binary files differindex d0a15be..d0a15be 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/hamburger.jpg +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/hamburger.jpg diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/lemonade.jpg b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/lemonade.jpg Binary files differindex db445c9..db445c9 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/lemonade.jpg +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/lemonade.jpg diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/list-delete.png b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/list-delete.png Binary files differindex df2a147..df2a147 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/list-delete.png +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/list-delete.png diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/minus-sign.png b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/minus-sign.png Binary files differindex d6f233d..d6f233d 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/minus-sign.png +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/minus-sign.png diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/moreDown.png b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/moreDown.png Binary files differindex 31a35d5..31a35d5 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/moreDown.png +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/moreDown.png diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/moreUp.png b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/moreUp.png Binary files differindex fefb9c9..fefb9c9 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/moreUp.png +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/moreUp.png diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/pancakes.jpg b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/pancakes.jpg Binary files differindex 60c4396..60c4396 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/pancakes.jpg +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/pancakes.jpg diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/plus-sign.png b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/plus-sign.png Binary files differindex 40df113..40df113 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/plus-sign.png +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/plus-sign.png diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/vegetable-soup.jpg b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/vegetable-soup.jpg Binary files differindex 9dce332..9dce332 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/content/pics/vegetable-soup.jpg +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/content/pics/vegetable-soup.jpg diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/dynamiclist.qml b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/dynamiclist.qml index f25f0fa..f25f0fa 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/dynamiclist.qml +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/dynamiclist.qml diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates.qml b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/expandingdelegates.qml index bd3d3a9..bd3d3a9 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/expandingdelegates.qml +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/expandingdelegates.qml diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/highlight.qml b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/highlight.qml index 249c73b..249c73b 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/highlight.qml +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/highlight.qml diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/highlightranges.qml b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/highlightranges.qml index 58d37a3..58d37a3 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/highlightranges.qml +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/highlightranges.qml diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/sections.qml b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/sections.qml index 3248899..3248899 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/sections.qml +++ b/examples/declarative/modelviews/listview/highlightranges/qml/highlightranges/sections.qml diff --git a/examples/declarative/modelviews/listview/highlightranges/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/declarative/modelviews/listview/highlightranges/qmlapplicationviewer/qmlapplicationviewer.cpp deleted file mode 100644 index 411a04c..0000000 --- a/examples/declarative/modelviews/listview/highlightranges/qmlapplicationviewer/qmlapplicationviewer.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// checksum 0x28c7 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#include "qmlapplicationviewer.h" - -#include <QtCore/QCoreApplication> -#include <QtCore/QDir> -#include <QtCore/QFileInfo> -#include <QtDeclarative/QDeclarativeComponent> -#include <QtDeclarative/QDeclarativeEngine> -#include <QtDeclarative/QDeclarativeContext> - -#if defined(QMLJSDEBUGGER) -#include <qt_private/qdeclarativedebughelper_p.h> -#endif - -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) -#include <jsdebuggeragent.h> -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) -#include <qdeclarativeviewobserver.h> -#endif - -#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK) -#include <eikenv.h> -#include <eikappui.h> -#include <aknenv.h> -#include <aknappui.h> -#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK - -#if defined(QMLJSDEBUGGER) - -// Enable debugging before any QDeclarativeEngine is created -struct QmlJsDebuggingEnabler -{ - QmlJsDebuggingEnabler() - { - QDeclarativeDebugHelper::enableDebugging(); - } -}; - -// Execute code in constructor before first QDeclarativeEngine is instantiated -static QmlJsDebuggingEnabler enableDebuggingHelper; - -#endif // QMLJSDEBUGGER - -class QmlApplicationViewerPrivate -{ - QString mainQmlFile; - friend class QmlApplicationViewer; - static QString adjustPath(const QString &path); -}; - -QString QmlApplicationViewerPrivate::adjustPath(const QString &path) -{ -#ifdef Q_OS_UNIX -#ifdef Q_OS_MAC - if (!QDir::isAbsolutePath(path)) - return QCoreApplication::applicationDirPath() - + QLatin1String("/../Resources/") + path; -#else - const QString pathInShareDir = QCoreApplication::applicationDirPath() - + QLatin1String("/../share/") - + QFileInfo(QCoreApplication::applicationFilePath()).fileName() - + QLatin1Char('/') + path; - if (QFileInfo(pathInShareDir).exists()) - return pathInShareDir; -#endif -#endif - return path; -} - -QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) : - QDeclarativeView(parent), - m_d(new QmlApplicationViewerPrivate) -{ - connect(engine(), SIGNAL(quit()), SLOT(close())); - setResizeMode(QDeclarativeView::SizeRootObjectToView); -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) - new QmlJSDebugger::JSDebuggerAgent(engine()); -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) - new QmlJSDebugger::QDeclarativeViewObserver(this, parent); -#endif -} - -QmlApplicationViewer::~QmlApplicationViewer() -{ - delete m_d; -} - -void QmlApplicationViewer::setMainQmlFile(const QString &file) -{ - m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file); - setSource(QUrl::fromLocalFile(m_d->mainQmlFile)); -} - -void QmlApplicationViewer::addImportPath(const QString &path) -{ - engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path)); -} - -void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) -{ -#ifdef Q_OS_SYMBIAN - if (orientation != ScreenOrientationAuto) { -#if defined(ORIENTATIONLOCK) - const CAknAppUiBase::TAppUiOrientation uiOrientation = - (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait - : CAknAppUi::EAppUiOrientationLandscape; - CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi()); - TRAPD(error, - if (appUi) - appUi->SetOrientationL(uiOrientation); - ); - Q_UNUSED(error) -#else // ORIENTATIONLOCK - qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation."); -#endif // ORIENTATIONLOCK - } -#elif defined(Q_WS_MAEMO_5) - Qt::WidgetAttribute attribute; - switch (orientation) { - case ScreenOrientationLockPortrait: - attribute = Qt::WA_Maemo5PortraitOrientation; - break; - case ScreenOrientationLockLandscape: - attribute = Qt::WA_Maemo5LandscapeOrientation; - break; - case ScreenOrientationAuto: - default: - attribute = Qt::WA_Maemo5AutoOrientation; - break; - } - setAttribute(attribute, true); -#else // Q_OS_SYMBIAN - Q_UNUSED(orientation); -#endif // Q_OS_SYMBIAN -} - -void QmlApplicationViewer::showExpanded() -{ -#ifdef Q_OS_SYMBIAN - showFullScreen(); -#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) - showMaximized(); -#else - show(); -#endif -} diff --git a/examples/declarative/modelviews/listview/highlightranges/qmlapplicationviewer/qmlapplicationviewer.h b/examples/declarative/modelviews/listview/highlightranges/qmlapplicationviewer/qmlapplicationviewer.h deleted file mode 100644 index f5b24b0..0000000 --- a/examples/declarative/modelviews/listview/highlightranges/qmlapplicationviewer/qmlapplicationviewer.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// checksum 0x5a59 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#ifndef QMLAPPLICATIONVIEWER_H -#define QMLAPPLICATIONVIEWER_H - -#include <QtDeclarative/QDeclarativeView> - -class QmlApplicationViewer : public QDeclarativeView -{ - Q_OBJECT - -public: - enum ScreenOrientation { - ScreenOrientationLockPortrait, - ScreenOrientationLockLandscape, - ScreenOrientationAuto - }; - - explicit QmlApplicationViewer(QWidget *parent = 0); - virtual ~QmlApplicationViewer(); - - void setMainQmlFile(const QString &file); - void addImportPath(const QString &path); - void setOrientation(ScreenOrientation orientation); - void showExpanded(); - -private: - class QmlApplicationViewerPrivate *m_d; -}; - -#endif // QMLAPPLICATIONVIEWER_H diff --git a/examples/declarative/modelviews/listview/highlightranges/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/declarative/modelviews/listview/highlightranges/qmlapplicationviewer/qmlapplicationviewer.pri deleted file mode 100644 index 1c0c7ed..0000000 --- a/examples/declarative/modelviews/listview/highlightranges/qmlapplicationviewer/qmlapplicationviewer.pri +++ /dev/null @@ -1,154 +0,0 @@ -# checksum 0x3dc8 version 0x2000a -# This file was generated by the Qt Quick Application wizard of Qt Creator. -# The code below adds the QmlApplicationViewer to the project and handles the -# activation of QML debugging. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -QT += declarative - -SOURCES += $$PWD/qmlapplicationviewer.cpp -HEADERS += $$PWD/qmlapplicationviewer.h -INCLUDEPATH += $$PWD - -defineTest(minQtVersion) { - maj = $$1 - min = $$2 - patch = $$3 - isEqual(QT_MAJOR_VERSION, $$maj) { - isEqual(QT_MINOR_VERSION, $$min) { - isEqual(QT_PATCH_VERSION, $$patch) { - return(true) - } - greaterThan(QT_PATCH_VERSION, $$patch) { - return(true) - } - } - greaterThan(QT_MINOR_VERSION, $$min) { - return(true) - } - } - return(false) -} - -contains(DEFINES, QMLJSDEBUGGER) { - CONFIG(debug, debug|release) { - !minQtVersion(4, 7, 1) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("This library requires Qt 4.7.1 or newer.") - warning() - DEFINES -= QMLJSDEBUGGER - } else:isEmpty(QMLJSDEBUGGER_PATH) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("Please specify its location on the qmake command line, eg") - warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger") - warning() - DEFINES -= QMLJSDEBUGGER - } else { - include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) - } - } else { - DEFINES -= QMLJSDEBUGGER - } -} -# This file was generated by an application wizard of Qt Creator. -# The code below handles deployment to Symbian and Maemo, aswell as copying -# of the application data to shadow build directories on desktop. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -defineTest(qtcAddDeployment) { -for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemsources = $${item}.sources - $$itemsources = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath= $$eval($${deploymentfolder}.target) - export($$itemsources) - export($$itempath) - DEPLOYMENT += $$item -} - -MAINPROFILEPWD = $$PWD - -symbian { - ICON = $${TARGET}.svg - TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 - contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone - contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices -} else:win32 { - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - source = $$eval($${deploymentfolder}.source) - pathSegments = $$split(source, /) - sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments) - copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\) - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } -} else:unix { - maemo5 { - installPrefix = /opt/usr - desktopfile.path = /usr/share/applications/hildon - } else { - installPrefix = /usr/local - desktopfile.path = /usr/share/applications - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - macx { - target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) - } else { - target = $$OUT_PWD/$$eval($${deploymentfolder}.target) - } - copyCommand += && $(MKDIR) $$target - copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } - } - for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemfiles = $${item}.files - $$itemfiles = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target) - export($$itemfiles) - export($$itempath) - INSTALLS += $$item - } - icon.files = $${TARGET}.png - icon.path = /usr/share/icons/hicolor/64x64/apps - desktopfile.files = $${TARGET}.desktop - target.path = $${installPrefix}/bin - export(icon.files) - export(icon.path) - export(desktopfile.files) - export(desktopfile.path) - export(target.path) - INSTALLS += desktopfile icon target -} - -export (ICON) -export (INSTALLS) -export (DEPLOYMENT) -export (TARGET.EPOCHEAPSIZE) -export (TARGET.CAPABILITY) -export (LIBS) -export (QMAKE_EXTRA_TARGETS) -} diff --git a/examples/declarative/modelviews/listview/listview.qmlproject b/examples/declarative/modelviews/listview/listview.qmlproject deleted file mode 100644 index d4909f8..0000000 --- a/examples/declarative/modelviews/listview/listview.qmlproject +++ /dev/null @@ -1,16 +0,0 @@ -import QmlProject 1.0 - -Project { - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ " ../exampleplugin " ] -} diff --git a/examples/declarative/modelviews/listview/sections.qml b/examples/declarative/modelviews/listview/sections.qml deleted file mode 100644 index 30c5a48..0000000 --- a/examples/declarative/modelviews/listview/sections.qml +++ /dev/null @@ -1,87 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This example shows how a ListView can be separated into sections using -// the ListView.section attached property. - -import QtQuick 1.0 - -//! [0] -Rectangle { - id: container - width: 200 - height: 250 - - ListModel { - id: animalsModel - ListElement { name: "Parrot"; size: "Small" } - ListElement { name: "Guinea pig"; size: "Small" } - ListElement { name: "Dog"; size: "Medium" } - ListElement { name: "Cat"; size: "Medium" } - ListElement { name: "Elephant"; size: "Large" } - } - - // The delegate for each section header - Component { - id: sectionHeading - Rectangle { - width: container.width - height: childrenRect.height - color: "lightsteelblue" - - Text { - text: section - font.bold: true - } - } - } - - ListView { - anchors.fill: parent - model: animalsModel - delegate: Text { text: name } - - section.property: "size" - section.criteria: ViewSection.FullString - section.delegate: sectionHeading - } -} -//! [0] - diff --git a/examples/declarative/modelviews/listview/sections/main.cpp b/examples/declarative/modelviews/listview/sections/main.cpp index 7b827c7..660616b 100644 --- a/examples/declarative/modelviews/listview/sections/main.cpp +++ b/examples/declarative/modelviews/listview/sections/main.cpp @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) QmlApplicationViewer viewer; viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait); - viewer.setMainQmlFile(QLatin1String("qml/qml/sections.qml")); + viewer.setMainQmlFile(QLatin1String("qml/sections/sections.qml")); viewer.showExpanded(); return app.exec(); diff --git a/examples/declarative/modelviews/listview/sections/qml/listview.qmlproject b/examples/declarative/modelviews/listview/sections/qml/listview.qmlproject deleted file mode 100644 index d4909f8..0000000 --- a/examples/declarative/modelviews/listview/sections/qml/listview.qmlproject +++ /dev/null @@ -1,16 +0,0 @@ -import QmlProject 1.0 - -Project { - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ " ../exampleplugin " ] -} diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/PetsModel.qml b/examples/declarative/modelviews/listview/sections/qml/sections/content/PetsModel.qml index 5220763..5220763 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/PetsModel.qml +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/PetsModel.qml diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/PressAndHoldButton.qml b/examples/declarative/modelviews/listview/sections/qml/sections/content/PressAndHoldButton.qml index d6808a4..d6808a4 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/PressAndHoldButton.qml +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/PressAndHoldButton.qml diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/RecipesModel.qml b/examples/declarative/modelviews/listview/sections/qml/sections/content/RecipesModel.qml index 6056b90..6056b90 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/RecipesModel.qml +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/RecipesModel.qml diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/TextButton.qml b/examples/declarative/modelviews/listview/sections/qml/sections/content/TextButton.qml index f26d775..f26d775 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/TextButton.qml +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/TextButton.qml diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/arrow-down.png b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/arrow-down.png Binary files differindex 29d1d44..29d1d44 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/arrow-down.png +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/arrow-down.png diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/arrow-up.png b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/arrow-up.png Binary files differindex e437312..e437312 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/arrow-up.png +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/arrow-up.png diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/fruit-salad.jpg b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/fruit-salad.jpg Binary files differindex da5a6b1..da5a6b1 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/fruit-salad.jpg +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/fruit-salad.jpg diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/hamburger.jpg b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/hamburger.jpg Binary files differindex d0a15be..d0a15be 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/hamburger.jpg +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/hamburger.jpg diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/lemonade.jpg b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/lemonade.jpg Binary files differindex db445c9..db445c9 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/lemonade.jpg +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/lemonade.jpg diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/list-delete.png b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/list-delete.png Binary files differindex df2a147..df2a147 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/list-delete.png +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/list-delete.png diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/minus-sign.png b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/minus-sign.png Binary files differindex d6f233d..d6f233d 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/minus-sign.png +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/minus-sign.png diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/moreDown.png b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/moreDown.png Binary files differindex 31a35d5..31a35d5 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/moreDown.png +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/moreDown.png diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/moreUp.png b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/moreUp.png Binary files differindex fefb9c9..fefb9c9 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/moreUp.png +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/moreUp.png diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/pancakes.jpg b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/pancakes.jpg Binary files differindex 60c4396..60c4396 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/pancakes.jpg +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/pancakes.jpg diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/plus-sign.png b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/plus-sign.png Binary files differindex 40df113..40df113 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/plus-sign.png +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/plus-sign.png diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/vegetable-soup.jpg b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/vegetable-soup.jpg Binary files differindex 9dce332..9dce332 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/content/pics/vegetable-soup.jpg +++ b/examples/declarative/modelviews/listview/sections/qml/sections/content/pics/vegetable-soup.jpg diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/dynamiclist.qml b/examples/declarative/modelviews/listview/sections/qml/sections/dynamiclist.qml index f25f0fa..f25f0fa 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/dynamiclist.qml +++ b/examples/declarative/modelviews/listview/sections/qml/sections/dynamiclist.qml diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/expandingdelegates.qml b/examples/declarative/modelviews/listview/sections/qml/sections/expandingdelegates.qml index bd3d3a9..bd3d3a9 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/expandingdelegates.qml +++ b/examples/declarative/modelviews/listview/sections/qml/sections/expandingdelegates.qml diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/highlight.qml b/examples/declarative/modelviews/listview/sections/qml/sections/highlight.qml index 249c73b..249c73b 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/highlight.qml +++ b/examples/declarative/modelviews/listview/sections/qml/sections/highlight.qml diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/highlightranges.qml b/examples/declarative/modelviews/listview/sections/qml/sections/highlightranges.qml index 58d37a3..58d37a3 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/highlightranges.qml +++ b/examples/declarative/modelviews/listview/sections/qml/sections/highlightranges.qml diff --git a/examples/declarative/modelviews/listview/dynamiclist/qml/sections.qml b/examples/declarative/modelviews/listview/sections/qml/sections/sections.qml index 3248899..3248899 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/qml/sections.qml +++ b/examples/declarative/modelviews/listview/sections/qml/sections/sections.qml diff --git a/examples/declarative/modelviews/listview/sections/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/declarative/modelviews/listview/sections/qmlapplicationviewer/qmlapplicationviewer.cpp deleted file mode 100644 index 411a04c..0000000 --- a/examples/declarative/modelviews/listview/sections/qmlapplicationviewer/qmlapplicationviewer.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// checksum 0x28c7 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#include "qmlapplicationviewer.h" - -#include <QtCore/QCoreApplication> -#include <QtCore/QDir> -#include <QtCore/QFileInfo> -#include <QtDeclarative/QDeclarativeComponent> -#include <QtDeclarative/QDeclarativeEngine> -#include <QtDeclarative/QDeclarativeContext> - -#if defined(QMLJSDEBUGGER) -#include <qt_private/qdeclarativedebughelper_p.h> -#endif - -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) -#include <jsdebuggeragent.h> -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) -#include <qdeclarativeviewobserver.h> -#endif - -#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK) -#include <eikenv.h> -#include <eikappui.h> -#include <aknenv.h> -#include <aknappui.h> -#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK - -#if defined(QMLJSDEBUGGER) - -// Enable debugging before any QDeclarativeEngine is created -struct QmlJsDebuggingEnabler -{ - QmlJsDebuggingEnabler() - { - QDeclarativeDebugHelper::enableDebugging(); - } -}; - -// Execute code in constructor before first QDeclarativeEngine is instantiated -static QmlJsDebuggingEnabler enableDebuggingHelper; - -#endif // QMLJSDEBUGGER - -class QmlApplicationViewerPrivate -{ - QString mainQmlFile; - friend class QmlApplicationViewer; - static QString adjustPath(const QString &path); -}; - -QString QmlApplicationViewerPrivate::adjustPath(const QString &path) -{ -#ifdef Q_OS_UNIX -#ifdef Q_OS_MAC - if (!QDir::isAbsolutePath(path)) - return QCoreApplication::applicationDirPath() - + QLatin1String("/../Resources/") + path; -#else - const QString pathInShareDir = QCoreApplication::applicationDirPath() - + QLatin1String("/../share/") - + QFileInfo(QCoreApplication::applicationFilePath()).fileName() - + QLatin1Char('/') + path; - if (QFileInfo(pathInShareDir).exists()) - return pathInShareDir; -#endif -#endif - return path; -} - -QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) : - QDeclarativeView(parent), - m_d(new QmlApplicationViewerPrivate) -{ - connect(engine(), SIGNAL(quit()), SLOT(close())); - setResizeMode(QDeclarativeView::SizeRootObjectToView); -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) - new QmlJSDebugger::JSDebuggerAgent(engine()); -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) - new QmlJSDebugger::QDeclarativeViewObserver(this, parent); -#endif -} - -QmlApplicationViewer::~QmlApplicationViewer() -{ - delete m_d; -} - -void QmlApplicationViewer::setMainQmlFile(const QString &file) -{ - m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file); - setSource(QUrl::fromLocalFile(m_d->mainQmlFile)); -} - -void QmlApplicationViewer::addImportPath(const QString &path) -{ - engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path)); -} - -void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) -{ -#ifdef Q_OS_SYMBIAN - if (orientation != ScreenOrientationAuto) { -#if defined(ORIENTATIONLOCK) - const CAknAppUiBase::TAppUiOrientation uiOrientation = - (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait - : CAknAppUi::EAppUiOrientationLandscape; - CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi()); - TRAPD(error, - if (appUi) - appUi->SetOrientationL(uiOrientation); - ); - Q_UNUSED(error) -#else // ORIENTATIONLOCK - qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation."); -#endif // ORIENTATIONLOCK - } -#elif defined(Q_WS_MAEMO_5) - Qt::WidgetAttribute attribute; - switch (orientation) { - case ScreenOrientationLockPortrait: - attribute = Qt::WA_Maemo5PortraitOrientation; - break; - case ScreenOrientationLockLandscape: - attribute = Qt::WA_Maemo5LandscapeOrientation; - break; - case ScreenOrientationAuto: - default: - attribute = Qt::WA_Maemo5AutoOrientation; - break; - } - setAttribute(attribute, true); -#else // Q_OS_SYMBIAN - Q_UNUSED(orientation); -#endif // Q_OS_SYMBIAN -} - -void QmlApplicationViewer::showExpanded() -{ -#ifdef Q_OS_SYMBIAN - showFullScreen(); -#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) - showMaximized(); -#else - show(); -#endif -} diff --git a/examples/declarative/modelviews/listview/sections/qmlapplicationviewer/qmlapplicationviewer.h b/examples/declarative/modelviews/listview/sections/qmlapplicationviewer/qmlapplicationviewer.h deleted file mode 100644 index f5b24b0..0000000 --- a/examples/declarative/modelviews/listview/sections/qmlapplicationviewer/qmlapplicationviewer.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// checksum 0x5a59 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#ifndef QMLAPPLICATIONVIEWER_H -#define QMLAPPLICATIONVIEWER_H - -#include <QtDeclarative/QDeclarativeView> - -class QmlApplicationViewer : public QDeclarativeView -{ - Q_OBJECT - -public: - enum ScreenOrientation { - ScreenOrientationLockPortrait, - ScreenOrientationLockLandscape, - ScreenOrientationAuto - }; - - explicit QmlApplicationViewer(QWidget *parent = 0); - virtual ~QmlApplicationViewer(); - - void setMainQmlFile(const QString &file); - void addImportPath(const QString &path); - void setOrientation(ScreenOrientation orientation); - void showExpanded(); - -private: - class QmlApplicationViewerPrivate *m_d; -}; - -#endif // QMLAPPLICATIONVIEWER_H diff --git a/examples/declarative/modelviews/listview/sections/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/declarative/modelviews/listview/sections/qmlapplicationviewer/qmlapplicationviewer.pri deleted file mode 100644 index 1c0c7ed..0000000 --- a/examples/declarative/modelviews/listview/sections/qmlapplicationviewer/qmlapplicationviewer.pri +++ /dev/null @@ -1,154 +0,0 @@ -# checksum 0x3dc8 version 0x2000a -# This file was generated by the Qt Quick Application wizard of Qt Creator. -# The code below adds the QmlApplicationViewer to the project and handles the -# activation of QML debugging. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -QT += declarative - -SOURCES += $$PWD/qmlapplicationviewer.cpp -HEADERS += $$PWD/qmlapplicationviewer.h -INCLUDEPATH += $$PWD - -defineTest(minQtVersion) { - maj = $$1 - min = $$2 - patch = $$3 - isEqual(QT_MAJOR_VERSION, $$maj) { - isEqual(QT_MINOR_VERSION, $$min) { - isEqual(QT_PATCH_VERSION, $$patch) { - return(true) - } - greaterThan(QT_PATCH_VERSION, $$patch) { - return(true) - } - } - greaterThan(QT_MINOR_VERSION, $$min) { - return(true) - } - } - return(false) -} - -contains(DEFINES, QMLJSDEBUGGER) { - CONFIG(debug, debug|release) { - !minQtVersion(4, 7, 1) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("This library requires Qt 4.7.1 or newer.") - warning() - DEFINES -= QMLJSDEBUGGER - } else:isEmpty(QMLJSDEBUGGER_PATH) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("Please specify its location on the qmake command line, eg") - warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger") - warning() - DEFINES -= QMLJSDEBUGGER - } else { - include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) - } - } else { - DEFINES -= QMLJSDEBUGGER - } -} -# This file was generated by an application wizard of Qt Creator. -# The code below handles deployment to Symbian and Maemo, aswell as copying -# of the application data to shadow build directories on desktop. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -defineTest(qtcAddDeployment) { -for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemsources = $${item}.sources - $$itemsources = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath= $$eval($${deploymentfolder}.target) - export($$itemsources) - export($$itempath) - DEPLOYMENT += $$item -} - -MAINPROFILEPWD = $$PWD - -symbian { - ICON = $${TARGET}.svg - TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 - contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone - contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices -} else:win32 { - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - source = $$eval($${deploymentfolder}.source) - pathSegments = $$split(source, /) - sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments) - copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\) - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } -} else:unix { - maemo5 { - installPrefix = /opt/usr - desktopfile.path = /usr/share/applications/hildon - } else { - installPrefix = /usr/local - desktopfile.path = /usr/share/applications - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - macx { - target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) - } else { - target = $$OUT_PWD/$$eval($${deploymentfolder}.target) - } - copyCommand += && $(MKDIR) $$target - copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } - } - for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemfiles = $${item}.files - $$itemfiles = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target) - export($$itemfiles) - export($$itempath) - INSTALLS += $$item - } - icon.files = $${TARGET}.png - icon.path = /usr/share/icons/hicolor/64x64/apps - desktopfile.files = $${TARGET}.desktop - target.path = $${installPrefix}/bin - export(icon.files) - export(icon.path) - export(desktopfile.files) - export(desktopfile.path) - export(target.path) - INSTALLS += desktopfile icon target -} - -export (ICON) -export (INSTALLS) -export (DEPLOYMENT) -export (TARGET.EPOCHEAPSIZE) -export (TARGET.CAPABILITY) -export (LIBS) -export (QMAKE_EXTRA_TARGETS) -} diff --git a/examples/declarative/modelviews/listview/sections/sections.pro b/examples/declarative/modelviews/listview/sections/sections.pro index 17e04f4..0d9151b 100644 --- a/examples/declarative/modelviews/listview/sections/sections.pro +++ b/examples/declarative/modelviews/listview/sections/sections.pro @@ -1,5 +1,5 @@ # Add more folders to ship with the application, here -folder_01.source = qml +folder_01.source = qml/sections folder_01.target = qml DEPLOYMENTFOLDERS = folder_01 @@ -35,5 +35,5 @@ symbian:TARGET.UID3 = 0xEA0874F7 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(qmlapplicationviewer/qmlapplicationviewer.pri) +include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/listview/expandingdelegates/qml/listview.qmlproject b/examples/declarative/modelviews/listview/sections/sections.qmlproject index d4909f8..6848d6b 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/qml/listview.qmlproject +++ b/examples/declarative/modelviews/listview/sections/sections.qmlproject @@ -3,13 +3,13 @@ import QmlProject 1.0 Project { /* Include .qml, .js, and image files from current directory and subdirectories */ QmlFiles { - directory: "." + directory: "qml/sections" } JavaScriptFiles { - directory: "." + directory: "qml/sections" } ImageFiles { - directory: "." + directory: "qml/sections" } /* List of plugin directories passed to QML runtime */ // importPaths: [ " ../exampleplugin " ] |