Diffstat (limited to 'noncore/unsupported/mail2/viewmailbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mail2/viewmailbase.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/noncore/unsupported/mail2/viewmailbase.cpp b/noncore/unsupported/mail2/viewmailbase.cpp index b650c88..a02f73a 100644 --- a/noncore/unsupported/mail2/viewmailbase.cpp +++ b/noncore/unsupported/mail2/viewmailbase.cpp | |||
@@ -1,50 +1,60 @@ | |||
1 | #include <qtextbrowser.h> | 1 | #include <qtextbrowser.h> |
2 | #include <qlistview.h> | 2 | #include <qlistview.h> |
3 | #include <qaction.h> | 3 | #include <qaction.h> |
4 | #include <qlabel.h> | 4 | #include <qlabel.h> |
5 | #include <qvbox.h> | 5 | #include <qvbox.h> |
6 | #include <qpopupmenu.h> | ||
6 | 7 | ||
7 | #include <qpe/qpetoolbar.h> | 8 | #include <qpe/qpetoolbar.h> |
9 | #include <qpe/qpemenubar.h> | ||
8 | #include <qpe/resource.h> | 10 | #include <qpe/resource.h> |
9 | 11 | ||
10 | #include "viewmailbase.h" | 12 | #include "viewmailbase.h" |
11 | #include "opendiag.h" | 13 | #include "opendiag.h" |
12 | 14 | ||
13 | ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) | 15 | ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) |
14 | : QMainWindow(parent, name, fl) | 16 | : QMainWindow(parent, name, fl) |
15 | { | 17 | { |
16 | setCaption(tr("E-Mail by %1")); | 18 | setCaption(tr("E-Mail by %1")); |
17 | setToolBarsMovable(false); | 19 | setToolBarsMovable(false); |
18 | 20 | ||
19 | toolbar = new QPEToolBar(this); | 21 | toolbar = new QPEToolBar(this); |
22 | menubar = new QPEMenuBar( toolbar ); | ||
23 | mailmenu = new QPopupMenu( menubar ); | ||
24 | menubar->insertItem( tr( "Mail" ), mailmenu ); | ||
25 | |||
20 | toolbar->setHorizontalStretchable(true); | 26 | toolbar->setHorizontalStretchable(true); |
21 | addToolBar(toolbar); | 27 | addToolBar(toolbar); |
22 | 28 | ||
29 | QLabel *spacer = new QLabel(toolbar); | ||
30 | spacer->setBackgroundMode(QWidget::PaletteButton); | ||
31 | toolbar->setStretchableWidget(spacer); | ||
32 | |||
23 | reply = new QAction(tr("Reply"), QIconSet(Resource::loadPixmap("mail/reply")), 0, 0, this); | 33 | reply = new QAction(tr("Reply"), QIconSet(Resource::loadPixmap("mail/reply")), 0, 0, this); |
24 | reply->addTo(toolbar); | 34 | reply->addTo(toolbar); |
35 | reply->addTo(mailmenu); | ||
25 | 36 | ||
26 | forward = new QAction(tr("Forward"), QIconSet(Resource::loadPixmap("mail/forward")), 0, 0, this); | 37 | forward = new QAction(tr("Forward"), QIconSet(Resource::loadPixmap("mail/forward")), 0, 0, this); |
27 | forward->addTo(toolbar); | 38 | forward->addTo(toolbar); |
39 | forward->addTo(mailmenu); | ||
28 | 40 | ||
29 | attachbutton = new QAction(tr("Attachments"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); | 41 | attachbutton = new QAction(tr("Attachments"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); |
30 | attachbutton->addTo(toolbar); | 42 | attachbutton->addTo(toolbar); |
43 | attachbutton->addTo(mailmenu); | ||
31 | connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); | 44 | connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); |
32 | 45 | ||
33 | deleteMail = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); | 46 | deleteMail = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); |
34 | deleteMail->addTo(toolbar); | 47 | deleteMail->addTo(toolbar); |
35 | 48 | deleteMail->addTo(mailmenu); | |
36 | QLabel *spacer = new QLabel(toolbar); | ||
37 | spacer->setBackgroundMode(QWidget::PaletteButton); | ||
38 | toolbar->setStretchableWidget(spacer); | ||
39 | 49 | ||
40 | QVBox *view = new QVBox(this); | 50 | QVBox *view = new QVBox(this); |
41 | setCentralWidget(view); | 51 | setCentralWidget(view); |
42 | 52 | ||
43 | attachments = new QListView(view); | 53 | attachments = new QListView(view); |
44 | attachments->setMinimumHeight(90); | 54 | attachments->setMinimumHeight(90); |
45 | attachments->setMaximumHeight(90); | 55 | attachments->setMaximumHeight(90); |
46 | attachments->setAllColumnsShowFocus(true); | 56 | attachments->setAllColumnsShowFocus(true); |
47 | attachments->addColumn("Mime Type", 100); | 57 | attachments->addColumn("Mime Type", 100); |
48 | attachments->addColumn("Filename", 100); | 58 | attachments->addColumn("Filename", 100); |
49 | attachments->addColumn("Description", 100); | 59 | attachments->addColumn("Description", 100); |
50 | attachments->hide(); | 60 | attachments->hide(); |