![]() |
digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
|
Public Member Functions | |
ParallelWorkers ()=default | |
ParallelWorkers is a helper class to distribute work over several identical workers objects. | |
virtual bool | connect (const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type=Qt::AutoConnection) const |
Connects signals outbound from all workers to a given receiver. | |
virtual void | deactivate (WorkerObject::DeactivatingMode mode=WorkerObject::FlushSignals) |
bool | optimalWorkerCountReached () const |
virtual void | schedule () |
The corresponding methods of all added worker objects will be called. | |
void | setPriority (QThread::Priority priority) |
virtual void | wait () |
Static Public Member Functions | |
static int | optimalWorkerCount () |
Regarding the number of logical CPUs on the current machine, returns the optimal count of concurrent workers. | |
Protected Types | |
typedef void(* | StaticMetacallFunction) (QObject *, QMetaObject::Call, int, void **) |
Protected Member Functions | |
void | add (WorkerObject *const worker) |
virtual QObject * | asQObject ()=0 |
virtual const QMetaObject * | mocMetaObject () const =0 |
The moc-generated metaObject of the target object. | |
const QMetaObject * | replacementMetaObject () const |
int | replacementQtMetacall (QMetaObject::Call _c, int _id, void **_a) |
Replaces slot call distribution of the target QObject. | |
int | replacementStaticQtMetacall (QMetaObject::Call _c, int _id, void **_a) |
virtual StaticMetacallFunction | staticMetacallPointer ()=0 |
virtual int | WorkerObjectQtMetacall (QMetaObject::Call _c, int _id, void **_a)=0 |
The qt_metacall of WorkerObject, one level above the target QObject. | |
Protected Attributes | |
int | m_currentIndex = 0 |
StaticMetacallFunction | m_originalStaticMetacall = nullptr |
QMetaObject * | m_replacementMetaObject = nullptr |
QList< WorkerObject * > | m_workers |
|
default |
|
protectedpure virtual |
Implemented in Digikam::ParallelAdapter< A >.
|
virtual |
Reimplemented in Digikam::ParallelAdapter< A >.
|
protectedpure virtual |
Implemented in Digikam::ParallelAdapter< A >.
bool Digikam::ParallelWorkers::optimalWorkerCountReached | ( | ) | const |
|
virtual |
Reimplemented in Digikam::ParallelAdapter< A >.
|
protectedpure virtual |
Implemented in Digikam::ParallelAdapter< A >.