summaryrefslogtreecommitdiffabout
path: root/kmicromail/viewmailbase.cpp
authorzautrix <zautrix>2005-01-24 12:16:16 (UTC)
committer zautrix <zautrix>2005-01-24 12:16:16 (UTC)
commitd4f5ce1bedd03191da5ecef2dc68381c10ef1fba (patch) (unidiff)
tree2d6860078083e588f8f365b308ee4ffb2c34f1c1 /kmicromail/viewmailbase.cpp
parent485a6b28e3be6437742852970fdd122ba071b726 (diff)
downloadkdepimpi-d4f5ce1bedd03191da5ecef2dc68381c10ef1fba.zip
kdepimpi-d4f5ce1bedd03191da5ecef2dc68381c10ef1fba.tar.gz
kdepimpi-d4f5ce1bedd03191da5ecef2dc68381c10ef1fba.tar.bz2
more imap fixes
Diffstat (limited to 'kmicromail/viewmailbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/viewmailbase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index c4731a7..d21696a 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -1,104 +1,104 @@
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 reply = new QAction(i18n("Reply"),SmallIcon("reply"), 0, 0, this); 31 reply = new QAction(i18n("Reply"),SmallIcon("reply"), 0, 0, this);
32 reply->addTo(toolbar); 32 reply->addTo(toolbar);
33 reply->addTo(mailmenu); 33 reply->addTo(mailmenu);
34 34
35 forward = new QAction(i18n("Forward"),SmallIcon("forward"), 0, 0, this); 35 forward = new QAction(i18n("Forward"),SmallIcon("forward"), 0, 0, this);
36 forward->addTo(toolbar); 36 forward->addTo(toolbar);
37 forward->addTo(mailmenu); 37 forward->addTo(mailmenu);
38 38
39 attachbutton = new QAction(i18n("Attachments"),SmallIcon("attach"), 0, 0, this, 0, true); 39 attachbutton = new QAction(i18n("Attachments"),SmallIcon("attach"), 0, 0, this, 0, true);
40 attachbutton->addTo(toolbar); 40 attachbutton->addTo(toolbar);
41 attachbutton->addTo(mailmenu); 41 attachbutton->addTo(mailmenu);
42 connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); 42 connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool)));
43 43
44 44
45 showHtml = new QAction( i18n( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true ); 45 showHtml = new QAction( i18n( "Show Html" ), SmallIcon( "html" ), 0, 0, this, 0, true );
46 showHtml->addTo( toolbar ); 46 showHtml->addTo( toolbar );
47 showHtml->addTo( mailmenu ); 47 showHtml->addTo( mailmenu );
48 48
49 deleteMail = new QAction(i18n("Delete Mail"),SmallIcon("trash"), 0, 0, this); 49 deleteMail = new QAction(i18n("Delete Mail"),SmallIcon("trash"), 0, 0, this);
50 deleteMail->addTo(toolbar); 50 deleteMail->addTo(toolbar);
51 deleteMail->addTo(mailmenu); 51 deleteMail->addTo(mailmenu);
52 52
53 53
54 54
55 nextMail = new QAction(i18n("Show next mail"),SmallIcon("add"), 0, 0, this); 55 nextMail = new QAction(i18n("Show next mail"),SmallIcon("enter"), 0, 0, this);
56 QLabel *spacer = new QLabel(toolbar); 56 QLabel *spacer = new QLabel(toolbar);
57 nextMail->addTo(toolbar); 57 nextMail->addTo(toolbar);
58 nextMail->addTo(mailmenu); 58 nextMail->addTo(mailmenu);
59 59
60 60
61 61
62 62
63 closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); 63 closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
64 //QLabel *spacer = new QLabel(toolbar); 64 //QLabel *spacer = new QLabel(toolbar);
65 spacer->setBackgroundMode(QWidget::PaletteButton); 65 spacer->setBackgroundMode(QWidget::PaletteButton);
66 toolbar->setStretchableWidget(spacer); 66 toolbar->setStretchableWidget(spacer);
67 closeMail->addTo(toolbar); 67 closeMail->addTo(toolbar);
68 closeMail->addTo(mailmenu); 68 closeMail->addTo(mailmenu);
69 QVBox *view = new QVBox(this); 69 QVBox *view = new QVBox(this);
70 setCentralWidget(view); 70 setCentralWidget(view);
71 71
72 attachments = new QListView(view); 72 attachments = new QListView(view);
73 attachments->setMinimumHeight(90); 73 attachments->setMinimumHeight(90);
74 attachments->setMaximumHeight(90); 74 attachments->setMaximumHeight(90);
75 attachments->setAllColumnsShowFocus(true); 75 attachments->setAllColumnsShowFocus(true);
76 attachments->addColumn("Mime Type", 60); 76 attachments->addColumn("Mime Type", 60);
77 attachments->addColumn(i18n("Description"), 100); 77 attachments->addColumn(i18n("Description"), 100);
78 attachments->addColumn(i18n("Filename"), 80); 78 attachments->addColumn(i18n("Filename"), 80);
79 attachments->addColumn(i18n("Size"), 80); 79 attachments->addColumn(i18n("Size"), 80);
80 attachments->setSorting(-1); 80 attachments->setSorting(-1);
81 attachments->hide(); 81 attachments->hide();
82 82
83 browser = new QTextBrowser(view); 83 browser = new QTextBrowser(view);
84 84
85 //openDiag = new OpenDiag(view); 85 //openDiag = new OpenDiag(view);
86 //openDiag->hide(); 86 //openDiag->hide();
87 87
88} 88}
89 89
90void ViewMailBase::slotChangeAttachview(bool state) 90void ViewMailBase::slotChangeAttachview(bool state)
91{ 91{
92 if (state) attachments->show(); 92 if (state) attachments->show();
93 else attachments->hide(); 93 else attachments->hide();
94} 94}
95 95
96void ViewMailBase::keyPressEvent ( QKeyEvent * e ) 96void ViewMailBase::keyPressEvent ( QKeyEvent * e )
97{ 97{
98 if( e->key()==Qt::Key_Escape ) { 98 if( e->key()==Qt::Key_Escape ) {
99 close(); 99 close();
100 e->accept(); 100 e->accept();
101 return; 101 return;
102 } 102 }
103 QWidget::keyPressEvent(e); 103 QWidget::keyPressEvent(e);
104} 104}