summaryrefslogtreecommitdiff
path: root/liveview/liveview.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-05-08 21:20:49 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-05-08 21:20:49 +0200
commit08d66614584019d9d05942b917aae494727e2dfb (patch)
treeb08d57da6d5fd7ea9ad7770600a48f7d0cbcf833 /liveview/liveview.h
parentf5c26f02c047d2659d43a2d7e04e0542152e67c7 (diff)
downloadsowatch-08d66614584019d9d05942b917aae494727e2dfb.tar.gz
sowatch-08d66614584019d9d05942b917aae494727e2dfb.zip
can configure date/time of liveview
Diffstat (limited to 'liveview/liveview.h')
-rw-r--r--liveview/liveview.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/liveview/liveview.h b/liveview/liveview.h
index 69016b5..b993ee2 100644
--- a/liveview/liveview.h
+++ b/liveview/liveview.h
@@ -46,8 +46,10 @@ protected:
NoMessage = 0,
GetDisplayProperties = 1,
GetDisplayPropertiesResponse = 2,
- StandBy = 7,
- StandByResponse = 8,
+ DeviceStatusChange = 7,
+ DeviceStatusChangeResponse = 8,
+ DateTimeRequest = 38,
+ DateTimeResponse = 39,
EnableLed = 40,
EnableLedResponse = 41,
Ack = 44,
@@ -55,6 +57,20 @@ protected:
GetSoftwareVersionResponse = 69
};
+ enum ResponseType {
+ ResponseOk = 0,
+ ResponseError = 1,
+ ResponseOutOfMemory = 2,
+ ResponseExit = 3,
+ ResponseCancel = 4
+ };
+
+ enum DeviceStatus {
+ DeviceOff = 0,
+ DeviceOn = 1,
+ DeviceMenu = 2
+ };
+
struct Message {
MessageType type;
QByteArray data;
@@ -67,13 +83,17 @@ protected:
void desetupBluetoothWatch();
void send(const Message& msg);
+ void sendResponse(MessageType type, ResponseType response);
void updateDisplayProperties();
void updateSoftwareVersion();
- void enableLed();
+ void enableLed(const QColor& color, int delay, int time);
void handleMessage(const Message& msg);
+ void handleDeviceStatusChange(const Message& msg);
+ void handleDateTimeRequest(const Message& msg);
void handleDisplayProperties(const Message& msg);
+ void handleSoftwareVersion(const Message& msg);
private slots:
void handleDataReceived();
@@ -82,6 +102,8 @@ private slots:
private:
ConfigKey *_settings;
+ bool _24hMode : 1;
+
/** Message outbox queue. */
QQueue<Message> _sendingMsgs;
QTimer* _sendTimer;