summaryrefslogtreecommitdiff
path: root/sowatchui/qml/MainPage.qml
blob: 339b1a65c754ff65c2766bf8e0d3aa6e5cd9e5d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import QtQuick 1.1
import com.nokia.meego 1.1
import com.nokia.extras 1.1

Page {
	id: mainPage
	anchors.leftMargin: UiConstants.DefaultMargin
	anchors.rightMargin: UiConstants.DefaultMargin
	orientationLock: PageOrientation.LockPortrait

	tools: ToolBarLayout {
		ToolIcon {
			platformIconId: "toolbar-add"
			anchors.right: parent.right
			onClicked: newWatchSheet.open()
		}
	}

	NewWatchSheet {
		id: newWatchSheet
	}

	ListView {
		id: watchesListView
		anchors.fill: parent
		model: watches

		delegate: ListDelegate {
			Image {
                source: "image://theme/icon-m-common-drilldown-arrow" + (theme.inverted ? "-inverse" : "")
                anchors.right: parent.right;
                anchors.verticalCenter: parent.verticalCenter
            }

			onClicked: pageStack.push(Qt.resolvedUrl("WatchPage.qml"),
									  {configKey: model.configKey,
			                           configQmlUrl: model.configQmlUrl});
		}
	}
	ScrollDecorator {
		flickableItem: watchesListView
	}
}