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