kmail

kmfolderseldlg.h

00001 /* KMail Folder Selection Dialog
00002  * Pops up a small window with a list of folders and Ok/Cancel buttons.
00003  * Author: Stefan Taferner <taferner@kde.org>
00004  *         Carsten Burghardt <burghardt@kde.org>
00005  */
00006 #ifndef kmfolderseldlg_h
00007 #define kmfolderseldlg_h
00008 
00009 #include <kdialogbase.h>
00010 #include <simplefoldertree.h>
00011 #include <tqvaluelist.h>
00012 #include <tqguardedptr.h>
00013 
00014 class KMFolder;
00015 class KMFolderTree;
00016 class KMMainWidget;
00017 class SimpleFolderTree;
00018 
00019 namespace KMail {
00020   //-----------------------------------------------------------------------------
00021   class KMFolderSelDlg: public KDialogBase
00022   {
00023     Q_OBJECT
00024   TQ_OBJECT
00025 
00026     public:
00035       KMFolderSelDlg( KMMainWidget * parent, const TQString& caption, 
00036           bool mustBeReadWrite, bool useGlobalSettings = true );
00043       KMFolderSelDlg( TQWidget * parent, KMFolderTree * tree,
00044           const TQString& caption, bool mustBeReadWrite, 
00045           bool useGlobalSettings = true );
00046 
00047       virtual ~KMFolderSelDlg();
00048 
00050       virtual KMFolder* folder( void );
00051 
00053       void setFolder( KMFolder* folder );
00054 
00056       void setFlags( bool mustBeReadWrite, bool showOutbox, bool showImapFolders );
00057 
00058     protected slots:
00059       void slotSelect();
00060       void slotUser1();
00061       void slotUpdateBtnStatus();
00062 
00063     protected:
00064       void readConfig();
00065       void writeConfig();
00067       void init();
00068 
00069       SimpleFolderTree * mTreeView;
00070       bool mUseGlobalSettings;
00071   };
00072 
00073 } // namespace KMail
00074 
00075 #endif /*kmfolderseldlg_h*/