From bc5b70046e84c6e5a33a19bd2e64e626fdf0579e Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Thu, 9 Aug 2012 18:50:23 +0200 Subject: first UI editable settings! --- sowatchui/qml/WatchPage.qml | 69 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 58 insertions(+), 11 deletions(-) (limited to 'sowatchui/qml/WatchPage.qml') diff --git a/sowatchui/qml/WatchPage.qml b/sowatchui/qml/WatchPage.qml index 8159834..83932eb 100644 --- a/sowatchui/qml/WatchPage.qml +++ b/sowatchui/qml/WatchPage.qml @@ -1,6 +1,7 @@ import QtQuick 1.1 import com.nokia.meego 1.1 import com.nokia.extras 1.1 +import com.javispedro.sowatch 1.0 Page { id: watchPage @@ -8,6 +9,9 @@ Page { anchors.rightMargin: UiConstants.DefaultMargin orientationLock: PageOrientation.LockPortrait + property string configKey; + property url configQmlUrl; + tools: ToolBarLayout { ToolIcon { platformIconId: "toolbar-back" @@ -16,22 +20,65 @@ Page { } } - ListView { - id: emptyListView + GConfKey { + id: nameKey + key: configKey + "/name" + } + + Flickable { + id: mainFlickable anchors.fill: parent - model: ListModel { + contentHeight: mainColumn.height - } + Column { + id: mainColumn + width: parent.width + + Item { + id: enableItem + width: parent.width + height: UiConstants.ListItemHeightDefault + + Label { + text: qsTr("Enabled") + font: UiConstants.TitleFont + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + } + Switch { + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + checked: true + } + } + + GroupHeader { + width: parent.width + text: "Watch settings" + visible: configQmlLoader.status === Loader.Ready + } + + Loader { + id: configQmlLoader + source: configQmlUrl + width: parent.width + onLoaded: item.configKey = configKey; + } + + GroupHeader { + width: parent.width + text: "Watchlets" + visible: configQmlLoader.status === Loader.Ready + } - delegate: ListDelegate { - Image { - source: "image://theme/icon-m-common-drilldown-arrow" + (theme.inverted ? "-inverse" : "") - anchors.right: parent.right; - anchors.verticalCenter: parent.verticalCenter - } + GroupHeader { + width: parent.width + text: "Notification sources" + visible: configQmlLoader.status === Loader.Ready + } } } ScrollDecorator { - flickableItem: watchesListView + flickableItem: mainFlickable } } -- cgit v1.2.3