![]() |
digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
|
Signals | |
void | progressItemAdded (ProgressItem *item) |
Emitted when a new ProgressItem is added. | |
void | progressItemCanceled (ProgressItem *item) |
Emitted when an item was canceled. | |
void | progressItemCanceledById (const QString &id) |
void | progressItemCompleted (ProgressItem *item) |
Emitted when a progress item was completed. | |
void | progressItemLabel (ProgressItem *item, const QString &label) |
Emitted when the label of an item changed. | |
void | progressItemProgress (ProgressItem *item, unsigned int v) |
Emitted when the progress value of an item changes. | |
void | progressItemStatus (ProgressItem *item, const QString &mess) |
Emitted when the status message of an item changed. | |
void | progressItemThumbnail (ProgressItem *item, const QPixmap &thumb) |
Emitted when the thumbnail data must be set in item. | |
void | progressItemUsesBusyIndicator (ProgressItem *item, bool value) |
Emitted when the busy indicator state of an item changes. | |
Public Member Functions | |
ProgressItem (ProgressItem *const parent, const QString &id, const QString &label, const QString &status, bool canBeCanceled, bool hasThumb) | |
void | addChild (ProgressItem *const kiddo) |
bool | advance (unsigned int v) |
Advance total items processed by n values and update percentage in progressbar. | |
bool | canBeCanceled () const |
void | cancel () |
bool | canceled () const |
unsigned int | completedItems () const |
bool | hasThumbnail () const |
const QString & | id () const |
bool | incCompletedItems (unsigned int v=1) |
void | incTotalItems (unsigned int v=1) |
const QString & | label () const |
ProgressItem * | parent () const |
unsigned int | progress () const |
void | removeChild (ProgressItem *const kiddo) |
void | reset () |
Reset the progress value of this item to 0 and the status string to the empty string. | |
void | setComplete () |
Tell the item it has finished. | |
bool | setCompletedItems (unsigned int v) |
void | setLabel (const QString &v) |
void | setProgress (unsigned int v) |
Set the progress (percentage of completion) value of this item. | |
void | setShowAtStart (bool showAtStart) |
Set the property to pop-up item when it's added in progress manager. | |
void | setStatus (const QString &v) |
Set the string to be used for showing this item's current status. | |
void | setThumbnail (const QIcon &icon) |
Sets whether this item has a thumbnail. | |
void | setTotalItems (unsigned int v) |
void | setUsesBusyIndicator (bool useBusyIndicator) |
Sets whether this item uses a busy indicator instead of real progress for its progress bar. | |
bool | showAtStart () const |
const QString & | status () const |
bool | totalCompleted () const |
unsigned int | totalItems () const |
void | updateProgress () |
Recalculate progress according to total/completed items and update. | |
bool | usesBusyIndicator () const |
bool Digikam::ProgressItem::advance | ( | unsigned int | v | ) |
v | The value to advance. |
bool Digikam::ProgressItem::canBeCanceled | ( | ) | const |
bool Digikam::ProgressItem::hasThumbnail | ( | ) | const |
const QString & Digikam::ProgressItem::id | ( | ) | const |
const QString & Digikam::ProgressItem::label | ( | ) | const |
ProgressItem * Digikam::ProgressItem::parent | ( | ) | const |
unsigned int Digikam::ProgressItem::progress | ( | ) | const |
|
signal |
item | The ProgressItem that was added. |
|
signal |
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.
item | The canceled item; |
|
signal |
The item will be deleted afterwards, so slots connected to this are the last chance to work with this item.
item | The completed item. |
|
signal |
Should be used by progress dialogs to update the label of an item.
item | The updated item. |
label | The new label. |
|
signal |
item | The item which got a new value. |
v | The value, for convenience. |
|
signal |
Should be used by progress dialogs to update the status message for an item.
item | The updated item. |
mess | The new message. |
|
signal |
item | The updated item |
thumb | thumbnail data |
|
signal |
Should be used by progress dialogs so that they can adjust the display of the progress bar to the new mode.
item | The updated item |
value | True if the item uses a busy indicator now, false otherwise |
void Digikam::ProgressItem::setComplete | ( | ) |
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.
void Digikam::ProgressItem::setLabel | ( | const QString & | v | ) |
v | Set the user visible string identifying this item. |
void Digikam::ProgressItem::setProgress | ( | unsigned int | v | ) |
v | The percentage value. |
void Digikam::ProgressItem::setShowAtStart | ( | bool | showAtStart | ) |
Use this method if you consider that item is important to be notified to end-user.
showAtStart | The flag to turn on this property. |
void Digikam::ProgressItem::setStatus | ( | const QString & | v | ) |
v | The status string. |
void Digikam::ProgressItem::setThumbnail | ( | const QIcon & | icon | ) |
icon | The icon to use as thumbnail. |
void Digikam::ProgressItem::setUsesBusyIndicator | ( | bool | useBusyIndicator | ) |
If it uses a busy indicator, you are still responsible for calling setProgress() from time to time to update the busy indicator.
param useBusyIndicator The flag to indicate busy state.
bool Digikam::ProgressItem::showAtStart | ( | ) | const |
const QString & Digikam::ProgressItem::status | ( | ) | const |
bool Digikam::ProgressItem::usesBusyIndicator | ( | ) | const |