Diffstat (limited to 'noncore/unsupported/mail2/composerbase.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/mail2/composerbase.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/noncore/unsupported/mail2/composerbase.cpp b/noncore/unsupported/mail2/composerbase.cpp index 6627701..ff00a73 100644 --- a/noncore/unsupported/mail2/composerbase.cpp +++ b/noncore/unsupported/mail2/composerbase.cpp | |||
@@ -1,56 +1,65 @@ | |||
1 | #include <qmultilineedit.h> | 1 | #include <qmultilineedit.h> |
2 | #include <qpopupmenu.h> | 2 | #include <qpopupmenu.h> |
3 | #include <qcombobox.h> | 3 | #include <qcombobox.h> |
4 | #include <qlineedit.h> | 4 | #include <qlineedit.h> |
5 | #include <qlayout.h> | 5 | #include <qlayout.h> |
6 | #include <qaction.h> | 6 | #include <qaction.h> |
7 | #include <qlabel.h> | 7 | #include <qlabel.h> |
8 | #include <qvbox.h> | 8 | #include <qvbox.h> |
9 | 9 | ||
10 | #include <qpe/qpetoolbar.h> | 10 | #include <qpe/qpetoolbar.h> |
11 | #include <qpe/qpemenubar.h> | ||
11 | #include <qpe/resource.h> | 12 | #include <qpe/resource.h> |
12 | 13 | ||
13 | #include "listviewplus.h" | 14 | #include "listviewplus.h" |
14 | #include "composerbase.h" | 15 | #include "composerbase.h" |
15 | 16 | ||
16 | ComposerBase::ComposerBase(QWidget *parent, const char *name, WFlags fl) | 17 | ComposerBase::ComposerBase(QWidget *parent, const char *name, WFlags fl) |
17 | : QMainWindow(parent, name, fl) | 18 | : QMainWindow(parent, name, fl) |
18 | { | 19 | { |
19 | setCaption(tr("Compose Message")); | 20 | setCaption(tr("Compose Message")); |
20 | setToolBarsMovable(false); | 21 | setToolBarsMovable(false); |
21 | 22 | ||
22 | toolbar = new QPEToolBar(this); | 23 | toolbar = new QPEToolBar(this); |
24 | menubar = new QPEMenuBar( toolbar ); | ||
25 | mailmenu = new QPopupMenu( menubar ); | ||
26 | menubar->insertItem( tr( "Mail" ), mailmenu ); | ||
23 | addToolBar(toolbar); | 27 | addToolBar(toolbar); |
24 | toolbar->setHorizontalStretchable(true); | 28 | toolbar->setHorizontalStretchable(true); |
25 | 29 | ||
26 | sendmail = new QAction(tr("Send the mail"), QIconSet(Resource::loadPixmap("mail/sendmail")), 0, 0, this); | 30 | sendmail = new QAction(tr("Send the mail"), QIconSet(Resource::loadPixmap("mail/sendmail")), 0, 0, this); |
27 | sendmail->addTo(toolbar); | 31 | sendmail->addTo(toolbar); |
32 | sendmail->addTo(mailmenu); | ||
28 | 33 | ||
29 | queuemail = new QAction(tr("Queue the mail"), QIconSet(Resource::loadPixmap("mail/sendall")), 0, 0, this); | 34 | queuemail = new QAction(tr("Queue the mail"), QIconSet(Resource::loadPixmap("mail/sendall")), 0, 0, this); |
30 | queuemail->addTo(toolbar); | 35 | queuemail->addTo(toolbar); |
36 | queuemail->addTo(mailmenu); | ||
31 | 37 | ||
32 | attachfile = new QAction(tr("Attach a file"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); | 38 | attachfile = new QAction(tr("Attach a file"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); |
33 | attachfile->addTo(toolbar); | 39 | attachfile->addTo(toolbar); |
40 | attachfile->addTo(mailmenu); | ||
34 | connect(attachfile, SIGNAL(toggled(bool)), SLOT(slotAttachfileChanged(bool))); | 41 | connect(attachfile, SIGNAL(toggled(bool)), SLOT(slotAttachfileChanged(bool))); |
35 | 42 | ||
36 | addressbook = new QAction(tr("Addressbook"), QIconSet(Resource::loadPixmap("mail/addbook")), 0, 0, this); | 43 | addressbook = new QAction(tr("Addressbook"), QIconSet(Resource::loadPixmap("mail/addbook")), 0, 0, this); |
37 | addressbook->addTo(toolbar); | 44 | addressbook->addTo(toolbar); |
45 | addressbook->addTo(mailmenu); | ||
38 | 46 | ||
39 | QLabel *spacer = new QLabel(toolbar); | 47 | QLabel *spacer = new QLabel(toolbar); |
40 | spacer->setBackgroundMode(QWidget::PaletteButton); | 48 | spacer->setBackgroundMode(QWidget::PaletteButton); |
41 | toolbar->setStretchableWidget(spacer); | 49 | toolbar->setStretchableWidget(spacer); |
42 | 50 | ||
43 | abort = new QAction(tr("Abort sending"), QIconSet(Resource::loadPixmap("mail/abort")), 0, 0, this); | 51 | abort = new QAction(tr("Abort sending"), QIconSet(Resource::loadPixmap("mail/abort")), 0, 0, this); |
44 | abort->addTo(toolbar); | 52 | abort->addTo(toolbar); |
53 | abort->addTo(mailmenu); | ||
45 | 54 | ||
46 | QWidget *main = new QWidget(this); | 55 | QWidget *main = new QWidget(this); |
47 | setCentralWidget(main); | 56 | setCentralWidget(main); |
48 | 57 | ||
49 | QGridLayout *layout = new QGridLayout(main); | 58 | QGridLayout *layout = new QGridLayout(main); |
50 | 59 | ||
51 | fromBox = new QComboBox(main); | 60 | fromBox = new QComboBox(main); |
52 | fromBox->insertItem(tr("From"), POPUP_FROM_FROM); | 61 | fromBox->insertItem(tr("From"), POPUP_FROM_FROM); |
53 | fromBox->insertItem(tr("Reply"), POPUP_FROM_REPLYTO); | 62 | fromBox->insertItem(tr("Reply"), POPUP_FROM_REPLYTO); |
54 | layout->addWidget(fromBox, 0, 0); | 63 | layout->addWidget(fromBox, 0, 0); |
55 | 64 | ||
56 | connect(fromBox, SIGNAL(activated(int)), SLOT(slotFromMenuChanged(int))); | 65 | connect(fromBox, SIGNAL(activated(int)), SLOT(slotFromMenuChanged(int))); |