AsyncProgressDialog
Public Types | Public Member Functions | Protected Member Functions | List of all members
APD::FunctionThread< void > Class Template Reference

A thread class, which executes the function provided in the constructor of this class as soon as the thread is started. More...

#include <FunctionThread.h>

Inheritance diagram for APD::FunctionThread< void >:
APD::TaskThread

Public Types

using Function = std::function< void(TaskThread *)>
 Definition of a function to be passed to constructor of this class.
 

Public Member Functions

 FunctionThread (Function func, QObject *parent=nullptr)
 
- Public Member Functions inherited from APD::TaskThread
 TaskThread (QObject *parent=nullptr)
 
void setRange (int minimum, int maximum)
 
void setValue (int value, const QVariant &userValue=QVariant())
 
void setText (const QString &text)
 
bool isCanceled () const
 

Protected Member Functions

void run () override
 

Additional Inherited Members

- Public Slots inherited from APD::TaskThread
void cancel ()
 
- Signals inherited from APD::TaskThread
void valueChanged (int value, const QVariant &userValue, const TimeStamp &timeStamp)
 
void rangeChanged (int minimum, int maximum)
 
void textChanged (const QString &text)
 

Detailed Description

template<>
class APD::FunctionThread< void >

A thread class, which executes the function provided in the constructor of this class as soon as the thread is started.

Constructor & Destructor Documentation

◆ FunctionThread()

APD::FunctionThread< void >::FunctionThread ( Function  func,
QObject *  parent = nullptr 
)
inline

Construct a new function thread. Function func is expected to accept one parameter - a pointer to TaskThread object. It can be used to setup progress range as well as current range value.

Member Function Documentation

◆ run()

void APD::FunctionThread< void >::run ( )
inlineoverrideprotected

Reimplementation of QThread::run()


The documentation for this class was generated from the following file: