kmail
copyfolderjob.h
Go to the documentation of this file.00001 00028 #ifndef COPYFOLDERJOB_H 00029 #define COPYFOLDERJOB_H 00030 00031 #include "folderjob.h" 00032 00033 #include <qguardedptr.h> 00034 00035 class FolderStorage; 00036 class KMFolderDir; 00037 class KMFolder; 00038 class KMCommand; 00039 00040 class KMFolderNode; 00041 00042 namespace KMail { 00043 00050 class CopyFolderJob : public FolderJob 00051 { 00052 Q_OBJECT 00053 public: 00059 CopyFolderJob( FolderStorage* const storage, KMFolderDir* const newParent = 0 ); 00060 00061 virtual ~CopyFolderJob(); 00062 00063 virtual void execute(); 00064 00068 KMFolder* targetFolder() const { return mNewFolder; } 00069 00070 protected slots: 00071 00073 bool createTargetDir(); 00074 00076 void copyMessagesToTargetDir(); 00077 00080 void slotCopyCompleted( KMCommand *command ); 00081 00084 void slotCopyNextChild( bool success = true ); 00085 00089 void rollback(); 00090 00094 void folderCreationDone( const QString &name, bool success ); 00095 00096 signals: 00098 void folderCopyComplete( bool success ); 00099 00100 protected: 00101 QGuardedPtr<FolderStorage> const mStorage; 00102 KMFolderDir* const mNewParent; 00103 QGuardedPtr<KMFolder> mNewFolder; 00104 QPtrListIterator<KMFolderNode> mChildFolderNodeIterator; 00105 KMFolder* mNextChildFolder; 00106 }; 00107 00108 } // namespace KMail 00109 00110 #endif /* COPYFOLDERJOB_H */