kmail

renamejob.h
1/*
2 * Copyright (c) 2004 Carsten Burghardt <burghardt@kde.org>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 *
17 * In addition, as a special exception, the copyright holders give
18 * permission to link the code of this program with any edition of
19 * the TQt library by Trolltech AS, Norway (or with modified versions
20 * of TQt that use the same license as TQt), and distribute linked
21 * combinations including the two. You must obey the GNU General
22 * Public License in all respects for all of the code used other than
23 * TQt. If you modify this file, you may extend this exception to
24 * your version of the file, but you are not obligated to do so. If
25 * you do not wish to do so, delete this exception statement from
26 * your version.
27 */
28#ifndef RENAMEJOB_H
29#define RENAMEJOB_H
30
31#include "folderjob.h"
32
33class FolderStorage;
34class KMFolderDir;
35class KMFolder;
36class KMCommand;
37
38namespace TDEIO {
39 class Job;
40}
41
42namespace KMail {
43
44class CopyFolderJob;
45
51class RenameJob : public FolderJob
52{
53 TQ_OBJECT
54
55public:
62 RenameJob( FolderStorage* storage, const TQString& newName,
63 KMFolderDir* newParent = 0 );
64
65 virtual ~RenameJob();
66
67 virtual void execute();
68
69protected slots:
71 void slotRenameResult( TDEIO::Job* job );
72
74 void folderCopyComplete( bool success );
75
76signals:
78 void renameDone( TQString newName, bool success );
79
80protected:
81 FolderStorage* mStorage;
82 FolderStorage* mStorageTempOpened;
83 KMFolderDir* mNewParent;
84 TQString mNewName;
85 TQString mNewImapPath;
86 TQString mOldName;
87 TQString mOldImapPath;
88 TQStringList mOldImapPaths;
89 KMFolder* mNewFolder;
90 CopyFolderJob *mCopyFolderJob;
91};
92
93} // namespace KMail
94
95#endif /* RENAMEJOB_H */
96
The FolderStorage class is the bass class for the storage related aspects of a collection of mail (a ...
Definition: folderstorage.h:80
KMail list that manages the contents of one directory that may contain folders and/or other directori...
Definition: kmfolderdir.h:16
Mail folder.
Definition: kmfolder.h:69
Copy a hierarchy of folders somewhere else in the folder tree.
Definition: copyfolderjob.h:51
Rename and move (d)imap folders They can be moved everywhere (except search folders) as a new folder ...
Definition: renamejob.h:52
void folderCopyComplete(bool success)
All messages are copied so remove the original folder.
Definition: renamejob.cpp:190
RenameJob(FolderStorage *storage, const TQString &newName, KMFolderDir *newParent=0)
Create a new job.
Definition: renamejob.cpp:71
void renameDone(TQString newName, bool success)
Emitted when the job is done, check the success bool.
void slotRenameResult(TDEIO::Job *job)
Rename the folder.
Definition: renamejob.cpp:157
folderdiaquotatab.h
Definition: aboutdata.cpp:40