-
Notifications
You must be signed in to change notification settings - Fork 6
/
QuadApplication.cpp
48 lines (35 loc) · 909 Bytes
/
QuadApplication.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
#include "QuadApplication.h"
#include "Toolbox.h"
#include <QDebug>
QuadApplication* QuadApplication::_app = NULL;
QuadApplication::QuadApplication(int &argc, char* argv[])
:QApplication(argc,argv)
, _toolbox(NULL)
, _mainwindow(NULL)
{
Q_ASSERT(_app == NULL);
_app = this;
setApplicationName("SIASUN");
this->setApplicationVersion("v1.2.3");
_toolbox = new Toolbox(this);
}
QuadApplication::~QuadApplication()
{
}
bool QuadApplication::_initForNormalAppBoot(void)
{
connect(this,&QuadApplication::lastWindowClosed,this,&QuadApplication::quit);
MainWindow* mainWindow = MainWindow::_create();
Q_CHECK_PTR(mainWindow);
_mainwindow = mainWindow->instance();
return true;
}
void QuadApplication::showMessage(QString message)
{
//qDebug()<<message;
}
QuadApplication* qgcApp()
{
Q_ASSERT(QuadApplication::_app);
return QuadApplication::_app;
}