digiKam
|
Public Types | |
enum | DeactivatingMode { FlushSignals , KeepSignals , PhaseOut } |
enum | State { Inactive , Scheduled , Running , Deactivating } |
Public Slots | |
void | deactivate (DeactivatingMode mode=FlushSignals) |
void | schedule () |
Signals | |
void | finished () |
void | started () |
void | writeMetadata (FileActionItemInfoList infos, int flag) |
void | writeMetadataToFiles (FileActionItemInfoList infos) |
void | writeOrientationToFiles (FileActionItemInfoList infos, int orientation) |
Public Member Functions | |
void | applyMetadata (const FileActionItemInfoList &infos, DisjointMetadata *hub) override |
void | assignColorLabel (const FileActionItemInfoList &infos, int colorId) override |
void | assignPickLabel (const FileActionItemInfoList &infos, int pickId) override |
void | assignRating (const FileActionItemInfoList &infos, int rating) override |
void | assignTags (const FileActionItemInfoList &infos, const QList< int > &tagIDs) override |
bool | connectAndSchedule (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type=Qt::AutoConnection) const |
void | copyAttributes (const FileActionItemInfoList &infos, const QStringList &derivedPaths) override |
void | editGroup (int groupAction, const ItemInfo &pick, const FileActionItemInfoList &infos) override |
FileActionMngrDatabaseWorker (FileActionMngr::Private *const dd) | |
QThread::Priority | priority () const |
void | removeTags (const FileActionItemInfoList &infos, const QList< int > &tagIDs) override |
void | setExifOrientation (const FileActionItemInfoList &infos, int orientation) override |
void | setPriority (QThread::Priority priority) |
State | state () const |
void | wait () |
Static Public Member Functions | |
static bool | connectAndSchedule (const QObject *sender, const char *signal, const WorkerObject *receiver, const char *method, Qt::ConnectionType type=Qt::AutoConnection) |
static bool | disconnectAndSchedule (const QObject *sender, const char *signal, const WorkerObject *receiver, const char *method) |
Protected Member Functions | |
virtual void | aboutToDeactivate () |
virtual void | aboutToQuitLoop () |
void | addRunnable (WorkerObjectRunnable *loop) |
bool | event (QEvent *e) override |
void | removeRunnable (WorkerObjectRunnable *loop) |
void | run () |
void | setEventLoop (QEventLoop *loop) |
void | shutDown () |
void | transitionToInactive () |
bool | transitionToRunning () |
|
inherited |
|
inherited |
|
inlineexplicit |
|
protectedvirtualinherited |
Called from deactivate(), typically from a different thread than the worker thread, possibly the UI thread. You can stop any extra controlled threads here. Immediately afterwards, an event will be sent to the working thread which will cause the event loop to quit. (aboutToQuitLoop())
Reimplemented in Digikam::TrainerWorker, and Digikam::RecognitionWorker.
Referenced by Digikam::WorkerObject::deactivate().
|
protectedvirtualinherited |
Called from within thread's event loop to quit processing. Quit any blocking operation. Immediately afterwards, the event loop will be quit.
Referenced by Digikam::WorkerObject::event().
|
protectedinherited |
|
overridevirtual |
Reimplemented from Digikam::DatabaseWorkerInterface.
References Digikam::CoreDbOperationGroup::allowLift(), Digikam::DisjointMetadata::changedFlags(), Digikam::FileActionItemInfoList::dbFinished(), Digikam::FileActionItemInfoList::dbProcessedOne(), Digikam::WorkerObject::Deactivating, Digikam::FileActionMngr::Private::fileProgressCreator(), Digikam::DisjointMetadata::FullWriteIfChanged, Digikam::ItemInfoTaskSplitter::hasNext(), Digikam::FileActionItemInfoList::schedulingForWrite(), Digikam::CoreDbOperationGroup::setMaximumTime(), Digikam::WorkerObject::state(), Digikam::DisjointMetadata::willWriteMetadata(), Digikam::DisjointMetadata::write(), and Digikam::DatabaseWorkerInterface::writeMetadata().
|
overridevirtual |
Reimplemented from Digikam::DatabaseWorkerInterface.
References Digikam::CoreDbOperationGroup::allowLift(), Digikam::FileActionItemInfoList::continueTask(), Digikam::FileActionItemInfoList::dbFinished(), Digikam::FileActionItemInfoList::dbProcessedOne(), Digikam::WorkerObject::Deactivating, Digikam::FileActionMngr::Private::fileProgressCreator(), Digikam::DisjointMetadata::FullWriteIfChanged, Digikam::ItemInfoTaskSplitter::hasNext(), Digikam::ItemInfo::id(), Digikam::DisjointMetadata::load(), Digikam::DisjointMetadata::PartialWrite, Digikam::FileActionItemInfoList::progress(), Digikam::FileActionItemInfoList::schedulingForWrite(), Digikam::DisjointMetadata::setColorLabel(), Digikam::CoreDbOperationGroup::setMaximumTime(), Digikam::FileActionMngr::Private::shallSendForWriting(), Digikam::WorkerObject::state(), Digikam::DisjointMetadata::willWriteMetadata(), Digikam::DisjointMetadata::write(), Digikam::MetadataHub::WRITE_COLORLABEL, and Digikam::DatabaseWorkerInterface::writeMetadata().
|
overridevirtual |
Reimplemented from Digikam::DatabaseWorkerInterface.
References Digikam::CoreDbOperationGroup::allowLift(), Digikam::FileActionItemInfoList::continueTask(), Digikam::FileActionItemInfoList::dbFinished(), Digikam::FileActionItemInfoList::dbProcessedOne(), Digikam::WorkerObject::Deactivating, Digikam::FileActionMngr::Private::fileProgressCreator(), Digikam::DisjointMetadata::FullWriteIfChanged, Digikam::ItemInfoTaskSplitter::hasNext(), Digikam::ItemInfo::id(), Digikam::DisjointMetadata::load(), Digikam::DisjointMetadata::PartialWrite, Digikam::FileActionItemInfoList::progress(), Digikam::FileActionItemInfoList::schedulingForWrite(), Digikam::CoreDbOperationGroup::setMaximumTime(), Digikam::DisjointMetadata::setPickLabel(), Digikam::FileActionMngr::Private::shallSendForWriting(), Digikam::WorkerObject::state(), Digikam::DisjointMetadata::willWriteMetadata(), Digikam::DisjointMetadata::write(), Digikam::MetadataHub::WRITE_PICKLABEL, and Digikam::DatabaseWorkerInterface::writeMetadata().
|
overridevirtual |
Reimplemented from Digikam::DatabaseWorkerInterface.
References Digikam::CoreDbOperationGroup::allowLift(), Digikam::FileActionItemInfoList::continueTask(), Digikam::FileActionItemInfoList::dbFinished(), Digikam::FileActionItemInfoList::dbProcessedOne(), Digikam::WorkerObject::Deactivating, Digikam::FileActionMngr::Private::fileProgressCreator(), Digikam::DisjointMetadata::FullWriteIfChanged, Digikam::ItemInfoTaskSplitter::hasNext(), Digikam::ItemInfo::id(), Digikam::DisjointMetadata::load(), Digikam::DisjointMetadata::PartialWrite, Digikam::FileActionItemInfoList::progress(), Digikam::FileActionItemInfoList::schedulingForWrite(), Digikam::CoreDbOperationGroup::setMaximumTime(), Digikam::DisjointMetadata::setRating(), Digikam::FileActionMngr::Private::shallSendForWriting(), Digikam::WorkerObject::state(), Digikam::DisjointMetadata::willWriteMetadata(), Digikam::DisjointMetadata::write(), Digikam::MetadataHub::WRITE_RATING, and Digikam::DatabaseWorkerInterface::writeMetadata().
|
overridevirtual |
Reimplemented from Digikam::DatabaseWorkerInterface.
|
inherited |
You must normally call schedule() to ensure that the object is active when you send a signal with work data. Instead, you can use these connect() methods when connecting your signal to this object, the signal that carries work data. Then the object will be scheduled each time you emit the signal.
References Digikam::WorkerObject::schedule().
Referenced by Digikam::FileActionMngr::Private::connectToDatabaseWorker().
|
staticinherited |
References Digikam::WorkerObject::schedule().
|
overridevirtual |
Reimplemented from Digikam::DatabaseWorkerInterface.
References Digikam::CollectionScanner::copyFileProperties(), Digikam::FileActionItemInfoList::dbFinished(), Digikam::FileActionItemInfoList::dbProcessedOne(), Digikam::WorkerObject::Deactivating, Digikam::ScanController::instance(), Digikam::ScanController::scannedInfo(), and Digikam::WorkerObject::state().
|
slotinherited |
Quits execution of this worker object. If mode is FlushSignals, all already emitted signals will be cleared. If mode is KeepSignals, already emitted signals are not cleared and will be kept in the event queue until destruction or schedule() is called. If mode is PhaseOut, already emitted signals will be processed and the thread quit immediately afterwards.
References Digikam::WorkerObject::aboutToDeactivate(), Digikam::WorkerObject::Deactivating, Digikam::WorkerObject::FlushSignals, Digikam::WorkerObject::Inactive, Digikam::WorkerObject::KeepSignals, Digikam::WorkerObject::Running, and Digikam::WorkerObject::Scheduled.
Referenced by Digikam::FileActionMngr::shutDown(), Digikam::WorkerObject::shutDown(), and Digikam::FacePipeline::Private::stop().
|
staticinherited |
References Digikam::WorkerObject::schedule().
|
overridevirtual |
Reimplemented from Digikam::DatabaseWorkerInterface.
References Digikam::ItemInfo::addToGroup(), Digikam::AddToGroup, Digikam::CoreDbOperationGroup::allowLift(), Digikam::ItemInfo::clearGroup(), Digikam::FileActionItemInfoList::dbFinished(), Digikam::FileActionItemInfoList::dbProcessedOne(), Digikam::WorkerObject::Deactivating, Digikam::ItemInfo::removeFromGroup(), Digikam::RemoveFromGroup, Digikam::CoreDbOperationGroup::setMaximumTime(), Digikam::WorkerObject::state(), and Digikam::Ungroup.
|
overrideprotectedinherited |
References Digikam::WorkerObject::aboutToQuitLoop().
|
signalinherited |
|
inherited |
Referenced by Digikam::WorkerObject::setPriority().
|
protectedinherited |
|
overridevirtual |
Reimplemented from Digikam::DatabaseWorkerInterface.
|
protectedinherited |
|
slotinherited |
Starts execution of this worker object: The object is moved to a thread and an event loop started, so that queued signals will be received.
References Digikam::WorkerObject::Deactivating, Digikam::WorkerObject::Inactive, Digikam::ThreadManager::instance(), Digikam::WorkerObject::Running, Digikam::ThreadManager::schedule(), and Digikam::WorkerObject::Scheduled.
Referenced by Digikam::WorkerObject::connectAndSchedule(), Digikam::WorkerObject::disconnectAndSchedule(), Digikam::ParallelWorkers::replacementStaticQtMetacall(), and Digikam::FacePipeline::Private::start().
|
protectedinherited |
|
overridevirtual |
Reimplemented from Digikam::DatabaseWorkerInterface.
References Digikam::FileActionItemInfoList::dbFinished(), Digikam::FileActionItemInfoList::dbProcessed(), Digikam::WorkerObject::Deactivating, Digikam::FileActionMngr::Private::fileProgressCreator(), Digikam::ItemInfoTaskSplitter::hasNext(), Digikam::ItemInfo::orientation(), Digikam::FaceUtils::rotateFaces(), Digikam::FileActionItemInfoList::schedulingForWrite(), Digikam::CoreDbOperationGroup::setMaximumTime(), Digikam::ItemInfo::setOrientation(), Digikam::WorkerObject::state(), and Digikam::DatabaseWorkerInterface::writeOrientationToFiles().
|
inherited |
Sets the priority for this dynamic thread. Can be set anytime. If the thread is currently not running, the priority will be set when it is run next time. When you set QThread::InheritPriority (default), the priority is not changed but inherited from the thread pool.
References Digikam::WorkerObject::priority(), and Digikam::WorkerObject::Running.
Referenced by Digikam::FacePipeline::Private::applyPriority().
|
protectedinherited |
If you are deleting data in your destructor which is accessed from the thread, do one of the following from your destructor to guarantee a safe shutdown: 1) Call this method 2) Call stop() and wait(), knowing that nothing will call start() anymore after this 3) Be sure the thread will never be running at destruction. Note: This irrevocably stops this object. Note: It is not sufficient that your parent class does this. Calling this method, or providing one of the above mentioned equivalent guarantees, must be done by every single last class in the hierarchy with an implemented destructor deleting data. (the base class destructor is always called after the derived class)
References Digikam::WorkerObject::deactivate(), Digikam::WorkerObject::PhaseOut, and Digikam::WorkerObject::wait().
Referenced by Digikam::WorkerObject::~WorkerObject().
|
signalinherited |
|
inherited |
Referenced by applyMetadata(), assignColorLabel(), assignPickLabel(), assignRating(), copyAttributes(), editGroup(), setExifOrientation(), Digikam::FileActionMngrFileWorker::transform(), Digikam::FileActionMngrFileWorker::writeMetadata(), Digikam::FileActionMngrFileWorker::writeMetadataToFiles(), and Digikam::FileActionMngrFileWorker::writeOrientationToFiles().
|
protectedinherited |
|
protectedinherited |
|
inherited |
References Digikam::WorkerObject::Inactive.
Referenced by Digikam::FileActionMngr::shutDown(), Digikam::WorkerObject::shutDown(), Digikam::FacePipeline::Private::wait(), Digikam::DetectionWorker::~DetectionWorker(), Digikam::RecognitionWorker::~RecognitionWorker(), and Digikam::TrainerWorker::~TrainerWorker().
|
signalinherited |
Referenced by applyMetadata(), assignColorLabel(), assignPickLabel(), and assignRating().
|
signalinherited |
|
signalinherited |
Referenced by setExifOrientation().