You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdepim/kmail/kmfolderseldlg.h

76 lines
2.2 KiB

/* KMail Folder Selection Dialog
* Pops up a small window with a list of folders and Ok/Cancel buttons.
* Author: Stefan Taferner <taferner@kde.org>
* Carsten Burghardt <burghardt@kde.org>
*/
#ifndef kmfolderseldlg_h
#define kmfolderseldlg_h
#include <kdialogbase.h>
#include <simplefoldertree.h>
#include <tqvaluelist.h>
#include <tqguardedptr.h>
class KMFolder;
class KMFolderTree;
class KMMainWidget;
class SimpleFolderTree;
namespace KMail {
//-----------------------------------------------------------------------------
class KMFolderSelDlg: public KDialogBase
{
Q_OBJECT
TQ_OBJECT
public:
/**
* Constructor with KMMainWidget
* @p tqparent @em must be a KMMainWin, because we
* need its foldertree.
* @param mustBeReadWrite if true, readonly folders are disabled
* @param useGlobalSettings if true, the current folder is read and
* written to GlobalSettings
*/
KMFolderSelDlg( KMMainWidget * tqparent, const TQString& caption,
bool mustBeReadWrite, bool useGlobalSettings = true );
/**
* Constructor with separate KMFolderTree
* @param mustBeReadWrite if true, readonly folders are disabled
* @param useGlobalSettings if true, the current folder is read and
* written to GlobalSettings
*/
KMFolderSelDlg( TQWidget * tqparent, KMFolderTree * tree,
const TQString& caption, bool mustBeReadWrite,
bool useGlobalSettings = true );
virtual ~KMFolderSelDlg();
/** Returns selected folder */
virtual KMFolder* folder( void );
/** Set selected folder */
void setFolder( KMFolder* folder );
/** Set some flags what folders to show and what not */
void setFlags( bool mustBeReadWrite, bool showOutbox, bool showImapFolders );
protected slots:
void slotSelect();
void slotUser1();
void slotUpdateBtntqStatus();
protected:
void readConfig();
void writeConfig();
/** Init the dialog */
void init();
SimpleFolderTree * mTreeView;
bool mUseGlobalSettings;
};
} // namespace KMail
#endif /*kmfolderseldlg_h*/