28 lines
826 B
C++
28 lines
826 B
C++
#include <QGuiApplication>
|
|
#include <QQuickView>
|
|
#include <QQmlContext>
|
|
#include <sailfishapp.h>
|
|
|
|
#include "apiclient.h"
|
|
#include "downloader.h"
|
|
#include "settings.h"
|
|
|
|
Q_DECL_EXPORT int main(int argc, char *argv[])
|
|
{
|
|
QGuiApplication *app = SailfishApp::application(argc, argv);
|
|
QQuickView *view = SailfishApp::createView();
|
|
|
|
Settings settings;
|
|
ApiClient apiClient(&settings);
|
|
Downloader downloader(&settings);
|
|
|
|
view->rootContext()->setContextProperty(QStringLiteral("appSettings"), &settings);
|
|
view->rootContext()->setContextProperty(QStringLiteral("apiClient"), &apiClient);
|
|
view->rootContext()->setContextProperty(QStringLiteral("downloader"), &downloader);
|
|
|
|
view->setSource(SailfishApp::pathTo(QStringLiteral("qml/harbour-calibreweb.qml")));
|
|
view->show();
|
|
|
|
return app->exec();
|
|
}
|