digiKam Developer Documentation: Digikam::ProgressItem Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
Digikam::ProgressItem Class Reference
Inheritance diagram for Digikam::ProgressItem:

## 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

## Member Function Documentation

## ◆ advance()

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

Parameters

  v | The value to advance.

Returns
  true if totalCompleted()

## ◆ canBeCanceled()

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

Returns
  Whether this item can be canceled.

## ◆ hasThumbnail()

bool Digikam::ProgressItem::hasThumbnail | ( |  | ) | const

Returns
  whether this item has a thumbnail.

## ◆ id()

const QString & Digikam::ProgressItem::id | ( |  | ) | const

Returns
  The id string which uniquely identifies the operation represented by this item.

## ◆ label()

const QString & Digikam::ProgressItem::label | ( |  | ) | const

Returns
  The user visible string to be used to represent this item.

## ◆ parent()

ProgressItem * Digikam::ProgressItem::parent | ( |  | ) | const

Returns
  The parent item of this one, if there is one.

## ◆ progress()

unsigned int Digikam::ProgressItem::progress | ( |  | ) | const

Returns
  The current progress value of this item in percent.

## ◆ progressItemAdded

void Digikam::ProgressItem::progressItemAdded | ( | ProgressItem * | item | ) |
| signal

Parameters

  item | The ProgressItem that was added.

## ◆ progressItemCanceled

void Digikam::ProgressItem::progressItemCanceled | ( | ProgressItem * | item | ) |
| 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.

Parameters

  item | The canceled item;

## ◆ progressItemCompleted

void Digikam::ProgressItem::progressItemCompleted | ( | ProgressItem * | item | ) |
| signal

The item will be deleted afterwards, so slots connected to this are the last chance to work with this item.

Parameters

  item | The completed item.

## ◆ progressItemLabel

void Digikam::ProgressItem::progressItemLabel | ( | ProgressItem * | item,
|  | const QString & | label
| ) |  |
| signal

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

Parameters

  item | The updated item.
  label | The new label.

## ◆ progressItemProgress

void Digikam::ProgressItem::progressItemProgress | ( | ProgressItem * | item,
|  | unsigned int | v
| ) |  |
| signal

Parameters

  item | The item which got a new value.
  v | The value, for convenience.

## ◆ progressItemStatus

void Digikam::ProgressItem::progressItemStatus | ( | ProgressItem * | item,
|  | const QString & | mess
| ) |  |
| signal

Should be used by progress dialogs to update the status message for an item.

Parameters

  item | The updated item.
  mess | The new message.

## ◆ progressItemThumbnail

void Digikam::ProgressItem::progressItemThumbnail | ( | ProgressItem * | item,
|  | const QPixmap & | thumb
| ) |  |
| signal

Parameters

  item | The updated item
  thumb | thumbnail data

## ◆ progressItemUsesBusyIndicator

void Digikam::ProgressItem::progressItemUsesBusyIndicator | ( | ProgressItem * | item,
|  | bool | value
| ) |  |
| signal

Should be used by progress dialogs so that they can adjust the display of the progress bar to the new mode.

Parameters

  item | The updated item
  value | True if the item uses a busy indicator now, false otherwise

## ◆ setComplete()

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.

## ◆ setLabel()

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

Parameters

  v | Set the user visible string identifying this item.

## ◆ setProgress()

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

Parameters

  v | The percentage value.

## ◆ setShowAtStart()

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

Use this method if you consider that item is important to be notified to end-user.

Parameters

  showAtStart | The flag to turn on this property.

## ◆ setStatus()

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

Parameters

  v | The status string.

## ◆ setThumbnail()

void Digikam::ProgressItem::setThumbnail | ( | const QIcon & | icon | ) |

Parameters

  icon | The icon to use as thumbnail.

## ◆ setUsesBusyIndicator()

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.

## ◆ showAtStart()

bool Digikam::ProgressItem::showAtStart | ( |  | ) | const

Returns
  true if item must be pop-up when it's added in progress manager.

## ◆ status()

const QString & Digikam::ProgressItem::status | ( |  | ) | const

Returns
  The string to be used for showing this item's current status.

## ◆ usesBusyIndicator()

bool Digikam::ProgressItem::usesBusyIndicator | ( |  | ) | const

Returns
  whether this item uses a busy indicator instead of real progress display