MeVisLab Toolbox Reference
mlBackgroundTaskIdleProcessing_Qt.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2009, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef ML_BACKGROUND_TASK_IDLE_PROCESSING_QT_H
14 #define ML_BACKGROUND_TASK_IDLE_PROCESSING_QT_H
15 
16 // Local includes
18 
19 #include <ThirdPartyWarningsDisable.h>
20 #include <QObject>
21 #include <ThirdPartyWarningsRestore.h>
22 
23 namespace ml {
24 
26 {
27  Q_OBJECT
28 
29 public:
31 
33  static void install();
34 
37 
38 private:
40  static void scheduleCB(void* self) { static_cast<BackgroundTaskIdleProcessing_Qt*>(self)->scheduleProcessPendingMessagesInGUIThread(); }
41 
43  void timerEvent(QTimerEvent* event) override;
44 
46  void customEvent(QEvent* event) override;
47 
48  int _timerId;
49  int _recursiveEntry;
50  bool _needsTimer;
51 };
52 
53 }
54 
55 #endif
56 
57 
#define MLBACKGROUNDTASKS_EXPORT
Project global and OS specific declarations.
void scheduleProcessPendingMessagesInGUIThread()
schedules the idle processing in the GUI thread.
static void install()
create an BackgroundTaskIdleProcessing_Qt object and install on the background task manager
Main documentation file for ML users and developers.
Definition: SoSFMLImage.h:51