summaryrefslogtreecommitdiff
path: root/declarativewatchwrapper.cpp
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.cpp
downloadsowatch-aa1c0fd3146b4ed055d181c99d52463afa6bedbb.tar.gz
sowatch-aa1c0fd3146b4ed055d181c99d52463afa6bedbb.zip
Initial import
Diffstat (limited to 'declarativewatchwrapper.cpp')
-rw-r--r--declarativewatchwrapper.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/declarativewatchwrapper.cpp b/declarativewatchwrapper.cpp
new file mode 100644
index 0000000..127b6d6
--- /dev/null
+++ b/declarativewatchwrapper.cpp
@@ -0,0 +1,29 @@
+#include <QtCore/QDebug>
+#include "watch.h"
+#include "declarativewatchwrapper.h"
+
+using namespace sowatch;
+
+DeclarativeWatchWrapper::DeclarativeWatchWrapper(Watch* watch, QObject *parent) :
+ QObject(parent), _watch(watch)
+{
+
+}
+
+QString DeclarativeWatchWrapper::model() const
+{
+ return _watch->model();
+}
+
+void DeclarativeWatchWrapper::activate()
+{
+ connect(_watch, SIGNAL(buttonPressed(int)), this, SIGNAL(buttonPressed(int)));
+ connect(_watch, SIGNAL(buttonReleased(int)), this, SIGNAL(buttonReleased(int)));
+}
+
+void DeclarativeWatchWrapper::deactivate()
+{
+ disconnect(this, SIGNAL(buttonPressed(int)));
+ disconnect(this, SIGNAL(buttonReleased(int)));
+}
+