25 lines
470 B
C
25 lines
470 B
C
|
|
#ifndef ASYNCWINDOW_H
|
|||
|
|
#define ASYNCWINDOW_H
|
|||
|
|
|
|||
|
|
#include <QMainWindow>
|
|||
|
|
#include "tsqueue.h"
|
|||
|
|
|
|||
|
|
class ASyncWindow : public QMainWindow {
|
|||
|
|
Q_OBJECT
|
|||
|
|
public:
|
|||
|
|
ASyncWindow(QWidget *parent);
|
|||
|
|
/* Meant to be called from other threads to pass a code block
|
|||
|
|
* that has to be executed in the context of the thread of the window.
|
|||
|
|
*/
|
|||
|
|
void QueueTask(TSQueue::t_Callable c);
|
|||
|
|
private:
|
|||
|
|
TSQueue m_taskQueue;
|
|||
|
|
private slots:
|
|||
|
|
|
|||
|
|
void processCallableQueue();
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
#endif // ASYNCWINDOW_H
|