KPIM::ProgressItem Class
The ProgressItem class. More...
| Header: | #include <KPIM/ProgressItem> |
| CMake: | find_package(KPim6Libkdepim REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::Libkdepim) |
| Inherits: | QObject |
Public Functions
| void | addChild(KPIM::ProgressItem *kiddo) |
| bool | canBeCanceled() const |
| void | cancel() |
| bool | canceled() const |
| unsigned int | completedItems() const |
| KPIM::ProgressItem::CryptoStatus | cryptoStatus() const |
| const QString & | id() const |
| void | incCompletedItems(unsigned int v = 1) |
| const QString & | label() const |
| KPIM::ProgressItem * | parent() const |
| unsigned int | progress() const |
| void | removeChild(KPIM::ProgressItem *kiddo) |
| void | reset() |
| void | setCanBeCanceled(bool b) |
| void | setComplete() |
| void | setCompletedItems(unsigned int v) |
| void | setCryptoStatus(KPIM::ProgressItem::CryptoStatus v) |
| void | setLabel(const QString &v) |
| void | setProgress(unsigned int v) |
| void | setStatus(const QString &v) |
| void | setTotalItems(unsigned int v) |
| void | setTypeProgressItem(unsigned int) |
| void | setUsesBusyIndicator(bool useBusyIndicator) |
| const QString & | status() const |
| unsigned int | totalItems() const |
| unsigned int | typeProgressItem() const |
| void | updateProgress() |
| bool | usesBusyIndicator() const |
Signals
| void | progressItemAdded(KPIM::ProgressItem *) |
| void | progressItemCanceled(KPIM::ProgressItem *) |
| void | progressItemCompleted(KPIM::ProgressItem *) |
| void | progressItemCryptoStatus(KPIM::ProgressItem *, KPIM::ProgressItem::CryptoStatus) |
| void | progressItemLabel(KPIM::ProgressItem *, const QString &) |
| void | progressItemProgress(KPIM::ProgressItem *, unsigned int) |
| void | progressItemStatus(KPIM::ProgressItem *, const QString &) |
| void | progressItemUsesBusyIndicator(KPIM::ProgressItem *item, bool value) |
Detailed Description
Member Function Documentation
void ProgressItem::addChild(KPIM::ProgressItem *kiddo)
Adds a child progress item. kiddo the child item to add
bool ProgressItem::canBeCanceled() const
Returns whether this item can be canceled by the user. Returns true if the item can be canceled, false otherwise
See also setCanBeCanceled().
void ProgressItem::cancel()
Cancels this progress item.
bool ProgressItem::canceled() const
Returns whether this item has been canceled. Returns true if canceled, false otherwise
unsigned int ProgressItem::completedItems() const
Returns the number of completed items. Returns the completed item count
See also setCompletedItems().
KPIM::ProgressItem::CryptoStatus ProgressItem::cryptoStatus() const
Returns the encryption status for this operation. Returns the CryptoStatus value
See also setCryptoStatus().
const QString &ProgressItem::id() const
Returns the unique ID for this progress item. Returns the unique ID string
void ProgressItem::incCompletedItems(unsigned int v = 1)
Increments the completed items counter. v the amount to increment (default 1)
const QString &ProgressItem::label() const
Returns the user-visible label for this item. Returns the label string
See also setLabel().
KPIM::ProgressItem *ProgressItem::parent() const
Returns the parent progress item. Returns the parent ProgressItem, or nullptr if this is a top-level item
unsigned int ProgressItem::progress() const
Returns the current progress percentage. Returns the progress value (0-100)
See also setProgress().
[signal] void ProgressItem::progressItemAdded(KPIM::ProgressItem *)
Emitted when a new ProgressItem is added. The ProgressItem that was added.
[signal] void ProgressItem::progressItemCanceled(KPIM::ProgressItem *)
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. The canceled item;
[signal] void ProgressItem::progressItemCompleted(KPIM::ProgressItem *)
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. The completed item.
[signal] void ProgressItem::progressItemCryptoStatus(KPIM::ProgressItem *, KPIM::ProgressItem::CryptoStatus)
Emitted when the crypto status of an item changed. Should be used by progress dialogs to update the crypto indicator of an item. The updated item. The new state.
[signal] void ProgressItem::progressItemLabel(KPIM::ProgressItem *, const QString &)
Emitted when the label of an item changed. Should be used by progress dialogs to update the label of an item. The updated item. The new label.
[signal] void ProgressItem::progressItemProgress(KPIM::ProgressItem *, unsigned int)
Emitted when the progress value of an item changes. The item which got a new value. The value, for convenience.
[signal] void ProgressItem::progressItemStatus(KPIM::ProgressItem *, const QString &)
Emitted when the status message of an item changed. Should be used by progress dialogs to update the status message for an item. The updated item. The new message.
[signal] void ProgressItem::progressItemUsesBusyIndicator(KPIM::ProgressItem *item, bool value)
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. item The updated item value True if the item uses a busy indicator now, false otherwise
void ProgressItem::removeChild(KPIM::ProgressItem *kiddo)
Removes a child progress item. kiddo the child item to remove
void ProgressItem::reset()
Resets the progress to 0 and clears the status message.
void ProgressItem::setCanBeCanceled(bool b)
Sets whether this item can be canceled. b true to allow cancellation, false otherwise
See also canBeCanceled().
void ProgressItem::setComplete()
Marks this item as complete. This will emit progressItemCompleted() and eventually delete the item.
void ProgressItem::setCompletedItems(unsigned int v)
Sets the number of completed items. v the completed item count
See also completedItems().
void ProgressItem::setCryptoStatus(KPIM::ProgressItem::CryptoStatus v)
Sets the encryption status for this operation. v the new CryptoStatus value
See also cryptoStatus().
void ProgressItem::setLabel(const QString &v)
Sets the user-visible label for this item. v the new label string
See also label().
void ProgressItem::setProgress(unsigned int v)
Sets the progress percentage. v the new progress value (0-100)
See also progress().
void ProgressItem::setStatus(const QString &v)
Sets the status message for this item. v the new status string
See also status().
void ProgressItem::setTotalItems(unsigned int v)
Sets the total number of items for progress calculation. v the total item count
See also totalItems().
void ProgressItem::setTypeProgressItem(unsigned int)
Sets the progress item type. type the progress item type
See also typeProgressItem().
void ProgressItem::setUsesBusyIndicator(bool useBusyIndicator)
Sets whether this item uses a busy indicator. useBusyIndicator true to use a busy indicator, false for precise progress
See also usesBusyIndicator().
const QString &ProgressItem::status() const
Returns the current status message for this item. Returns the status string
See also setStatus().
unsigned int ProgressItem::totalItems() const
Returns the total number of items. Returns the total item count
See also setTotalItems().
unsigned int ProgressItem::typeProgressItem() const
Returns the progress item type. Returns the progress item type
See also setTypeProgressItem().
void ProgressItem::updateProgress()
Recalculates and updates the progress based on item counts.
bool ProgressItem::usesBusyIndicator() const
Returns whether this item uses a busy indicator instead of precise progress. Returns true if using a busy indicator, false otherwise
See also setUsesBusyIndicator().