summaryrefslogtreecommitdiff
path: root/metawatch/metawatchplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'metawatch/metawatchplugin.cpp')
-rw-r--r--metawatch/metawatchplugin.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/metawatch/metawatchplugin.cpp b/metawatch/metawatchplugin.cpp
index 523230b..72713ec 100644
--- a/metawatch/metawatchplugin.cpp
+++ b/metawatch/metawatchplugin.cpp
@@ -3,6 +3,7 @@
#include "metawatchdigital.h"
#include "metawatchanalog.h"
#include "metawatchsimulator.h"
+#include "metawatchscanner.h"
#include "metawatchplugin.h"
using namespace sowatch;
@@ -33,14 +34,17 @@ QStringList MetaWatchPlugin::drivers()
return d;
}
-Watch* MetaWatchPlugin::getWatch(const QString& driver, QSettings& settings, QObject *parent)
+WatchScanner* MetaWatchPlugin::getScanner(QObject *parent)
+{
+ return new MetaWatchScanner(parent);
+}
+
+Watch* MetaWatchPlugin::getWatch(const QString& driver, ConfigKey* settings, QObject *parent)
{
if (driver == "metawatch-digital") {
- QBluetoothAddress address(settings.value("address").toString());
- return new MetaWatchDigital(address, &settings, parent);
+ return new MetaWatchDigital(settings, parent);
} else if (driver == "metawatch-analog") {
- QBluetoothAddress address(settings.value("address").toString());
- return new MetaWatchAnalog(address, &settings, parent);
+ return new MetaWatchAnalog(settings, parent);
} else {
return 0;
}