summaryrefslogtreecommitdiffabout
path: root/kmicromail/viewmailbase.cpp
Unidiff
Diffstat (limited to 'kmicromail/viewmailbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/viewmailbase.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index d21696a..9365c23 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -1,94 +1,102 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2#include <qtextbrowser.h> 2#include <qtextbrowser.h>
3#include <qlistview.h> 3#include <qlistview.h>
4#include <qaction.h> 4#include <qaction.h>
5#include <qlabel.h> 5#include <qlabel.h>
6#include <qvbox.h> 6#include <qvbox.h>
7 7
8#include <qtoolbar.h> 8#include <qtoolbar.h>
9#include <qmenubar.h> 9#include <qmenubar.h>
10#include <kiconloader.h> 10#include <kiconloader.h>
11//#include <qpe/resource.h> 11//#include <qpe/resource.h>
12#include <klocale.h> 12#include <klocale.h>
13 13
14#include "viewmailbase.h" 14#include "viewmailbase.h"
15//#include "opendiag.h" 15//#include "opendiag.h"
16 16
17ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) 17ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
18 : QMainWindow(parent, name, fl) 18 : QMainWindow(parent, name, fl)
19{ 19{
20 20
21 setToolBarsMovable(false); 21 setToolBarsMovable(false);
22 22
23 toolbar = new QToolBar(this); 23 toolbar = new QToolBar(this);
24 menubar = new QMenuBar( toolbar ); 24 menubar = new QMenuBar( toolbar );
25 mailmenu = new QPopupMenu( menubar ); 25 mailmenu = new QPopupMenu( menubar );
26 menubar->insertItem( i18n( "Mail" ), mailmenu ); 26 menubar->insertItem( i18n( "Mail" ), mailmenu );
27 27
28 toolbar->setHorizontalStretchable(true); 28 toolbar->setHorizontalStretchable(true);
29 addToolBar(toolbar); 29 addToolBar(toolbar);
30 30
31 viewSource = new QAction(i18n("View Source"), 0, 0, this);
32 viewSource->addTo(mailmenu);
33
34 downloadMail= new QAction(i18n("Download Mail"),SmallIcon("add"), 0, 0, this);
35 downloadMail->addTo(toolbar);
36 downloadMail->addTo(mailmenu);
37
38
31 reply = new QAction(i18n("Reply"),SmallIcon("reply"), 0, 0, this); 39 reply = new QAction(i18n("Reply"),SmallIcon("reply"), 0, 0, this);
32 reply->addTo(toolbar); 40 reply->addTo(toolbar);
33 reply->addTo(mailmenu); 41 reply->addTo(mailmenu);
34 42
35 forward = new QAction(i18n("Forward"),SmallIcon("forward"), 0, 0, this); 43 forward = new QAction(i18n("Forward"),SmallIcon("forward"), 0, 0, this);
36 forward->addTo(toolbar); 44 forward->addTo(toolbar);
37 forward->addTo(mailmenu); 45 forward->addTo(mailmenu);
38 46
39 attachbutton = new QAction(i18n("Attachments"),SmallIcon("attach"), 0, 0, this, 0, true); 47 attachbutton = new QAction(i18n("Attachments"),SmallIcon("attach"), 0, 0, this, 0, true);
40 attachbutton->addTo(toolbar); 48 attachbutton->addTo(toolbar);
41 attachbutton->addTo(mailmenu); 49 attachbutton->addTo(mailmenu);
42 connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); 50 connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool)));
43 51
44 52
45 showHtml = new QAction( i18n( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true ); 53 showHtml = new QAction( i18n( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true );
46 showHtml->addTo( toolbar ); 54 showHtml->addTo( toolbar );
47 showHtml->addTo( mailmenu ); 55 showHtml->addTo( mailmenu );
48 56
49 deleteMail = new QAction(i18n("Delete Mail"),SmallIcon("trash"), 0, 0, this); 57 deleteMail = new QAction(i18n("Delete Mail"),SmallIcon("trash"), 0, 0, this);
50 deleteMail->addTo(toolbar); 58 deleteMail->addTo(toolbar);
51 deleteMail->addTo(mailmenu); 59 deleteMail->addTo(mailmenu);
52 60
53 61
54 62
55 nextMail = new QAction(i18n("Show next mail"),SmallIcon("enter"), 0, 0, this); 63 nextMail = new QAction(i18n("Show next mail"),SmallIcon("enter"), 0, 0, this);
56 QLabel *spacer = new QLabel(toolbar); 64 QLabel *spacer = new QLabel(toolbar);
57 nextMail->addTo(toolbar); 65 nextMail->addTo(toolbar);
58 nextMail->addTo(mailmenu); 66 nextMail->addTo(mailmenu);
59 67
60 68
61 69
62 70
63 closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); 71 closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
64 //QLabel *spacer = new QLabel(toolbar); 72 //QLabel *spacer = new QLabel(toolbar);
65 spacer->setBackgroundMode(QWidget::PaletteButton); 73 spacer->setBackgroundMode(QWidget::PaletteButton);
66 toolbar->setStretchableWidget(spacer); 74 toolbar->setStretchableWidget(spacer);
67 closeMail->addTo(toolbar); 75 closeMail->addTo(toolbar);
68 closeMail->addTo(mailmenu); 76 closeMail->addTo(mailmenu);
69 QVBox *view = new QVBox(this); 77 QVBox *view = new QVBox(this);
70 setCentralWidget(view); 78 setCentralWidget(view);
71 79
72 attachments = new QListView(view); 80 attachments = new QListView(view);
73 attachments->setMinimumHeight(90); 81 attachments->setMinimumHeight(90);
74 attachments->setMaximumHeight(90); 82 attachments->setMaximumHeight(90);
75 attachments->setAllColumnsShowFocus(true); 83 attachments->setAllColumnsShowFocus(true);
76 attachments->addColumn("Mime Type", 60); 84 attachments->addColumn("Mime Type", 60);
77 attachments->addColumn(i18n("Description"), 100); 85 attachments->addColumn(i18n("Description"), 100);
78 attachments->addColumn(i18n("Filename"), 80); 86 attachments->addColumn(i18n("Filename"), 80);
79 attachments->addColumn(i18n("Size"), 80); 87 attachments->addColumn(i18n("Size"), 80);
80 attachments->setSorting(-1); 88 attachments->setSorting(-1);
81 attachments->hide(); 89 attachments->hide();
82 90
83 browser = new QTextBrowser(view); 91 browser = new QTextBrowser(view);
84 92
85 //openDiag = new OpenDiag(view); 93 //openDiag = new OpenDiag(view);
86 //openDiag->hide(); 94 //openDiag->hide();
87 95
88} 96}
89 97
90void ViewMailBase::slotChangeAttachview(bool state) 98void ViewMailBase::slotChangeAttachview(bool state)
91{ 99{
92 if (state) attachments->show(); 100 if (state) attachments->show();
93 else attachments->hide(); 101 else attachments->hide();
94} 102}