MeVisLabToolboxReference
MeVis/Foundation/Sources/MLBackgroundTasks/mlBackgroundTaskIdleProcessing_Qt.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00009 //----------------------------------------------------------------------------------
00010 
00011 
00012 #ifndef __mlBackgroundTaskIdleProcessing_Qt_H
00013 #define __mlBackgroundTaskIdleProcessing_Qt_H
00014 
00015 
00016 // Local includes
00017 #include "MLBackgroundTasksSystem.h"
00018 
00019 #include <QObject>
00020 
00021 namespace ml {
00022 
00023 class MLBACKGROUNDTASKS_EXPORT BackgroundTaskIdleProcessing_Qt : public QObject
00024 {
00025   Q_OBJECT
00026 
00027 public:
00028   BackgroundTaskIdleProcessing_Qt();
00029 
00031   static void install();
00032 
00034   void scheduleProcessPendingMessagesInGUIThread();
00035 
00036 private:
00038   static void scheduleCB(void* self) { static_cast<BackgroundTaskIdleProcessing_Qt*>(self)->scheduleProcessPendingMessagesInGUIThread(); }
00039 
00041   void timerEvent(QTimerEvent* event);
00042 
00044   void customEvent(QEvent* event);
00045 
00046   int  _timerId;
00047   int  _recursiveEntry;
00048   bool _needsTimer;
00049 };
00050 
00051 }
00052 
00053 #endif
00054 
00055