From b9b1829dbc50534190c8b81f91ee477af6971834 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Sun, 14 Sep 2014 14:11:26 +0200 Subject: addign watch properties, starting notification work --- src/metawatch.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/metawatch.h') diff --git a/src/metawatch.h b/src/metawatch.h index 9068c08..6b50ead 100644 --- a/src/metawatch.h +++ b/src/metawatch.h @@ -12,7 +12,7 @@ QT_USE_NAMESPACE_BLUETOOTH class MetaWatch : public QObject { Q_OBJECT - Q_ENUMS(MessageTypes WatchProperty UiStyle) + Q_ENUMS(MessageTypes DeviceType WatchMode WatchProperty UiStyle) Q_FLAGS(WatchProperties) public: @@ -25,6 +25,7 @@ public: MessageSetRealTimeClock = 0x26, MessageWatchPropertyOperation = 0x30, + MessageWatchPropertyOperationResponse = 0x31, MessageModeChangeIndication = 0x33, @@ -48,6 +49,10 @@ public: DeviceMetaWatchDigitalGen2 = 5 }; + enum WatchMode { + WatchModeIdle = 0 + }; + enum WatchProperty { WatchPropertyHourFormat12h = 0, WatchPropertyHourFormat24h = 1, @@ -55,10 +60,10 @@ public: WatchPropertyDateFormatDDMM = 1 << 1, WatchPropertyShowSeconds = 1 << 2, WatchPropertyShowSeparationLines = 1 << 3, - WatchPropertyAutobacklight = 1 << 4, + WatchPropertyAutoBacklight = 1 << 4, - WatchPropertyOperationRead = 0 << 7, - WatchPropertyOperationWrite = 1 << 7 + WatchPropertyOperationRead = 1 << 7, + WatchPropertyOperationWrite = 0 << 7 }; Q_DECLARE_FLAGS(WatchProperties, WatchProperty) @@ -74,7 +79,10 @@ public: void updateDeviceType(); void updateBatteryStatus(); - void updateLcdDisplay(); // TODO: More overloads + /** Switches to v2 UI, goes to idle mode */ + void updateLcdDisplay(); + /** Goes to idle mode and a specific page */ + void updateLcdDisplayPage(int page); void updateWidgetList(const QList& widgets); signals: @@ -82,6 +90,7 @@ signals: void disconnected(); void deviceType(DeviceType type); + void modeChange(WatchMode mode, int page); void batteryStatus(bool charging, int charge); public slots: -- cgit v1.2.3