libkdepim

KPIM::ProgressItem Class Reference

List of all members.

Detailed Description

Definition at line 39 of file progressmanager.h.


Signals

void progressItemAdded (KPIM::ProgressItem *)
void progressItemProgress (KPIM::ProgressItem *, unsigned int)
void progressItemCompleted (KPIM::ProgressItem *)
void progressItemCanceled (KPIM::ProgressItem *)
void progressItemStatus (KPIM::ProgressItem *, const QString &)
void progressItemLabel (KPIM::ProgressItem *, const QString &)
void progressItemUsesCrypto (KPIM::ProgressItem *, bool)

Public Member Functions

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

Protected Member Functions

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

Friends

class ProgressManager
class QDict< ProgressItem >

Member Function Documentation

const QString& KPIM::ProgressItem::id (  )  const [inline]

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

Definition at line 51 of file progressmanager.h.

ProgressItem* KPIM::ProgressItem::parent (  )  const [inline]

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

Definition at line 56 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 61 of file progressmanager.h.

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

Parameters:
v Set the user visible string identifying this item.

v will be interpreted as rich text, so it might have to be escaped.

Definition at line 108 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 72 of file progressmanager.h.

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

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

v will be interpreted as rich text, so it might have to be escaped.

Parameters:
v The status string.

Definition at line 114 of file progressmanager.cpp.

bool KPIM::ProgressItem::canBeCanceled (  )  const [inline]

Returns:
Whether this item can be cancelled.

Definition at line 83 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 89 of file progressmanager.h.

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

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

Parameters:
v The value.

Definition at line 120 of file progressmanager.cpp.

unsigned int KPIM::ProgressItem::progress (  )  const [inline]

Returns:
The current progress value of this item in percent.

Definition at line 101 of file progressmanager.h.

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

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

Parameters:
v The percentage value.

Definition at line 101 of file progressmanager.cpp.

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 cancelled. Don't use the item after this has been called on it.

Definition at line 51 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 122 of file progressmanager.h.

void KPIM::ProgressItem::updateProgress (  )  [inline]

Recalculate progress according to total/completed items and update.

Definition at line 136 of file progressmanager.h.

void KPIM::ProgressItem::progressItemAdded ( KPIM::ProgressItem  )  [signal]

Emitted when a new ProgressItem is added.

Parameters:
The ProgressItem that was added.

void KPIM::ProgressItem::progressItemProgress ( KPIM::ProgressItem ,
unsigned  int 
) [signal]

Emitted when the progress value of an item changes.

Parameters:
The item which got a new value.
The value, for convenience.

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:
The completed item.

void KPIM::ProgressItem::progressItemCanceled ( KPIM::ProgressItem  )  [signal]

Emitted when an item was cancelled.

It will _not_ go away immediately, only when the owner sets it complete, which will usually happen. Can be used to visually indicate the cancelled status of an item. Should be used by the owner of the item to make sure it is set completed even if it is cancelled. 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:
The canceled item;

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:
The updated item.
The new message.

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:
The updated item.
The new label.

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:
The updated item.
The new state.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys