kmail
KMFolderMgr Class Reference
#include <kmfoldermgr.h>
Public Slots | |
void | compactAll () |
void | expireAll () |
void | removeFolderAux (KMFolder *obsoleteFolder, bool success) |
void | slotRenameDone (QString newName, bool success) |
Signals | |
void | changed () |
void | folderAdded (KMFolder *) |
void | folderInvalidated (KMFolder *) |
void | folderMoveOrCopyOperationFinished () |
void | folderRemoved (KMFolder *) |
void | msgAdded (KMFolder *, Q_UINT32) |
void | msgChanged (KMFolder *, Q_UINT32, int delta) |
void | msgHeaderChanged (KMFolder *, int idx) |
void | msgRemoved (KMFolder *, Q_UINT32) |
Public Member Functions | |
QString | basePath () const |
void | compactAllFolders (bool immediate, KMFolderDir *adir=0) |
virtual void | contentsChanged (void) |
void | copyFolder (KMFolder *folder, KMFolderDir *newParent) |
virtual KMFolder * | createFolder (const QString &fName, bool sysFldr=FALSE, KMFolderType aFolderType=KMFolderTypeMbox, KMFolderDir *aFolderDir=0) |
virtual void | createFolderList (QStringList *str, QValueList< QGuardedPtr< KMFolder > > *folders, KMFolderDir *adir, const QString &prefix, bool i18nized=FALSE) |
virtual void | createFolderList (QStringList *str, QValueList< QGuardedPtr< KMFolder > > *folders) |
virtual void | createI18nFolderList (QStringList *str, QValueList< QGuardedPtr< KMFolder > > *folders) |
uint | createId () |
KMFolderRootDir & | dir () |
void | expireAllFolders (bool immediate, KMFolderDir *adir=0) |
virtual KMFolder * | find (const QString &folderName, bool foldersOnly=TRUE) |
virtual KMFolder * | findById (const uint id) |
virtual KMFolder * | findIdString (const QString &folderId, const uint id=0, KMFolderDir *dir=0) |
virtual KMFolder * | findOrCreate (const QString &folderName, bool sysFldr=TRUE, const uint id=0) |
int | folderCount (KMFolderDir *dir=0) |
virtual KMFolder * | getFolderByURL (const QString &vpath, const QString &prefix=QString::null, KMFolderDir *adir=0) |
virtual void | getFolderURLS (QStringList &flist, const QString &prefix=QString::null, KMFolderDir *adir=0) |
KMFolderMgr (const QString &basePath, KMFolderDirType dirType=KMStandardDir) | |
void | moveFolder (KMFolder *folder, KMFolderDir *newParent) |
KMFolder * | parentFolder (KMFolder *folder) |
void | quiet (bool) |
virtual void | reload (void) |
virtual void | remove (KMFolder *obsoleteFolder) |
void | renameFolder (KMFolder *folder, const QString &newName, KMFolderDir *newParent=0) |
virtual void | setBasePath (const QString &) |
void | syncAllFolders (KMFolderDir *adir=0) |
void | tryReleasingFolder (KMFolder *folder, KMFolderDir *Dir=0) |
virtual | ~KMFolderMgr () |
Protected Member Functions | |
void | removeDirAux (KMFolderDir *aFolderDir) |
void | removeFolder (KMFolder *aFolder) |
Protected Attributes | |
QString | mBasePath |
bool | mChanged |
KMFolderRootDir | mDir |
int | mQuiet |
KMFolder * | mRemoveOrig |
Detailed Description
Definition at line 16 of file kmfoldermgr.h.
Constructor & Destructor Documentation
KMFolderMgr::KMFolderMgr | ( | const QString & | basePath, | |
KMFolderDirType | dirType = KMStandardDir | |||
) |
Definition at line 41 of file kmfoldermgr.cpp.
KMFolderMgr::~KMFolderMgr | ( | ) | [virtual] |
Definition at line 54 of file kmfoldermgr.cpp.
Member Function Documentation
QString KMFolderMgr::basePath | ( | ) | const [inline] |
void KMFolderMgr::changed | ( | ) | [signal] |
Emitted when the list of folders has changed.
This signal is a hook where clients like the KMFolderTree tree-view can connect. The signal is meant to be emitted whenever the code using the folder-manager changed things.
void KMFolderMgr::compactAll | ( | ) | [inline, slot] |
GUI action: compact all folders that need to be compacted.
Definition at line 129 of file kmfoldermgr.h.
void KMFolderMgr::compactAllFolders | ( | bool | immediate, | |
KMFolderDir * | adir = 0 | |||
) |
Compact all folders that need to be, either immediately or scheduled as a background task.
Definition at line 111 of file kmfoldermgr.cpp.
void KMFolderMgr::contentsChanged | ( | void | ) | [virtual] |
void KMFolderMgr::copyFolder | ( | KMFolder * | folder, | |
KMFolderDir * | newParent | |||
) |
KMFolder * KMFolderMgr::createFolder | ( | const QString & | fName, | |
bool | sysFldr = FALSE , |
|||
KMFolderType | aFolderType = KMFolderTypeMbox , |
|||
KMFolderDir * | aFolderDir = 0 | |||
) | [virtual] |
Create a mail folder in the root folder directory dir() with given name.
Returns Folder on success.
Definition at line 177 of file kmfoldermgr.cpp.
void KMFolderMgr::createFolderList | ( | QStringList * | str, | |
QValueList< QGuardedPtr< KMFolder > > * | folders, | |||
KMFolderDir * | adir, | |||
const QString & | prefix, | |||
bool | i18nized = FALSE | |||
) | [virtual] |
Auxillary function to facilitate creating a list of formatted folder names, suitable for showing in QComboBox.
Definition at line 467 of file kmfoldermgr.cpp.
void KMFolderMgr::createFolderList | ( | QStringList * | str, | |
QValueList< QGuardedPtr< KMFolder > > * | folders | |||
) | [virtual] |
Create a list of formatted formatted folder labels and corresponding folders.
Definition at line 453 of file kmfoldermgr.cpp.
void KMFolderMgr::createI18nFolderList | ( | QStringList * | str, | |
QValueList< QGuardedPtr< KMFolder > > * | folders | |||
) | [virtual] |
Create a list of formatted formatted folder labels and corresponding folders.
The system folder names are translated
Definition at line 460 of file kmfoldermgr.cpp.
uint KMFolderMgr::createId | ( | ) |
KMFolderRootDir & KMFolderMgr::dir | ( | void | ) |
void KMFolderMgr::expireAll | ( | ) | [slot] |
void KMFolderMgr::expireAllFolders | ( | bool | immediate, | |
KMFolderDir * | adir = 0 | |||
) |
Expire old messages in all folders, either immediately or scheduled as a background task.
Check each folder in turn to see if it is configured to AutoExpire.
If so, expire old messages.
Should be called with 0 first time around.
Definition at line 512 of file kmfoldermgr.cpp.
Searches folder and returns it.
Skips directories (objects of type KMFolderDir) if foldersOnly is TRUE.
Definition at line 222 of file kmfoldermgr.cpp.
KMFolder * KMFolderMgr::findById | ( | const uint | id | ) | [virtual] |
Searches folder by id and returns it.
Skips directories (objects of type KMFolderDir)
Definition at line 235 of file kmfoldermgr.cpp.
KMFolder * KMFolderMgr::findIdString | ( | const QString & | folderId, | |
const uint | id = 0 , |
|||
KMFolderDir * | dir = 0 | |||
) | [virtual] |
Searches for a folder with the given id, recurses into directories.
Definition at line 241 of file kmfoldermgr.cpp.
KMFolder * KMFolderMgr::findOrCreate | ( | const QString & | folderName, | |
bool | sysFldr = TRUE , |
|||
const uint | id = 0 | |||
) | [virtual] |
Uses find() to find given folder.
If not found the folder is created. Directories are skipped. If an id is passed this searches for it
Definition at line 301 of file kmfoldermgr.cpp.
void KMFolderMgr::folderAdded | ( | KMFolder * | ) | [signal] |
Emitted, when a folder has been added.
int KMFolderMgr::folderCount | ( | KMFolderDir * | dir = 0 |
) |
void KMFolderMgr::folderInvalidated | ( | KMFolder * | ) | [signal] |
Emitted, when serial numbers for a folder have been invalidated.
void KMFolderMgr::folderMoveOrCopyOperationFinished | ( | ) | [signal] |
Emitted when a folder has been moved or copied.
void KMFolderMgr::folderRemoved | ( | KMFolder * | ) | [signal] |
Emitted, when a folder is about to be removed.
KMFolder * KMFolderMgr::getFolderByURL | ( | const QString & | vpath, | |
const QString & | prefix = QString::null , |
|||
KMFolderDir * | adir = 0 | |||
) | [virtual] |
Definition at line 279 of file kmfoldermgr.cpp.
void KMFolderMgr::getFolderURLS | ( | QStringList & | flist, | |
const QString & | prefix = QString::null , |
|||
KMFolderDir * | adir = 0 | |||
) | [virtual] |
Definition at line 264 of file kmfoldermgr.cpp.
void KMFolderMgr::moveFolder | ( | KMFolder * | folder, | |
KMFolderDir * | newParent | |||
) |
void KMFolderMgr::msgAdded | ( | KMFolder * | , | |
Q_UINT32 | ||||
) | [signal] |
Emitted, when a message has been appended to a folder.
void KMFolderMgr::msgChanged | ( | KMFolder * | , | |
Q_UINT32 | , | |||
int | delta | |||
) | [signal] |
Emitted, when the status of a message is changed.
void KMFolderMgr::msgHeaderChanged | ( | KMFolder * | , | |
int | idx | |||
) | [signal] |
Emitted when a field of the header of a specific message changed.
void KMFolderMgr::msgRemoved | ( | KMFolder * | , | |
Q_UINT32 | ||||
) | [signal] |
Emitted, when a message has been removed from a folder.
Returns the parent Folder for the given folder or 0 on failure.
Definition at line 369 of file kmfoldermgr.cpp.
void KMFolderMgr::quiet | ( | bool | beQuiet | ) |
void KMFolderMgr::reload | ( | void | ) | [virtual] |
void KMFolderMgr::remove | ( | KMFolder * | obsoleteFolder | ) | [virtual] |
Physically remove given folder and delete the given folder object.
Definition at line 340 of file kmfoldermgr.cpp.
void KMFolderMgr::removeDirAux | ( | KMFolderDir * | aFolderDir | ) | [protected] |
Auxillary function to facilitate removal of a folder directory.
Definition at line 423 of file kmfoldermgr.cpp.
void KMFolderMgr::removeFolder | ( | KMFolder * | aFolder | ) | [protected] |
Auxillary function to facilitate removal of a folder.
Definition at line 362 of file kmfoldermgr.cpp.
void KMFolderMgr::removeFolderAux | ( | KMFolder * | obsoleteFolder, | |
bool | success | |||
) | [slot] |
Called from KMFolder::remove when the folderstorage was removed.
Definition at line 385 of file kmfoldermgr.cpp.
void KMFolderMgr::renameFolder | ( | KMFolder * | folder, | |
const QString & | newName, | |||
KMFolderDir * | newParent = 0 | |||
) |
void KMFolderMgr::setBasePath | ( | const QString & | aBasePath | ) | [virtual] |
Set base path.
Also calls reload() on the base directory.
Definition at line 128 of file kmfoldermgr.cpp.
void KMFolderMgr::slotRenameDone | ( | QString | newName, | |
bool | success | |||
) | [slot] |
void KMFolderMgr::syncAllFolders | ( | KMFolderDir * | adir = 0 |
) |
void KMFolderMgr::tryReleasingFolder | ( | KMFolder * | folder, | |
KMFolderDir * | Dir = 0 | |||
) |
Try closing folder
if possible, something is attempting an exclusive access to it.
Currently used for KMFolderSearch and the background tasks like expiry
Definition at line 544 of file kmfoldermgr.cpp.
Member Data Documentation
QString KMFolderMgr::mBasePath [protected] |
Definition at line 179 of file kmfoldermgr.h.
bool KMFolderMgr::mChanged [protected] |
Definition at line 182 of file kmfoldermgr.h.
KMFolderRootDir KMFolderMgr::mDir [protected] |
Definition at line 180 of file kmfoldermgr.h.
int KMFolderMgr::mQuiet [protected] |
Definition at line 181 of file kmfoldermgr.h.
KMFolder* KMFolderMgr::mRemoveOrig [protected] |
Definition at line 183 of file kmfoldermgr.h.
The documentation for this class was generated from the following files: