diff options
Diffstat (limited to 'declarativewatchwrapper.cpp')
-rw-r--r-- | declarativewatchwrapper.cpp | 29 |
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))); +} + |