author | conber <conber> | 2002-06-19 13:58:18 (UTC) |
---|---|---|
committer | conber <conber> | 2002-06-19 13:58:18 (UTC) |
commit | dee5f6c5a3bd982913d0b234fb9392ce68d5df63 (patch) (unidiff) | |
tree | 8a3c2d374d622234b7cf67648c8c4e31a2b530b6 | |
parent | 230cdc6fd89f9e52859633816f554512cd2121e0 (diff) | |
download | opie-dee5f6c5a3bd982913d0b234fb9392ce68d5df63.zip opie-dee5f6c5a3bd982913d0b234fb9392ce68d5df63.tar.gz opie-dee5f6c5a3bd982913d0b234fb9392ce68d5df63.tar.bz2 |
some small fixes
-rw-r--r-- | noncore/unsupported/mail2/composerbase.cpp | 8 | ||||
-rw-r--r-- | noncore/unsupported/mail2/configdiag.cpp | 20 | ||||
-rw-r--r-- | noncore/unsupported/mail2/configdiag.h | 2 | ||||
-rw-r--r-- | noncore/unsupported/mail2/configdiagbase.ui | 11 | ||||
-rw-r--r-- | noncore/unsupported/mail2/mainwindowbase.cpp | 8 |
5 files changed, 8 insertions, 41 deletions
diff --git a/noncore/unsupported/mail2/composerbase.cpp b/noncore/unsupported/mail2/composerbase.cpp index ff00a73..c456ae5 100644 --- a/noncore/unsupported/mail2/composerbase.cpp +++ b/noncore/unsupported/mail2/composerbase.cpp | |||
@@ -1,211 +1,211 @@ | |||
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/qpemenubar.h> |
12 | #include <qpe/resource.h> | 12 | #include <qpe/resource.h> |
13 | 13 | ||
14 | #include "listviewplus.h" | 14 | #include "listviewplus.h" |
15 | #include "composerbase.h" | 15 | #include "composerbase.h" |
16 | 16 | ||
17 | ComposerBase::ComposerBase(QWidget *parent, const char *name, WFlags fl) | 17 | ComposerBase::ComposerBase(QWidget *parent, const char *name, WFlags fl) |
18 | : QMainWindow(parent, name, fl) | 18 | : QMainWindow(parent, name, fl) |
19 | { | 19 | { |
20 | setCaption(tr("Compose Message")); | 20 | setCaption(tr("Compose Message")); |
21 | setToolBarsMovable(false); | 21 | setToolBarsMovable(false); |
22 | 22 | ||
23 | toolbar = new QPEToolBar(this); | 23 | toolbar = new QPEToolBar(this); |
24 | menubar = new QPEMenuBar( toolbar ); | 24 | menubar = new QPEMenuBar( toolbar ); |
25 | mailmenu = new QPopupMenu( menubar ); | 25 | mailmenu = new QPopupMenu( menubar ); |
26 | menubar->insertItem( tr( "Mail" ), mailmenu ); | 26 | menubar->insertItem( tr( "Mail" ), mailmenu ); |
27 | addToolBar(toolbar); | 27 | addToolBar(toolbar); |
28 | toolbar->setHorizontalStretchable(true); | 28 | toolbar->setHorizontalStretchable(true); |
29 | 29 | ||
30 | QLabel *spacer = new QLabel(toolbar); | ||
31 | spacer->setBackgroundMode(QWidget::PaletteButton); | ||
32 | toolbar->setStretchableWidget(spacer); | ||
33 | |||
30 | sendmail = new QAction(tr("Send the mail"), QIconSet(Resource::loadPixmap("mail/sendmail")), 0, 0, this); | 34 | sendmail = new QAction(tr("Send the mail"), QIconSet(Resource::loadPixmap("mail/sendmail")), 0, 0, this); |
31 | sendmail->addTo(toolbar); | 35 | sendmail->addTo(toolbar); |
32 | sendmail->addTo(mailmenu); | 36 | sendmail->addTo(mailmenu); |
33 | 37 | ||
34 | queuemail = new QAction(tr("Queue the mail"), QIconSet(Resource::loadPixmap("mail/sendall")), 0, 0, this); | 38 | queuemail = new QAction(tr("Queue the mail"), QIconSet(Resource::loadPixmap("mail/sendall")), 0, 0, this); |
35 | queuemail->addTo(toolbar); | 39 | queuemail->addTo(toolbar); |
36 | queuemail->addTo(mailmenu); | 40 | queuemail->addTo(mailmenu); |
37 | 41 | ||
38 | attachfile = new QAction(tr("Attach a file"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); | 42 | attachfile = new QAction(tr("Attach a file"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); |
39 | attachfile->addTo(toolbar); | 43 | attachfile->addTo(toolbar); |
40 | attachfile->addTo(mailmenu); | 44 | attachfile->addTo(mailmenu); |
41 | connect(attachfile, SIGNAL(toggled(bool)), SLOT(slotAttachfileChanged(bool))); | 45 | connect(attachfile, SIGNAL(toggled(bool)), SLOT(slotAttachfileChanged(bool))); |
42 | 46 | ||
43 | addressbook = new QAction(tr("Addressbook"), QIconSet(Resource::loadPixmap("mail/addbook")), 0, 0, this); | 47 | addressbook = new QAction(tr("Addressbook"), QIconSet(Resource::loadPixmap("mail/addbook")), 0, 0, this); |
44 | addressbook->addTo(toolbar); | 48 | addressbook->addTo(toolbar); |
45 | addressbook->addTo(mailmenu); | 49 | addressbook->addTo(mailmenu); |
46 | 50 | ||
47 | QLabel *spacer = new QLabel(toolbar); | ||
48 | spacer->setBackgroundMode(QWidget::PaletteButton); | ||
49 | toolbar->setStretchableWidget(spacer); | ||
50 | |||
51 | 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); |
52 | abort->addTo(toolbar); | 52 | abort->addTo(toolbar); |
53 | abort->addTo(mailmenu); | 53 | abort->addTo(mailmenu); |
54 | 54 | ||
55 | QWidget *main = new QWidget(this); | 55 | QWidget *main = new QWidget(this); |
56 | setCentralWidget(main); | 56 | setCentralWidget(main); |
57 | 57 | ||
58 | QGridLayout *layout = new QGridLayout(main); | 58 | QGridLayout *layout = new QGridLayout(main); |
59 | 59 | ||
60 | fromBox = new QComboBox(main); | 60 | fromBox = new QComboBox(main); |
61 | fromBox->insertItem(tr("From"), POPUP_FROM_FROM); | 61 | fromBox->insertItem(tr("From"), POPUP_FROM_FROM); |
62 | fromBox->insertItem(tr("Reply"), POPUP_FROM_REPLYTO); | 62 | fromBox->insertItem(tr("Reply"), POPUP_FROM_REPLYTO); |
63 | layout->addWidget(fromBox, 0, 0); | 63 | layout->addWidget(fromBox, 0, 0); |
64 | 64 | ||
65 | connect(fromBox, SIGNAL(activated(int)), SLOT(slotFromMenuChanged(int))); | 65 | connect(fromBox, SIGNAL(activated(int)), SLOT(slotFromMenuChanged(int))); |
66 | 66 | ||
67 | QHBoxLayout *fromLayout = new QHBoxLayout(); | 67 | QHBoxLayout *fromLayout = new QHBoxLayout(); |
68 | layout->addLayout(fromLayout, 0, 1); | 68 | layout->addLayout(fromLayout, 0, 1); |
69 | 69 | ||
70 | from = new QComboBox(main); | 70 | from = new QComboBox(main); |
71 | fromLayout->addWidget(from); | 71 | fromLayout->addWidget(from); |
72 | 72 | ||
73 | replyto = new QLineEdit(main); | 73 | replyto = new QLineEdit(main); |
74 | replyto->hide(); | 74 | replyto->hide(); |
75 | fromLayout->addWidget(replyto); | 75 | fromLayout->addWidget(replyto); |
76 | 76 | ||
77 | receiversBox = new QComboBox(main); | 77 | receiversBox = new QComboBox(main); |
78 | receiversBox->insertItem(tr("To"), POPUP_RECV_TO); | 78 | receiversBox->insertItem(tr("To"), POPUP_RECV_TO); |
79 | receiversBox->insertItem(tr("Cc"), POPUP_RECV_CC); | 79 | receiversBox->insertItem(tr("Cc"), POPUP_RECV_CC); |
80 | receiversBox->insertItem(tr("Bcc"), POPUP_RECV_BCC); | 80 | receiversBox->insertItem(tr("Bcc"), POPUP_RECV_BCC); |
81 | layout->addWidget(receiversBox, 1, 0); | 81 | layout->addWidget(receiversBox, 1, 0); |
82 | 82 | ||
83 | connect(receiversBox, SIGNAL(activated(int)), SLOT(slotReceiverMenuChanged(int))); | 83 | connect(receiversBox, SIGNAL(activated(int)), SLOT(slotReceiverMenuChanged(int))); |
84 | 84 | ||
85 | QHBoxLayout *receiverLayout = new QHBoxLayout(); | 85 | QHBoxLayout *receiverLayout = new QHBoxLayout(); |
86 | layout->addLayout(receiverLayout, 1, 1); | 86 | layout->addLayout(receiverLayout, 1, 1); |
87 | 87 | ||
88 | to = new QLineEdit(main); | 88 | to = new QLineEdit(main); |
89 | receiverLayout->addWidget(to); | 89 | receiverLayout->addWidget(to); |
90 | 90 | ||
91 | cc = new QLineEdit(main); | 91 | cc = new QLineEdit(main); |
92 | cc->hide(); | 92 | cc->hide(); |
93 | receiverLayout->addWidget(cc); | 93 | receiverLayout->addWidget(cc); |
94 | 94 | ||
95 | bcc = new QLineEdit(main); | 95 | bcc = new QLineEdit(main); |
96 | bcc->hide(); | 96 | bcc->hide(); |
97 | receiverLayout->addWidget(bcc); | 97 | receiverLayout->addWidget(bcc); |
98 | 98 | ||
99 | subjectBox = new QComboBox(main); | 99 | subjectBox = new QComboBox(main); |
100 | subjectBox->insertItem(tr("Subj."), POPUP_SUBJ_SUBJECT); | 100 | subjectBox->insertItem(tr("Subj."), POPUP_SUBJ_SUBJECT); |
101 | subjectBox->insertItem(tr("Prio."), POPUP_SUBJ_PRIORITY); | 101 | subjectBox->insertItem(tr("Prio."), POPUP_SUBJ_PRIORITY); |
102 | layout->addWidget(subjectBox, 2, 0); | 102 | layout->addWidget(subjectBox, 2, 0); |
103 | connect(subjectBox, SIGNAL(activated(int)), SLOT(slotSubjectMenuChanged(int))); | 103 | connect(subjectBox, SIGNAL(activated(int)), SLOT(slotSubjectMenuChanged(int))); |
104 | 104 | ||
105 | QHBoxLayout *subjectLayout = new QHBoxLayout(); | 105 | QHBoxLayout *subjectLayout = new QHBoxLayout(); |
106 | layout->addLayout(subjectLayout, 2, 1); | 106 | layout->addLayout(subjectLayout, 2, 1); |
107 | 107 | ||
108 | subject = new QLineEdit(main); | 108 | subject = new QLineEdit(main); |
109 | subjectLayout->addWidget(subject); | 109 | subjectLayout->addWidget(subject); |
110 | 110 | ||
111 | priority = new QComboBox(main); | 111 | priority = new QComboBox(main); |
112 | priority->insertItem(tr("Low"), POPUP_PRIO_LOW); | 112 | priority->insertItem(tr("Low"), POPUP_PRIO_LOW); |
113 | priority->insertItem(tr("Normal"), POPUP_PRIO_NORMAL); | 113 | priority->insertItem(tr("Normal"), POPUP_PRIO_NORMAL); |
114 | priority->insertItem(tr("High"), POPUP_PRIO_HIGH); | 114 | priority->insertItem(tr("High"), POPUP_PRIO_HIGH); |
115 | priority->setCurrentItem(POPUP_PRIO_NORMAL); | 115 | priority->setCurrentItem(POPUP_PRIO_NORMAL); |
116 | priority->hide(); | 116 | priority->hide(); |
117 | subjectLayout->addWidget(priority); | 117 | subjectLayout->addWidget(priority); |
118 | 118 | ||
119 | QVBox *view = new QVBox(main); | 119 | QVBox *view = new QVBox(main); |
120 | layout->addMultiCellWidget(view, 3, 3, 0, 1); | 120 | layout->addMultiCellWidget(view, 3, 3, 0, 1); |
121 | 121 | ||
122 | message = new QMultiLineEdit(view); | 122 | message = new QMultiLineEdit(view); |
123 | message->setMinimumHeight(30); | 123 | message->setMinimumHeight(30); |
124 | 124 | ||
125 | attachWindow = new QMainWindow(view, 0, 0); | 125 | attachWindow = new QMainWindow(view, 0, 0); |
126 | attachWindow->setMinimumHeight(100); | 126 | attachWindow->setMinimumHeight(100); |
127 | attachWindow->setMaximumHeight(100); | 127 | attachWindow->setMaximumHeight(100); |
128 | attachWindow->setToolBarsMovable(false); | 128 | attachWindow->setToolBarsMovable(false); |
129 | attachWindow->hide(); | 129 | attachWindow->hide(); |
130 | 130 | ||
131 | attachToolbar = new QPEToolBar(attachWindow); | 131 | attachToolbar = new QPEToolBar(attachWindow); |
132 | attachToolbar->setVerticalStretchable(true); | 132 | attachToolbar->setVerticalStretchable(true); |
133 | 133 | ||
134 | addattach = new QAction(tr("Add an Attachement"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this); | 134 | addattach = new QAction(tr("Add an Attachement"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this); |
135 | addattach->addTo(attachToolbar); | 135 | addattach->addTo(attachToolbar); |
136 | 136 | ||
137 | delattach = new QAction(tr("Remove Attachement"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); | 137 | delattach = new QAction(tr("Remove Attachement"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); |
138 | delattach->addTo(attachToolbar); | 138 | delattach->addTo(attachToolbar); |
139 | 139 | ||
140 | QLabel *attachSpacer = new QLabel(attachToolbar); | 140 | QLabel *attachSpacer = new QLabel(attachToolbar); |
141 | attachSpacer->setBackgroundMode(QWidget::PaletteButton); | 141 | attachSpacer->setBackgroundMode(QWidget::PaletteButton); |
142 | attachToolbar->setStretchableWidget(attachSpacer); | 142 | attachToolbar->setStretchableWidget(attachSpacer); |
143 | 143 | ||
144 | attachWindow->addToolBar(attachToolbar, QMainWindow::Left); | 144 | attachWindow->addToolBar(attachToolbar, QMainWindow::Left); |
145 | 145 | ||
146 | attachView = new ListViewPlus(attachWindow); | 146 | attachView = new ListViewPlus(attachWindow); |
147 | attachView->addColumn(tr("Name"), 80); | 147 | attachView->addColumn(tr("Name"), 80); |
148 | attachView->addColumn(tr("Description"), 110); | 148 | attachView->addColumn(tr("Description"), 110); |
149 | attachView->setAllColumnsShowFocus(true); | 149 | attachView->setAllColumnsShowFocus(true); |
150 | attachWindow->setCentralWidget(attachView); | 150 | attachWindow->setCentralWidget(attachView); |
151 | 151 | ||
152 | attachPopup = new QPopupMenu(attachView); | 152 | attachPopup = new QPopupMenu(attachView); |
153 | attachPopup->insertItem(tr("Rename"), POPUP_ATTACH_RENAME); | 153 | attachPopup->insertItem(tr("Rename"), POPUP_ATTACH_RENAME); |
154 | attachPopup->insertItem(tr("Change Description"), POPUP_ATTACH_DESC); | 154 | attachPopup->insertItem(tr("Change Description"), POPUP_ATTACH_DESC); |
155 | attachPopup->insertSeparator(); | 155 | attachPopup->insertSeparator(); |
156 | attachPopup->insertItem(tr("Remove"), POPUP_ATTACH_REMOVE); | 156 | attachPopup->insertItem(tr("Remove"), POPUP_ATTACH_REMOVE); |
157 | attachView->setPopup(attachPopup); | 157 | attachView->setPopup(attachPopup); |
158 | 158 | ||
159 | status = new QLabel(view); | 159 | status = new QLabel(view); |
160 | QFont tmpFont = status->font(); | 160 | QFont tmpFont = status->font(); |
161 | tmpFont.setPixelSize(8); | 161 | tmpFont.setPixelSize(8); |
162 | status->setFont(tmpFont); | 162 | status->setFont(tmpFont); |
163 | } | 163 | } |
164 | 164 | ||
165 | void ComposerBase::slotAttachfileChanged(bool toggled) | 165 | void ComposerBase::slotAttachfileChanged(bool toggled) |
166 | { | 166 | { |
167 | if (toggled) { | 167 | if (toggled) { |
168 | if (attachWindow->isHidden()) attachWindow->show(); | 168 | if (attachWindow->isHidden()) attachWindow->show(); |
169 | } else { | 169 | } else { |
170 | if (!attachWindow->isHidden()) attachWindow->hide(); | 170 | if (!attachWindow->isHidden()) attachWindow->hide(); |
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
174 | void ComposerBase::slotFromMenuChanged(int id) | 174 | void ComposerBase::slotFromMenuChanged(int id) |
175 | { | 175 | { |
176 | if (POPUP_FROM_FROM == id) { | 176 | if (POPUP_FROM_FROM == id) { |
177 | if (from->isHidden()) from->show(); | 177 | if (from->isHidden()) from->show(); |
178 | if (!replyto->isHidden()) replyto->hide(); | 178 | if (!replyto->isHidden()) replyto->hide(); |
179 | } else if (POPUP_FROM_REPLYTO == id) { | 179 | } else if (POPUP_FROM_REPLYTO == id) { |
180 | if (!from->isHidden()) from->hide(); | 180 | if (!from->isHidden()) from->hide(); |
181 | if (replyto->isHidden()) replyto->show(); | 181 | if (replyto->isHidden()) replyto->show(); |
182 | } | 182 | } |
183 | } | 183 | } |
184 | 184 | ||
185 | void ComposerBase::slotReceiverMenuChanged(int id) | 185 | void ComposerBase::slotReceiverMenuChanged(int id) |
186 | { | 186 | { |
187 | if (POPUP_RECV_TO == id) { | 187 | if (POPUP_RECV_TO == id) { |
188 | if (to->isHidden()) to->show(); | 188 | if (to->isHidden()) to->show(); |
189 | if (!cc->isHidden()) cc->hide(); | 189 | if (!cc->isHidden()) cc->hide(); |
190 | if (!bcc->isHidden()) bcc->hide(); | 190 | if (!bcc->isHidden()) bcc->hide(); |
191 | } else if (POPUP_RECV_CC == id) { | 191 | } else if (POPUP_RECV_CC == id) { |
192 | if (!to->isHidden()) to->hide(); | 192 | if (!to->isHidden()) to->hide(); |
193 | if (cc->isHidden()) cc->show(); | 193 | if (cc->isHidden()) cc->show(); |
194 | if (!bcc->isHidden()) bcc->hide(); | 194 | if (!bcc->isHidden()) bcc->hide(); |
195 | } else if (POPUP_RECV_BCC == id) { | 195 | } else if (POPUP_RECV_BCC == id) { |
196 | if (!to->isHidden()) to->hide(); | 196 | if (!to->isHidden()) to->hide(); |
197 | if (!cc->isHidden()) cc->hide(); | 197 | if (!cc->isHidden()) cc->hide(); |
198 | if (bcc->isHidden()) bcc->show(); | 198 | if (bcc->isHidden()) bcc->show(); |
199 | } | 199 | } |
200 | } | 200 | } |
201 | 201 | ||
202 | void ComposerBase::slotSubjectMenuChanged(int id) | 202 | void ComposerBase::slotSubjectMenuChanged(int id) |
203 | { | 203 | { |
204 | if (POPUP_SUBJ_SUBJECT == id) { | 204 | if (POPUP_SUBJ_SUBJECT == id) { |
205 | if (subject->isHidden()) subject->show(); | 205 | if (subject->isHidden()) subject->show(); |
206 | if (!priority->isHidden()) priority->hide(); | 206 | if (!priority->isHidden()) priority->hide(); |
207 | } else if (POPUP_SUBJ_PRIORITY == id) { | 207 | } else if (POPUP_SUBJ_PRIORITY == id) { |
208 | if (!subject->isHidden()) subject->hide(); | 208 | if (!subject->isHidden()) subject->hide(); |
209 | if (priority->isHidden()) priority->show(); | 209 | if (priority->isHidden()) priority->show(); |
210 | } | 210 | } |
211 | } | 211 | } |
diff --git a/noncore/unsupported/mail2/configdiag.cpp b/noncore/unsupported/mail2/configdiag.cpp index b89b937..e2b2f13 100644 --- a/noncore/unsupported/mail2/configdiag.cpp +++ b/noncore/unsupported/mail2/configdiag.cpp | |||
@@ -1,145 +1,125 @@ | |||
1 | #include <qmessagebox.h> | 1 | #include <qmessagebox.h> |
2 | #include <qpushbutton.h> | 2 | #include <qpushbutton.h> |
3 | #include <qtoolbutton.h> | 3 | #include <qtoolbutton.h> |
4 | #include <qgroupbox.h> | 4 | #include <qgroupbox.h> |
5 | #include <qcheckbox.h> | 5 | #include <qcheckbox.h> |
6 | #include <qspinbox.h> | 6 | #include <qspinbox.h> |
7 | #include <qheader.h> | 7 | #include <qheader.h> |
8 | #include <qtimer.h> | 8 | #include <qtimer.h> |
9 | #include <qlabel.h> | 9 | #include <qlabel.h> |
10 | 10 | ||
11 | #include <qpe/resource.h> | 11 | #include <qpe/resource.h> |
12 | #include <qpe/config.h> | 12 | #include <qpe/config.h> |
13 | 13 | ||
14 | #include "accounteditor.h" | 14 | #include "accounteditor.h" |
15 | #include "zaurusstuff.h" | ||
16 | #include "configdiag.h" | 15 | #include "configdiag.h" |
17 | #include "defines.h" | 16 | #include "defines.h" |
18 | 17 | ||
19 | AccountListItem::AccountListItem(QListView *parent, Account &account) | 18 | AccountListItem::AccountListItem(QListView *parent, Account &account) |
20 | : QListViewItem(parent), _account(account) | 19 | : QListViewItem(parent), _account(account) |
21 | { | 20 | { |
22 | QString displayText; | 21 | QString displayText; |
23 | if (!_account.realName().isEmpty() && !_account.email().isEmpty()) | 22 | if (!_account.realName().isEmpty() && !_account.email().isEmpty()) |
24 | setText(0, _account.realName() + " <" + _account.email() + ">"); | 23 | setText(0, _account.realName() + " <" + _account.email() + ">"); |
25 | else if (_account.realName().isEmpty() && !_account.email().isEmpty()) | 24 | else if (_account.realName().isEmpty() && !_account.email().isEmpty()) |
26 | setText(0, _account.email()); | 25 | setText(0, _account.email()); |
27 | else if (!_account.realName().isEmpty() && _account.email().isEmpty()) | 26 | else if (!_account.realName().isEmpty() && _account.email().isEmpty()) |
28 | setText(0, _account.realName()); | 27 | setText(0, _account.realName()); |
29 | else | 28 | else |
30 | setText(0, QObject::tr("(no name)")); | 29 | setText(0, QObject::tr("(no name)")); |
31 | 30 | ||
32 | setPixmap(0, Resource::loadPixmap("mail/inbox")); | 31 | setPixmap(0, Resource::loadPixmap("mail/inbox")); |
33 | } | 32 | } |
34 | 33 | ||
35 | ConfigDiag::ConfigDiag(QWidget *parent, const char *name, bool modal, WFlags fl) | 34 | ConfigDiag::ConfigDiag(QWidget *parent, const char *name, bool modal, WFlags fl) |
36 | : ConfigDiagBase(parent, name, modal, fl) | 35 | : ConfigDiagBase(parent, name, modal, fl) |
37 | { | 36 | { |
38 | _configBenD = new Config("mail"); | 37 | _configBenD = new Config("mail"); |
39 | _configBenD->setGroup("Settings"); | 38 | _configBenD->setGroup("Settings"); |
40 | disabled->setChecked(_configBenD->readBoolEntry("Disabled", false)); | 39 | disabled->setChecked(_configBenD->readBoolEntry("Disabled", false)); |
41 | playSound->setChecked(_configBenD->readBoolEntry("PlaySound", false)); | 40 | playSound->setChecked(_configBenD->readBoolEntry("PlaySound", false)); |
42 | blinkLed->setChecked(_configBenD->readBoolEntry("BlinkLed", true)); | 41 | blinkLed->setChecked(_configBenD->readBoolEntry("BlinkLed", true)); |
43 | checkDelay->setValue(_configBenD->readNumEntry("CheckDelay", 5)); | 42 | checkDelay->setValue(_configBenD->readNumEntry("CheckDelay", 5)); |
44 | 43 | ||
45 | accountList->header()->hide(); | 44 | accountList->header()->hide(); |
46 | disclaimer->setText(disclaimer->text().arg(VERSION)); | 45 | disclaimer->setText(disclaimer->text().arg(VERSION)); |
47 | 46 | ||
48 | connect(accountNew, SIGNAL(clicked()), SLOT(slotNewAccount())); | 47 | connect(accountNew, SIGNAL(clicked()), SLOT(slotNewAccount())); |
49 | connect(accountEdit, SIGNAL(clicked()), SLOT(slotEditAccount())); | 48 | connect(accountEdit, SIGNAL(clicked()), SLOT(slotEditAccount())); |
50 | connect(accountDelete, SIGNAL(clicked()), SLOT(slotDelAccount())); | 49 | connect(accountDelete, SIGNAL(clicked()), SLOT(slotDelAccount())); |
51 | 50 | ||
52 | connect(testbutton, SIGNAL(clicked()), SLOT(slotTestSettings())); | ||
53 | |||
54 | slotFillLists(); | 51 | slotFillLists(); |
55 | } | 52 | } |
56 | 53 | ||
57 | void ConfigDiag::accept() | 54 | void ConfigDiag::accept() |
58 | { | 55 | { |
59 | _configBenD->setGroup("Settings"); | 56 | _configBenD->setGroup("Settings"); |
60 | _configBenD->writeEntry("Disabled", disabled->isChecked()); | 57 | _configBenD->writeEntry("Disabled", disabled->isChecked()); |
61 | _configBenD->writeEntry("PlaySound", playSound->isChecked()); | 58 | _configBenD->writeEntry("PlaySound", playSound->isChecked()); |
62 | _configBenD->writeEntry("BlinkLed", blinkLed->isChecked()); | 59 | _configBenD->writeEntry("BlinkLed", blinkLed->isChecked()); |
63 | _configBenD->writeEntry("CheckDelay", checkDelay->value()); | 60 | _configBenD->writeEntry("CheckDelay", checkDelay->value()); |
64 | _configBenD->write(); | 61 | _configBenD->write(); |
65 | 62 | ||
66 | QDialog::accept(); | 63 | QDialog::accept(); |
67 | } | 64 | } |
68 | 65 | ||
69 | void ConfigDiag::slotFillLists() | 66 | void ConfigDiag::slotFillLists() |
70 | { | 67 | { |
71 | accountList->clear(); | 68 | accountList->clear(); |
72 | 69 | ||
73 | QValueList<Account> accounts = ConfigFile::getAccounts(); | 70 | QValueList<Account> accounts = ConfigFile::getAccounts(); |
74 | 71 | ||
75 | QValueList<Account>::Iterator it; | 72 | QValueList<Account>::Iterator it; |
76 | for (it = accounts.begin(); it != accounts.end(); it++) | 73 | for (it = accounts.begin(); it != accounts.end(); it++) |
77 | (void) new AccountListItem(accountList, *it); | 74 | (void) new AccountListItem(accountList, *it); |
78 | } | 75 | } |
79 | 76 | ||
80 | void ConfigDiag::slotNewAccount() | 77 | void ConfigDiag::slotNewAccount() |
81 | { | 78 | { |
82 | Account account; | 79 | Account account; |
83 | AccountEditor editor(account, 0, 0, true); | 80 | AccountEditor editor(account, 0, 0, true); |
84 | editor.showMaximized(); | 81 | editor.showMaximized(); |
85 | editor.show(); | 82 | editor.show(); |
86 | 83 | ||
87 | if (QDialog::Accepted == editor.exec()) { | 84 | if (QDialog::Accepted == editor.exec()) { |
88 | ConfigFile::updateAccount(editor._account); | 85 | ConfigFile::updateAccount(editor._account); |
89 | slotFillLists(); | 86 | slotFillLists(); |
90 | emit changed(); | 87 | emit changed(); |
91 | } | 88 | } |
92 | } | 89 | } |
93 | 90 | ||
94 | void ConfigDiag::slotEditAccount() | 91 | void ConfigDiag::slotEditAccount() |
95 | { | 92 | { |
96 | if (!accountList->currentItem()) { | 93 | if (!accountList->currentItem()) { |
97 | QMessageBox::information(this, tr("Error"), tr("<p>You have to select an account first.</p>"), tr("Ok")); | 94 | QMessageBox::information(this, tr("Error"), tr("<p>You have to select an account first.</p>"), tr("Ok")); |
98 | return; | 95 | return; |
99 | } | 96 | } |
100 | Account account = ((AccountListItem *)accountList->currentItem())->account(); | 97 | Account account = ((AccountListItem *)accountList->currentItem())->account(); |
101 | 98 | ||
102 | AccountEditor editor(account, 0, 0, true); | 99 | AccountEditor editor(account, 0, 0, true); |
103 | editor.showMaximized(); | 100 | editor.showMaximized(); |
104 | editor.show(); | 101 | editor.show(); |
105 | 102 | ||
106 | if (QDialog::Accepted == editor.exec()) { | 103 | if (QDialog::Accepted == editor.exec()) { |
107 | ConfigFile::updateAccount(editor._account); | 104 | ConfigFile::updateAccount(editor._account); |
108 | slotFillLists(); | 105 | slotFillLists(); |
109 | emit changed(); | 106 | emit changed(); |
110 | } | 107 | } |
111 | } | 108 | } |
112 | 109 | ||
113 | void ConfigDiag::slotDelAccount() | 110 | void ConfigDiag::slotDelAccount() |
114 | { | 111 | { |
115 | if (!accountList->currentItem()) { | 112 | if (!accountList->currentItem()) { |
116 | QMessageBox::information(this, tr("Error"), tr("<p>You have to select an account first.</p>"), tr("Ok")); | 113 | QMessageBox::information(this, tr("Error"), tr("<p>You have to select an account first.</p>"), tr("Ok")); |
117 | return; | 114 | return; |
118 | } | 115 | } |
119 | Account account = ((AccountListItem *)accountList->currentItem())->account(); | 116 | Account account = ((AccountListItem *)accountList->currentItem())->account(); |
120 | 117 | ||
121 | int ret = QMessageBox::information(this, tr("Question"), tr("<p>Do you relly want to delete the selected account?</p>"), tr("Yes"), tr("No")); | 118 | int ret = QMessageBox::information(this, tr("Question"), tr("<p>Do you relly want to delete the selected account?</p>"), tr("Yes"), tr("No")); |
122 | if (1 == ret) return; | 119 | if (1 == ret) return; |
123 | 120 | ||
124 | ConfigFile::deleteAccount(account); | 121 | ConfigFile::deleteAccount(account); |
125 | slotFillLists(); | 122 | slotFillLists(); |
126 | emit changed(); | 123 | emit changed(); |
127 | } | 124 | } |
128 | 125 | ||
129 | void ConfigDiag::slotTestSettings() | ||
130 | { | ||
131 | testbutton->setEnabled(false); | ||
132 | |||
133 | if (blinkLed->isChecked()) ZaurusStuff::blinkLedOn(); | ||
134 | if (playSound->isChecked()) ZaurusStuff::buzzerOn(); | ||
135 | QTimer::singleShot(3000, this, SLOT(slotEndTest())); | ||
136 | } | ||
137 | |||
138 | void ConfigDiag::slotEndTest() | ||
139 | { | ||
140 | if (playSound->isChecked()) ZaurusStuff::buzzerOff(); | ||
141 | if (blinkLed->isChecked()) ZaurusStuff::blinkLedOff(); | ||
142 | |||
143 | testbutton->setEnabled(true); | ||
144 | } | ||
145 | |||
diff --git a/noncore/unsupported/mail2/configdiag.h b/noncore/unsupported/mail2/configdiag.h index f70ba7f..cbc9b22 100644 --- a/noncore/unsupported/mail2/configdiag.h +++ b/noncore/unsupported/mail2/configdiag.h | |||
@@ -1,48 +1,46 @@ | |||
1 | #ifndef CONFIGDIAG_H | 1 | #ifndef CONFIGDIAG_H |
2 | #define CONFIGDIAG_H | 2 | #define CONFIGDIAG_H |
3 | 3 | ||
4 | #include <qlistview.h> | 4 | #include <qlistview.h> |
5 | 5 | ||
6 | #include "configdiagbase.h" | 6 | #include "configdiagbase.h" |
7 | #include "configfile.h" | 7 | #include "configfile.h" |
8 | 8 | ||
9 | class Config; | 9 | class Config; |
10 | class Account; | 10 | class Account; |
11 | 11 | ||
12 | class AccountListItem : public QListViewItem | 12 | class AccountListItem : public QListViewItem |
13 | { | 13 | { |
14 | public: | 14 | public: |
15 | AccountListItem(QListView *parent, Account &account); | 15 | AccountListItem(QListView *parent, Account &account); |
16 | 16 | ||
17 | Account account() { return _account; } | 17 | Account account() { return _account; } |
18 | 18 | ||
19 | protected: | 19 | protected: |
20 | Account _account; | 20 | Account _account; |
21 | 21 | ||
22 | }; | 22 | }; |
23 | 23 | ||
24 | class ConfigDiag : public ConfigDiagBase | 24 | class ConfigDiag : public ConfigDiagBase |
25 | { | 25 | { |
26 | Q_OBJECT | 26 | Q_OBJECT |
27 | 27 | ||
28 | public: | 28 | public: |
29 | ConfigDiag(QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags fl = 0); | 29 | ConfigDiag(QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags fl = 0); |
30 | 30 | ||
31 | signals: | 31 | signals: |
32 | void changed(); | 32 | void changed(); |
33 | 33 | ||
34 | protected slots: | 34 | protected slots: |
35 | void accept(); | 35 | void accept(); |
36 | void slotFillLists(); | 36 | void slotFillLists(); |
37 | void slotNewAccount(); | 37 | void slotNewAccount(); |
38 | void slotEditAccount(); | 38 | void slotEditAccount(); |
39 | void slotDelAccount(); | 39 | void slotDelAccount(); |
40 | void slotTestSettings(); | ||
41 | void slotEndTest(); | ||
42 | 40 | ||
43 | private: | 41 | private: |
44 | Config *_configBenD; | 42 | Config *_configBenD; |
45 | 43 | ||
46 | }; | 44 | }; |
47 | 45 | ||
48 | #endif | 46 | #endif |
diff --git a/noncore/unsupported/mail2/configdiagbase.ui b/noncore/unsupported/mail2/configdiagbase.ui index 182fedc..8b225fe 100644 --- a/noncore/unsupported/mail2/configdiagbase.ui +++ b/noncore/unsupported/mail2/configdiagbase.ui | |||
@@ -1,352 +1,341 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>ConfigDiagBase</class> | 2 | <class>ConfigDiagBase</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QDialog</class> | 4 | <class>QDialog</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>ConfigDiagBase</cstring> | 7 | <cstring>ConfigDiagBase</cstring> |
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>260</width> | 14 | <width>260</width> |
15 | <height>344</height> | 15 | <height>344</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>Configuration</string> | 20 | <string>Configuration</string> |
21 | </property> | 21 | </property> |
22 | <property> | 22 | <property> |
23 | <name>layoutMargin</name> | 23 | <name>layoutMargin</name> |
24 | </property> | 24 | </property> |
25 | <property> | 25 | <property> |
26 | <name>layoutSpacing</name> | 26 | <name>layoutSpacing</name> |
27 | </property> | 27 | </property> |
28 | <grid> | 28 | <grid> |
29 | <property stdset="1"> | 29 | <property stdset="1"> |
30 | <name>margin</name> | 30 | <name>margin</name> |
31 | <number>0</number> | 31 | <number>0</number> |
32 | </property> | 32 | </property> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>spacing</name> | 34 | <name>spacing</name> |
35 | <number>0</number> | 35 | <number>0</number> |
36 | </property> | 36 | </property> |
37 | <widget row="0" column="0" > | 37 | <widget row="0" column="0" > |
38 | <class>QTabWidget</class> | 38 | <class>QTabWidget</class> |
39 | <property stdset="1"> | 39 | <property stdset="1"> |
40 | <name>name</name> | 40 | <name>name</name> |
41 | <cstring>TabWidget2</cstring> | 41 | <cstring>TabWidget2</cstring> |
42 | </property> | 42 | </property> |
43 | <property> | 43 | <property> |
44 | <name>layoutMargin</name> | 44 | <name>layoutMargin</name> |
45 | </property> | 45 | </property> |
46 | <property> | 46 | <property> |
47 | <name>layoutSpacing</name> | 47 | <name>layoutSpacing</name> |
48 | </property> | 48 | </property> |
49 | <widget> | 49 | <widget> |
50 | <class>QWidget</class> | 50 | <class>QWidget</class> |
51 | <property stdset="1"> | 51 | <property stdset="1"> |
52 | <name>name</name> | 52 | <name>name</name> |
53 | <cstring>tab</cstring> | 53 | <cstring>tab</cstring> |
54 | </property> | 54 | </property> |
55 | <attribute> | 55 | <attribute> |
56 | <name>title</name> | 56 | <name>title</name> |
57 | <string>Accounts</string> | 57 | <string>Accounts</string> |
58 | </attribute> | 58 | </attribute> |
59 | <grid> | 59 | <grid> |
60 | <property stdset="1"> | 60 | <property stdset="1"> |
61 | <name>margin</name> | 61 | <name>margin</name> |
62 | <number>4</number> | 62 | <number>4</number> |
63 | </property> | 63 | </property> |
64 | <property stdset="1"> | 64 | <property stdset="1"> |
65 | <name>spacing</name> | 65 | <name>spacing</name> |
66 | <number>3</number> | 66 | <number>3</number> |
67 | </property> | 67 | </property> |
68 | <widget row="1" column="1" > | 68 | <widget row="1" column="1" > |
69 | <class>QPushButton</class> | 69 | <class>QPushButton</class> |
70 | <property stdset="1"> | 70 | <property stdset="1"> |
71 | <name>name</name> | 71 | <name>name</name> |
72 | <cstring>accountEdit</cstring> | 72 | <cstring>accountEdit</cstring> |
73 | </property> | 73 | </property> |
74 | <property stdset="1"> | 74 | <property stdset="1"> |
75 | <name>text</name> | 75 | <name>text</name> |
76 | <string>Edit</string> | 76 | <string>Edit</string> |
77 | </property> | 77 | </property> |
78 | </widget> | 78 | </widget> |
79 | <widget row="1" column="2" > | 79 | <widget row="1" column="2" > |
80 | <class>QPushButton</class> | 80 | <class>QPushButton</class> |
81 | <property stdset="1"> | 81 | <property stdset="1"> |
82 | <name>name</name> | 82 | <name>name</name> |
83 | <cstring>accountDelete</cstring> | 83 | <cstring>accountDelete</cstring> |
84 | </property> | 84 | </property> |
85 | <property stdset="1"> | 85 | <property stdset="1"> |
86 | <name>text</name> | 86 | <name>text</name> |
87 | <string>Delete</string> | 87 | <string>Delete</string> |
88 | </property> | 88 | </property> |
89 | </widget> | 89 | </widget> |
90 | <widget row="0" column="0" rowspan="1" colspan="3" > | 90 | <widget row="0" column="0" rowspan="1" colspan="3" > |
91 | <class>QListView</class> | 91 | <class>QListView</class> |
92 | <column> | 92 | <column> |
93 | <property> | 93 | <property> |
94 | <name>text</name> | 94 | <name>text</name> |
95 | <string>[Hidden]</string> | 95 | <string>[Hidden]</string> |
96 | </property> | 96 | </property> |
97 | <property> | 97 | <property> |
98 | <name>clickable</name> | 98 | <name>clickable</name> |
99 | <bool>true</bool> | 99 | <bool>true</bool> |
100 | </property> | 100 | </property> |
101 | <property> | 101 | <property> |
102 | <name>resizeable</name> | 102 | <name>resizeable</name> |
103 | <bool>true</bool> | 103 | <bool>true</bool> |
104 | </property> | 104 | </property> |
105 | </column> | 105 | </column> |
106 | <property stdset="1"> | 106 | <property stdset="1"> |
107 | <name>name</name> | 107 | <name>name</name> |
108 | <cstring>accountList</cstring> | 108 | <cstring>accountList</cstring> |
109 | </property> | 109 | </property> |
110 | </widget> | 110 | </widget> |
111 | <widget row="1" column="0" > | 111 | <widget row="1" column="0" > |
112 | <class>QPushButton</class> | 112 | <class>QPushButton</class> |
113 | <property stdset="1"> | 113 | <property stdset="1"> |
114 | <name>name</name> | 114 | <name>name</name> |
115 | <cstring>accountNew</cstring> | 115 | <cstring>accountNew</cstring> |
116 | </property> | 116 | </property> |
117 | <property stdset="1"> | 117 | <property stdset="1"> |
118 | <name>text</name> | 118 | <name>text</name> |
119 | <string>New</string> | 119 | <string>New</string> |
120 | </property> | 120 | </property> |
121 | </widget> | 121 | </widget> |
122 | </grid> | 122 | </grid> |
123 | </widget> | 123 | </widget> |
124 | <widget> | 124 | <widget> |
125 | <class>QWidget</class> | 125 | <class>QWidget</class> |
126 | <property stdset="1"> | 126 | <property stdset="1"> |
127 | <name>name</name> | 127 | <name>name</name> |
128 | <cstring>tab</cstring> | 128 | <cstring>tab</cstring> |
129 | </property> | 129 | </property> |
130 | <attribute> | 130 | <attribute> |
131 | <name>title</name> | 131 | <name>title</name> |
132 | <string>General</string> | 132 | <string>General</string> |
133 | </attribute> | 133 | </attribute> |
134 | <grid> | 134 | <grid> |
135 | <property stdset="1"> | 135 | <property stdset="1"> |
136 | <name>margin</name> | 136 | <name>margin</name> |
137 | <number>4</number> | 137 | <number>4</number> |
138 | </property> | 138 | </property> |
139 | <property stdset="1"> | 139 | <property stdset="1"> |
140 | <name>spacing</name> | 140 | <name>spacing</name> |
141 | <number>3</number> | 141 | <number>3</number> |
142 | </property> | 142 | </property> |
143 | <spacer row="1" column="0" > | 143 | <spacer row="1" column="0" > |
144 | <property> | 144 | <property> |
145 | <name>name</name> | 145 | <name>name</name> |
146 | <cstring>Spacer5</cstring> | 146 | <cstring>Spacer5</cstring> |
147 | </property> | 147 | </property> |
148 | <property stdset="1"> | 148 | <property stdset="1"> |
149 | <name>orientation</name> | 149 | <name>orientation</name> |
150 | <enum>Vertical</enum> | 150 | <enum>Vertical</enum> |
151 | </property> | 151 | </property> |
152 | <property stdset="1"> | 152 | <property stdset="1"> |
153 | <name>sizeType</name> | 153 | <name>sizeType</name> |
154 | <enum>Expanding</enum> | 154 | <enum>Expanding</enum> |
155 | </property> | 155 | </property> |
156 | <property> | 156 | <property> |
157 | <name>sizeHint</name> | 157 | <name>sizeHint</name> |
158 | <size> | 158 | <size> |
159 | <width>20</width> | 159 | <width>20</width> |
160 | <height>20</height> | 160 | <height>20</height> |
161 | </size> | 161 | </size> |
162 | </property> | 162 | </property> |
163 | </spacer> | 163 | </spacer> |
164 | <widget row="0" column="0" > | 164 | <widget row="0" column="0" > |
165 | <class>QGroupBox</class> | 165 | <class>QGroupBox</class> |
166 | <property stdset="1"> | 166 | <property stdset="1"> |
167 | <name>name</name> | 167 | <name>name</name> |
168 | <cstring>notificationGroup</cstring> | 168 | <cstring>notificationGroup</cstring> |
169 | </property> | 169 | </property> |
170 | <property stdset="1"> | 170 | <property stdset="1"> |
171 | <name>title</name> | 171 | <name>title</name> |
172 | <string>Mail notification</string> | 172 | <string>Mail notification</string> |
173 | </property> | 173 | </property> |
174 | <property> | 174 | <property> |
175 | <name>layoutMargin</name> | 175 | <name>layoutMargin</name> |
176 | </property> | 176 | </property> |
177 | <property> | 177 | <property> |
178 | <name>layoutSpacing</name> | 178 | <name>layoutSpacing</name> |
179 | </property> | 179 | </property> |
180 | <grid> | 180 | <grid> |
181 | <property stdset="1"> | 181 | <property stdset="1"> |
182 | <name>margin</name> | 182 | <name>margin</name> |
183 | <number>4</number> | 183 | <number>4</number> |
184 | </property> | 184 | </property> |
185 | <property stdset="1"> | 185 | <property stdset="1"> |
186 | <name>spacing</name> | 186 | <name>spacing</name> |
187 | <number>3</number> | 187 | <number>3</number> |
188 | </property> | 188 | </property> |
189 | <widget row="1" column="0" > | 189 | <widget row="1" column="0" > |
190 | <class>QFrame</class> | 190 | <class>QFrame</class> |
191 | <property stdset="1"> | 191 | <property stdset="1"> |
192 | <name>name</name> | 192 | <name>name</name> |
193 | <cstring>Frame3</cstring> | 193 | <cstring>Frame3</cstring> |
194 | </property> | 194 | </property> |
195 | <property stdset="1"> | 195 | <property stdset="1"> |
196 | <name>frameShape</name> | 196 | <name>frameShape</name> |
197 | <enum>NoFrame</enum> | 197 | <enum>NoFrame</enum> |
198 | </property> | 198 | </property> |
199 | <property stdset="1"> | 199 | <property stdset="1"> |
200 | <name>frameShadow</name> | 200 | <name>frameShadow</name> |
201 | <enum>Raised</enum> | 201 | <enum>Raised</enum> |
202 | </property> | 202 | </property> |
203 | <property> | 203 | <property> |
204 | <name>layoutMargin</name> | 204 | <name>layoutMargin</name> |
205 | </property> | 205 | </property> |
206 | <property> | 206 | <property> |
207 | <name>layoutSpacing</name> | 207 | <name>layoutSpacing</name> |
208 | </property> | 208 | </property> |
209 | <grid> | 209 | <grid> |
210 | <property stdset="1"> | 210 | <property stdset="1"> |
211 | <name>margin</name> | 211 | <name>margin</name> |
212 | <number>0</number> | 212 | <number>0</number> |
213 | </property> | 213 | </property> |
214 | <property stdset="1"> | 214 | <property stdset="1"> |
215 | <name>spacing</name> | 215 | <name>spacing</name> |
216 | <number>3</number> | 216 | <number>3</number> |
217 | </property> | 217 | </property> |
218 | <widget row="1" column="0" rowspan="1" colspan="3" > | 218 | <widget row="1" column="0" rowspan="1" colspan="3" > |
219 | <class>QCheckBox</class> | 219 | <class>QCheckBox</class> |
220 | <property stdset="1"> | 220 | <property stdset="1"> |
221 | <name>name</name> | 221 | <name>name</name> |
222 | <cstring>blinkLed</cstring> | 222 | <cstring>blinkLed</cstring> |
223 | </property> | 223 | </property> |
224 | <property stdset="1"> | 224 | <property stdset="1"> |
225 | <name>sizePolicy</name> | 225 | <name>sizePolicy</name> |
226 | <sizepolicy> | 226 | <sizepolicy> |
227 | <hsizetype>3</hsizetype> | 227 | <hsizetype>3</hsizetype> |
228 | <vsizetype>0</vsizetype> | 228 | <vsizetype>0</vsizetype> |
229 | </sizepolicy> | 229 | </sizepolicy> |
230 | </property> | 230 | </property> |
231 | <property stdset="1"> | 231 | <property stdset="1"> |
232 | <name>text</name> | 232 | <name>text</name> |
233 | <string>Blink LED</string> | 233 | <string>Blink LED</string> |
234 | </property> | 234 | </property> |
235 | </widget> | 235 | </widget> |
236 | <widget row="2" column="2" > | ||
237 | <class>QToolButton</class> | ||
238 | <property stdset="1"> | ||
239 | <name>name</name> | ||
240 | <cstring>testbutton</cstring> | ||
241 | </property> | ||
242 | <property stdset="1"> | ||
243 | <name>text</name> | ||
244 | <string> Test </string> | ||
245 | </property> | ||
246 | </widget> | ||
247 | <widget row="0" column="0" rowspan="1" colspan="3" > | 236 | <widget row="0" column="0" rowspan="1" colspan="3" > |
248 | <class>QCheckBox</class> | 237 | <class>QCheckBox</class> |
249 | <property stdset="1"> | 238 | <property stdset="1"> |
250 | <name>name</name> | 239 | <name>name</name> |
251 | <cstring>playSound</cstring> | 240 | <cstring>playSound</cstring> |
252 | </property> | 241 | </property> |
253 | <property stdset="1"> | 242 | <property stdset="1"> |
254 | <name>text</name> | 243 | <name>text</name> |
255 | <string>Play sound</string> | 244 | <string>Play sound</string> |
256 | </property> | 245 | </property> |
257 | </widget> | 246 | </widget> |
258 | <widget row="2" column="0" > | 247 | <widget row="2" column="0" > |
259 | <class>QLabel</class> | 248 | <class>QLabel</class> |
260 | <property stdset="1"> | 249 | <property stdset="1"> |
261 | <name>name</name> | 250 | <name>name</name> |
262 | <cstring>TextLabel1</cstring> | 251 | <cstring>TextLabel1</cstring> |
263 | </property> | 252 | </property> |
264 | <property stdset="1"> | 253 | <property stdset="1"> |
265 | <name>text</name> | 254 | <name>text</name> |
266 | <string><b>Check&nbsp;every</string> | 255 | <string><b>Check&nbsp;every</string> |
267 | </property> | 256 | </property> |
268 | </widget> | 257 | </widget> |
269 | <widget row="2" column="1" > | 258 | <widget row="2" column="1" > |
270 | <class>QSpinBox</class> | 259 | <class>QSpinBox</class> |
271 | <property stdset="1"> | 260 | <property stdset="1"> |
272 | <name>name</name> | 261 | <name>name</name> |
273 | <cstring>checkDelay</cstring> | 262 | <cstring>checkDelay</cstring> |
274 | </property> | 263 | </property> |
275 | <property stdset="1"> | 264 | <property stdset="1"> |
276 | <name>sizePolicy</name> | 265 | <name>sizePolicy</name> |
277 | <sizepolicy> | 266 | <sizepolicy> |
278 | <hsizetype>3</hsizetype> | 267 | <hsizetype>3</hsizetype> |
279 | <vsizetype>0</vsizetype> | 268 | <vsizetype>0</vsizetype> |
280 | </sizepolicy> | 269 | </sizepolicy> |
281 | </property> | 270 | </property> |
282 | <property stdset="1"> | 271 | <property stdset="1"> |
283 | <name>suffix</name> | 272 | <name>suffix</name> |
284 | <string> min</string> | 273 | <string> min</string> |
285 | </property> | 274 | </property> |
286 | <property stdset="1"> | 275 | <property stdset="1"> |
287 | <name>maxValue</name> | 276 | <name>maxValue</name> |
288 | <number>30</number> | 277 | <number>30</number> |
289 | </property> | 278 | </property> |
290 | <property stdset="1"> | 279 | <property stdset="1"> |
291 | <name>minValue</name> | 280 | <name>minValue</name> |
292 | <number>1</number> | 281 | <number>1</number> |
293 | </property> | 282 | </property> |
294 | <property stdset="1"> | 283 | <property stdset="1"> |
295 | <name>value</name> | 284 | <name>value</name> |
296 | <number>1</number> | 285 | <number>1</number> |
297 | </property> | 286 | </property> |
298 | </widget> | 287 | </widget> |
299 | </grid> | 288 | </grid> |
300 | </widget> | 289 | </widget> |
301 | <widget row="0" column="0" > | 290 | <widget row="0" column="0" > |
302 | <class>QCheckBox</class> | 291 | <class>QCheckBox</class> |
303 | <property stdset="1"> | 292 | <property stdset="1"> |
304 | <name>name</name> | 293 | <name>name</name> |
305 | <cstring>disabled</cstring> | 294 | <cstring>disabled</cstring> |
306 | </property> | 295 | </property> |
307 | <property stdset="1"> | 296 | <property stdset="1"> |
308 | <name>text</name> | 297 | <name>text</name> |
309 | <string>Disable mail notification</string> | 298 | <string>Disable mail notification</string> |
310 | </property> | 299 | </property> |
311 | </widget> | 300 | </widget> |
312 | </grid> | 301 | </grid> |
313 | </widget> | 302 | </widget> |
314 | <widget row="2" column="0" > | 303 | <widget row="2" column="0" > |
315 | <class>QLabel</class> | 304 | <class>QLabel</class> |
316 | <property stdset="1"> | 305 | <property stdset="1"> |
317 | <name>name</name> | 306 | <name>name</name> |
318 | <cstring>disclaimer</cstring> | 307 | <cstring>disclaimer</cstring> |
319 | </property> | 308 | </property> |
320 | <property stdset="1"> | 309 | <property stdset="1"> |
321 | <name>text</name> | 310 | <name>text</name> |
322 | <string><p><b>Mail version %1</b><hr> | 311 | <string><p><b>Mail version %1</b><hr> |
323 | Sponsored and Programmed by LISAsystems<br> | 312 | Sponsored and Programmed by LISAsystems<br> |
324 | Visit http://www.lisa.de/ for Information. | 313 | Visit http://www.lisa.de/ for Information. |
325 | </string> | 314 | </string> |
326 | </property> | 315 | </property> |
327 | </widget> | 316 | </widget> |
328 | </grid> | 317 | </grid> |
329 | </widget> | 318 | </widget> |
330 | </widget> | 319 | </widget> |
331 | </grid> | 320 | </grid> |
332 | </widget> | 321 | </widget> |
333 | <connections> | 322 | <connections> |
334 | <connection> | 323 | <connection> |
335 | <sender>disabled</sender> | 324 | <sender>disabled</sender> |
336 | <signal>toggled(bool)</signal> | 325 | <signal>toggled(bool)</signal> |
337 | <receiver>Frame3</receiver> | 326 | <receiver>Frame3</receiver> |
338 | <slot>setDisabled(bool)</slot> | 327 | <slot>setDisabled(bool)</slot> |
339 | </connection> | 328 | </connection> |
340 | </connections> | 329 | </connections> |
341 | <tabstops> | 330 | <tabstops> |
342 | <tabstop>TabWidget2</tabstop> | 331 | <tabstop>TabWidget2</tabstop> |
343 | <tabstop>accountList</tabstop> | 332 | <tabstop>accountList</tabstop> |
344 | <tabstop>accountNew</tabstop> | 333 | <tabstop>accountNew</tabstop> |
345 | <tabstop>accountEdit</tabstop> | 334 | <tabstop>accountEdit</tabstop> |
346 | <tabstop>accountDelete</tabstop> | 335 | <tabstop>accountDelete</tabstop> |
347 | <tabstop>disabled</tabstop> | 336 | <tabstop>disabled</tabstop> |
348 | <tabstop>playSound</tabstop> | 337 | <tabstop>playSound</tabstop> |
349 | <tabstop>blinkLed</tabstop> | 338 | <tabstop>blinkLed</tabstop> |
350 | <tabstop>checkDelay</tabstop> | 339 | <tabstop>checkDelay</tabstop> |
351 | </tabstops> | 340 | </tabstops> |
352 | </UI> | 341 | </UI> |
diff --git a/noncore/unsupported/mail2/mainwindowbase.cpp b/noncore/unsupported/mail2/mainwindowbase.cpp index 9ffe6f0..d61899b 100644 --- a/noncore/unsupported/mail2/mainwindowbase.cpp +++ b/noncore/unsupported/mail2/mainwindowbase.cpp | |||
@@ -1,90 +1,90 @@ | |||
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 <qaction.h> | 4 | #include <qaction.h> |
5 | #include <qheader.h> | 5 | #include <qheader.h> |
6 | #include <qlabel.h> | 6 | #include <qlabel.h> |
7 | #include <qvbox.h> | 7 | #include <qvbox.h> |
8 | 8 | ||
9 | #include <qpe/qpetoolbar.h> | 9 | #include <qpe/qpetoolbar.h> |
10 | #include <qpe/qpemenubar.h> | 10 | #include <qpe/qpemenubar.h> |
11 | #include <qpe/resource.h> | 11 | #include <qpe/resource.h> |
12 | 12 | ||
13 | #include "mainwindowbase.h" | 13 | #include "mainwindowbase.h" |
14 | #include "folderwidget.h" | 14 | #include "folderwidget.h" |
15 | #include "mailtable.h" | 15 | #include "mailtable.h" |
16 | 16 | ||
17 | MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl) | 17 | MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl) |
18 | : QMainWindow(parent, name, fl) | 18 | : QMainWindow(parent, name, fl) |
19 | { | 19 | { |
20 | setCaption(tr("E-Mail")); | 20 | setCaption(tr("E-Mail")); |
21 | setToolBarsMovable(false); | 21 | setToolBarsMovable(false); |
22 | 22 | ||
23 | toolbar = new QPEToolBar(this); | 23 | toolbar = new QPEToolBar(this); |
24 | menubar = new QPEMenuBar( toolbar ); | 24 | menubar = new QPEMenuBar( toolbar ); |
25 | mailmenu = new QPopupMenu( menubar ); | 25 | mailmenu = new QPopupMenu( menubar ); |
26 | servermenu = new QPopupMenu( menubar ); | 26 | servermenu = new QPopupMenu( menubar ); |
27 | menubar->insertItem( tr( "Mail" ), mailmenu ); | 27 | menubar->insertItem( tr( "Mail" ), mailmenu ); |
28 | menubar->insertItem( tr( "Servers" ), servermenu ); | 28 | menubar->insertItem( tr( "Servers" ), servermenu ); |
29 | 29 | ||
30 | addToolBar(toolbar); | 30 | addToolBar(toolbar); |
31 | toolbar->setHorizontalStretchable(true); | 31 | toolbar->setHorizontalStretchable(true); |
32 | 32 | ||
33 | QLabel *spacer = new QLabel(toolbar); | ||
34 | spacer->setBackgroundMode(QWidget::PaletteButton); | ||
35 | toolbar->setStretchableWidget(spacer); | ||
36 | |||
33 | compose = new QAction(tr("Compose new mail"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this); | 37 | compose = new QAction(tr("Compose new mail"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this); |
34 | compose->addTo(toolbar); | 38 | compose->addTo(toolbar); |
35 | compose->addTo(mailmenu); | 39 | compose->addTo(mailmenu); |
36 | 40 | ||
37 | sendQueue = new QAction(tr("Send queued mails"), QIconSet(Resource::loadPixmap("mail/sendqueue")), 0, 0, this); | 41 | sendQueue = new QAction(tr("Send queued mails"), QIconSet(Resource::loadPixmap("mail/sendqueue")), 0, 0, this); |
38 | sendQueue->addTo(toolbar); | 42 | sendQueue->addTo(toolbar); |
39 | sendQueue->addTo(mailmenu); | 43 | sendQueue->addTo(mailmenu); |
40 | 44 | ||
41 | folders = new QAction(tr("Show/hide folders"), QIconSet(Resource::loadPixmap("mail/folder")), 0, 0, this, 0, true); | 45 | folders = new QAction(tr("Show/hide folders"), QIconSet(Resource::loadPixmap("mail/folder")), 0, 0, this, 0, true); |
42 | folders->addTo(toolbar); | 46 | folders->addTo(toolbar); |
43 | folders->addTo(servermenu); | 47 | folders->addTo(servermenu); |
44 | connect(folders, SIGNAL(toggled(bool)), SLOT(slotFoldersToggled(bool))); | 48 | connect(folders, SIGNAL(toggled(bool)), SLOT(slotFoldersToggled(bool))); |
45 | 49 | ||
46 | findmails = new QAction(tr("Search mails"), QIconSet(Resource::loadPixmap("mail/find")), 0, 0, this); | 50 | findmails = new QAction(tr("Search mails"), QIconSet(Resource::loadPixmap("mail/find")), 0, 0, this); |
47 | findmails->addTo(toolbar); | 51 | findmails->addTo(toolbar); |
48 | findmails->addTo(mailmenu); | 52 | findmails->addTo(mailmenu); |
49 | 53 | ||
50 | configure = new QAction(tr("Configuration"), QIconSet(Resource::loadPixmap("mail/configure")), 0, 0, this); | 54 | configure = new QAction(tr("Configuration"), QIconSet(Resource::loadPixmap("mail/configure")), 0, 0, this); |
51 | configure->addTo(toolbar); | 55 | configure->addTo(toolbar); |
52 | configure->addTo(servermenu); | 56 | configure->addTo(servermenu); |
53 | 57 | ||
54 | QLabel *spacer = new QLabel(toolbar); | ||
55 | spacer->setBackgroundMode(QWidget::PaletteButton); | ||
56 | toolbar->setStretchableWidget(spacer); | ||
57 | |||
58 | stop = new QAction(tr("Abort"), QIconSet(Resource::loadPixmap("mail/abort")), 0, 0, this); | 58 | stop = new QAction(tr("Abort"), QIconSet(Resource::loadPixmap("mail/abort")), 0, 0, this); |
59 | stop->addTo(toolbar); | 59 | stop->addTo(toolbar); |
60 | 60 | ||
61 | QVBox *view = new QVBox(this); | 61 | QVBox *view = new QVBox(this); |
62 | setCentralWidget(view); | 62 | setCentralWidget(view); |
63 | 63 | ||
64 | folderView = new FolderWidget(view); | 64 | folderView = new FolderWidget(view); |
65 | folderView->setMinimumHeight(90); | 65 | folderView->setMinimumHeight(90); |
66 | folderView->setMaximumHeight(90); | 66 | folderView->setMaximumHeight(90); |
67 | folderView->hide(); | 67 | folderView->hide(); |
68 | 68 | ||
69 | mailView = new MailTable(view); | 69 | mailView = new MailTable(view); |
70 | mailView->setMinimumHeight(50); | 70 | mailView->setMinimumHeight(50); |
71 | 71 | ||
72 | QHBox *status = new QHBox(view); | 72 | QHBox *status = new QHBox(view); |
73 | 73 | ||
74 | statusLabel = new QLabel(status); | 74 | statusLabel = new QLabel(status); |
75 | QFont tmpFont = statusLabel->font(); | 75 | QFont tmpFont = statusLabel->font(); |
76 | tmpFont.setPixelSize(8); | 76 | tmpFont.setPixelSize(8); |
77 | statusLabel->setFont(tmpFont); | 77 | statusLabel->setFont(tmpFont); |
78 | 78 | ||
79 | statusProgress = new QProgressBar(status); | 79 | statusProgress = new QProgressBar(status); |
80 | statusProgress->setCenterIndicator(true); | 80 | statusProgress->setCenterIndicator(true); |
81 | statusProgress->setMaximumHeight(15); | 81 | statusProgress->setMaximumHeight(15); |
82 | statusProgress->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); | 82 | statusProgress->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); |
83 | } | 83 | } |
84 | 84 | ||
85 | void MainWindowBase::slotFoldersToggled(bool toggled) | 85 | void MainWindowBase::slotFoldersToggled(bool toggled) |
86 | { | 86 | { |
87 | if (folderView->isHidden() && toggled) folderView->show(); | 87 | if (folderView->isHidden() && toggled) folderView->show(); |
88 | if (!folderView->isHidden() && !toggled) folderView->hide(); | 88 | if (!folderView->isHidden() && !toggled) folderView->hide(); |
89 | } | 89 | } |
90 | 90 | ||