• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

libkdepim

  • KPIM
  • ProgressItem
Signals | Public Member Functions | Protected Member Functions | List of all members
KPIM::ProgressItem Class Reference

#include <progressmanager.h>

Inheritance diagram for KPIM::ProgressItem:
Inheritance graph
[legend]

Signals

void progressItemAdded (KPIM::ProgressItem *)
 
void progressItemCanceled (KPIM::ProgressItem *)
 
void progressItemCompleted (KPIM::ProgressItem *)
 
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)
 
void progressItemUsesCrypto (KPIM::ProgressItem *, bool)
 

Public Member Functions

void addChild (ProgressItem *kiddo)
 
bool canBeCanceled () const
 
void cancel ()
 
bool canceled () const
 
unsigned int completedItems () const
 
const QString & id () const
 
void incCompletedItems (unsigned int v=1)
 
const QString & label () const
 
ProgressItem * parent () const
 
unsigned int progress () const
 
void removeChild (ProgressItem *kiddo)
 
void reset ()
 
void setComplete ()
 
void setCompletedItems (unsigned int v)
 
void setLabel (const QString &v)
 
void setProgress (unsigned int v)
 
void setStatus (const QString &v)
 
void setTotalItems (unsigned int v)
 
void setUsesBusyIndicator (bool useBusyIndicator)
 
void setUsesCrypto (bool v)
 
const QString & status () const
 
unsigned int totalItems () const
 
void updateProgress ()
 
bool usesBusyIndicator () const
 
bool usesCrypto () const
 

Protected Member Functions

 ProgressItem (ProgressItem *parent, const QString &id, const QString &label, const QString &status, bool isCancellable, bool usesCrypto)
 
virtual ~ProgressItem ()
 

Detailed Description

Definition at line 45 of file progressmanager.h.

Constructor & Destructor Documentation

KPIM::ProgressItem::ProgressItem ( ProgressItem *  parent,
const QString &  id,
const QString &  label,
const QString &  status,
bool  isCancellable,
bool  usesCrypto 
)
protected

Definition at line 34 of file progressmanager.cpp.

KPIM::ProgressItem::~ProgressItem ( )
protectedvirtual

Definition at line 44 of file progressmanager.cpp.

Member Function Documentation

void KPIM::ProgressItem::addChild ( ProgressItem *  kiddo)

Definition at line 67 of file progressmanager.cpp.

bool KPIM::ProgressItem::canBeCanceled ( ) const
inline
Returns
Whether this item can be canceled.

Definition at line 86 of file progressmanager.h.

void KPIM::ProgressItem::cancel ( )

Definition at line 90 of file progressmanager.cpp.

bool KPIM::ProgressItem::canceled ( ) const
inline

Definition at line 164 of file progressmanager.h.

unsigned int KPIM::ProgressItem::completedItems ( ) const
inline

Definition at line 151 of file progressmanager.h.

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

Definition at line 56 of file progressmanager.h.

void KPIM::ProgressItem::incCompletedItems ( unsigned int  v = 1)
inline

Definition at line 150 of file progressmanager.h.

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

Definition at line 66 of file progressmanager.h.

ProgressItem* KPIM::ProgressItem::parent ( ) const
inline
Returns
The parent item of this one, if there is one.

Definition at line 61 of file progressmanager.h.

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

Definition at line 116 of file progressmanager.h.

void KPIM::ProgressItem::progressItemAdded ( KPIM::ProgressItem *  )
signal

Emitted when a new ProgressItem is added.

Parameters
TheProgressItem that was added.
void KPIM::ProgressItem::progressItemCanceled ( KPIM::ProgressItem *  )
signal

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;
void KPIM::ProgressItem::progressItemCompleted ( KPIM::ProgressItem *  )
signal

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.
void KPIM::ProgressItem::progressItemLabel ( KPIM::ProgressItem *  ,
const QString &   
)
signal

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.
void KPIM::ProgressItem::progressItemProgress ( KPIM::ProgressItem *  ,
unsigned  int 
)
signal

Emitted when the progress value of an item changes.

Parameters
Theitem which got a new value.
Thevalue, for convenience.
void KPIM::ProgressItem::progressItemStatus ( KPIM::ProgressItem *  ,
const QString &   
)
signal

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.
void KPIM::ProgressItem::progressItemUsesBusyIndicator ( KPIM::ProgressItem *  item,
bool  value 
)
signal

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
void KPIM::ProgressItem::progressItemUsesCrypto ( KPIM::ProgressItem *  ,
bool   
)
signal

Emitted when the crypto status of an item changed.

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

Parameters
Theupdated item.
Thenew state.
void KPIM::ProgressItem::removeChild ( ProgressItem *  kiddo)

Definition at line 72 of file progressmanager.cpp.

void KPIM::ProgressItem::reset ( )
inline

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

Definition at line 137 of file progressmanager.h.

void KPIM::ProgressItem::setComplete ( )

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.

Definition at line 48 of file progressmanager.cpp.

void KPIM::ProgressItem::setCompletedItems ( unsigned int  v)
inline

Definition at line 149 of file progressmanager.h.

void KPIM::ProgressItem::setLabel ( const QString &  v)
Parameters
vSet the user visible string identifying this item.

Definition at line 119 of file progressmanager.cpp.

void KPIM::ProgressItem::setProgress ( unsigned int  v)

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

Parameters
vThe percentage value.

Definition at line 112 of file progressmanager.cpp.

void KPIM::ProgressItem::setStatus ( const QString &  v)

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

Parameters
vThe status string.

Definition at line 125 of file progressmanager.cpp.

void KPIM::ProgressItem::setTotalItems ( unsigned int  v)
inline

Definition at line 147 of file progressmanager.h.

void KPIM::ProgressItem::setUsesBusyIndicator ( bool  useBusyIndicator)

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.

Definition at line 137 of file progressmanager.cpp.

void KPIM::ProgressItem::setUsesCrypto ( bool  v)

Set whether this item uses crypted communication, so listeners can display a nice crypto icon.

Parameters
vThe value.

Definition at line 131 of file progressmanager.cpp.

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

Definition at line 76 of file progressmanager.h.

unsigned int KPIM::ProgressItem::totalItems ( ) const
inline

Definition at line 148 of file progressmanager.h.

void KPIM::ProgressItem::updateProgress ( )
inline

Recalculate progress according to total/completed items and update.

Definition at line 156 of file progressmanager.h.

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

Definition at line 104 of file progressmanager.h.

bool KPIM::ProgressItem::usesCrypto ( ) const
inline
Returns
Whether this item uses secure communication (Account uses ssl, for example.).

Definition at line 92 of file progressmanager.h.


The documentation for this class was generated from the following files:
  • progressmanager.h
  • progressmanager.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkdepim

Skip menu "libkdepim"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal