summaryrefslogtreecommitdiff
path: root/metawatch/metawatchplugin.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2011-09-18 04:26:20 +0200
committerJavier S. Pedro <maemo@javispedro.com>2011-09-18 04:26:20 +0200
commitc42d5abff1f5f51facc169dd593725d819c4c868 (patch)
tree9aa8bdef88bf89561c7726948541a1ba3906b81e /metawatch/metawatchplugin.cpp
parentf225345d4de3b198a557fe3566f9630163e76d51 (diff)
downloadsowatch-c42d5abff1f5f51facc169dd593725d819c4c868.tar.gz
sowatch-c42d5abff1f5f51facc169dd593725d819c4c868.zip
separation into lib and plugins complete
Diffstat (limited to 'metawatch/metawatchplugin.cpp')
-rw-r--r--metawatch/metawatchplugin.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/metawatch/metawatchplugin.cpp b/metawatch/metawatchplugin.cpp
index e5eaabf..e56d6db 100644
--- a/metawatch/metawatchplugin.cpp
+++ b/metawatch/metawatchplugin.cpp
@@ -1,8 +1,10 @@
+#include <QtConnectivity/QBluetoothAddress>
#include "metawatch.h"
#include "metawatchsimulator.h"
#include "metawatchplugin.h"
using namespace sowatch;
+QTM_USE_NAMESPACE
MetaWatchPlugin::~MetaWatchPlugin()
{
@@ -17,13 +19,17 @@ QStringList MetaWatchPlugin::drivers()
return d;
}
-Watch* MetaWatchPlugin::getWatch(const QString& driver, const QString& connId, QObject *parent)
+Watch* MetaWatchPlugin::getWatch(const QString& driver, QSettings& settings, QObject *parent)
{
if (driver == "metawatch-digital") {
- return new MetaWatch(QBluetoothAddress(connId), parent);
+ QBluetoothAddress address(settings.value("address").toString());
+ return new MetaWatch(address, parent);
} else if (driver == "metawatch-digital-sim") {
- return new MetaWatchSimulator(parent);
+ //return new MetaWatchSimulator(parent);
+ return 0;
} else {
return 0;
}
}
+
+Q_EXPORT_PLUGIN2(metawatch, MetaWatchPlugin)