summaryrefslogtreecommitdiff
path: root/liveview/liveviewplugin.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-05-08 18:04:31 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-05-08 18:04:31 +0200
commitccd19d2b7ee4184503ea46b98333b27a5613190e (patch)
treef78cc3f3c946d7a4f8167f72fb20703c65494d84 /liveview/liveviewplugin.cpp
parent6003bf81107dd9be51589c074b74c5af82bfc8ab (diff)
downloadsowatch-ccd19d2b7ee4184503ea46b98333b27a5613190e.tar.gz
sowatch-ccd19d2b7ee4184503ea46b98333b27a5613190e.zip
big change: a new abstract BluetoothWatch class
Diffstat (limited to 'liveview/liveviewplugin.cpp')
-rw-r--r--liveview/liveviewplugin.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/liveview/liveviewplugin.cpp b/liveview/liveviewplugin.cpp
new file mode 100644
index 0000000..6ad6f7f
--- /dev/null
+++ b/liveview/liveviewplugin.cpp
@@ -0,0 +1,45 @@
+#include <QtConnectivity/QBluetoothAddress>
+
+#include "liveview.h"
+#include "liveviewscanner.h"
+#include "liveviewplugin.h"
+
+using namespace sowatch;
+QTM_USE_NAMESPACE
+
+LiveViewPlugin::LiveViewPlugin()
+{
+}
+
+LiveViewPlugin::~LiveViewPlugin()
+{
+
+}
+
+QStringList LiveViewPlugin::drivers()
+{
+ QStringList d;
+ d << "livewview";
+ return d;
+}
+
+WatchScanner* LiveViewPlugin::getScanner(QObject *parent)
+{
+ return new LiveViewScanner(parent);
+}
+
+QUrl LiveViewPlugin::getConfigQmlUrl(const QString &driver)
+{
+ return QUrl();
+}
+
+Watch* LiveViewPlugin::getWatch(const QString& driver, ConfigKey* settings, QObject *parent)
+{
+ if (driver == "liveview") {
+ return new LiveView(settings, parent);
+ } else {
+ return 0;
+ }
+}
+
+Q_EXPORT_PLUGIN2(liveview, LiveViewPlugin)