15 #ifndef __KMAIL_SIEVECONFIG_H__
16 #define __KMAIL_SIEVECONFIG_H__
31 SieveConfig(
bool managesieveSupported=
false,
bool reuseConfig=
true,
32 unsigned int port=2000,
const KURL & alternateURL=KURL(),
33 const TQString& vacationFileName = TQString() )
34 : mManagesieveSupported( managesieveSupported ),
35 mReuseConfig( reuseConfig ),
37 mAlternateURL( alternateURL ),
38 mVacationFileName( vacationFileName ) {}
40 SieveConfig(
const SieveConfig & other )
41 : mManagesieveSupported( other.managesieveSupported() ),
42 mReuseConfig( other.reuseConfig() ),
43 mPort( other.port() ),
44 mAlternateURL( other.alternateURL() ),
45 mVacationFileName( other.vacationFileName() ) {}
47 bool managesieveSupported()
const {
48 return mManagesieveSupported;
50 void setManagesieveSupported(
bool enable ) {
51 mManagesieveSupported = enable;
54 bool reuseConfig()
const {
57 void setReuseConfig(
bool reuse ) {
61 unsigned short port()
const {
64 void setPort(
unsigned short port ) {
68 KURL alternateURL()
const {
71 void setAlternateURL(
const KURL & url ) {
75 TQString vacationFileName()
const {
return mVacationFileName; }
77 void readConfig(
const TDEConfigBase & config );
78 void writeConfig( TDEConfigBase & config )
const;
81 bool mManagesieveSupported;
85 TQString mVacationFileName;
88 class SieveConfigEditor :
public TQWidget {
92 SieveConfigEditor( TQWidget * parent=0,
const char * name=0 );
94 bool managesieveSupported()
const;
95 virtual void setManagesieveSupported(
bool enable );
97 bool reuseConfig()
const;
98 virtual void setReuseConfig(
bool reuse );
100 unsigned short port()
const;
101 virtual void setPort(
unsigned short port );
103 KURL alternateURL()
const;
104 virtual void setAlternateURL(
const KURL & url );
106 TQString vacationFileName()
const;
107 virtual void setVacationFileName(
const TQString & url );
109 SieveConfig config()
const {
110 return SieveConfig( managesieveSupported(), reuseConfig(),
111 port(), alternateURL(), vacationFileName() );
114 virtual void setConfig(
const SieveConfig & config );
117 void slotEnableWidgets();
120 TQCheckBox * mManagesieveCheck;
121 TQCheckBox * mSameConfigCheck;
122 KIntSpinBox * mPortSpin;
123 TQLineEdit * mAlternateURLEdit;
124 TQString mVacationFileName;