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

Public Slots

void start ()
 

Signals

void progressItemAdded (ProgressItem *)
 
void progressItemCanceled (ProgressItem *)
 
void progressItemCanceledById (const QString &id)
 
void progressItemCompleted (ProgressItem *)
 
void progressItemLabel (ProgressItem *, const QString &)
 
void progressItemProgress (ProgressItem *, unsigned int)
 
void progressItemStatus (ProgressItem *, const QString &)
 
void progressItemThumbnail (ProgressItem *item, const QPixmap &thumb)
 
void progressItemUsesBusyIndicator (ProgressItem *item, bool value)
 
void signalCanceled ()
 
void signalComplete ()
 

Public Member Functions

void addChild (ProgressItem *const kiddo)
 
bool advance (unsigned int v)
 
bool canBeCanceled () const
 
void cancel ()
 
bool canceled () const
 
unsigned int completedItems () const
 
 FingerPrintsGenerator (const bool rebuildAll, const AlbumList &list=AlbumList(), ProgressItem *const parent=nullptr)
 
bool hasThumbnail () const
 
const QString & id () const
 
bool incCompletedItems (unsigned int v=1)
 
void incTotalItems (unsigned int v=1)
 
const QString & label () const
 
ProgressItemparent () const
 
unsigned int progress () const
 
void removeChild (ProgressItem *const kiddo)
 
void reset ()
 
void setComplete ()
 
bool setCompletedItems (unsigned int v)
 
void setLabel (const QString &v)
 
void setNotificationEnabled (bool b)
 
void setProgress (unsigned int v)
 
void setShowAtStart (bool showAtStart)
 
void setStatus (const QString &v)
 
void setThumbnail (const QIcon &icon)
 
void setTotalItems (unsigned int v)
 
void setUseMultiCoreCPU (bool b) override
 
void setUsesBusyIndicator (bool useBusyIndicator)
 
bool showAtStart () const
 
const QString & status () const
 
bool totalCompleted () const
 
unsigned int totalItems () const
 
void updateProgress ()
 
bool usesBusyIndicator () const
 
 ~FingerPrintsGenerator () override
 

Constructor & Destructor Documentation

◆ FingerPrintsGenerator()

Digikam::FingerPrintsGenerator::FingerPrintsGenerator ( const bool  rebuildAll,
const AlbumList list = AlbumList(),
ProgressItem *const  parent = nullptr 
)
explicit

Constructor using AlbumList as argument. If list is empty, whole Albums collection is processed.

References Digikam::ProgressManager::addProgressItem(), and Digikam::ProgressItem::setLabel().

◆ ~FingerPrintsGenerator()

Digikam::FingerPrintsGenerator::~FingerPrintsGenerator ( )
override

Member Function Documentation

◆ addChild()

void Digikam::ProgressItem::addChild ( ProgressItem *const  kiddo)
inherited

◆ advance()

bool Digikam::ProgressItem::advance ( unsigned int  v)
inherited

Advance total items processed by n values and update percentage in progressbar.

Parameters
vThe value to advance.
Returns
true if totalCompleted()

References Digikam::ProgressItem::incCompletedItems(), and Digikam::ProgressItem::updateProgress().

Referenced by Digikam::DFileOperations::copyFolderRecursively().

◆ canBeCanceled()

bool Digikam::ProgressItem::canBeCanceled ( ) const
inherited

◆ cancel()

◆ canceled()

bool Digikam::ProgressItem::canceled ( ) const
inherited

◆ completedItems()

unsigned int Digikam::ProgressItem::completedItems ( ) const
inherited

◆ hasThumbnail()

bool Digikam::ProgressItem::hasThumbnail ( ) const
inherited
Returns
whether this item has a thumbnail.

Referenced by Digikam::ProgressItem::setThumbnail(), and Digikam::TransactionItem::TransactionItem().

◆ id()

const QString & Digikam::ProgressItem::id ( ) const
inherited
Returns
The id string which uniquely identifies the operation represented by this item.

Referenced by Digikam::ProgressManager::addProgressItem(), Digikam::ProgressItem::ProgressItem(), Digikam::DProgressWdg::progressScheduled(), and Digikam::StatusProgressBar::setProgressBarMode().

◆ incCompletedItems()

bool Digikam::ProgressItem::incCompletedItems ( unsigned int  v = 1)
inherited

◆ incTotalItems()

void Digikam::ProgressItem::incTotalItems ( unsigned int  v = 1)
inherited

◆ label()

const QString & Digikam::ProgressItem::label ( ) const
inherited
Returns
The user visible string to be used to represent this item.

Referenced by Digikam::ProgressItem::ProgressItem(), Digikam::MaintenanceTool::slotDone(), and Digikam::TransactionItem::TransactionItem().

◆ parent()

◆ progress()

unsigned int Digikam::ProgressItem::progress ( ) const
inherited
Returns
The current progress value of this item in percent.

Referenced by Digikam::TransactionItem::TransactionItem().

◆ progressItemAdded

void Digikam::ProgressItem::progressItemAdded ( ProgressItem )
signalinherited

Emitted when a new ProgressItem is added.

Parameters
TheProgressItem that was added.

◆ progressItemCanceled

void Digikam::ProgressItem::progressItemCanceled ( ProgressItem )
signalinherited

Emitted when an item was canceled. It will not go away immediately, only when the owner sets it complete, which will usually happen. Can be used to visually indicate the canceled status of an item. Should be used by the owner of the item to make sure it is set completed even if it is canceled. There is a ProgressManager::slotStandardCancelHandler which simply sets the item completed and can be used if no other work needs to be done on cancel.

Parameters
Thecanceled item;

Referenced by Digikam::ProgressItem::cancel(), Digikam::FacesDetector::FacesDetector(), and Digikam::FileActionProgress::FileActionProgress().

◆ progressItemCanceledById

void Digikam::ProgressItem::progressItemCanceledById ( const QString &  id)
signalinherited

◆ progressItemCompleted

void Digikam::ProgressItem::progressItemCompleted ( ProgressItem )
signalinherited

Emitted when a progress item was completed. The item will be deleted afterwards, so slots connected to this are the last chance to work with this item.

Parameters
Thecompleted item.

Referenced by Digikam::ProgressItem::removeChild(), and Digikam::ProgressItem::setComplete().

◆ progressItemLabel

void Digikam::ProgressItem::progressItemLabel ( ProgressItem ,
const QString &   
)
signalinherited

Emitted when the label of an item changed. Should be used by progress dialogs to update the label of an item.

Parameters
Theupdated item.
Thenew label.

Referenced by Digikam::ProgressItem::setLabel().

◆ progressItemProgress

void Digikam::ProgressItem::progressItemProgress ( ProgressItem ,
unsigned int   
)
signalinherited

Emitted when the progress value of an item changes.

Parameters
Theitem which got a new value.
Thevalue, for convenience.

Referenced by Digikam::ProgressItem::setProgress().

◆ progressItemStatus

void Digikam::ProgressItem::progressItemStatus ( ProgressItem ,
const QString &   
)
signalinherited

Emitted when the status message of an item changed. Should be used by progress dialogs to update the status message for an item.

Parameters
Theupdated item.
Thenew message.

Referenced by Digikam::ProgressItem::setStatus().

◆ progressItemThumbnail

void Digikam::ProgressItem::progressItemThumbnail ( ProgressItem item,
const QPixmap &  thumb 
)
signalinherited

Emitted when the thumbnail data must be set in item.

Parameters
itemThe updated item
thumbthumbnail data

Referenced by Digikam::ProgressItem::setThumbnail().

◆ progressItemUsesBusyIndicator

void Digikam::ProgressItem::progressItemUsesBusyIndicator ( ProgressItem item,
bool  value 
)
signalinherited

Emitted when the busy indicator state of an item changes. Should be used by progress dialogs so that they can adjust the display of the progress bar to the new mode.

Parameters
itemThe updated item
valueTrue if the item uses a busy indicator now, false otherwise

Referenced by Digikam::ProgressItem::setUsesBusyIndicator().

◆ removeChild()

void Digikam::ProgressItem::removeChild ( ProgressItem *const  kiddo)
inherited

◆ reset()

void Digikam::ProgressItem::reset ( )
inherited

Reset the progress value of this item to 0 and the status string to the empty string.

References Digikam::ProgressItem::setProgress(), and Digikam::ProgressItem::setStatus().

◆ setComplete()

void Digikam::ProgressItem::setComplete ( )
inherited

Tell the item it has finished. This will emit progressItemCompleted() result in the destruction of the item after all slots connected to this signal have executed. This is the only way to get rid of an item and needs to be called even if the item is canceled. Don't use the item after this has been called on it.

References Digikam::ProgressItem::progressItemCompleted(), and Digikam::ProgressItem::setProgress().

Referenced by Digikam::ProgressManager::addProgressItem(), Digikam::TwoProgressItemsContainer::advance(), Digikam::DProgressWdg::progressCompleted(), Digikam::StatusProgressBar::setProgressBarMode(), Digikam::MaintenanceTool::slotCancel(), Digikam::MaintenanceTool::slotDone(), Digikam::PrivateProgressItemCreator::slotProgressItemCanceled(), and Digikam::ProgressManager::slotStandardCancelHandler().

◆ setCompletedItems()

bool Digikam::ProgressItem::setCompletedItems ( unsigned int  v)
inherited

◆ setLabel()

void Digikam::ProgressItem::setLabel ( const QString &  v)
inherited

◆ setNotificationEnabled()

void Digikam::MaintenanceTool::setNotificationEnabled ( bool  b)
inherited

If true, show a notification message on desktop notification manager with time elpased to run process.

◆ setProgress()

void Digikam::ProgressItem::setProgress ( unsigned int  v)
inherited

Set the progress (percentage of completion) value of this item.

Parameters
vThe percentage value.

References Digikam::ProgressItem::progressItemProgress().

Referenced by Digikam::ProgressItem::reset(), Digikam::ProgressItem::setComplete(), and Digikam::ProgressItem::updateProgress().

◆ setShowAtStart()

void Digikam::ProgressItem::setShowAtStart ( bool  showAtStart)
inherited

Set the property to pop-up item when it's added in progress manager. Use this method if you consider that item is important to be notified to end-user.

References Digikam::ProgressItem::showAtStart().

Referenced by Digikam::NewItemsFinder::NewItemsFinder().

◆ setStatus()

void Digikam::ProgressItem::setStatus ( const QString &  v)
inherited

Set the string to be used for showing this item's current status.

Parameters
vThe status string.

References Digikam::ProgressItem::progressItemStatus().

Referenced by Digikam::ProgressItem::cancel(), Digikam::DProgressWdg::progressStatusChanged(), Digikam::ProgressItem::reset(), and Digikam::StatusProgressBar::setProgressText().

◆ setThumbnail()

◆ setTotalItems()

void Digikam::ProgressItem::setTotalItems ( unsigned int  v)
inherited

◆ setUseMultiCoreCPU()

void Digikam::FingerPrintsGenerator::setUseMultiCoreCPU ( bool  )
overridevirtual

Re-implement this method if your tool is able to use multi-core CPU to process item in parallel

Reimplemented from Digikam::MaintenanceTool.

◆ setUsesBusyIndicator()

void Digikam::ProgressItem::setUsesBusyIndicator ( bool  useBusyIndicator)
inherited

Sets whether this item uses a busy indicator instead of real progress for its progress bar. If it uses a busy indicator, you are still responsible for calling setProgress() from time to time to update the busy indicator.

References Digikam::ProgressItem::progressItemUsesBusyIndicator().

◆ showAtStart()

bool Digikam::ProgressItem::showAtStart ( ) const
inherited
Returns
true if item must be pop-up when it's added in progress manager.

Referenced by Digikam::ProgressItem::setShowAtStart(), and Digikam::ProgressView::slotTransactionAdded().

◆ signalCanceled

void Digikam::MaintenanceTool::signalCanceled ( )
signalinherited

Emit when process is canceled.

Referenced by Digikam::MaintenanceTool::slotCancel().

◆ signalComplete

void Digikam::MaintenanceTool::signalComplete ( )
signalinherited

Emit when process is done (not canceled).

Referenced by Digikam::MaintenanceTool::slotDone().

◆ start

◆ status()

const QString & Digikam::ProgressItem::status ( ) const
inherited
Returns
The string to be used for showing this item's current status.

Referenced by Digikam::ProgressItem::ProgressItem(), and Digikam::TransactionItem::TransactionItem().

◆ totalCompleted()

bool Digikam::ProgressItem::totalCompleted ( ) const
inherited

◆ totalItems()

unsigned int Digikam::ProgressItem::totalItems ( ) const
inherited

◆ updateProgress()

void Digikam::ProgressItem::updateProgress ( )
inherited

Recalculate progress according to total/completed items and update.

References Digikam::ProgressItem::setProgress().

Referenced by Digikam::ProgressItem::advance(), and Digikam::StatusProgressBar::setProgressValue().

◆ usesBusyIndicator()

bool Digikam::ProgressItem::usesBusyIndicator ( ) const
inherited
Returns
whether this item uses a busy indicator instead of real progress display

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