digiKam
|
Public Member Functions | |
void | add (A *const worker) |
QObject * | asQObject () override |
bool | connect (const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type=Qt::AutoConnection) const |
void | deactivate (WorkerObject::DeactivatingMode mode=WorkerObject::FlushSignals) |
const QMetaObject * | metaObject () const override |
const QMetaObject * | mocMetaObject () const override |
bool | optimalWorkerCountReached () const |
ParallelAdapter () | |
int | qt_metacall (QMetaObject::Call _c, int _id, void **_a) override |
void | schedule () |
void | setPriority (QThread::Priority priority) |
StaticMetacallFunction | staticMetacallPointer () override |
void | wait () |
int | WorkerObjectQtMetacall (QMetaObject::Call _c, int _id, void **_a) override |
~ParallelAdapter () override | |
Static Public Member Functions | |
static int | optimalWorkerCount () |
static void | qt_static_metacall (QObject *o, QMetaObject::Call _c, int _id, void **_a) |
Protected Types | |
typedef void(* | StaticMetacallFunction) (QObject *, QMetaObject::Call, int, void **) |
Protected Member Functions | |
void | add (WorkerObject *const worker) |
const QMetaObject * | replacementMetaObject () const |
int | replacementQtMetacall (QMetaObject::Call _c, int _id, void **_a) |
int | replacementStaticQtMetacall (QMetaObject::Call _c, int _id, void **_a) |
Protected Attributes | |
int | m_currentIndex |
StaticMetacallFunction | m_originalStaticMetacall |
QMetaObject * | m_replacementMetaObject |
QList< WorkerObject * > | m_workers |
|
protectedinherited |
|
inlineexplicit |
Instead of using a single WorkerObject, create a ParallelAdapter for your worker object subclass, and add() individual WorkerObjects. The load will be evenly distributed. Note: unlike with WorkerObject directly, there is no need to call schedule(). For inbound connections (signals connected to a WorkerObject's slot, to be processed, use a Qt::DirectConnection on the adapter. For outbound connections (signals emitted from the WorkerObject), use ParallelAdapter's connect to have a connection from all added WorkerObjects.
|
inlineoverride |
|
inline |
References Digikam::ParallelWorkers::add().
|
protectedinherited |
References Digikam::ParallelWorkers::m_workers.
Referenced by Digikam::ParallelAdapter< A >::add().
|
inlineoverridevirtual |
Return the target QObject (double inheritance)
Implements Digikam::ParallelWorkers.
|
inline |
References Digikam::ParallelWorkers::connect().
|
inline |
References Digikam::ParallelWorkers::deactivate().
|
inlineoverride |
|
inlineoverridevirtual |
The moc-generated metaObject of the target object
Implements Digikam::ParallelWorkers.
|
staticinherited |
Regarding the number of logical CPUs on the current machine, returns the optimal count of concurrent workers
Referenced by Digikam::ItemInfoTaskSplitter::ItemInfoTaskSplitter(), and Digikam::ParallelWorkers::optimalWorkerCountReached().
|
inherited |
Returns true if the current number of added workers has reached the optimalWorkerCount()
References Digikam::ParallelWorkers::m_workers, and Digikam::ParallelWorkers::optimalWorkerCount().
|
inlineoverride |
|
inlinestatic |
References Digikam::ParallelWorkers::replacementStaticQtMetacall().
Referenced by Digikam::ParallelAdapter< A >::staticMetacallPointer().
|
protectedinherited |
|
protectedinherited |
Replaces slot call distribution of the target QObject
References Digikam::ParallelWorkers::replacementStaticQtMetacall(), and Digikam::ParallelWorkers::WorkerObjectQtMetacall().
Referenced by Digikam::ParallelAdapter< A >::qt_metacall().
|
protectedinherited |
References Digikam::ParallelWorkers::asQObject(), Digikam::ParallelWorkers::m_currentIndex, Digikam::ParallelWorkers::m_originalStaticMetacall, Digikam::ParallelWorkers::m_workers, Digikam::ParallelWorkers::mocMetaObject(), and Digikam::WorkerObject::schedule().
Referenced by Digikam::ParallelAdapter< A >::qt_static_metacall(), and Digikam::ParallelWorkers::replacementQtMetacall().
|
inline |
References Digikam::ParallelWorkers::schedule().
|
inherited |
References Digikam::ParallelWorkers::m_workers.
|
inlineoverridevirtual |
Implements Digikam::ParallelWorkers.
References Digikam::ParallelAdapter< A >::qt_static_metacall().
|
inline |
References Digikam::ParallelWorkers::wait().
|
inlineoverridevirtual |
The qt_metacall of WorkerObject, one level above the target QObject
Implements Digikam::ParallelWorkers.
|
protectedinherited |
Referenced by Digikam::ParallelWorkers::replacementStaticQtMetacall().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Referenced by Digikam::ParallelWorkers::add(), Digikam::ParallelWorkers::connect(), Digikam::ParallelWorkers::deactivate(), Digikam::ParallelWorkers::optimalWorkerCountReached(), Digikam::ParallelWorkers::replacementStaticQtMetacall(), Digikam::ParallelWorkers::schedule(), Digikam::ParallelWorkers::setPriority(), Digikam::ParallelWorkers::wait(), and Digikam::ParallelWorkers::~ParallelWorkers().