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