00001 #ifndef COMPOSEMAIL_H 00002 #define COMPOSEMAIL_H 00003 00004 #include <qlineedit.h> 00005 #include <qlistview.h> 00006 00007 #include "composemailui.h" 00008 #include "addresspickerui.h" 00009 #include <libmailwrapper/settings.h> 00010 #include <libmailwrapper/mailwrapper.h> 00011 00012 class RecMail; 00013 00014 #include <opie2/osmartpointer.h> 00015 00016 class AddressPicker : public AddressPickerUI 00017 { 00018 Q_OBJECT 00019 00020 public: 00021 AddressPicker( QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 ); 00022 static QString getNames(); 00023 00024 protected: 00025 QString selectedNames; 00026 void accept(); 00027 00028 }; 00029 00030 class RecMail; 00031 00032 class ComposeMail : public ComposeMailUI 00033 { 00034 Q_OBJECT 00035 00036 public: 00037 ComposeMail( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 ); 00038 virtual ~ComposeMail(); 00039 00040 void reEditMail(const Opie::Core::OSmartPointer<RecMail>¤t); 00041 00042 public slots: 00043 void slotAdjustColumns(); 00044 00045 void setTo( const QString & to ); 00046 void setSubject( const QString & subject ); 00047 void setInReplyTo( const QString & messageId ); 00048 void setMessage( const QString & text ); 00049 00050 protected slots: 00051 void accept(); 00052 void reject(); 00053 00054 private slots: 00055 void fillValues( int current ); 00056 void pickAddress( QLineEdit *line ); 00057 void pickAddressTo(); 00058 void pickAddressCC(); 00059 void pickAddressBCC(); 00060 void pickAddressReply(); 00061 void addAttachment(); 00062 void removeAttachment(); 00063 00064 protected: 00065 Settings *settings; 00066 QList<SMTPaccount> smtpAccounts; 00067 QString m_replyid; 00068 }; 00069 00070 class AttachViewItem : public QListViewItem 00071 { 00072 public: 00073 AttachViewItem( QListView *parent, Attachment *att ); 00074 Attachment *getAttachment() { return attachment; } 00075 00076 private: 00077 Attachment *attachment; 00078 00079 }; 00080 00081 #endif
1.4.2