Advanced Multi-Physics (AMP)
On-Line Documentation
ThreadedSlotsClass.h
Go to the documentation of this file.
1#ifndef ThreadedSlotsClass_H
2#define ThreadedSlotsClass_H
3
4#include <functional>
5#include <mutex>
6#include <thread>
7
8#include <QAction>
9#include <QMainWindow>
10
11
13class ThreadedSlotsClass : public QMainWindow
14{
15 Q_OBJECT
16
17protected:
23 void callFun( std::function<void( void )> &&fun );
25 void update();
26
27private:
28 std::function<void( void )> d_fun;
29 QAction *d_callAction;
30 volatile bool d_running;
31 std::mutex d_mutex;
32 std::thread::id d_id;
33
34private slots:
36};
37
38#endif
This is a helper class that allows a thread to call a function from the main thread.
virtual ~ThreadedSlotsClass()
Destructor.
ThreadedSlotsClass()
Empty constructor.
std::function< void(void)> d_fun
void update()
Process queue events.
void callFun(std::function< void(void)> &&fun)
Call a function.



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:40.
Comments on this page