kmail Library API Documentation

KMail::RenameJob Class Reference

Rename and move (d)imap folders They can be moved everywhere (except search folders) as a new folder is created, all messages are moved there and the original folder is deleted. More...

#include <renamejob.h>

Collaboration diagram for KMail::RenameJob:

Collaboration graph
[legend]
List of all members.

Signals

void renameDone (QString newName, bool success)

Public Member Functions

 RenameJob (FolderStorage *storage, const QString &newName, KMFolderDir *newParent=0)
virtual void execute ()

Protected Slots

void slotRenameResult (KIO::Job *job)
void slotMoveMessages ()
void slotMoveCompleted (KMCommand *command)

Protected Attributes

FolderStoragemStorage
KMFolderDirmNewParent
QString mNewName
QString mNewImapPath
QString mOldName
QString mOldImapPath
KMFoldermNewFolder

Detailed Description

Rename and move (d)imap folders They can be moved everywhere (except search folders) as a new folder is created, all messages are moved there and the original folder is deleted.

Definition at line 49 of file renamejob.h.


Constructor & Destructor Documentation

RenameJob::RenameJob FolderStorage storage,
const QString newName,
KMFolderDir newParent = 0
 

Create a new job.

Parameters:
storage the folder that should be renames
newName the new name of the folder
newParent the new parent if the folder should be moved, else 0

Definition at line 56 of file renamejob.cpp.

References FolderStorage::folderType().


Member Function Documentation

void RenameJob::slotRenameResult KIO::Job *  job  )  [protected, slot]
 

Rename the folder.

Definition at line 181 of file renamejob.cpp.

References FolderStorage::folderType(), FolderStorage::rename(), and renameDone().

void RenameJob::slotMoveMessages  )  [protected, slot]
 

Move all messages from the original folder to mNewFolder.

Definition at line 214 of file renamejob.cpp.

References FolderStorage::getMsgBase(), and slotMoveCompleted().

void RenameJob::slotMoveCompleted KMCommand *  command  )  [protected, slot]
 

All messages are moved so remove the original folder.

Definition at line 240 of file renamejob.cpp.

References FolderStorage::folder(), KMFolder::folderType(), FolderStorage::folderType(), KMFolder::idString(), KMFolder::readConfig(), renameDone(), and KMFolder::storage().

Referenced by slotMoveMessages().

void KMail::RenameJob::renameDone QString  newName,
bool  success
[signal]
 

Emitted when the job is done, check the success bool.

Referenced by slotMoveCompleted(), and slotRenameResult().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kmail Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jan 31 15:55:35 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003