summaryrefslogtreecommitdiffabout
path: root/kmicromail/viewmailbase.cpp
authorzautrix <zautrix>2004-08-06 22:27:51 (UTC)
committer zautrix <zautrix>2004-08-06 22:27:51 (UTC)
commit81a027fdb113968401105258cf89b56b96987103 (patch) (unidiff)
tree1e5e91873d80618f296190c64bf4c056a3a79ea2 /kmicromail/viewmailbase.cpp
parentc07b730f8f38aabf365a67578df6140080824f10 (diff)
downloadkdepimpi-81a027fdb113968401105258cf89b56b96987103.zip
kdepimpi-81a027fdb113968401105258cf89b56b96987103.tar.gz
kdepimpi-81a027fdb113968401105258cf89b56b96987103.tar.bz2
SOme change logs
Diffstat (limited to 'kmicromail/viewmailbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/viewmailbase.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index 584a0ac..705b57f 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -1,91 +1,92 @@
1// CHANGED 2004-08-06 Lutz Rogowski
1#include <qtextbrowser.h> 2#include <qtextbrowser.h>
2#include <qlistview.h> 3#include <qlistview.h>
3#include <qaction.h> 4#include <qaction.h>
4#include <qlabel.h> 5#include <qlabel.h>
5#include <qvbox.h> 6#include <qvbox.h>
6 7
7#include <qtoolbar.h> 8#include <qtoolbar.h>
8#include <qmenubar.h> 9#include <qmenubar.h>
9#include <kiconloader.h> 10#include <kiconloader.h>
10//#include <qpe/resource.h> 11//#include <qpe/resource.h>
11 12
12#include "viewmailbase.h" 13#include "viewmailbase.h"
13//#include "opendiag.h" 14//#include "opendiag.h"
14 15
15ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) 16ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
16 : QMainWindow(parent, name, fl) 17 : QMainWindow(parent, name, fl)
17{ 18{
18 19
19 setToolBarsMovable(false); 20 setToolBarsMovable(false);
20 21
21 toolbar = new QToolBar(this); 22 toolbar = new QToolBar(this);
22 menubar = new QMenuBar( toolbar ); 23 menubar = new QMenuBar( toolbar );
23 mailmenu = new QPopupMenu( menubar ); 24 mailmenu = new QPopupMenu( menubar );
24 menubar->insertItem( tr( "Mail" ), mailmenu ); 25 menubar->insertItem( tr( "Mail" ), mailmenu );
25 26
26 toolbar->setHorizontalStretchable(true); 27 toolbar->setHorizontalStretchable(true);
27 addToolBar(toolbar); 28 addToolBar(toolbar);
28 29
29 reply = new QAction(tr("Reply"),SmallIcon("reply"), 0, 0, this); 30 reply = new QAction(tr("Reply"),SmallIcon("reply"), 0, 0, this);
30 reply->addTo(toolbar); 31 reply->addTo(toolbar);
31 reply->addTo(mailmenu); 32 reply->addTo(mailmenu);
32 33
33 forward = new QAction(tr("Forward"),SmallIcon("forward"), 0, 0, this); 34 forward = new QAction(tr("Forward"),SmallIcon("forward"), 0, 0, this);
34 forward->addTo(toolbar); 35 forward->addTo(toolbar);
35 forward->addTo(mailmenu); 36 forward->addTo(mailmenu);
36 37
37 attachbutton = new QAction(tr("Attachments"),SmallIcon("attach"), 0, 0, this, 0, true); 38 attachbutton = new QAction(tr("Attachments"),SmallIcon("attach"), 0, 0, this, 0, true);
38 attachbutton->addTo(toolbar); 39 attachbutton->addTo(toolbar);
39 attachbutton->addTo(mailmenu); 40 attachbutton->addTo(mailmenu);
40 connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); 41 connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool)));
41 42
42 43
43 showHtml = new QAction( tr( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true ); 44 showHtml = new QAction( tr( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true );
44 showHtml->addTo( toolbar ); 45 showHtml->addTo( toolbar );
45 showHtml->addTo( mailmenu ); 46 showHtml->addTo( mailmenu );
46 47
47 deleteMail = new QAction(tr("Delete Mail"),SmallIcon("trash"), 0, 0, this); 48 deleteMail = new QAction(tr("Delete Mail"),SmallIcon("trash"), 0, 0, this);
48 deleteMail->addTo(toolbar); 49 deleteMail->addTo(toolbar);
49 deleteMail->addTo(mailmenu); 50 deleteMail->addTo(mailmenu);
50 closeMail = new QAction(tr("Close"),SmallIcon("exit"), 0, 0, this); 51 closeMail = new QAction(tr("Close"),SmallIcon("exit"), 0, 0, this);
51 QLabel *spacer = new QLabel(toolbar); 52 QLabel *spacer = new QLabel(toolbar);
52 spacer->setBackgroundMode(QWidget::PaletteButton); 53 spacer->setBackgroundMode(QWidget::PaletteButton);
53 toolbar->setStretchableWidget(spacer); 54 toolbar->setStretchableWidget(spacer);
54 closeMail->addTo(toolbar); 55 closeMail->addTo(toolbar);
55 closeMail->addTo(mailmenu); 56 closeMail->addTo(mailmenu);
56 QVBox *view = new QVBox(this); 57 QVBox *view = new QVBox(this);
57 setCentralWidget(view); 58 setCentralWidget(view);
58 59
59 attachments = new QListView(view); 60 attachments = new QListView(view);
60 attachments->setMinimumHeight(90); 61 attachments->setMinimumHeight(90);
61 attachments->setMaximumHeight(90); 62 attachments->setMaximumHeight(90);
62 attachments->setAllColumnsShowFocus(true); 63 attachments->setAllColumnsShowFocus(true);
63 attachments->addColumn("Mime Type", 60); 64 attachments->addColumn("Mime Type", 60);
64 attachments->addColumn(tr("Description"), 100); 65 attachments->addColumn(tr("Description"), 100);
65 attachments->addColumn(tr("Filename"), 80); 66 attachments->addColumn(tr("Filename"), 80);
66 attachments->addColumn(tr("Size"), 80); 67 attachments->addColumn(tr("Size"), 80);
67 attachments->setSorting(-1); 68 attachments->setSorting(-1);
68 attachments->hide(); 69 attachments->hide();
69 70
70 browser = new QTextBrowser(view); 71 browser = new QTextBrowser(view);
71 72
72 //openDiag = new OpenDiag(view); 73 //openDiag = new OpenDiag(view);
73 //openDiag->hide(); 74 //openDiag->hide();
74 75
75} 76}
76 77
77void ViewMailBase::slotChangeAttachview(bool state) 78void ViewMailBase::slotChangeAttachview(bool state)
78{ 79{
79 if (state) attachments->show(); 80 if (state) attachments->show();
80 else attachments->hide(); 81 else attachments->hide();
81} 82}
82 83
83void ViewMailBase::keyPressEvent ( QKeyEvent * e ) 84void ViewMailBase::keyPressEvent ( QKeyEvent * e )
84{ 85{
85 if( e->key()==Qt::Key_Escape ) { 86 if( e->key()==Qt::Key_Escape ) {
86 close(); 87 close();
87 e->accept(); 88 e->accept();
88 return; 89 return;
89 } 90 }
90 QWidget::keyPressEvent(e); 91 QWidget::keyPressEvent(e);
91} 92}