summaryrefslogtreecommitdiff
path: root/metawatch/metawatchplugin.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-04-26 01:36:20 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-04-26 01:36:20 +0200
commit93f3acd128d6b349efe14e97b12c2703ca4f81f3 (patch)
tree937f3de2307444f0c28d6d21f26f1580e789b074 /metawatch/metawatchplugin.cpp
parent1375a26b135547fdd8e07db62acf8116a8482560 (diff)
downloadsowatch-93f3acd128d6b349efe14e97b12c2703ca4f81f3.tar.gz
sowatch-93f3acd128d6b349efe14e97b12c2703ca4f81f3.zip
Moved the core framework to GConf & D-Bus
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;
}