diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-07-07 13:50:28 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-07-07 13:50:28 +0200 |
commit | f61dfc6557303a8bba5301927f42e5b2a7ffcac6 (patch) | |
tree | fdba31b412015684d46c7a3cb070b8a57ff37ef4 /liveview/liveview.h | |
parent | 92475d094cfddf7dd3036f5f1a9d6845a83ee350 (diff) | |
download | sowatch-f61dfc6557303a8bba5301927f42e5b2a7ffcac6.tar.gz sowatch-f61dfc6557303a8bba5301927f42e5b2a7ffcac6.zip |
add some notification support to liveview
Diffstat (limited to 'liveview/liveview.h')
-rw-r--r-- | liveview/liveview.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/liveview/liveview.h b/liveview/liveview.h index b85a574..13a8f0a 100644 --- a/liveview/liveview.h +++ b/liveview/liveview.h @@ -79,7 +79,11 @@ protected: DateTimeResponse = 39, EnableLed = 40, EnableLedResponse = 41, + Vibrate = 42, + VibrateResponse = 43, Ack = 44, + SetScreenMode = 64, + SetScreenModeResponse = 65, GetSoftwareVersion = 68, GetSoftwareVersionResponse = 69 }; @@ -106,6 +110,7 @@ protected: enum Mode { RootMenuMode = 0, ApplicationMode, + NotificationMode, NotificationListMode }; @@ -128,6 +133,12 @@ protected: NotificationShowPrev = 4 }; + enum ScreenBrigthness { + ScreenOff = 49, + ScreenDim = 50, + ScreenMax = 51 + }; + struct Message { MessageType type; QByteArray data; @@ -183,6 +194,8 @@ protected: void sendMenuItem(unsigned char id, MenuItemType type, unsigned short unread, const QString& text, const QByteArray& image); void sendNotification(unsigned short id, unsigned short unread, unsigned short count, const QString& date, const QString& header, const QString& body, const QByteArray& image); void enableLed(const QColor& color, unsigned short delay, unsigned short time); + void vibrate(unsigned short delay, unsigned short time); + void setScreenMode(ScreenBrigthness mode); void handleMessage(const Message& msg); void handleDeviceStatusChange(const Message& msg); @@ -207,12 +220,15 @@ private: WatchletsModel *_watchlets; NotificationsModel *_notifications; + // Configurable settings bool _24hMode : 1; + // Watch properties int _screenWidth; int _screenHeight; QStringList _buttons; + // Runtime variables Mode _mode; int _curNotificationIndex; |