summaryrefslogtreecommitdiff
path: root/liveview/liveview.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-05-14 01:13:41 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-05-14 01:13:41 +0200
commit80c58c124caf17f670d8efc120f5ae4bfd9aa09f (patch)
treec6d036f06437e54f80afd65e1a700a018cab994b /liveview/liveview.h
parentc3392e5d539e87f4720b3d107aaefffdc9579f4d (diff)
downloadsowatch-80c58c124caf17f670d8efc120f5ae4bfd9aa09f.tar.gz
sowatch-80c58c124caf17f670d8efc120f5ae4bfd9aa09f.zip
added liveview watchlet menu (API break)
Diffstat (limited to 'liveview/liveview.h')
-rw-r--r--liveview/liveview.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/liveview/liveview.h b/liveview/liveview.h
index bd8a3ac..4df7f10 100644
--- a/liveview/liveview.h
+++ b/liveview/liveview.h
@@ -120,12 +120,25 @@ protected:
{ }
};
+ struct RootMenuItem {
+ MenuItemType type;
+ QByteArray icon;
+ QString title;
+ int unread;
+ QString watchletId;
+ };
+
void setupBluetoothWatch();
void desetupBluetoothWatch();
+ /** Recreate the device menu (after watchlets change) */
+ void recreateWatchletsMenu();
/** Update the device menu (after a power on, etc.) */
void refreshMenu();
+ QByteArray encodeImage(const QImage& image) const;
+ QByteArray encodeImage(const QUrl& url) const;
+
protected:
void send(const Message& msg);
void sendResponse(MessageType type, ResponseType response);
@@ -169,6 +182,10 @@ private:
mutable LiveViewPaintEngine* _paintEngine;
QImage _image;
+ QList<RootMenuItem> _rootMenu;
+ /** Keeps the index of the first watchlet. */
+ int _rootMenuFirstWatchlet;
+
/** Message outbox queue. */
QQueue<Message> _sendingMsgs;
QTimer* _sendTimer;