From aa1c0fd3146b4ed055d181c99d52463afa6bedbb Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Fri, 16 Sep 2011 17:47:24 +0200 Subject: Initial import --- declarativewatchwrapper.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 declarativewatchwrapper.cpp (limited to 'declarativewatchwrapper.cpp') 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 +#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))); +} + -- cgit v1.2.3