summaryrefslogtreecommitdiff
path: root/sowatchui/main.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-08-09 01:53:38 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-08-09 01:53:38 +0200
commit3aa62b0543d978c1a01c5cf05a898fd8d805c44b (patch)
tree84ebdd8d94728375cd21457d8f5773f46ee0dcc7 /sowatchui/main.cpp
parent081aa7b760986092377be7f62cac3bdee7400874 (diff)
downloadsowatch-3aa62b0543d978c1a01c5cf05a898fd8d805c44b.tar.gz
sowatch-3aa62b0543d978c1a01c5cf05a898fd8d805c44b.zip
new watch scanning ui
Diffstat (limited to 'sowatchui/main.cpp')
-rw-r--r--sowatchui/main.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/sowatchui/main.cpp b/sowatchui/main.cpp
index 54a65fa..f306fa9 100644
--- a/sowatchui/main.cpp
+++ b/sowatchui/main.cpp
@@ -1,11 +1,27 @@
#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"
+#include <sowatch.h>
+
+#include "watchesmodel.h"
+#include "scanwatchesmodel.h"
+
+static sowatch::Registry *registry;
+static WatchesModel *watches;
+static ScanWatchesModel *watchScanner;
+
Q_DECL_EXPORT int main(int argc, char *argv[])
{
QScopedPointer<QApplication> app(createApplication(argc, argv));
QScopedPointer<QmlApplicationViewer> viewer(QmlApplicationViewer::create());
+ registry = sowatch::Registry::registry();
+ watches = new WatchesModel(app.data());
+ watchScanner = new ScanWatchesModel(app.data());
+
+ viewer->rootContext()->setContextProperty("watches", watches);
+ viewer->rootContext()->setContextProperty("watchScanner", watchScanner);
+
viewer->setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
viewer->setMainQmlFile(QLatin1String("qml/main.qml"));
viewer->showExpanded();