diff options
Diffstat (limited to 'sowatchui/main.cpp')
-rw-r--r-- | sowatchui/main.cpp | 16 |
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(); |