summaryrefslogtreecommitdiff
path: root/metawatch
diff options
context:
space:
mode:
Diffstat (limited to 'metawatch')
-rw-r--r--metawatch/metawatch.pro7
-rw-r--r--metawatch/metawatchdigital.h5
-rw-r--r--metawatch/metawatchdigitalfacewatchlet.cpp8
-rw-r--r--metawatch/metawatchdigitalfacewatchlet.h18
-rw-r--r--metawatch/metawatchfacewatchlet.cpp9
-rw-r--r--metawatch/metawatchfacewatchlet.h18
6 files changed, 34 insertions, 31 deletions
diff --git a/metawatch/metawatch.pro b/metawatch/metawatch.pro
index 1437b71..bd6d9bc 100644
--- a/metawatch/metawatch.pro
+++ b/metawatch/metawatch.pro
@@ -19,7 +19,7 @@ SOURCES += metawatchplugin.cpp \
metawatchscanner.cpp \
metawatchdigitalsimulator.cpp \
metawatchdigitalsimulatorform.cpp \
- metawatchdigitalfacewatchlet.cpp
+ metawatchfacewatchlet.cpp
HEADERS += metawatchplugin.h \
metawatchpaintengine.h \
@@ -29,13 +29,14 @@ HEADERS += metawatchplugin.h \
metawatchscanner.h \
metawatchdigitalsimulator.h \
metawatchdigitalsimulatorform.h \
- metawatchdigitalfacewatchlet.h
+ metawatchfacewatchlet.h
FORMS += \
metawatchdigitalsimulatorform.ui
res_files.files += res/graphics res/fonts
-qml_files.files += qml/com qml/metawatch-digital-config.qml
+qml_files.files += qml/com qml/metawatch-digital-config.qml \
+ qml/metawatch-digital-watchface.qml
LIBS += -L$$OUT_PWD/../libsowatch/ -lsowatch
diff --git a/metawatch/metawatchdigital.h b/metawatch/metawatchdigital.h
index 4fd6ae6..3648160 100644
--- a/metawatch/metawatchdigital.h
+++ b/metawatch/metawatchdigital.h
@@ -31,6 +31,9 @@ public:
void update(Mode mode, const QList<QRect>& rects = QList<QRect>());
protected:
+ void handleWatchConnected();
+
+private:
// Idle screen: notifications unread count
ushort _nMails, _nCalls, _nIms, _nSms, _nMms;
// Idle screen: weather information
@@ -39,8 +42,6 @@ protected:
short _wTemperature;
bool _wMetric;
- void handleWatchConnected();
-
void renderIdleScreen();
void renderIdleWeather();
QImage iconForWeather(WeatherNotification::WeatherType w);
diff --git a/metawatch/metawatchdigitalfacewatchlet.cpp b/metawatch/metawatchdigitalfacewatchlet.cpp
deleted file mode 100644
index 08d8ac4..0000000
--- a/metawatch/metawatchdigitalfacewatchlet.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "metawatchdigitalfacewatchlet.h"
-
-using namespace sowatch;
-
-MetaWatchDigitalFaceWatchlet::MetaWatchDigitalFaceWatchlet(Watch *watch) :
- DeclarativeWatchlet(watch, "crap")
-{
-}
diff --git a/metawatch/metawatchdigitalfacewatchlet.h b/metawatch/metawatchdigitalfacewatchlet.h
deleted file mode 100644
index b4b92ca..0000000
--- a/metawatch/metawatchdigitalfacewatchlet.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef METAWATCHDIGITALFACEWATCHLET_H
-#define METAWATCHDIGITALFACEWATCHLET_H
-
-#include <sowatch.h>
-
-namespace sowatch
-{
-
-class MetaWatchDigitalFaceWatchlet : public DeclarativeWatchlet
-{
- Q_OBJECT
-public:
- explicit MetaWatchDigitalFaceWatchlet(Watch* watch);
-};
-
-}
-
-#endif // METAWATCHDIGITALFACEWATCHLET_H
diff --git a/metawatch/metawatchfacewatchlet.cpp b/metawatch/metawatchfacewatchlet.cpp
new file mode 100644
index 0000000..7e18988
--- /dev/null
+++ b/metawatch/metawatchfacewatchlet.cpp
@@ -0,0 +1,9 @@
+#include "metawatchfacewatchlet.h"
+
+using namespace sowatch;
+
+MetaWatchFaceWatchlet::MetaWatchFaceWatchlet(Watch *watch) :
+ DeclarativeWatchlet(watch, "com.javispedro.sowatch.metawatch.watchface")
+{
+ setSource(QUrl(SOWATCH_QML_DIR "/metawatch/" + watch->model() + "-watchface.qml"));
+}
diff --git a/metawatch/metawatchfacewatchlet.h b/metawatch/metawatchfacewatchlet.h
new file mode 100644
index 0000000..2895589
--- /dev/null
+++ b/metawatch/metawatchfacewatchlet.h
@@ -0,0 +1,18 @@
+#ifndef METAWATCHFACEWATCHLET_H
+#define METAWATCHFACEWATCHLET_H
+
+#include <sowatch.h>
+
+namespace sowatch
+{
+
+class MetaWatchFaceWatchlet : public DeclarativeWatchlet
+{
+ Q_OBJECT
+public:
+ explicit MetaWatchFaceWatchlet(Watch* watch);
+};
+
+}
+
+#endif // METAWATCHFACEWATCHLET_H