summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-10-09 07:02:50 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-10-09 07:02:50 (GMT)
commit3995e86d68b2f9958156da3b51d50609b748d220 (patch)
treee69586c8b97acb442d85be8c8d850d574e6e2982 /examples
parentc1e591809975119d87d3f2d7fdb33eda22f0ccd1 (diff)
parent79be9b9d7b9b3fd6620c4425278657ba573d1794 (diff)
downloadQt-3995e86d68b2f9958156da3b51d50609b748d220.zip
Qt-3995e86d68b2f9958156da3b51d50609b748d220.tar.gz
Qt-3995e86d68b2f9958156da3b51d50609b748d220.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/gridview/gridview.qml52
1 files changed, 15 insertions, 37 deletions
diff --git a/examples/declarative/gridview/gridview.qml b/examples/declarative/gridview/gridview.qml
index 2e5110a..93931c7 100644
--- a/examples/declarative/gridview/gridview.qml
+++ b/examples/declarative/gridview/gridview.qml
@@ -4,57 +4,35 @@ Rectangle {
width: 300; height: 400; color: "white"
ListModel {
- id: AppModel
- ListElement {
- name: "Music"
- icon: "AudioPlayer_48.png"
- }
- ListElement {
- name: "Movies"
- icon: "VideoPlayer_48.png"
- }
- ListElement {
- name: "Camera"
- icon: "Camera_48.png"
- }
- ListElement {
- name: "Calendar"
- icon: "DateBook_48.png"
- }
- ListElement {
- name: "Messaging"
- icon: "EMail_48.png"
- }
- ListElement {
- name: "Todo List"
- icon: "TodoList_48.png"
- }
- ListElement {
- name: "Contacts"
- icon: "AddressBook_48.png"
- }
+ id: appModel
+ ListElement { name: "Music"; icon: "pics/AudioPlayer_48.png" }
+ ListElement { name: "Movies"; icon: "pics/VideoPlayer_48.png" }
+ ListElement { name: "Camera"; icon: "pics/Camera_48.png" }
+ ListElement { name: "Calendar"; icon: "pics/DateBook_48.png" }
+ ListElement { name: "Messaging"; icon: "pics/EMail_48.png" }
+ ListElement { name: "Todo List"; icon: "pics/TodoList_48.png" }
+ ListElement { name: "Contacts"; icon: "pics/AddressBook_48.png" }
}
Component {
- id: AppDelegate
+ id: appDelegate
Item {
width: 100; height: 100
- Image { id: Icon; y: 20; anchors.horizontalCenter: parent.horizontalCenter; source: icon }
- Text { anchors.top: Icon.bottom; anchors.horizontalCenter: parent.horizontalCenter; text: name }
+ Image { id: myIcon; y: 20; anchors.horizontalCenter: parent.horizontalCenter; source: icon }
+ Text { anchors.top: myIcon.bottom; anchors.horizontalCenter: parent.horizontalCenter; text: name }
}
}
Component {
- id: AppHighlight
- Rectangle { width: 80; height: 80; color: "#FFFF88" }
+ id: appHighlight
+ Rectangle { width: 80; height: 80; color: "lightsteelblue" }
}
GridView {
- id: List1
anchors.fill: parent
cellWidth: 100; cellHeight: 100
- model: AppModel; delegate: AppDelegate
- highlight: AppHighlight
+ model: appModel; delegate: appDelegate
+ highlight: appHighlight
focus: true
}
}