-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
25 lines (19 loc) · 834 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"
#include "googledocsservice.h"
#include "accountsmodel.h"
Q_DECL_EXPORT int main(int argc, char *argv[])
{
QScopedPointer<QApplication> app(createApplication(argc, argv));
QmlApplicationViewer viewer;
AccountsModel accountsModel;
viewer.rootContext()->setContextProperty("accountsModel", &accountsModel);
GoogleDocsService gDocumentService;
gDocumentService.setAccountsModel(&accountsModel);
gDocumentService.setRootContext(viewer.rootContext());
viewer.rootContext()->setContextProperty("gDocumentService", &gDocumentService);
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
viewer.setMainQmlFile(QLatin1String("qml/harmattangoogledrive/main.qml"));
viewer.showExpanded();
return app->exec();
}