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

Public Slots

void slotCancel ()
 cancels thread execution More...
 

Signals

void collectionTrashItemInfo (const DTrashItemInfo &trashItemInfo)
 
void signalFinished ()
 
void signalOneProccessed (const QUrl &url)
 
void signalRenameFailed (const QUrl &url)
 

Public Member Functions

void cancel ()
 
void copyOrMove (IOJobData *const data)
 Starts a number of jobs to copy or move source files to destination. More...
 
void deleteFiles (IOJobData *const data)
 Starts a number of jobs to delete multiple files. More...
 
void emptyDTrashItems (IOJobData *const data)
 creates a job for every item to delete from collection trash More...
 
QStringList & errorsList () const
 errorsList More...
 
bool hasErrors () const
 hasErrors More...
 
 IOJobsThread (QObject *const parent)
 
bool isCanceled () const
 isCanceled More...
 
IOJobDatajobData () const
 jobData More...
 
void listDTrashItems (const QString &collectionPath)
 Starts a job for listing trash items in a collection. More...
 
int maximumNumberOfThreads () const
 
void renameFile (IOJobData *const data)
 Starts one job to rename a file to a new name. More...
 
void restoreDTrashItems (IOJobData *const data)
 creates a job for every item to restore back to album More...
 
void setDefaultMaximumNumberOfThreads ()
 
void setMaximumNumberOfThreads (int n)
 
 ~IOJobsThread () 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

◆ IOJobsThread()

Digikam::IOJobsThread::IOJobsThread ( QObject *const  parent)
explicit

◆ ~IOJobsThread()

Digikam::IOJobsThread::~IOJobsThread ( )
override

Member Function Documentation

◆ appendJobs()

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

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(), copyOrMove(), DigikamGenericFileCopyPlugin::FCThread::createCopyJobs(), DigikamGenericMjpegStreamPlugin::MjpegFrameThread::createFrameJob(), Digikam::DatesDBJobsThread::datesListing(), deleteFiles(), emptyDTrashItems(), Digikam::MaintenanceThread::generateFingerprints(), Digikam::MaintenanceThread::generateThumbs(), Digikam::GPSDBJobsThread::GPSListing(), DigikamGenericDNGConverterPlugin::DNGConverterActionThread::identifyRawFiles(), listDTrashItems(), DigikamGenericPrintCreatorPlugin::AdvPrintThread::preparePrint(), DigikamGenericPrintCreatorPlugin::AdvPrintThread::preview(), DigikamGenericPrintCreatorPlugin::AdvPrintThread::print(), Digikam::ActionThread::processQueueItems(), DigikamGenericDNGConverterPlugin::DNGConverterActionThread::processRawFiles(), Digikam::VidSlideThread::processStream(), renameFile(), DigikamGenericSendByMailPlugin::ImageResizeThread::resize(), restoreDTrashItems(), Digikam::SearchesDBJobsThread::searchesListing(), DigikamGenericTimeAdjustPlugin::TimeAdjustThread::setPreviewDates(), DigikamGenericTimeAdjustPlugin::TimeAdjustThread::setUpdatedDates(), Digikam::MaintenanceThread::shrinkDatabases(), Digikam::MaintenanceThread::sortByImageQuality(), Digikam::MaintenanceThread::syncMetadata(), and Digikam::TagsDBJobsThread::tagsListing().

◆ cancel()

◆ collectionTrashItemInfo

void Digikam::IOJobsThread::collectionTrashItemInfo ( const DTrashItemInfo trashItemInfo)
signal

Referenced by listDTrashItems().

◆ copyOrMove()

void Digikam::IOJobsThread::copyOrMove ( IOJobData *const  data)

Starts a number of jobs to copy or move source files to destination.

Parameters
dataIOJobsData container

References Digikam::ActionThreadBase::appendJobs(), Digikam::ActionThreadBase::maximumNumberOfThreads(), and Digikam::IOJobData::sourceUrls().

Referenced by Digikam::IOJobsManager::startIOJobs().

◆ deleteFiles()

void Digikam::IOJobsThread::deleteFiles ( IOJobData *const  data)

Starts a number of jobs to delete multiple files.

Parameters
dataIOJobsData container

References Digikam::ActionThreadBase::appendJobs(), Digikam::ActionThreadBase::maximumNumberOfThreads(), and Digikam::IOJobData::sourceUrls().

Referenced by Digikam::IOJobsManager::startIOJobs().

◆ emptyDTrashItems()

void Digikam::IOJobsThread::emptyDTrashItems ( IOJobData *const  data)

creates a job for every item to delete from collection trash

Parameters
dataIOJobsData container

References Digikam::ActionThreadBase::appendJobs().

Referenced by Digikam::IOJobsManager::startIOJobs().

◆ errorsList()

QStringList & Digikam::IOJobsThread::errorsList ( ) const

errorsList

Returns

◆ hasErrors()

bool Digikam::IOJobsThread::hasErrors ( ) const

hasErrors

Returns
true if string list was not empty

◆ isCanceled()

bool Digikam::IOJobsThread::isCanceled ( ) const

isCanceled

Returns
true if the thread was interrupted

◆ isEmpty()

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

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

Referenced by Digikam::ActionThreadBase::slotJobFinished().

◆ jobData()

IOJobData * Digikam::IOJobsThread::jobData ( ) const

jobData

Returns

◆ listDTrashItems()

void Digikam::IOJobsThread::listDTrashItems ( const QString &  collectionPath)

Starts a job for listing trash items in a collection.

Parameters
collectionPath

References Digikam::ActionThreadBase::appendJobs(), collectionTrashItemInfo(), and signalFinished().

Referenced by Digikam::IOJobsManager::startDTrashItemsListingForCollection().

◆ maximumNumberOfThreads()

◆ pendingCount()

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

Return the number of pending jobs to process.

◆ renameFile()

void Digikam::IOJobsThread::renameFile ( IOJobData *const  data)

Starts one job to rename a file to a new name.

Parameters
dataIOJobsData container

References Digikam::ActionThreadBase::appendJobs(), and signalRenameFailed().

Referenced by Digikam::IOJobsManager::startIOJobs().

◆ restoreDTrashItems()

void Digikam::IOJobsThread::restoreDTrashItems ( IOJobData *const  data)

creates a job for every item to restore back to album

Parameters
dataIOJobsData container

References Digikam::ActionThreadBase::appendJobs().

Referenced by Digikam::IOJobsManager::startIOJobs().

◆ run()

void Digikam::ActionThreadBase::run ( )
overrideprotectedinherited

Main thread loop used to process jobs in todo list.

References Digikam::ActionThreadBase::slotJobFinished().

◆ setDefaultMaximumNumberOfThreads()

void Digikam::ActionThreadBase::setDefaultMaximumNumberOfThreads ( )
inherited

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 Digikam::ActionThreadBase::setMaximumNumberOfThreads().

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

◆ setMaximumNumberOfThreads()

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

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

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

◆ signalFinished

void Digikam::IOJobsThread::signalFinished ( )
signal

Referenced by listDTrashItems().

◆ signalOneProccessed

void Digikam::IOJobsThread::signalOneProccessed ( const QUrl &  url)
signal

◆ signalRenameFailed

void Digikam::IOJobsThread::signalRenameFailed ( const QUrl &  url)
signal

Referenced by renameFile().

◆ slotCancel

void Digikam::IOJobsThread::slotCancel ( )
slot

cancels thread execution

References Digikam::ActionThreadBase::cancel().

◆ slotJobFinished

void Digikam::ActionThreadBase::slotJobFinished ( )
protectedslotinherited

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