70 virtual bool init() {
return true; }
71 virtual bool exit() {
return true; }
103 #endif // THREADBASE_H void setTimerInterval(const int msec, const int firstMsec=0)
Set timer interval for the periodically called worker.
bool isActive() const
Return true if thread is running and not suspended.
QString getThreadName() const
Get thread name.
Universal base class for threaded modules.
virtual void periodicallyCalledWorker()
Virtual worker function called periodically from the timer.
virtual void suspend()
Mark the thread as suspended.
int getVerbosity()
Get the actual verbosity level.
void setPriority(const QThread::Priority p)
Set thread priority.
virtual void finallyCalledWorker()
Virtual worker function called when the thread stops.
virtual void initiallyCalledWorker()
Virtual worker function called when the thread is starting.
int getVerbosity()
Get verbosity level.
ThreadWorker mThreadWorker
Instance of the worker.
void setVerbosity(int verbosity)
Set verbosity level of messages.
virtual void resume()
Resume from the suspend mode.
virtual bool init()
Virtual initialization function (no functionality here)
virtual void timeout()
Private timeout slot called by the worker.
~ThreadBase()
Destructor, stops the thread if it is still running.
virtual bool exit()
Virtual exit function (no functionality here)
virtual bool start()
Start the thread.
Helper class for ThreadBase.
bool isInterruptionRequested() const
Return true if the thread was requested to interrupt or terminate.
Base class for managing log messages.
void setThreadName(const QString name)
Set thread name (Linux only)
virtual bool stop()
Stop the thread.
bool mSuspended
Flag indicating suspended state.