summaryrefslogtreecommitdiff
path: root/sowatchui/qml/AddWatchletSheet.qml
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-08-10 16:06:14 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-08-10 16:06:14 +0200
commit39fa663cd08bd2b7d46ed170d49ac794c531c42e (patch)
tree92131388053eadbfca4b8917ab1e1f87ffe30fdd /sowatchui/qml/AddWatchletSheet.qml
parentb9082fda48bb026fc4e6148efeba9aabf608373a (diff)
downloadsowatch-39fa663cd08bd2b7d46ed170d49ac794c531c42e.tar.gz
sowatch-39fa663cd08bd2b7d46ed170d49ac794c531c42e.zip
watchlet edit UI
Diffstat (limited to 'sowatchui/qml/AddWatchletSheet.qml')
-rw-r--r--sowatchui/qml/AddWatchletSheet.qml48
1 files changed, 48 insertions, 0 deletions
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
+ }
+ }
+}