From 39fa663cd08bd2b7d46ed170d49ac794c531c42e Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Fri, 10 Aug 2012 16:06:14 +0200 Subject: watchlet edit UI --- sowatchui/qml/AddWatchletSheet.qml | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 sowatchui/qml/AddWatchletSheet.qml (limited to 'sowatchui/qml/AddWatchletSheet.qml') diff --git a/sowatchui/qml/AddWatchletSheet.qml b/sowatchui/qml/AddWatchletSheet.qml new file mode 100644 index 0000000..e052350 --- /dev/null +++ b/sowatchui/qml/AddWatchletSheet.qml @@ -0,0 +1,48 @@ +import QtQuick 1.1 +import com.nokia.meego 1.1 +import com.nokia.extras 1.1 +import com.javispedro.sowatch 1.0 + +Sheet { + id: sheet + anchors.margins: UiConstants.DefaultMargin + + property string configKey; + + rejectButtonText: qsTr("Cancel") + + content: ListView { + id: listView + anchors.fill: parent + anchors.margins: UiConstants.DefaultMargin + + flickableDirection: Flickable.VerticalFlick + + model: WatchletsModel { + id: watchletsModel + configKey: sheet.configKey + displayUnadded: true + } + + header: Column { + width: parent.width + + GroupHeader { + width: parent.width + text: qsTr("Available watchlets") + } + } + + delegate: ListDelegate { + onClicked: { + watchletsModel.addWatchlet(model.name); + close(); + accepted(); + } + } + + ScrollDecorator { + flickableItem: listView + } + } +} -- cgit v1.2.3