23 #include "application.h"
25 #include "gui/mainwindow.h"
40 : QApplication(argc, argv)
47 Application::~Application()
53 if (staticInstance != NULL)
55 staticInstance->destroy();
59 void Application::destroy()
64 bool Application::isInit()
66 return staticInstance != NULL;
69 void Application::init(
int &argc,
char **argv)
71 assert(staticInstance == NULL &&
"Cannot initialize Application twice!");
77 assert(staticInstance != NULL);
78 return staticInstance;
96 void Application::setMainWindow(
MainWindow *mainWindow)
void stopRunning()
Makes isRunning() return false.
QWidget * mainWindowAsQWidget() const
Returns MainWindow as a QWidget.
MainWindow * mainWindow() const
MainWindow of the program.
Program central hub of information.
static void deinit()
Deinitializes the program; executed when program is shutting down.
bool isRunning() const
Plugins and other threads can use this to figure out if program is closing.