summaryrefslogtreecommitdiffabout
path: root/kmicromail/viewmailbase.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kmicromail/viewmailbase.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kmicromail/viewmailbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/viewmailbase.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index 3bb964e..371ee91 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -1,38 +1,41 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2#include <qtextbrowser.h> 2#include <q3textbrowser.h>
3#include <qlistview.h> 3#include <q3listview.h>
4#include <qaction.h> 4#include <qaction.h>
5#include <qlabel.h> 5#include <qlabel.h>
6#include <qvbox.h> 6#include <q3vbox.h>
7#include <qapplication.h> 7#include <qapplication.h>
8 8
9#include <qtoolbar.h> 9#include <q3toolbar.h>
10#include <qmenubar.h> 10#include <qmenubar.h>
11//Added by qt3to4:
12#include <QKeyEvent>
13#include <Q3PopupMenu>
11#include <kiconloader.h> 14#include <kiconloader.h>
12//#include <qpe/resource.h> 15//#include <qpe/resource.h>
13#include <klocale.h> 16#include <klocale.h>
14 17
15#include "viewmailbase.h" 18#include "viewmailbase.h"
16//#include "opendiag.h" 19//#include "opendiag.h"
17 20
18ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) 21ViewMailBase::ViewMailBase(QWidget *parent, const char *name, Qt::WFlags fl)
19 : QMainWindow(parent, name, fl) 22 : Q3MainWindow(parent, name, fl)
20{ 23{
21 24
22 setToolBarsMovable(false); 25 setToolBarsMovable(false);
23 26
24 toolbar = new QToolBar(this); 27 toolbar = new Q3ToolBar(this);
25 menubar = new QMenuBar( toolbar ); 28 menubar = new QMenuBar( toolbar );
26 mailmenu = new QPopupMenu( menubar ); 29 mailmenu = new Q3PopupMenu( menubar );
27 menubar->insertItem( i18n( "Mail" ), mailmenu ); 30 menubar->insertItem( i18n( "Mail" ), mailmenu );
28 31
29 toolbar->setHorizontalStretchable(true); 32 toolbar->setHorizontalStretchable(true);
30 addToolBar(toolbar); 33 addToolBar(toolbar);
31 34
32 viewSource = new QAction(i18n("View Source"), 0, 0, this); 35 viewSource = new QAction(i18n("View Source"), 0, 0, this);
33 viewSource->addTo(mailmenu); 36 viewSource->addTo(mailmenu);
34 37
35 downloadMail= new QAction(i18n("Download Mail"),SmallIcon("add"), 0, 0, this); 38 downloadMail= new QAction(i18n("Download Mail"),SmallIcon("add"), 0, 0, this);
36 downloadMail->addTo(toolbar); 39 downloadMail->addTo(toolbar);
37 downloadMail->addTo(mailmenu); 40 downloadMail->addTo(mailmenu);
38 41
@@ -60,41 +63,41 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
60 63
61 nextMail = new QAction(i18n("Show next mail"),SmallIcon("enter"), 0, 0, this); 64 nextMail = new QAction(i18n("Show next mail"),SmallIcon("enter"), 0, 0, this);
62 QLabel *spacer = new QLabel(toolbar); 65 QLabel *spacer = new QLabel(toolbar);
63 nextMail->addTo(toolbar); 66 nextMail->addTo(toolbar);
64 nextMail->addTo(mailmenu); 67 nextMail->addTo(mailmenu);
65 68
66 closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); 69 closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
67 //QLabel *spacer = new QLabel(toolbar); 70 //QLabel *spacer = new QLabel(toolbar);
68 spacer->setBackgroundMode(QWidget::PaletteButton); 71 spacer->setBackgroundMode(QWidget::PaletteButton);
69 toolbar->setStretchableWidget(spacer); 72 toolbar->setStretchableWidget(spacer);
70 closeMail->addTo(toolbar); 73 closeMail->addTo(toolbar);
71 closeMail->addTo(mailmenu); 74 closeMail->addTo(mailmenu);
72 QVBox *view = new QVBox(this); 75 Q3VBox *view = new Q3VBox(this);
73 setCentralWidget(view); 76 setCentralWidget(view);
74 77
75 attachments = new QListView(view); 78 attachments = new Q3ListView(view);
76 int fixh = 100; 79 int fixh = 100;
77 if ( QApplication::desktop()->width() > 320 ) 80 if ( QApplication::desktop()->width() > 320 )
78 fixh = 200; 81 fixh = 200;
79 attachments->setFixedHeight(fixh); 82 attachments->setFixedHeight(fixh);
80 attachments->setAllColumnsShowFocus(true); 83 attachments->setAllColumnsShowFocus(true);
81 attachments->addColumn("Mime Type", fixh-30); 84 attachments->addColumn("Mime Type", fixh-30);
82 attachments->addColumn(i18n("Description"), 100); 85 attachments->addColumn(i18n("Description"), 100);
83 attachments->addColumn(i18n("Filename"), 80); 86 attachments->addColumn(i18n("Filename"), 80);
84 attachments->addColumn(i18n("Size"), 80); 87 attachments->addColumn(i18n("Size"), 80);
85 attachments->setSorting(-1); 88 attachments->setSorting(-1);
86 attachments->hide(); 89 attachments->hide();
87 90
88 browser = new QTextBrowser(view); 91 browser = new Q3TextBrowser(view);
89 92
90 //openDiag = new OpenDiag(view); 93 //openDiag = new OpenDiag(view);
91 //openDiag->hide(); 94 //openDiag->hide();
92 95
93} 96}
94 97
95void ViewMailBase::slotChangeAttachview(bool state) 98void ViewMailBase::slotChangeAttachview(bool state)
96{ 99{
97 if (state) attachments->show(); 100 if (state) attachments->show();
98 else attachments->hide(); 101 else attachments->hide();
99} 102}
100 103