summaryrefslogtreecommitdiff
path: root/metawatch/metawatchdigital.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2011-10-15 23:57:14 +0200
committerJavier S. Pedro <maemo@javispedro.com>2011-10-15 23:57:14 +0200
commitde66281645cea6073659ff4d9f534a2f403588cc (patch)
tree1183f1242d8b7be061668e903cd51867b696e438 /metawatch/metawatchdigital.h
parentf0052223da8290fb9273c4901f6309e612ea55ff (diff)
downloadsowatch-de66281645cea6073659ff4d9f534a2f403588cc.tar.gz
sowatch-de66281645cea6073659ff4d9f534a2f403588cc.zip
Moving MetaWatchDigital stuff into its own class
Diffstat (limited to 'metawatch/metawatchdigital.h')
-rw-r--r--metawatch/metawatchdigital.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/metawatch/metawatchdigital.h b/metawatch/metawatchdigital.h
new file mode 100644
index 0000000..c75fc40
--- /dev/null
+++ b/metawatch/metawatchdigital.h
@@ -0,0 +1,49 @@
+#ifndef METAWATCHDIGITAL_H
+#define METAWATCHDIGITAL_H
+
+#include "metawatch.h"
+
+namespace sowatch
+{
+
+class MetaWatchDigital : public MetaWatch
+{
+ Q_OBJECT
+public:
+ explicit MetaWatchDigital(const QBluetoothAddress& address, QSettings* settings = 0, QObject *parent = 0);
+
+ static const int screenWidth = 96;
+ static const int screenHeight = 96;
+ static const int systemAreaHeight = 30;
+
+ int metric(PaintDeviceMetric metric) const;
+
+ QString model() const;
+
+ void updateNotificationCount(Notification::Type type, int count);
+
+ void displayIdleScreen();
+ void displayNotification(Notification *notification);
+ void displayApplication();
+
+ void clear(Mode mode, bool black = false);
+ void update(Mode mode, const QList<QRect>& rects = QList<QRect>());
+
+protected:
+ // Notifications: Unread count
+ uint _nMails, _nCalls, _nIms, _nSms, _nMms;
+
+ void handleWatchConnected();
+
+ void renderIdleScreen();
+ void renderIdleWeather();
+ void renderIdleCounts();
+
+ void renderNotificationScreen();
+ void renderNotification(Notification *n);
+ QImage iconForNotification(const Notification *n);
+};
+
+}
+
+#endif // METAWATCHDIGITAL_H