21 #include <QApplication> 27 #define EXITING_DUE_TO_WINDOW_CLOSE 106 33 class QSGLApplication :
public QApplication {
35 QSGLApplication(
int& argc,
char *argv[]);
36 bool notify(QObject* receiver, QEvent* e)
override;
47 class QtGui :
public QObject {
62 string getApplicationDisplayName()
const;
74 char** getArgv()
const;
86 static QtGui* instance();
91 void setArgs(
int argc,
char** argv);
99 void startBackgroundEventLoop(
GThunkInt mainFunc,
bool exitAfter =
true);
101 void startEventLoop(
bool exitAfter =
true);
108 void processEventFromQueue();
111 Q_DISABLE_COPY(QtGui)
119 QSGLApplication* getApplication();
125 static QSGLApplication* _app;
126 static QThread* _qtGuiThread;
127 static GThread* _studentThread;
128 static QtGui* _instance;
130 friend class GEventQueue;
131 friend class GThread;
132 friend class GWindow;
void exitGraphics()
Closes all graphics windows and exits from the application without waiting for any additional user in...
Definition: gwindow.cpp:1338
void studentThreadHasExited(string reason)
Definition: qtgui.cpp:166
std::function< int()> GThunkInt
An alias for a function wrapper around a function with no parameters and an int return (such as main(...
Definition: gtypes.h:36