-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
63 lines (56 loc) · 2.09 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QtQuick>
#include "enguia.h"
#include "mmobile.h"
#include "mflow.h"
#include "euser.h"
#include "eplace.h"
#include "dataenguiamobile.h"
#include "pandroid.h"
//shared below
#include "dataenguiashared.h"
#include "msdefines.h"
#include "mshared.h"
#include "msblocks.h"
#include "msfiles.h"
#include "msusers.h"
#include "msorder.h"
#include "msagenda.h"
#include "msvc.h"
#include "bmeta.h"
#include "mstimer.h"
#include "dstore.h"
#include "AppDelegate.h"
/*
*Enguia Mobile main function
*/
int main(int argc, char *argv[]){
QApplication app(argc, argv);
QApplication::setOrganizationName("Tezine Technologies");
QApplication::setOrganizationDomain("enguia.net");
QApplication::setApplicationName("Enguia Mobile");
QQmlApplicationEngine engine;
Enguia *enguia=new Enguia();
enguia->setup(320,600);
new MShared(engine);
BMeta::obj()->setup(QList<QMetaObject>()<<DATAENGUIAMOBILE::getMeta()<<DATAENGUIASHARED::getMeta());
qmlRegisterType<MMobile>("com.tezine.enguia", 1, 0, "MMobile");
engine.rootContext()->setContextProperty("enguia", enguia);//use this to create a global object
engine.rootContext()->setContextProperty("mMobile", MMobile::obj());
engine.rootContext()->setContextProperty("mFlow", MFlow::obj());
//shared below
qmlRegisterType<MSDefines>("com.tezine.enguia", 1, 0, "MSDefines");
qmlRegisterType<MSTimer>("com.tezine.enguia", 1, 0, "MSTimer");
engine.rootContext()->setContextProperty("mShared", MShared::obj());
engine.rootContext()->setContextProperty("mSBlocks", MSBlocks::obj());
engine.rootContext()->setContextProperty("mSFiles", MSFiles::obj());
engine.rootContext()->setContextProperty("mSUsers", MSUsers::obj());
engine.rootContext()->setContextProperty("mSOrder", MSOrder::obj());
engine.rootContext()->setContextProperty("mSAgenda", MSAgenda::obj());
engine.rootContext()->setContextProperty("mSVC", MSVC::obj());
engine.rootContext()->setContextProperty("dstore", DStore::obj());
MShared::obj()->setPreviewMode(false);
engine.load(QUrl(QStringLiteral("qrc:/VMMainWindow.qml")));
return app.exec();
}