digiKam
|
Public Types | |
enum | State { Inactive , Scheduled , Running , Deactivating } |
Public Slots | |
void | start () |
void | stop () |
void | wait () |
Signals | |
void | finished () |
void | infosToDispatch () |
void | starting () |
Public Member Functions | |
FacePipelineExtendedPackage::Ptr | filter (const ItemInfo &info) |
bool | isFinished () const |
bool | isRunning () const |
QThread::Priority | priority () const |
void | process (const ItemInfo &info) |
void | process (const QList< ItemInfo > &infos) |
ScanStateFilter (FacePipeline::FilterMode mode, FacePipeline::Private *const d) | |
void | setEmitSignals (bool emitThem) |
void | setPriority (QThread::Priority priority) |
State | state () const |
~ScanStateFilter () override | |
Public Attributes | |
FacePipeline::Private *const | d |
FacePipeline::FilterMode | mode |
FacePipelineFaceTagsIface::Roles | tasks |
Protected Slots | |
void | dispatch () |
Protected Member Functions | |
void | run () override |
bool | runningFlag () const volatile |
void | shutDown () |
void | start (QMutexLocker &locker) |
void | stop (QMutexLocker &locker) |
QMutex * | threadMutex () const |
void | wait (QMutexLocker &locker) |
Protected Attributes | |
QList< ItemInfo > | toBeSkipped |
QList< ItemInfo > | toFilter |
QList< FacePipelineExtendedPackage::Ptr > | toSend |
|
inherited |
Digikam::ScanStateFilter::ScanStateFilter | ( | FacePipeline::FilterMode | mode, |
FacePipeline::Private *const | d | ||
) |
References dispatch(), and infosToDispatch().
|
override |
|
protectedslot |
References d, Digikam::FacePipeline::Private::sendFromFilter(), Digikam::FacePipeline::Private::skipFromFilter(), Digikam::DynamicThread::threadMutex(), toBeSkipped, and toSend.
Referenced by ScanStateFilter().
FacePipelineExtendedPackage::Ptr Digikam::ScanStateFilter::filter | ( | const ItemInfo & | info | ) |
References Digikam::FacePipeline::Private::buildPackage(), Digikam::FaceTagsEditor::confirmedFaceTagsIfaces(), d, Digikam::FaceTagsEditor::databaseFacesForTraining(), Digikam::FaceUtils::hasBeenScanned(), Digikam::ItemInfo::id(), mode, Digikam::FacePipeline::ReadConfirmedFaces, Digikam::FacePipeline::ReadFacesForTraining, Digikam::FacePipelineFaceTagsIface::ReadFromDatabase, Digikam::FacePipeline::ReadUnconfirmedFaces, Digikam::FacePipeline::ScanAll, Digikam::FacePipeline::SkipAlreadyScanned, tasks, and Digikam::FaceTagsEditor::unconfirmedFaceTagsIfaces().
|
signalinherited |
|
signal |
Referenced by run(), and ScanStateFilter().
|
inherited |
References Digikam::DynamicThread::Inactive.
|
inherited |
|
inherited |
Referenced by Digikam::DynamicThread::setPriority().
void Digikam::ScanStateFilter::process | ( | const ItemInfo & | info | ) |
References Digikam::DynamicThread::start(), Digikam::DynamicThread::threadMutex(), and toFilter.
References Digikam::DynamicThread::start(), Digikam::DynamicThread::threadMutex(), and toFilter.
|
overrideprotectedvirtual |
Implement this pure virtual function in your subclass.
Implements Digikam::DynamicThread.
References infosToDispatch(), Digikam::DynamicThread::runningFlag(), Digikam::DynamicThread::stop(), Digikam::DynamicThread::threadMutex(), toBeSkipped, toFilter, and toSend.
|
protectedinherited |
In you run() method, you shall regularly check for runningFlag() and cleanup and return if false.
Referenced by Digikam::ImageHistogram::calculate(), Digikam::RawProcessingFilter::continueQuery(), Digikam::LoadSaveThread::run(), run(), and Digikam::NREstimate::startAnalyse().
|
inherited |
|
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::DynamicThread::priority().
Referenced by Digikam::FacePipeline::Private::applyPriority(), and Digikam::FacePipeline::Private::createThumbnailLoadThread().
|
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::DynamicThread::stop(), and Digikam::DynamicThread::wait().
Referenced by Digikam::ManagedLoadSaveThread::shutDown(), Digikam::DynamicThread::~DynamicThread(), and Digikam::LoadSaveThread::~LoadSaveThread().
|
slotinherited |
Referenced by Digikam::ImageHistogram::calculateInThread(), Digikam::FacePreviewLoader::checkRestart(), Digikam::ImageHistogram::getCount(), Digikam::ImageHistogram::getMaximum(), Digikam::ImageHistogram::getMean(), Digikam::ImageHistogram::getMedian(), Digikam::ImageHistogram::getStdDev(), Digikam::LoadSaveThread::load(), Digikam::ManagedLoadSaveThread::load(), Digikam::ManagedLoadSaveThread::loadThumbnail(), Digikam::DImgThreadedFilter::multithreadedSteps(), Digikam::ManagedLoadSaveThread::preloadThumbnail(), Digikam::ManagedLoadSaveThread::preloadThumbnailGroup(), Digikam::ManagedLoadSaveThread::prependThumbnailGroup(), process(), Digikam::LoadSaveThread::save(), Digikam::ManagedLoadSaveThread::save(), and Digikam::DImgThreadedFilter::startFilter().
|
protectedinherited |
Doing the same as start(), stop() and wait above, provide it with a locked QMutexLocker on mutex(). Note the start() will unlock and relock for scheduling once, after state change.
References Digikam::ThreadManager::instance(), and Digikam::ThreadManager::schedule().
|
signalinherited |
Emitted if emitSignals is enabled
|
inherited |
|
slotinherited |
Stop computation, sets the running flag to false.
Referenced by Digikam::WBFilter::autoExposureAdjustement(), Digikam::DImgThreadedFilter::cancelFilter(), Digikam::DImgThreadedFilter::multithreadedSteps(), Digikam::LoadSaveThread::run(), run(), Digikam::DynamicThread::shutDown(), Digikam::FacePreviewLoader::slotImageLoaded(), Digikam::FacePipeline::Private::stop(), and Digikam::ImageHistogram::stopCalculation().
|
protectedinherited |
|
protectedinherited |
This is the non-recursive mutex used to protect state variables and waiting in this class. You can use it if you want to protect your memory in the same scope as calling start, stop or wait, then using the QMutexLocker variants below. Note that when you have locked this mutex, you must use these variants, as the mutex is non-recursive.
Referenced by dispatch(), Digikam::LoadSaveThread::load(), Digikam::ManagedLoadSaveThread::load(), Digikam::ManagedLoadSaveThread::loadThumbnail(), Digikam::ManagedLoadSaveThread::preloadThumbnail(), Digikam::ManagedLoadSaveThread::preloadThumbnailGroup(), Digikam::ManagedLoadSaveThread::prependThumbnailGroup(), process(), Digikam::LoadSaveThread::run(), run(), Digikam::LoadSaveThread::save(), Digikam::ManagedLoadSaveThread::save(), Digikam::ManagedLoadSaveThread::shutDown(), Digikam::ManagedLoadSaveThread::stopAllTasks(), Digikam::ManagedLoadSaveThread::stopLoading(), Digikam::ManagedLoadSaveThread::stopSaving(), and Digikam::LoadSaveThread::taskHasFinished().
|
slotinherited |
Waits until the thread finishes. Typically, call stop() before.
Referenced by Digikam::DImgThreadedFilter::cancelFilter(), Digikam::ThumbnailLoadThread::cleanUp(), Digikam::DynamicThread::shutDown(), Digikam::FacePreviewLoader::slotImageLoaded(), Digikam::ImageHistogram::stopCalculation(), and Digikam::FacePipeline::Private::wait().
|
protectedinherited |
FacePipeline::Private* const Digikam::ScanStateFilter::d |
Referenced by dispatch(), and filter().
FacePipeline::FilterMode Digikam::ScanStateFilter::mode |
Referenced by filter().
FacePipelineFaceTagsIface::Roles Digikam::ScanStateFilter::tasks |
Referenced by dispatch(), and run().
|
protected |
Referenced by dispatch(), and run().