summaryrefslogtreecommitdiffabout
path: root/kmicromail/viewmail.h
Unidiff
Diffstat (limited to 'kmicromail/viewmail.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/viewmail.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h
index 561989e..fc5edcf 100644
--- a/kmicromail/viewmail.h
+++ b/kmicromail/viewmail.h
@@ -1,91 +1,93 @@
1#ifndef VIEWMAIL_H 1#ifndef VIEWMAIL_H
2#define VIEWMAIL_H 2#define VIEWMAIL_H
3 3
4#include "viewmailbase.h" 4#include "viewmailbase.h"
5#include <libmailwrapper/mailtypes.h> 5#include <libmailwrapper/mailtypes.h>
6 6
7#include <qdialog.h> 7#include <qdialog.h>
8#include <qapplication.h>
8 9
9#include <qlistview.h> 10#include <qlistview.h>
10#include <qmap.h> 11#include <qmap.h>
12#include <klocale.h>
11#include <qstringlist.h> 13#include <qstringlist.h>
12#include <qvaluelist.h> 14#include <qvaluelist.h>
13 15
14//namespace Opie { namespace MM { class OImageScrollView; } } 16//namespace Opie { namespace MM { class OImageScrollView; } }
15 17
16class AttachItem : public QListViewItem 18class AttachItem : public QListViewItem
17{ 19{
18public: 20public:
19 AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, 21 AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file,
20 const QString&fsize,int num,const QValueList<int>&path); 22 const QString&fsize,int num,const QValueList<int>&path);
21 AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, 23 AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file,
22 const QString&fsize,int num,const QValueList<int>&path); 24 const QString&fsize,int num,const QValueList<int>&path);
23 int Partnumber() { return _partNum; } 25 int Partnumber() { return _partNum; }
24 bool isParentof(const QValueList<int>&path); 26 bool isParentof(const QValueList<int>&path);
25 27
26private: 28private:
27 int _partNum; 29 int _partNum;
28 /* needed for a better display of attachments */ 30 /* needed for a better display of attachments */
29 QValueList<int> _path; 31 QValueList<int> _path;
30}; 32};
31 33
32class ViewMail : public ViewMailBase 34class ViewMail : public ViewMailBase
33{ 35{
34 Q_OBJECT 36 Q_OBJECT
35 37
36public: 38public:
37 ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = 0); 39 ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
38 ~ViewMail(); 40 ~ViewMail();
39 41
40 void hide(); 42 void hide();
41 void exec(); 43 void exec();
42 void setMail(const RecMailP&mail ); 44 void setMail(const RecMailP&mail );
43 void setBody(const RecBodyP&body); 45 void setBody(const RecBodyP&body);
44 bool deleted; 46 bool deleted;
45 signals: 47 signals:
46 void showNextMail(ViewMail*); 48 void showNextMail(ViewMail*);
47 void deleteAndDisplayNextMail(ViewMail *); 49 void deleteAndDisplayNextMail(ViewMail *);
48 void signalDownloadMail(); 50 void signalDownloadMail();
49protected: 51protected:
50 QString deHtml(const QString &string); 52 QString deHtml(const QString &string);
51 AttachItem* searchParent(const QValueList<int>&path); 53 AttachItem* searchParent(const QValueList<int>&path);
52 AttachItem* lastChild(AttachItem*parent); 54 AttachItem* lastChild(AttachItem*parent);
53 55
54protected slots: 56protected slots:
55 void slotNextMail() { emit showNextMail(this); }; 57 void slotNextMail() { setCaption(i18n("Displaying next mail...please wait!")); qApp->processEvents();emit showNextMail(this); };
56 void slotReply(); 58 void slotReply();
57 void slotForward(); 59 void slotForward();
58 void setText(); 60 void setText();
59 void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); 61 void slotItemClicked( QListViewItem * item , const QPoint & point, int c );
60 void slotDeleteMail( ); 62 void slotDeleteMail( );
61 void slotShowHtml( bool ); 63 void slotShowHtml( bool );
62 void slotViewSource(); 64 void slotViewSource();
63 65
64private: 66private:
65 void readConfig(); 67 void readConfig();
66 bool sourceOn;; 68 bool sourceOn;;
67 bool _inLoop; 69 bool _inLoop;
68 QString m_mailHtml; 70 QString m_mailHtml;
69 bool m_gotBody; 71 bool m_gotBody;
70 RecBodyP m_body; 72 RecBodyP m_body;
71 RecMailP m_recMail; 73 RecMailP m_recMail;
72 bool m_showHtml; 74 bool m_showHtml;
73 75
74 // 0 from 1 subject 2 bodytext 3 date 76 // 0 from 1 subject 2 bodytext 3 date
75 QMap <int,QString> m_mail; 77 QMap <int,QString> m_mail;
76 // 0 to 1 cc 2 bcc 78 // 0 to 1 cc 2 bcc
77 QMap <int,QStringList> m_mail2; 79 QMap <int,QStringList> m_mail2;
78}; 80};
79 81
80class MailImageDlg:public QDialog 82class MailImageDlg:public QDialog
81{ 83{
82 Q_OBJECT 84 Q_OBJECT
83public: 85public:
84 MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0); 86 MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0);
85 ~MailImageDlg(); 87 ~MailImageDlg();
86 void setName(const QString&); 88 void setName(const QString&);
87protected: 89protected:
88 //Opie::MM::OImageScrollView*m_imageview; 90 //Opie::MM::OImageScrollView*m_imageview;
89}; 91};
90 92
91#endif 93#endif