From f61dfc6557303a8bba5301927f42e5b2a7ffcac6 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Sun, 7 Jul 2013 13:50:28 +0200 Subject: add some notification support to liveview --- .../qml/com/javispedro/sowatch/liveview/LVPage.qml | 7 +++ .../qml/com/javispedro/sowatch/liveview/qmldir | 2 + liveview/qml/liveview-config.qml | 53 ++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 liveview/qml/com/javispedro/sowatch/liveview/LVPage.qml create mode 100644 liveview/qml/com/javispedro/sowatch/liveview/qmldir create mode 100644 liveview/qml/liveview-config.qml (limited to 'liveview/qml') diff --git a/liveview/qml/com/javispedro/sowatch/liveview/LVPage.qml b/liveview/qml/com/javispedro/sowatch/liveview/LVPage.qml new file mode 100644 index 0000000..f3eaf96 --- /dev/null +++ b/liveview/qml/com/javispedro/sowatch/liveview/LVPage.qml @@ -0,0 +1,7 @@ +import Qt 4.7 + +Rectangle { + width: 128 + height: 128 + color: "black" +} diff --git a/liveview/qml/com/javispedro/sowatch/liveview/qmldir b/liveview/qml/com/javispedro/sowatch/liveview/qmldir new file mode 100644 index 0000000..82dc2a2 --- /dev/null +++ b/liveview/qml/com/javispedro/sowatch/liveview/qmldir @@ -0,0 +1,2 @@ +LVPage 1.0 LVPage.qml +LVLabel 1.0 LVLabel.qml diff --git a/liveview/qml/liveview-config.qml b/liveview/qml/liveview-config.qml new file mode 100644 index 0000000..f6c84b0 --- /dev/null +++ b/liveview/qml/liveview-config.qml @@ -0,0 +1,53 @@ +import QtQuick 1.1 +import com.nokia.meego 1.1 +import com.javispedro.sowatch 1.0 + +Column { + property string configKey; + + Item { + id: hourModeItem + width: parent.width + height: UiConstants.ListItemHeightDefault + + GConfKey { + id: hourModeKey + key: configKey + "/24h-mode" + } + MouseArea { + id: hourModeArea + anchors.fill: parent + onClicked: hourModeSelect.open(); + } + SelectionDialog { + id: hourModeSelect + titleText: qsTr("Time format") + selectedIndex: hourModeKey.value ? 1 : 0 + model: ListModel { + ListElement { name: QT_TR_NOOP("12 hour") } + ListElement { name: QT_TR_NOOP("24 hour") } + } + onSelectedIndexChanged: hourModeKey.value = selectedIndex == 1 + } + Column { + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + + Label { + text: qsTr("Time format") + font: UiConstants.TitleFont + } + + Label { + text: qsTr(hourModeSelect.model.get(hourModeSelect.selectedIndex).name) + font: UiConstants.FieldLabelFont + color: UiConstants.FieldLabelColor + } + } + Image { + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + source: "image://theme/meegotouch-combobox-indicator" + (theme.inverted ? "-inverted" : "") + } + } +} -- cgit v1.2.3