summaryrefslogtreecommitdiff
path: root/declarativewatchwrapper.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2011-09-16 17:47:24 +0200
committerJavier <javier@pcjavier.(none)>2011-09-16 17:47:24 +0200
commitaa1c0fd3146b4ed055d181c99d52463afa6bedbb (patch)
treef6fb8d9693ad8c545ddabf76312f8f33b5b9878f /declarativewatchwrapper.h
downloadsowatch-aa1c0fd3146b4ed055d181c99d52463afa6bedbb.tar.gz
sowatch-aa1c0fd3146b4ed055d181c99d52463afa6bedbb.zip
Initial import
Diffstat (limited to 'declarativewatchwrapper.h')
-rw-r--r--declarativewatchwrapper.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/declarativewatchwrapper.h b/declarativewatchwrapper.h
new file mode 100644
index 0000000..09e0923
--- /dev/null
+++ b/declarativewatchwrapper.h
@@ -0,0 +1,41 @@
+#ifndef DECLARATIVEWATCHWRAPPER_H
+#define DECLARATIVEWATCHWRAPPER_H
+
+#include <QtDeclarative/QtDeclarative>
+
+namespace sowatch
+{
+
+class Watch;
+class DeclarativeWatchlet;
+
+class DeclarativeWatchWrapper : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString model READ model NOTIFY modelChanged)
+
+public:
+ explicit DeclarativeWatchWrapper(Watch *watch, QObject *parent = 0);
+
+ Q_INVOKABLE QString model() const;
+
+signals:
+ void buttonPressed(int button);
+ void buttonReleased(int button);
+
+ void modelChanged();
+
+protected:
+ Watch* _watch;
+
+ void activate();
+ void deactivate();
+
+friend class DeclarativeWatchlet;
+};
+
+}
+
+QML_DECLARE_TYPE(sowatch::DeclarativeWatchWrapper)
+
+#endif // DECLARATIVEWATCHWRAPPER_H