diff options
Diffstat (limited to 'libsowatch/watch.h')
-rw-r--r-- | libsowatch/watch.h | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/libsowatch/watch.h b/libsowatch/watch.h index eabfa06..ee9bde7 100644 --- a/libsowatch/watch.h +++ b/libsowatch/watch.h @@ -3,6 +3,7 @@ #include <QtCore/QObject> #include <QtCore/QDateTime> +#include <QtCore/QStringList> #include <QtGui/QPaintDevice> #include <QtGui/QImage> #include "notification.h" @@ -21,18 +22,34 @@ public: explicit Watch(QObject* parent = 0); ~Watch(); - /** Return a string identiyfying this watch's model. */ + /** Return a string identifying this watch's model. */ virtual QString model() const = 0; + + /** Names for all the buttons this watch has. Order is important. */ + virtual QStringList buttons() const = 0; + /** Should return true if the watch is connected. */ virtual bool isConnected() const = 0; - /** Indicates if watch is too busy atm and we should limit frame rate. */ virtual bool busy() const = 0; - /** Changes the current date/time on the watch. */ + /** Gets the current date/time on the watch. */ virtual QDateTime dateTime() = 0; + /** Sets the current date/time on the watch. */ virtual void setDateTime(const QDateTime& dateTime) = 0; + /** Go back to the idle screen. */ + virtual void displayIdleScreen() = 0; + /** A standard notification; it's up to the watch when to stop showing it. */ + virtual void displayNotification(Notification* n) = 0; + /** Enter application mode. */ + virtual void displayApplication() = 0; + + /** Grabs a button from whatever is default function is for the current mode. */ + virtual void grabButton(int button) = 0; + /** Restores a button to its default function. */ + virtual void ungrabButton(int button) = 0; + /** Tells the watch to update the unread notifications count, if visible. */ virtual void updateNotificationCount(Notification::Type type, int count) = 0; @@ -43,16 +60,10 @@ signals: void disconnected(); /** The watch has returned to the idle screen by either inactivity or notification cleared/timeout. */ void idling(); + /** A button has been pressed. */ void buttonPressed(int button); + /** A button has been pressed and then released. */ void buttonReleased(int button); - -public slots: - /** Go back to the idle screen. */ - virtual void displayIdleScreen() = 0; - /** A standard notification; it's up to the watch when to stop showing it. */ - virtual void displayNotification(Notification* n) = 0; - /** Enter application mode. */ - virtual void displayApplication() = 0; }; } |