39 #include <QApplication> 40 #include <QtOpenGL/QGLWidget> 104 void lastWindowClosed();
111 typedef void (*callback)(void);
132 ICLApplication(
int argc,
char **argv,
const std::string &paInitString=
"",
133 callback init=0, callback run=0,
134 callback run2=0, callback run3=0,
135 callback run4=0, callback run5=0);
143 void addThread(callback cb);
147 void addInit(callback cb);
151 void addFinalization(callback cb);
155 void addPrepareShutDown(callback cb);
168 virtual void execute() = 0;
178 void executeInGUIThread(AsynchronousEvent *event,
bool blocking =
false,
bool forcePostEvent =
false);
192 executeInGUIThread(
new TmpAsynchronousEvent(
data,f),blocking, forcePostEvent);
197 template<
class T,
class U>
208 executeInGUIThread(
new TmpAsynchronousEvent(t,u,f),blocking, forcePostEvent);
213 virtual bool event(QEvent *eIn);
219 static bool isGUIThreadActive();
The General Function Template.
Definition: Function.h:284
static std::vector< ExecThread * > s_threads
list of threads
Definition: Application.h:226
QApplication * app
Definition: Application.h:107
undocument this line if you encounter any issues!
Definition: Any.h:37
static std::vector< callback > s_inits
list of initialization functions
Definition: Application.h:229
QApplication extension for ICL based applications.
Definition: Application.h:100
void executeInGUIThread(utils::Function< void, T > f, T data, bool blocking=false, bool forcePostEvent=false)
utility class for executing functions with given arguments in the GUI thread
Definition: Application.h:183
static std::vector< callback > s_callbacks
list of callback functions
Definition: Application.h:233
static std::vector< callback > s_prepare_shutdowns
list of finalization functions
Definition: Application.h:239
ICLQt_API ImgROI data(ImgQ &r)
creates full ROI ROI-struct
interface for events that must be executed in the GUI Thread
Definition: Application.h:166
SecondSingeltonException(const std::string &reason)
Basic constructor.
Definition: Application.h:116
#define ICLQt_API
Definition: CompatMacros.h:178
virtual ~AsynchronousEvent()
virtual destructor
Definition: Application.h:171
Base class for Exception handling in the ICL.
Definition: Exception.h:42
void executeInGUIThread(utils::Function< void, T, U > f, T t, U u, bool blocking=false, bool forcePostEvent=false)
utility class for executing functions with given arguments in the GUI thread
Definition: Application.h:198
ICLApplication ICLApp
this is just a shortcut typedef
Definition: Application.h:243
QGLWidget * sharedWidget
Definition: Application.h:108
static ICLApplication * s_app
singelton instance
Definition: Application.h:223
Such an exception is returned if a 2nd instance of ICLApplication is created.
Definition: Application.h:114
static std::vector< callback > s_finalizes
list of finalization functions
Definition: Application.h:236