summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mail2/composerbase.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/mail2/composerbase.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/mail2/composerbase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/unsupported/mail2/composerbase.cpp b/noncore/unsupported/mail2/composerbase.cpp
index 7754863..10d567d 100644
--- a/noncore/unsupported/mail2/composerbase.cpp
+++ b/noncore/unsupported/mail2/composerbase.cpp
@@ -1,46 +1,46 @@
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 <qtoolbar.h>
6#include <qlayout.h> 5#include <qlayout.h>
7#include <qaction.h> 6#include <qaction.h>
8#include <qlabel.h> 7#include <qlabel.h>
9#include <qvbox.h> 8#include <qvbox.h>
10 9
10#include <qpe/qpetoolbar.h>
11#include <qpe/resource.h> 11#include <qpe/resource.h>
12 12
13#include "listviewplus.h" 13#include "listviewplus.h"
14#include "composerbase.h" 14#include "composerbase.h"
15 15
16ComposerBase::ComposerBase(QWidget *parent, const char *name, WFlags fl) 16ComposerBase::ComposerBase(QWidget *parent, const char *name, WFlags fl)
17 : QMainWindow(parent, name, fl) 17 : QMainWindow(parent, name, fl)
18{ 18{
19 setCaption(tr("Compose Message")); 19 setCaption(tr("Compose Message"));
20 setToolBarsMovable(false); 20 setToolBarsMovable(false);
21 21
22 toolbar = new QToolBar(this); 22 toolbar = new QPEToolBar(this);
23 addToolBar(toolbar); 23 addToolBar(toolbar);
24 toolbar->setHorizontalStretchable(true); 24 toolbar->setHorizontalStretchable(true);
25 25
26 sendmail = new QAction(tr("Send the mail"), QIconSet(Resource::loadPixmap("mail/sendmail")), 0, 0, this); 26 sendmail = new QAction(tr("Send the mail"), QIconSet(Resource::loadPixmap("mail/sendmail")), 0, 0, this);
27 sendmail->addTo(toolbar); 27 sendmail->addTo(toolbar);
28 28
29 attachfile = new QAction(tr("Attach a file"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); 29 attachfile = new QAction(tr("Attach a file"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true);
30 attachfile->addTo(toolbar); 30 attachfile->addTo(toolbar);
31 connect(attachfile, SIGNAL(toggled(bool)), SLOT(slotAttachfileChanged(bool))); 31 connect(attachfile, SIGNAL(toggled(bool)), SLOT(slotAttachfileChanged(bool)));
32 32
33 addressbook = new QAction(tr("Addressbook"), QIconSet(Resource::loadPixmap("mail/addbook")), 0, 0, this); 33 addressbook = new QAction(tr("Addressbook"), QIconSet(Resource::loadPixmap("mail/addbook")), 0, 0, this);
34 addressbook->addTo(toolbar); 34 addressbook->addTo(toolbar);
35 35
36 QLabel *spacer = new QLabel(toolbar); 36 QLabel *spacer = new QLabel(toolbar);
37 spacer->setBackgroundMode(QWidget::PaletteButton); 37 spacer->setBackgroundMode(QWidget::PaletteButton);
38 toolbar->setStretchableWidget(spacer); 38 toolbar->setStretchableWidget(spacer);
39 39
40 abort = new QAction(tr("Abort sending"), QIconSet(Resource::loadPixmap("mail/abort")), 0, 0, this); 40 abort = new QAction(tr("Abort sending"), QIconSet(Resource::loadPixmap("mail/abort")), 0, 0, this);
41 abort->addTo(toolbar); 41 abort->addTo(toolbar);
42 42
43 QWidget *main = new QWidget(this); 43 QWidget *main = new QWidget(this);
44 setCentralWidget(main); 44 setCentralWidget(main);
45 45
46 QGridLayout *layout = new QGridLayout(main); 46 QGridLayout *layout = new QGridLayout(main);
@@ -95,49 +95,49 @@ ComposerBase::ComposerBase(QWidget *parent, const char *name, WFlags fl)
95 95
96 subject = new QLineEdit(main); 96 subject = new QLineEdit(main);
97 subjectLayout->addWidget(subject); 97 subjectLayout->addWidget(subject);
98 98
99 priority = new QComboBox(main); 99 priority = new QComboBox(main);
100 priority->insertItem(tr("Low"), POPUP_PRIO_LOW); 100 priority->insertItem(tr("Low"), POPUP_PRIO_LOW);
101 priority->insertItem(tr("Normal"), POPUP_PRIO_NORMAL); 101 priority->insertItem(tr("Normal"), POPUP_PRIO_NORMAL);
102 priority->insertItem(tr("High"), POPUP_PRIO_HIGH); 102 priority->insertItem(tr("High"), POPUP_PRIO_HIGH);
103 priority->setCurrentItem(POPUP_PRIO_NORMAL); 103 priority->setCurrentItem(POPUP_PRIO_NORMAL);
104 priority->hide(); 104 priority->hide();
105 subjectLayout->addWidget(priority); 105 subjectLayout->addWidget(priority);
106 106
107 QVBox *view = new QVBox(main); 107 QVBox *view = new QVBox(main);
108 layout->addMultiCellWidget(view, 3, 3, 0, 1); 108 layout->addMultiCellWidget(view, 3, 3, 0, 1);
109 109
110 message = new QMultiLineEdit(view); 110 message = new QMultiLineEdit(view);
111 message->setMinimumHeight(30); 111 message->setMinimumHeight(30);
112 112
113 attachWindow = new QMainWindow(view, 0, 0); 113 attachWindow = new QMainWindow(view, 0, 0);
114 attachWindow->setMinimumHeight(100); 114 attachWindow->setMinimumHeight(100);
115 attachWindow->setMaximumHeight(100); 115 attachWindow->setMaximumHeight(100);
116 attachWindow->setToolBarsMovable(false); 116 attachWindow->setToolBarsMovable(false);
117 attachWindow->hide(); 117 attachWindow->hide();
118 118
119 attachToolbar = new QToolBar(attachWindow); 119 attachToolbar = new QPEToolBar(attachWindow);
120 attachToolbar->setVerticalStretchable(true); 120 attachToolbar->setVerticalStretchable(true);
121 121
122 addattach = new QAction(tr("Add an Attachement"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this); 122 addattach = new QAction(tr("Add an Attachement"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this);
123 addattach->addTo(attachToolbar); 123 addattach->addTo(attachToolbar);
124 124
125 delattach = new QAction(tr("Remove Attachement"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); 125 delattach = new QAction(tr("Remove Attachement"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this);
126 delattach->addTo(attachToolbar); 126 delattach->addTo(attachToolbar);
127 127
128 QLabel *attachSpacer = new QLabel(attachToolbar); 128 QLabel *attachSpacer = new QLabel(attachToolbar);
129 attachSpacer->setBackgroundMode(QWidget::PaletteButton); 129 attachSpacer->setBackgroundMode(QWidget::PaletteButton);
130 attachToolbar->setStretchableWidget(attachSpacer); 130 attachToolbar->setStretchableWidget(attachSpacer);
131 131
132 attachWindow->addToolBar(attachToolbar, QMainWindow::Left); 132 attachWindow->addToolBar(attachToolbar, QMainWindow::Left);
133 133
134 attachView = new ListViewPlus(attachWindow); 134 attachView = new ListViewPlus(attachWindow);
135 attachView->addColumn(tr("Name"), 80); 135 attachView->addColumn(tr("Name"), 80);
136 attachView->addColumn(tr("Description"), 110); 136 attachView->addColumn(tr("Description"), 110);
137 attachView->setAllColumnsShowFocus(true); 137 attachView->setAllColumnsShowFocus(true);
138 attachWindow->setCentralWidget(attachView); 138 attachWindow->setCentralWidget(attachView);
139 139
140 attachPopup = new QPopupMenu(attachView); 140 attachPopup = new QPopupMenu(attachView);
141 attachPopup->insertItem(tr("Rename"), POPUP_ATTACH_RENAME); 141 attachPopup->insertItem(tr("Rename"), POPUP_ATTACH_RENAME);
142 attachPopup->insertItem(tr("Change Description"), POPUP_ATTACH_DESC); 142 attachPopup->insertItem(tr("Change Description"), POPUP_ATTACH_DESC);
143 attachPopup->insertSeparator(); 143 attachPopup->insertSeparator();