kmail
kmfolderseldlg.hGo to the documentation of this file.00001
00002
00003
00004
00005
00006 #ifndef kmfolderseldlg_h
00007 #define kmfolderseldlg_h
00008
00009 #include <kdialogbase.h>
00010 #include <kfoldertree.h>
00011
00012 class KMFolder;
00013 class KMFolderTree;
00014 class KMMainWidget;
00015
00016 namespace KMail {
00017
00018 class SimpleFolderTree : public KFolderTree
00019 {
00020 Q_OBJECT
00021
00022 public:
00023 SimpleFolderTree( QWidget * parent, KMFolderTree * folderTree,
00024 const QString & preSelection, bool mustBeReadWrite );
00025
00027 void reload( bool mustBeReadWrite, bool showOutbox, bool showImapFolders,
00028 const QString& preSelection = QString::null );
00029
00031 const KMFolder * folder() const;
00032
00034 void setFolder( KMFolder* );
00035 void setFolder( const QString& idString );
00036
00038 void applyFilter( const QString& filter );
00039
00040 public slots:
00041 void addChildFolder();
00042
00043 protected slots:
00044 void slotContextMenuRequested( QListViewItem *, const QPoint & );
00045 virtual void recolorRows();
00046
00047 protected:
00049 virtual void readColorConfig(void);
00050 virtual void keyPressEvent( QKeyEvent *e );
00051
00053 friend class KMFolderSelDlg;
00054 int mFolderColumn;
00055 int mPathColumn;
00056
00057 private:
00058 KMFolderTree* mFolderTree;
00059 QString mFilter;
00060 bool mLastMustBeReadWrite;
00061 bool mLastShowOutbox;
00062 bool mLastShowImapFolders;
00063 };
00064
00065
00066 class KMFolderSelDlg: public KDialogBase
00067 {
00068 Q_OBJECT
00069
00070 public:
00079 KMFolderSelDlg( KMMainWidget * parent, const QString& caption,
00080 bool mustBeReadWrite, bool useGlobalSettings = true );
00087 KMFolderSelDlg( QWidget * parent, KMFolderTree * tree,
00088 const QString& caption, bool mustBeReadWrite,
00089 bool useGlobalSettings = true );
00090
00091 virtual ~KMFolderSelDlg();
00092
00094 virtual KMFolder* folder( void );
00095
00097 void setFolder( KMFolder* folder );
00098
00100 void setFlags( bool mustBeReadWrite, bool showOutbox, bool showImapFolders );
00101
00102 protected slots:
00103 void slotSelect();
00104 void slotUser1();
00105 void slotUpdateBtnStatus();
00106
00107 protected:
00108 void readConfig();
00109 void writeConfig();
00111 void init();
00112
00113 SimpleFolderTree * mTreeView;
00114 bool mUseGlobalSettings;
00115 };
00116
00117 }
00118
00119 #endif
|