digiKam
Digikam::ActionThreadBase Class Reference
+ Inheritance diagram for Digikam::ActionThreadBase:

Public Member Functions

 ActionThreadBase (QObject *const parent=nullptr)
 
void cancel ()
 
int maximumNumberOfThreads () const
 
void setDefaultMaximumNumberOfThreads ()
 
void setMaximumNumberOfThreads (int n)
 
 ~ActionThreadBase () override
 

Protected Slots

void slotJobFinished ()
 

Protected Member Functions

void appendJobs (const ActionJobCollection &jobs)
 
bool isEmpty () const
 
int pendingCount () const
 
void run () override
 

Constructor & Destructor Documentation

◆ ActionThreadBase()

Digikam::ActionThreadBase::ActionThreadBase ( QObject *const  parent = nullptr)
explicit

◆ ~ActionThreadBase()

Digikam::ActionThreadBase::~ActionThreadBase ( )
override

References cancel().

Member Function Documentation

◆ appendJobs()

void Digikam::ActionThreadBase::appendJobs ( const ActionJobCollection jobs)
protected

Append a collection of jobs to process into QThreadPool. Jobs are add to pending lists and will be deleted by ActionThreadBase, not QThreadPool.

Referenced by Digikam::AlbumsDBJobsThread::albumsListing(), Digikam::MaintenanceThread::cleanCoreDb(), Digikam::MaintenanceThread::cleanFacesDb(), Digikam::MaintenanceThread::cleanSimilarityDb(), Digikam::MaintenanceThread::cleanThumbsDb(), Digikam::MaintenanceThread::computeDatabaseJunk(), Digikam::IOJobsThread::copyOrMove(), DigikamGenericFileCopyPlugin::FCThread::createCopyJobs(), DigikamGenericMjpegStreamPlugin::MjpegFrameThread::createFrameJob(), Digikam::DatesDBJobsThread::datesListing(), Digikam::IOJobsThread::deleteFiles(), Digikam::IOJobsThread::emptyDTrashItems(), Digikam::MaintenanceThread::generateFingerprints(), Digikam::MaintenanceThread::generateThumbs(), Digikam::GPSDBJobsThread::GPSListing(), DigikamGenericDNGConverterPlugin::DNGConverterActionThread::identifyRawFiles(), Digikam::IOJobsThread::listDTrashItems(), DigikamGenericPrintCreatorPlugin::AdvPrintThread::preparePrint(), DigikamGenericPrintCreatorPlugin::AdvPrintThread::preview(), DigikamGenericPrintCreatorPlugin::AdvPrintThread::print(), Digikam::ActionThread::processQueueItems(), DigikamGenericDNGConverterPlugin::DNGConverterActionThread::processRawFiles(), Digikam::VidSlideThread::processStream(), Digikam::IOJobsThread::renameFile(), DigikamGenericSendByMailPlugin::ImageResizeThread::resize(), Digikam::IOJobsThread::restoreDTrashItems(), Digikam::SearchesDBJobsThread::searchesListing(), DigikamGenericTimeAdjustPlugin::TimeAdjustThread::setPreviewDates(), DigikamGenericTimeAdjustPlugin::TimeAdjustThread::setUpdatedDates(), Digikam::MaintenanceThread::shrinkDatabases(), Digikam::MaintenanceThread::sortByImageQuality(), Digikam::MaintenanceThread::syncMetadata(), and Digikam::TagsDBJobsThread::tagsListing().

◆ cancel()

◆ isEmpty()

bool Digikam::ActionThreadBase::isEmpty ( ) const
protected

Return true if list of pending jobs to process is empty.

Referenced by slotJobFinished().

◆ maximumNumberOfThreads()

◆ pendingCount()

int Digikam::ActionThreadBase::pendingCount ( ) const
protected

Return the number of pending jobs to process.

◆ run()

void Digikam::ActionThreadBase::run ( )
overrideprotected

Main thread loop used to process jobs in todo list.

References slotJobFinished().

◆ setDefaultMaximumNumberOfThreads()

void Digikam::ActionThreadBase::setDefaultMaximumNumberOfThreads ( )

Reset maximum number of threads used to parallelize collection of job processing to max core detected on computer. This method is called in constructor.

References setMaximumNumberOfThreads().

Referenced by ActionThreadBase(), Digikam::ActionThread::setSettings(), and Digikam::MaintenanceThread::setUseMultiCore().

◆ setMaximumNumberOfThreads()

void Digikam::ActionThreadBase::setMaximumNumberOfThreads ( int  n)

Adjust maximum number of threads used to parallelize collection of job processing.

Referenced by setDefaultMaximumNumberOfThreads(), Digikam::ActionThread::setSettings(), and Digikam::MaintenanceThread::setUseMultiCore().

◆ slotJobFinished

void Digikam::ActionThreadBase::slotJobFinished ( )
protectedslot

References isEmpty().

Referenced by run().


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