-rw-r--r-- | noncore/unsupported/mail2/composerbase.cpp | 6 | ||||
-rw-r--r-- | noncore/unsupported/mail2/composerbase.h | 4 | ||||
-rw-r--r-- | noncore/unsupported/mail2/mainwindowbase.cpp | 4 | ||||
-rw-r--r-- | noncore/unsupported/mail2/mainwindowbase.h | 4 | ||||
-rw-r--r-- | noncore/unsupported/mail2/viewmailbase.cpp | 4 | ||||
-rw-r--r-- | noncore/unsupported/mail2/viewmailbase.h | 4 |
6 files changed, 13 insertions, 13 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,199 +1,199 @@ | |||
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 | ||
16 | ComposerBase::ComposerBase(QWidget *parent, const char *name, WFlags fl) | 16 | ComposerBase::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); |
47 | 47 | ||
48 | fromBox = new QComboBox(main); | 48 | fromBox = new QComboBox(main); |
49 | fromBox->insertItem(tr("From"), POPUP_FROM_FROM); | 49 | fromBox->insertItem(tr("From"), POPUP_FROM_FROM); |
50 | fromBox->insertItem(tr("Reply"), POPUP_FROM_REPLYTO); | 50 | fromBox->insertItem(tr("Reply"), POPUP_FROM_REPLYTO); |
51 | layout->addWidget(fromBox, 0, 0); | 51 | layout->addWidget(fromBox, 0, 0); |
52 | 52 | ||
53 | connect(fromBox, SIGNAL(activated(int)), SLOT(slotFromMenuChanged(int))); | 53 | connect(fromBox, SIGNAL(activated(int)), SLOT(slotFromMenuChanged(int))); |
54 | 54 | ||
55 | QHBoxLayout *fromLayout = new QHBoxLayout(); | 55 | QHBoxLayout *fromLayout = new QHBoxLayout(); |
56 | layout->addLayout(fromLayout, 0, 1); | 56 | layout->addLayout(fromLayout, 0, 1); |
57 | 57 | ||
58 | from = new QComboBox(main); | 58 | from = new QComboBox(main); |
59 | fromLayout->addWidget(from); | 59 | fromLayout->addWidget(from); |
60 | 60 | ||
61 | replyto = new QLineEdit(main); | 61 | replyto = new QLineEdit(main); |
62 | replyto->hide(); | 62 | replyto->hide(); |
63 | fromLayout->addWidget(replyto); | 63 | fromLayout->addWidget(replyto); |
64 | 64 | ||
65 | receiversBox = new QComboBox(main); | 65 | receiversBox = new QComboBox(main); |
66 | receiversBox->insertItem(tr("To"), POPUP_RECV_TO); | 66 | receiversBox->insertItem(tr("To"), POPUP_RECV_TO); |
67 | receiversBox->insertItem(tr("Cc"), POPUP_RECV_CC); | 67 | receiversBox->insertItem(tr("Cc"), POPUP_RECV_CC); |
68 | receiversBox->insertItem(tr("Bcc"), POPUP_RECV_BCC); | 68 | receiversBox->insertItem(tr("Bcc"), POPUP_RECV_BCC); |
69 | layout->addWidget(receiversBox, 1, 0); | 69 | layout->addWidget(receiversBox, 1, 0); |
70 | 70 | ||
71 | connect(receiversBox, SIGNAL(activated(int)), SLOT(slotReceiverMenuChanged(int))); | 71 | connect(receiversBox, SIGNAL(activated(int)), SLOT(slotReceiverMenuChanged(int))); |
72 | 72 | ||
73 | QHBoxLayout *receiverLayout = new QHBoxLayout(); | 73 | QHBoxLayout *receiverLayout = new QHBoxLayout(); |
74 | layout->addLayout(receiverLayout, 1, 1); | 74 | layout->addLayout(receiverLayout, 1, 1); |
75 | 75 | ||
76 | to = new QLineEdit(main); | 76 | to = new QLineEdit(main); |
77 | receiverLayout->addWidget(to); | 77 | receiverLayout->addWidget(to); |
78 | 78 | ||
79 | cc = new QLineEdit(main); | 79 | cc = new QLineEdit(main); |
80 | cc->hide(); | 80 | cc->hide(); |
81 | receiverLayout->addWidget(cc); | 81 | receiverLayout->addWidget(cc); |
82 | 82 | ||
83 | bcc = new QLineEdit(main); | 83 | bcc = new QLineEdit(main); |
84 | bcc->hide(); | 84 | bcc->hide(); |
85 | receiverLayout->addWidget(bcc); | 85 | receiverLayout->addWidget(bcc); |
86 | 86 | ||
87 | subjectBox = new QComboBox(main); | 87 | subjectBox = new QComboBox(main); |
88 | subjectBox->insertItem(tr("Subj."), POPUP_SUBJ_SUBJECT); | 88 | subjectBox->insertItem(tr("Subj."), POPUP_SUBJ_SUBJECT); |
89 | subjectBox->insertItem(tr("Prio."), POPUP_SUBJ_PRIORITY); | 89 | subjectBox->insertItem(tr("Prio."), POPUP_SUBJ_PRIORITY); |
90 | layout->addWidget(subjectBox, 2, 0); | 90 | layout->addWidget(subjectBox, 2, 0); |
91 | connect(subjectBox, SIGNAL(activated(int)), SLOT(slotSubjectMenuChanged(int))); | 91 | connect(subjectBox, SIGNAL(activated(int)), SLOT(slotSubjectMenuChanged(int))); |
92 | 92 | ||
93 | QHBoxLayout *subjectLayout = new QHBoxLayout(); | 93 | QHBoxLayout *subjectLayout = new QHBoxLayout(); |
94 | layout->addLayout(subjectLayout, 2, 1); | 94 | layout->addLayout(subjectLayout, 2, 1); |
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(); |
144 | attachPopup->insertItem(tr("Remove"), POPUP_ATTACH_REMOVE); | 144 | attachPopup->insertItem(tr("Remove"), POPUP_ATTACH_REMOVE); |
145 | attachView->setPopup(attachPopup); | 145 | attachView->setPopup(attachPopup); |
146 | 146 | ||
147 | status = new QLabel(view); | 147 | status = new QLabel(view); |
148 | QFont tmpFont = status->font(); | 148 | QFont tmpFont = status->font(); |
149 | tmpFont.setPixelSize(8); | 149 | tmpFont.setPixelSize(8); |
150 | status->setFont(tmpFont); | 150 | status->setFont(tmpFont); |
151 | } | 151 | } |
152 | 152 | ||
153 | void ComposerBase::slotAttachfileChanged(bool toggled) | 153 | void ComposerBase::slotAttachfileChanged(bool toggled) |
154 | { | 154 | { |
155 | if (toggled) { | 155 | if (toggled) { |
156 | if (attachWindow->isHidden()) attachWindow->show(); | 156 | if (attachWindow->isHidden()) attachWindow->show(); |
157 | } else { | 157 | } else { |
158 | if (!attachWindow->isHidden()) attachWindow->hide(); | 158 | if (!attachWindow->isHidden()) attachWindow->hide(); |
159 | } | 159 | } |
160 | } | 160 | } |
161 | 161 | ||
162 | void ComposerBase::slotFromMenuChanged(int id) | 162 | void ComposerBase::slotFromMenuChanged(int id) |
163 | { | 163 | { |
164 | if (POPUP_FROM_FROM == id) { | 164 | if (POPUP_FROM_FROM == id) { |
165 | if (from->isHidden()) from->show(); | 165 | if (from->isHidden()) from->show(); |
166 | if (!replyto->isHidden()) replyto->hide(); | 166 | if (!replyto->isHidden()) replyto->hide(); |
167 | } else if (POPUP_FROM_REPLYTO == id) { | 167 | } else if (POPUP_FROM_REPLYTO == id) { |
168 | if (!from->isHidden()) from->hide(); | 168 | if (!from->isHidden()) from->hide(); |
169 | if (replyto->isHidden()) replyto->show(); | 169 | if (replyto->isHidden()) replyto->show(); |
170 | } | 170 | } |
171 | } | 171 | } |
172 | 172 | ||
173 | void ComposerBase::slotReceiverMenuChanged(int id) | 173 | void ComposerBase::slotReceiverMenuChanged(int id) |
174 | { | 174 | { |
175 | if (POPUP_RECV_TO == id) { | 175 | if (POPUP_RECV_TO == id) { |
176 | if (to->isHidden()) to->show(); | 176 | if (to->isHidden()) to->show(); |
177 | if (!cc->isHidden()) cc->hide(); | 177 | if (!cc->isHidden()) cc->hide(); |
178 | if (!bcc->isHidden()) bcc->hide(); | 178 | if (!bcc->isHidden()) bcc->hide(); |
179 | } else if (POPUP_RECV_CC == id) { | 179 | } else if (POPUP_RECV_CC == id) { |
180 | if (!to->isHidden()) to->hide(); | 180 | if (!to->isHidden()) to->hide(); |
181 | if (cc->isHidden()) cc->show(); | 181 | if (cc->isHidden()) cc->show(); |
182 | if (!bcc->isHidden()) bcc->hide(); | 182 | if (!bcc->isHidden()) bcc->hide(); |
183 | } else if (POPUP_RECV_BCC == id) { | 183 | } else if (POPUP_RECV_BCC == id) { |
184 | if (!to->isHidden()) to->hide(); | 184 | if (!to->isHidden()) to->hide(); |
185 | if (!cc->isHidden()) cc->hide(); | 185 | if (!cc->isHidden()) cc->hide(); |
186 | if (bcc->isHidden()) bcc->show(); | 186 | if (bcc->isHidden()) bcc->show(); |
187 | } | 187 | } |
188 | } | 188 | } |
189 | 189 | ||
190 | void ComposerBase::slotSubjectMenuChanged(int id) | 190 | void ComposerBase::slotSubjectMenuChanged(int id) |
191 | { | 191 | { |
192 | if (POPUP_SUBJ_SUBJECT == id) { | 192 | if (POPUP_SUBJ_SUBJECT == id) { |
193 | if (subject->isHidden()) subject->show(); | 193 | if (subject->isHidden()) subject->show(); |
194 | if (!priority->isHidden()) priority->hide(); | 194 | if (!priority->isHidden()) priority->hide(); |
195 | } else if (POPUP_SUBJ_PRIORITY == id) { | 195 | } else if (POPUP_SUBJ_PRIORITY == id) { |
196 | if (!subject->isHidden()) subject->hide(); | 196 | if (!subject->isHidden()) subject->hide(); |
197 | if (priority->isHidden()) priority->show(); | 197 | if (priority->isHidden()) priority->show(); |
198 | } | 198 | } |
199 | } | 199 | } |
diff --git a/noncore/unsupported/mail2/composerbase.h b/noncore/unsupported/mail2/composerbase.h index e5fab67..75b77f4 100644 --- a/noncore/unsupported/mail2/composerbase.h +++ b/noncore/unsupported/mail2/composerbase.h | |||
@@ -1,55 +1,55 @@ | |||
1 | #ifndef COMPOSERBASE_H | 1 | #ifndef COMPOSERBASE_H |
2 | #define COMPOSERBASE_H | 2 | #define COMPOSERBASE_H |
3 | 3 | ||
4 | #include <qmainwindow.h> | 4 | #include <qmainwindow.h> |
5 | 5 | ||
6 | class QMultiLineEdit; | 6 | class QMultiLineEdit; |
7 | class ListViewPlus; | 7 | class ListViewPlus; |
8 | class QPopupMenu; | 8 | class QPopupMenu; |
9 | class QPEToolBar; | ||
9 | class QComboBox; | 10 | class QComboBox; |
10 | class QLineEdit; | 11 | class QLineEdit; |
11 | class QToolBar; | ||
12 | class QAction; | 12 | class QAction; |
13 | class QLabel; | 13 | class QLabel; |
14 | 14 | ||
15 | class ComposerBase : public QMainWindow | 15 | class ComposerBase : public QMainWindow |
16 | { | 16 | { |
17 | Q_OBJECT | 17 | Q_OBJECT |
18 | 18 | ||
19 | public: | 19 | public: |
20 | ComposerBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); | 20 | ComposerBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); |
21 | 21 | ||
22 | protected: | 22 | protected: |
23 | static const int POPUP_FROM_FROM = 0; | 23 | static const int POPUP_FROM_FROM = 0; |
24 | static const int POPUP_FROM_REPLYTO = 1; | 24 | static const int POPUP_FROM_REPLYTO = 1; |
25 | static const int POPUP_RECV_TO = 0; | 25 | static const int POPUP_RECV_TO = 0; |
26 | static const int POPUP_RECV_CC = 1; | 26 | static const int POPUP_RECV_CC = 1; |
27 | static const int POPUP_RECV_BCC = 2; | 27 | static const int POPUP_RECV_BCC = 2; |
28 | static const int POPUP_SUBJ_SUBJECT = 0; | 28 | static const int POPUP_SUBJ_SUBJECT = 0; |
29 | static const int POPUP_SUBJ_PRIORITY = 1; | 29 | static const int POPUP_SUBJ_PRIORITY = 1; |
30 | static const int POPUP_PRIO_LOW = 0; | 30 | static const int POPUP_PRIO_LOW = 0; |
31 | static const int POPUP_PRIO_NORMAL = 1; | 31 | static const int POPUP_PRIO_NORMAL = 1; |
32 | static const int POPUP_PRIO_HIGH = 2; | 32 | static const int POPUP_PRIO_HIGH = 2; |
33 | static const int POPUP_ATTACH_RENAME = 0; | 33 | static const int POPUP_ATTACH_RENAME = 0; |
34 | static const int POPUP_ATTACH_DESC = 1; | 34 | static const int POPUP_ATTACH_DESC = 1; |
35 | static const int POPUP_ATTACH_REMOVE = 2; | 35 | static const int POPUP_ATTACH_REMOVE = 2; |
36 | 36 | ||
37 | QMultiLineEdit *message; | 37 | QMultiLineEdit *message; |
38 | ListViewPlus *attachView; | 38 | ListViewPlus *attachView; |
39 | QMainWindow *attachWindow; | 39 | QMainWindow *attachWindow; |
40 | QPopupMenu *attachPopup; | 40 | QPopupMenu *attachPopup; |
41 | QPEToolBar *toolbar, *attachToolbar; | ||
41 | QComboBox *fromBox, *from, *receiversBox, *subjectBox, *priority; | 42 | QComboBox *fromBox, *from, *receiversBox, *subjectBox, *priority; |
42 | QLineEdit *replyto, *to, *cc, *bcc, *subject; | 43 | QLineEdit *replyto, *to, *cc, *bcc, *subject; |
43 | QToolBar *toolbar, *attachToolbar; | ||
44 | QAction *sendmail, *attachfile, *addressbook, *abort, *addattach, *delattach; | 44 | QAction *sendmail, *attachfile, *addressbook, *abort, *addattach, *delattach; |
45 | QLabel *fromLabel, *status; | 45 | QLabel *fromLabel, *status; |
46 | 46 | ||
47 | protected slots: | 47 | protected slots: |
48 | void slotAttachfileChanged(bool toggled); | 48 | void slotAttachfileChanged(bool toggled); |
49 | void slotFromMenuChanged(int id); | 49 | void slotFromMenuChanged(int id); |
50 | void slotReceiverMenuChanged(int id); | 50 | void slotReceiverMenuChanged(int id); |
51 | void slotSubjectMenuChanged(int id); | 51 | void slotSubjectMenuChanged(int id); |
52 | 52 | ||
53 | }; | 53 | }; |
54 | 54 | ||
55 | #endif | 55 | #endif |
diff --git a/noncore/unsupported/mail2/mainwindowbase.cpp b/noncore/unsupported/mail2/mainwindowbase.cpp index 4054af6..c55bd90 100644 --- a/noncore/unsupported/mail2/mainwindowbase.cpp +++ b/noncore/unsupported/mail2/mainwindowbase.cpp | |||
@@ -1,75 +1,75 @@ | |||
1 | #include <qprogressbar.h> | 1 | #include <qprogressbar.h> |
2 | #include <qtoolbutton.h> | 2 | #include <qtoolbutton.h> |
3 | #include <qpopupmenu.h> | 3 | #include <qpopupmenu.h> |
4 | #include <qtoolbar.h> | ||
5 | #include <qaction.h> | 4 | #include <qaction.h> |
6 | #include <qheader.h> | 5 | #include <qheader.h> |
7 | #include <qlabel.h> | 6 | #include <qlabel.h> |
8 | #include <qvbox.h> | 7 | #include <qvbox.h> |
9 | 8 | ||
9 | #include <qpe/qpetoolbar.h> | ||
10 | #include <qpe/resource.h> | 10 | #include <qpe/resource.h> |
11 | 11 | ||
12 | #include "mainwindowbase.h" | 12 | #include "mainwindowbase.h" |
13 | #include "folderwidget.h" | 13 | #include "folderwidget.h" |
14 | #include "mailtable.h" | 14 | #include "mailtable.h" |
15 | 15 | ||
16 | MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl) | 16 | MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl) |
17 | : QMainWindow(parent, name, fl) | 17 | : QMainWindow(parent, name, fl) |
18 | { | 18 | { |
19 | setCaption(tr("E-Mail")); | 19 | setCaption(tr("E-Mail")); |
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 | compose = new QAction(tr("Compose new mail"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this); | 26 | compose = new QAction(tr("Compose new mail"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this); |
27 | compose->addTo(toolbar); | 27 | compose->addTo(toolbar); |
28 | 28 | ||
29 | folders = new QAction(tr("Show/hide folders"), QIconSet(Resource::loadPixmap("mail/folder")), 0, 0, this, 0, true); | 29 | folders = new QAction(tr("Show/hide folders"), QIconSet(Resource::loadPixmap("mail/folder")), 0, 0, this, 0, true); |
30 | folders->addTo(toolbar); | 30 | folders->addTo(toolbar); |
31 | connect(folders, SIGNAL(toggled(bool)), SLOT(slotFoldersToggled(bool))); | 31 | connect(folders, SIGNAL(toggled(bool)), SLOT(slotFoldersToggled(bool))); |
32 | 32 | ||
33 | findmails = new QAction(tr("Search mails"), QIconSet(Resource::loadPixmap("mail/find")), 0, 0, this); | 33 | findmails = new QAction(tr("Search mails"), QIconSet(Resource::loadPixmap("mail/find")), 0, 0, this); |
34 | findmails->addTo(toolbar); | 34 | findmails->addTo(toolbar); |
35 | 35 | ||
36 | configure = new QAction(tr("Configuration"), QIconSet(Resource::loadPixmap("mail/configure")), 0, 0, this); | 36 | configure = new QAction(tr("Configuration"), QIconSet(Resource::loadPixmap("mail/configure")), 0, 0, this); |
37 | configure->addTo(toolbar); | 37 | configure->addTo(toolbar); |
38 | 38 | ||
39 | QLabel *spacer = new QLabel(toolbar); | 39 | QLabel *spacer = new QLabel(toolbar); |
40 | spacer->setBackgroundMode(QWidget::PaletteButton); | 40 | spacer->setBackgroundMode(QWidget::PaletteButton); |
41 | toolbar->setStretchableWidget(spacer); | 41 | toolbar->setStretchableWidget(spacer); |
42 | 42 | ||
43 | stop = new QAction(tr("Abort"), QIconSet(Resource::loadPixmap("mail/abort")), 0, 0, this); | 43 | stop = new QAction(tr("Abort"), QIconSet(Resource::loadPixmap("mail/abort")), 0, 0, this); |
44 | stop->addTo(toolbar); | 44 | stop->addTo(toolbar); |
45 | 45 | ||
46 | QVBox *view = new QVBox(this); | 46 | QVBox *view = new QVBox(this); |
47 | setCentralWidget(view); | 47 | setCentralWidget(view); |
48 | 48 | ||
49 | folderView = new FolderWidget(view); | 49 | folderView = new FolderWidget(view); |
50 | folderView->setMinimumHeight(90); | 50 | folderView->setMinimumHeight(90); |
51 | folderView->setMaximumHeight(90); | 51 | folderView->setMaximumHeight(90); |
52 | folderView->hide(); | 52 | folderView->hide(); |
53 | 53 | ||
54 | mailView = new MailTable(view); | 54 | mailView = new MailTable(view); |
55 | mailView->setMinimumHeight(50); | 55 | mailView->setMinimumHeight(50); |
56 | 56 | ||
57 | QHBox *status = new QHBox(view); | 57 | QHBox *status = new QHBox(view); |
58 | 58 | ||
59 | statusLabel = new QLabel(status); | 59 | statusLabel = new QLabel(status); |
60 | QFont tmpFont = statusLabel->font(); | 60 | QFont tmpFont = statusLabel->font(); |
61 | tmpFont.setPixelSize(8); | 61 | tmpFont.setPixelSize(8); |
62 | statusLabel->setFont(tmpFont); | 62 | statusLabel->setFont(tmpFont); |
63 | 63 | ||
64 | statusProgress = new QProgressBar(status); | 64 | statusProgress = new QProgressBar(status); |
65 | statusProgress->setCenterIndicator(true); | 65 | statusProgress->setCenterIndicator(true); |
66 | statusProgress->setMaximumHeight(15); | 66 | statusProgress->setMaximumHeight(15); |
67 | statusProgress->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); | 67 | statusProgress->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); |
68 | } | 68 | } |
69 | 69 | ||
70 | void MainWindowBase::slotFoldersToggled(bool toggled) | 70 | void MainWindowBase::slotFoldersToggled(bool toggled) |
71 | { | 71 | { |
72 | if (folderView->isHidden() && toggled) folderView->show(); | 72 | if (folderView->isHidden() && toggled) folderView->show(); |
73 | if (!folderView->isHidden() && !toggled) folderView->hide(); | 73 | if (!folderView->isHidden() && !toggled) folderView->hide(); |
74 | } | 74 | } |
75 | 75 | ||
diff --git a/noncore/unsupported/mail2/mainwindowbase.h b/noncore/unsupported/mail2/mainwindowbase.h index cf23f4f..0776f02 100644 --- a/noncore/unsupported/mail2/mainwindowbase.h +++ b/noncore/unsupported/mail2/mainwindowbase.h | |||
@@ -1,35 +1,35 @@ | |||
1 | #ifndef MAINWINDOWBASE_H | 1 | #ifndef MAINWINDOWBASE_H |
2 | #define MAINWINDOWBASE_H | 2 | #define MAINWINDOWBASE_H |
3 | 3 | ||
4 | #include <qmainwindow.h> | 4 | #include <qmainwindow.h> |
5 | 5 | ||
6 | class ServerConnection; | 6 | class ServerConnection; |
7 | class QProgressBar; | 7 | class QProgressBar; |
8 | class FolderWidget; | 8 | class FolderWidget; |
9 | class QPEToolBar; | ||
9 | class MailTable; | 10 | class MailTable; |
10 | class QToolBar; | ||
11 | class QAction; | 11 | class QAction; |
12 | class QLabel; | 12 | class QLabel; |
13 | 13 | ||
14 | class MainWindowBase : public QMainWindow | 14 | class MainWindowBase : public QMainWindow |
15 | { | 15 | { |
16 | Q_OBJECT | 16 | Q_OBJECT |
17 | 17 | ||
18 | public: | 18 | public: |
19 | MainWindowBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); | 19 | MainWindowBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); |
20 | 20 | ||
21 | protected slots: | 21 | protected slots: |
22 | void slotFoldersToggled(bool toggled); | 22 | void slotFoldersToggled(bool toggled); |
23 | 23 | ||
24 | protected: | 24 | protected: |
25 | ServerConnection *serverConnection; | 25 | ServerConnection *serverConnection; |
26 | QProgressBar *statusProgress; | 26 | QProgressBar *statusProgress; |
27 | FolderWidget *folderView; | 27 | FolderWidget *folderView; |
28 | QPEToolBar *toolbar; | ||
28 | MailTable *mailView; | 29 | MailTable *mailView; |
29 | QToolBar *toolbar; | ||
30 | QAction *compose, *folders, *findmails, *configure, *stop; | 30 | QAction *compose, *folders, *findmails, *configure, *stop; |
31 | QLabel *statusLabel; | 31 | QLabel *statusLabel; |
32 | 32 | ||
33 | }; | 33 | }; |
34 | 34 | ||
35 | #endif | 35 | #endif |
diff --git a/noncore/unsupported/mail2/viewmailbase.cpp b/noncore/unsupported/mail2/viewmailbase.cpp index 134e5cb..b650c88 100644 --- a/noncore/unsupported/mail2/viewmailbase.cpp +++ b/noncore/unsupported/mail2/viewmailbase.cpp | |||
@@ -1,65 +1,65 @@ | |||
1 | #include <qtextbrowser.h> | 1 | #include <qtextbrowser.h> |
2 | #include <qlistview.h> | 2 | #include <qlistview.h> |
3 | #include <qtoolbar.h> | ||
4 | #include <qaction.h> | 3 | #include <qaction.h> |
5 | #include <qlabel.h> | 4 | #include <qlabel.h> |
6 | #include <qvbox.h> | 5 | #include <qvbox.h> |
7 | 6 | ||
7 | #include <qpe/qpetoolbar.h> | ||
8 | #include <qpe/resource.h> | 8 | #include <qpe/resource.h> |
9 | 9 | ||
10 | #include "viewmailbase.h" | 10 | #include "viewmailbase.h" |
11 | #include "opendiag.h" | 11 | #include "opendiag.h" |
12 | 12 | ||
13 | ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) | 13 | ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) |
14 | : QMainWindow(parent, name, fl) | 14 | : QMainWindow(parent, name, fl) |
15 | { | 15 | { |
16 | setCaption(tr("E-Mail by %1")); | 16 | setCaption(tr("E-Mail by %1")); |
17 | setToolBarsMovable(false); | 17 | setToolBarsMovable(false); |
18 | 18 | ||
19 | toolbar = new QToolBar(this); | 19 | toolbar = new QPEToolBar(this); |
20 | toolbar->setHorizontalStretchable(true); | 20 | toolbar->setHorizontalStretchable(true); |
21 | addToolBar(toolbar); | 21 | addToolBar(toolbar); |
22 | 22 | ||
23 | reply = new QAction(tr("Reply"), QIconSet(Resource::loadPixmap("mail/reply")), 0, 0, this); | 23 | reply = new QAction(tr("Reply"), QIconSet(Resource::loadPixmap("mail/reply")), 0, 0, this); |
24 | reply->addTo(toolbar); | 24 | reply->addTo(toolbar); |
25 | 25 | ||
26 | forward = new QAction(tr("Forward"), QIconSet(Resource::loadPixmap("mail/forward")), 0, 0, this); | 26 | forward = new QAction(tr("Forward"), QIconSet(Resource::loadPixmap("mail/forward")), 0, 0, this); |
27 | forward->addTo(toolbar); | 27 | forward->addTo(toolbar); |
28 | 28 | ||
29 | attachbutton = new QAction(tr("Attachments"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); | 29 | attachbutton = new QAction(tr("Attachments"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); |
30 | attachbutton->addTo(toolbar); | 30 | attachbutton->addTo(toolbar); |
31 | connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); | 31 | connect(attachbutton, SIGNAL(toggled(bool)), SLOT(slotChangeAttachview(bool))); |
32 | 32 | ||
33 | deleteMail = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); | 33 | deleteMail = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); |
34 | deleteMail->addTo(toolbar); | 34 | deleteMail->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 | QVBox *view = new QVBox(this); | 40 | QVBox *view = new QVBox(this); |
41 | setCentralWidget(view); | 41 | setCentralWidget(view); |
42 | 42 | ||
43 | attachments = new QListView(view); | 43 | attachments = new QListView(view); |
44 | attachments->setMinimumHeight(90); | 44 | attachments->setMinimumHeight(90); |
45 | attachments->setMaximumHeight(90); | 45 | attachments->setMaximumHeight(90); |
46 | attachments->setAllColumnsShowFocus(true); | 46 | attachments->setAllColumnsShowFocus(true); |
47 | attachments->addColumn("Mime Type", 100); | 47 | attachments->addColumn("Mime Type", 100); |
48 | attachments->addColumn("Filename", 100); | 48 | attachments->addColumn("Filename", 100); |
49 | attachments->addColumn("Description", 100); | 49 | attachments->addColumn("Description", 100); |
50 | attachments->hide(); | 50 | attachments->hide(); |
51 | 51 | ||
52 | browser = new QTextBrowser(view); | 52 | browser = new QTextBrowser(view); |
53 | 53 | ||
54 | openDiag = new OpenDiag(view); | 54 | openDiag = new OpenDiag(view); |
55 | openDiag->hide(); | 55 | openDiag->hide(); |
56 | 56 | ||
57 | } | 57 | } |
58 | 58 | ||
59 | void ViewMailBase::slotChangeAttachview(bool state) | 59 | void ViewMailBase::slotChangeAttachview(bool state) |
60 | { | 60 | { |
61 | if (state) attachments->show(); | 61 | if (state) attachments->show(); |
62 | else attachments->hide(); | 62 | else attachments->hide(); |
63 | } | 63 | } |
64 | 64 | ||
65 | 65 | ||
diff --git a/noncore/unsupported/mail2/viewmailbase.h b/noncore/unsupported/mail2/viewmailbase.h index 183bb04..9ddf2aa 100644 --- a/noncore/unsupported/mail2/viewmailbase.h +++ b/noncore/unsupported/mail2/viewmailbase.h | |||
@@ -1,32 +1,32 @@ | |||
1 | #ifndef VIEWMAILBASE_H | 1 | #ifndef VIEWMAILBASE_H |
2 | #define VIEWMAILBASE_H | 2 | #define VIEWMAILBASE_H |
3 | 3 | ||
4 | #include <qmainwindow.h> | 4 | #include <qmainwindow.h> |
5 | 5 | ||
6 | class QAction; | 6 | class QAction; |
7 | class OpenDiag; | 7 | class OpenDiag; |
8 | class QToolBar; | ||
9 | class QListView; | 8 | class QListView; |
9 | class QPEToolBar; | ||
10 | class QTextBrowser; | 10 | class QTextBrowser; |
11 | 11 | ||
12 | class ViewMailBase : public QMainWindow | 12 | class ViewMailBase : public QMainWindow |
13 | { | 13 | { |
14 | Q_OBJECT | 14 | Q_OBJECT |
15 | 15 | ||
16 | public: | 16 | public: |
17 | ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); | 17 | ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); |
18 | 18 | ||
19 | protected: | 19 | protected: |
20 | QAction *reply, *forward, *attachbutton, *deleteMail; | 20 | QAction *reply, *forward, *attachbutton, *deleteMail; |
21 | QListView *attachments; | 21 | QListView *attachments; |
22 | QToolBar *toolbar; | 22 | QPEToolBar *toolbar; |
23 | QTextBrowser *browser; | 23 | QTextBrowser *browser; |
24 | OpenDiag *openDiag; | 24 | OpenDiag *openDiag; |
25 | 25 | ||
26 | protected slots: | 26 | protected slots: |
27 | void slotChangeAttachview(bool state); | 27 | void slotChangeAttachview(bool state); |
28 | 28 | ||
29 | }; | 29 | }; |
30 | 30 | ||
31 | #endif | 31 | #endif |
32 | 32 | ||