00001
00002
00003
00004
#ifndef kmmsgpartdlg_h
00005
#define kmmsgpartdlg_h
00006
00007
#include <kdialogbase.h>
00008
#include <kio/global.h>
00009
00010
class KMMessagePart;
00011
class QPushButton;
00012
class KComboBox;
00013
class QComboBox;
00014
class QCheckBox;
00015
class QLabel;
00016
class QLineEdit;
00017
00018
#undef None
00019
00023 class KMMsgPartDialog:
public KDialogBase
00024 {
00025 Q_OBJECT
00026
00027
public:
00028
KMMsgPartDialog(
const QString & caption=QString::null,
00029
QWidget * parent=0,
const char * name=0 );
00030
virtual ~
KMMsgPartDialog();
00031
00033
QString mimeType()
const;
00035
void setMimeType(
const QString & type,
const QString & subtype );
00041
void setMimeType(
const QString & mimeType );
00044
void setMimeTypeList(
const QStringList & mimeTypes );
00045
00049
void setSize( KIO::filesize_t size,
bool estimated=
false );
00050
00054
QString fileName()
const;
00058
void setFileName(
const QString & fileName );
00059
00062
QString description()
const;
00065
void setDescription(
const QString & description );
00066
00068 enum Encoding {
00069 None = 0x00,
00070 SevenBit = 0x01,
00071 EightBit = 0x02,
00072 QuotedPrintable = 0x04,
00073 Base64 = 0x08
00074 };
00075
00077 Encoding
encoding() const;
00079
void setEncoding( Encoding encoding );
00082
void setShownEncodings(
int encodings );
00083
00086
bool isInline() const;
00089
void setInline(
bool inlined );
00090
00092
bool isEncrypted() const;
00094
void setEncrypted(
bool encrypted );
00096
void setCanEncrypt(
bool enable );
00097
00099
bool isSigned() const;
00101
void setSigned(
bool sign );
00103
void setCanSign(
bool enable );
00104
00105 protected slots:
00106
void slotMimeTypeChanged( const
QString & mimeType );
00107
00108 protected:
00109 KComboBox *mMimeType;
00110
QLabel *mIcon;
00111
QLabel *mSize;
00112
QLineEdit *mFileName;
00113
QLineEdit *mDescription;
00114
QComboBox *mEncoding;
00115
QCheckBox *mInline;
00116
QCheckBox *mEncrypted;
00117
QCheckBox *mSigned;
00118
QStringList mI18nizedEncodings;
00119
bool mReadOnly;
00120 };
00121
00125 class
KMMsgPartDialogCompat : public
KMMsgPartDialog {
00126 Q_OBJECT
00127
public:
00128
KMMsgPartDialogCompat(
const char * caption=0,
bool=FALSE );
00129
virtual ~
KMMsgPartDialogCompat();
00130
00132
void setMsgPart(KMMessagePart* msgPart);
00133
00135 KMMessagePart* msgPart(
void)
const {
return mMsgPart; }
00136
00137
protected slots:
00138
void slotOk();
00139
00140
protected:
00143
void applyChanges(
void);
00144
00145 KMMessagePart *mMsgPart;
00146 };
00147
00148
#endif