From 29aaea2d80a9eb1715b6cddfac2d2aacf76358bd Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Thu, 11 Feb 2016 23:55:16 +0100 Subject: launchpad ~mzanetti/rockwork/trunk r87 --- rockwork/main.cpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 rockwork/main.cpp (limited to 'rockwork/main.cpp') diff --git a/rockwork/main.cpp b/rockwork/main.cpp new file mode 100644 index 0000000..70fd0d7 --- /dev/null +++ b/rockwork/main.cpp @@ -0,0 +1,37 @@ +#include +#include +#include +#include +#include + +#include "notificationsourcemodel.h" +#include "servicecontrol.h" +#include "pebbles.h" +#include "pebble.h" +#include "applicationsmodel.h" +#include "applicationsfiltermodel.h" +#include "appstoreclient.h" +#include "screenshotmodel.h" + +int main(int argc, char *argv[]) +{ + QGuiApplication app(argc, argv); + + qmlRegisterUncreatableType("RockWork", 1, 0, "Pebble", "Get them from the model"); + qmlRegisterUncreatableType("RockWork", 1, 0, "ApplicationsModel", "Get them from a Pebble object"); + qmlRegisterUncreatableType("RockWork", 1, 0, "AppItem", "Get them from an ApplicationsModel"); + qmlRegisterType("RockWork", 1, 0, "ApplicationsFilterModel"); + qmlRegisterType("RockWork", 1, 0, "Pebbles"); + qmlRegisterUncreatableType("RockWork", 1, 0, "NotificationSourceModel", "Get it from a Pebble object"); + qmlRegisterType("RockWork", 1, 0, "ServiceController"); + qmlRegisterType("RockWork", 1, 0, "AppStoreClient"); + qmlRegisterType("RockWork", 1, 0, "ScreenshotModel"); + + QQuickView view; + view.engine()->rootContext()->setContextProperty("version", QStringLiteral(VERSION)); + view.engine()->rootContext()->setContextProperty("homePath", QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first()); + view.setSource(QUrl(QStringLiteral("qrc:///Main.qml"))); + view.setResizeMode(QQuickView::SizeRootObjectToView); + view.show(); + return app.exec(); +} -- cgit v1.2.3