IdentityManager Class Reference
Manages the list of identities. More...
#include <identitymanager.h>
Inheritance diagram for IdentityManager:

Public Types | |
typedef QValueList< KMIdentity >::Iterator | Iterator |
typedef QValueList< KMIdentity >::ConstIterator | ConstIterator |
Signals | |
void | changed (uint uoid) |
void | changed (const KMIdentity &ident) |
void | deleted (uint uoid) |
void | added (const KMIdentity &ident) |
Public Methods | |
void | commit () |
void | rollback () |
bool | hasPendingChanges () const |
QStringList | identities () const |
QStringList | shadowIdentities () const |
void | sort () |
const KMIdentity & | identityForAddress (const QString &addresses) const |
bool | thatIsMe (const QString &addressList) const |
const KMIdentity & | identityForName (const QString &identityName) const |
const KMIdentity & | identityForUoid (uint uoid) const |
const KMIdentity & | identityForNameOrDefault (const QString &identityName) const |
const KMIdentity & | identityForUoidOrDefault (uint uoid) const |
const KMIdentity & | defaultIdentity () const |
bool | setAsDefault (const QString &identityName) |
bool | setAsDefault (uint uoid) |
KMIdentity & | identityForName (const QString &identityName) |
KMIdentity & | identityForUoid (uint uoid) |
bool | removeIdentity (const QString &identityName) |
ConstIterator | begin () const |
ConstIterator | end () const |
Iterator | begin () |
Iterator | end () |
KMIdentity & | newFromScratch (const QString &name) |
KMIdentity & | newFromControlCenter (const QString &name) |
KMIdentity & | newFromExisting (const KMIdentity &other, const QString &name=QString::null) |
Protected Methods | |
IdentityManager (QObject *parent=0, const char *name=0) | |
virtual | ~IdentityManager () |
Protected Attributes | |
QValueList< KMIdentity > | mIdentities |
QValueList< KMIdentity > | mShadowIdentities |
Friends | |
class | KMKernel |
Detailed Description
Manages the list of identities.
- Author:
- Marc Mutz <mutz@kde.org>
Definition at line 46 of file identitymanager.h.
Member Function Documentation
|
Commit changes to disk and emit changed() if necessary.
Implements ConfigManager. Definition at line 82 of file identitymanager.cpp. References added(), QValueList::begin(), QValueList< KMIdentity >::begin(), ConfigManager::changed(), deleted(), QValueList::end(), QValueList< KMIdentity >::end(), QValueList::find(), hasPendingChanges(), identityForUoid(), mIdentities, mShadowIdentities, and QValueList::remove(). |
|
Re-read the config from disk and forget changes.
Implements ConfigManager. Definition at line 124 of file identitymanager.cpp. References mIdentities, and mShadowIdentities. |
|
Check whether there are any unsaved changes.
Implements ConfigManager. Definition at line 129 of file identitymanager.cpp. References mIdentities, and mShadowIdentities. Referenced by commit(). |
|
Definition at line 134 of file identitymanager.cpp. References QValueList< KMIdentity >::begin(), QValueList< KMIdentity >::end(), and mIdentities. |
|
Convenience method.
Definition at line 143 of file identitymanager.cpp. References QValueList< KMIdentity >::begin(), QValueList< KMIdentity >::end(), and mShadowIdentities. Referenced by setAsDefault(). |
|
Sort the identities by name (the default is always first). This operates on the shadow list, so you need to commit for the changes to take effect. Definition at line 155 of file identitymanager.cpp. References mShadowIdentities. Referenced by setAsDefault(). |
|
Definition at line 263 of file identitymanager.cpp. Referenced by thatIsMe(). |
|
Definition at line 280 of file identitymanager.cpp. References identityForAddress(), and KMIdentity::isNull(). |
|
Definition at line 230 of file identitymanager.cpp. Referenced by identityForNameOrDefault(). |
|
Definition at line 239 of file identitymanager.cpp. Referenced by commit(), and identityForUoidOrDefault(). |
|
Definition at line 245 of file identitymanager.cpp. References defaultIdentity(), identityForName(), and KMIdentity::isNull(). |
|
Convenience menthod.
Definition at line 254 of file identitymanager.cpp. References defaultIdentity(), identityForUoid(), and KMIdentity::isNull(). |
|
Definition at line 302 of file identitymanager.cpp. References QValueList< KMIdentity >::isEmpty(), and mIdentities. Referenced by identityForNameOrDefault(), and identityForUoidOrDefault(). |
|
Definition at line 310 of file identitymanager.cpp. References shadowIdentities(), and sort(). |
|
Sets the identity with Unique Object Identifier (UOID) As usual, use commit to make this permanent.
Definition at line 322 of file identitymanager.cpp. References QValueList< KMIdentity >::begin(), QValueList< KMIdentity >::end(), mShadowIdentities, and sort(). |
|
Definition at line 284 of file identitymanager.cpp. |
|
Definition at line 293 of file identitymanager.cpp. |
|
Removes the identity with name
Definition at line 341 of file identitymanager.cpp. References QValueList< KMIdentity >::first(), mShadowIdentities, and QValueList< KMIdentity >::remove(). |
|
Emitted whenever the identity with Unique Object Identifier (UOID) Useful for more fine-grained change notifications than what is possible with the standard changed() signal. |
|
Emitted whenever the identity Useful for more fine-grained change notifications than what is possible with the standard changed() signal. |
|
Emitted on commit() for each deleted identity. At the time this signal is emitted, the identity does still exist and can be retrieved by identityForUoid() if needed Referenced by commit(). |
|
Emitted on commit() for each new identity.
Referenced by commit(). |
Member Data Documentation
|
The list that will be seen by everyone.
Definition at line 186 of file identitymanager.h. Referenced by commit(), defaultIdentity(), hasPendingChanges(), identities(), and rollback(). |
|
The list that will be seen by the config dialog.
Definition at line 188 of file identitymanager.h. Referenced by commit(), hasPendingChanges(), removeIdentity(), rollback(), setAsDefault(), shadowIdentities(), and sort(). |
The documentation for this class was generated from the following files: