summaryrefslogtreecommitdiff
path: root/sowatchui
diff options
context:
space:
mode:
Diffstat (limited to 'sowatchui')
-rw-r--r--sowatchui/qml/MainPage.qml62
-rw-r--r--sowatchui/qml/ServiceLoader.qml7
-rw-r--r--sowatchui/qml/main.qml4
-rw-r--r--sowatchui/qml/sowatch.js29
-rw-r--r--sowatchui/sowatchui.pro37
5 files changed, 73 insertions, 66 deletions
diff --git a/sowatchui/qml/MainPage.qml b/sowatchui/qml/MainPage.qml
index 45b72f3..a7ba7d7 100644
--- a/sowatchui/qml/MainPage.qml
+++ b/sowatchui/qml/MainPage.qml
@@ -1,9 +1,67 @@
import QtQuick 1.1
import com.nokia.meego 1.0
-import "sowatch.js" as Sowatch
-
Page {
+ id: mainPage
tools: commonTools
+ ListModel {
+ id: testModel
+ ListElement {
+ name: "one"
+ }
+ ListElement {
+ name: "two"
+ }
+ }
+
+ Flickable {
+ anchors.fill: parent
+ contentWidth: mainPage.width
+ contentHeight: mainColumn.height + 100
+
+ Column {
+ id: mainColumn
+
+ width: mainPage.width
+ height: childrenRect.height
+ spacing: 8
+
+ ListView {
+ model: testModel
+ width: mainPage.width
+ height: 50*model.count
+ clip: true
+ interactive: false
+ delegate: Rectangle {
+ height: 50
+ width: mainPage.width
+ color: "red"
+ Text {
+ text: name
+ }
+ }
+ }
+ ListView {
+ model: testModel
+ width: mainPage.width
+ height: 50*model.count
+ clip: true
+ interactive: false
+ delegate: Rectangle {
+ height: 50
+ width: mainPage.width
+ color: "green"
+ Text {
+ text: name
+ }
+ }
+ }
+ Button {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Refresh")
+ onClicked: Sowatch.refreshWatches()
+ }
+ }
+ }
}
diff --git a/sowatchui/qml/ServiceLoader.qml b/sowatchui/qml/ServiceLoader.qml
deleted file mode 100644
index 8128ca7..0000000
--- a/sowatchui/qml/ServiceLoader.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-import QtQuick 1.1
-import QtMobility.serviceframework 1.1
-
-Service {
- id: sowatch
- interfaceName: "com.javispedro.sowatch.service"
-}
diff --git a/sowatchui/qml/main.qml b/sowatchui/qml/main.qml
index 8697b6d..eb4c081 100644
--- a/sowatchui/qml/main.qml
+++ b/sowatchui/qml/main.qml
@@ -1,8 +1,6 @@
import QtQuick 1.1
import com.nokia.meego 1.0
-import "sowatch.js" as Sowatch
-
PageStackWindow {
id: appWindow
@@ -18,7 +16,7 @@ PageStackWindow {
ToolIcon {
platformIconId: "toolbar-view-menu"
anchors.right: (parent === undefined) ? undefined : parent.right
- onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close()
+ onClicked: (myMenu.status === DialogStatus.Closed) ? myMenu.open() : myMenu.close()
}
}
diff --git a/sowatchui/qml/sowatch.js b/sowatchui/qml/sowatch.js
deleted file mode 100644
index f2d48dd..0000000
--- a/sowatchui/qml/sowatch.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var service = null;
-
-function getService() {
- var component = Qt.createComponent("ServiceLoader.qml");
- if (component.status == Component.Ready) {
- var loader = component.createObject(null);
- service = loader.serviceObject;
- }
-}
-
-function checkService() {
- if (service === null) {
- getService();
- }
-}
-
-function start() {
- getService();
-}
-
-function stop() {
- checkService();
- service.terminate();
-}
-
-function restart() {
- stop();
- start();
-}
diff --git a/sowatchui/sowatchui.pro b/sowatchui/sowatchui.pro
index 2265ad6..c73875c 100644
--- a/sowatchui/sowatchui.pro
+++ b/sowatchui/sowatchui.pro
@@ -1,4 +1,6 @@
-TARGET=sowatch
+TARGET = sowatch
+
+QT += dbus
# Add more folders to ship with the application, here
qml_folder.source = qml
@@ -8,38 +10,23 @@ DEPLOYMENTFOLDERS = qml_folder
# Additional import path used to resolve QML modules in Creator's code model
QML_IMPORT_PATH =
-symbian:TARGET.UID3 = 0xE5EBE65C
-
-# Smart Installer package's UID
-# This UID is from the protected range and therefore the package will
-# fail to install if self-signed. By default qmake uses the unprotected
-# range value if unprotected UID is defined for the application and
-# 0x2002CCCF value if protected UID is given to the application
-#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
-
-# Allow network access on Symbian
-symbian:TARGET.CAPABILITY += NetworkServices
-
-# If your application uses the Qt Mobility libraries, uncomment the following
-# lines and add the respective components to the MOBILITY variable.
-CONFIG += mobility
-MOBILITY += serviceframework
-
# Speed up launching on MeeGo/Harmattan when using applauncherd daemon
CONFIG += qdeclarative-boostable
-# Add dependency to Symbian components
-# CONFIG += qt-components
+# Dependency to the main Sowatch library
+LIBS += -L$$OUT_PWD/../libsowatch/ -lsowatch
+INCLUDEPATH += $$PWD/../libsowatch
+DEPENDPATH += $$PWD/../libsowatch
-# The .cpp file which was generated for your project. Feel free to hack it.
+# Source files
SOURCES += main.cpp
-# Please do not modify the following two lines. Required for deployment.
-include(qmlapplicationviewer/qmlapplicationviewer.pri)
-qtcAddDeployment()
-
OTHER_FILES += \
qml/MainPage.qml \
qml/main.qml \
sowatch_harmattan.desktop \
sowatch.desktop
+
+# Please do not modify the following two lines. Required for deployment.
+include(qmlapplicationviewer/qmlapplicationviewer.pri)
+qtcAddDeployment()