author | zautrix <zautrix> | 2004-11-06 23:30:02 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-11-06 23:30:02 (UTC) |
commit | 023e0e82dd8bf6421d12492a2dd25534fc43ad31 (patch) (unidiff) | |
tree | cf0533e3ccc642cb57a41953f184f457fa5365ba /kmicromail/koprefsdialog.cpp | |
parent | f8841c92d5251f713eb7a025af8fdee52de45b3d (diff) | |
download | kdepimpi-023e0e82dd8bf6421d12492a2dd25534fc43ad31.zip kdepimpi-023e0e82dd8bf6421d12492a2dd25534fc43ad31.tar.gz kdepimpi-023e0e82dd8bf6421d12492a2dd25534fc43ad31.tar.bz2 |
many ompi fixes
Diffstat (limited to 'kmicromail/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/koprefsdialog.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp index c878fc9..4abf859 100644 --- a/kmicromail/koprefsdialog.cpp +++ b/kmicromail/koprefsdialog.cpp | |||
@@ -80,189 +80,194 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | |||
80 | setupLocaleTab(); | 80 | setupLocaleTab(); |
81 | setupTimeZoneTab(); | 81 | setupTimeZoneTab(); |
82 | setupTimeTab(); | 82 | setupTimeTab(); |
83 | setupLocaleDateTab(); | 83 | setupLocaleDateTab(); |
84 | setupFontsTab(); | 84 | setupFontsTab(); |
85 | setupColorsTab(); | 85 | setupColorsTab(); |
86 | setupViewsTab(); | 86 | setupViewsTab(); |
87 | //setupSyncTab(); | 87 | //setupSyncTab(); |
88 | //setupSyncAlgTab(); | 88 | //setupSyncAlgTab(); |
89 | //setupPrinterTab(); | 89 | //setupPrinterTab(); |
90 | //setupGroupSchedulingTab(); | 90 | //setupGroupSchedulingTab(); |
91 | //setupGroupAutomationTab(); | 91 | //setupGroupAutomationTab(); |
92 | #endif | 92 | #endif |
93 | } | 93 | } |
94 | 94 | ||
95 | #include "kpimglobalprefs.h" | 95 | #include "kpimglobalprefs.h" |
96 | 96 | ||
97 | KOPrefsDialog::~KOPrefsDialog() | 97 | KOPrefsDialog::~KOPrefsDialog() |
98 | { | 98 | { |
99 | } | 99 | } |
100 | void KOPrefsDialog::setupGlobalTab() | 100 | void KOPrefsDialog::setupGlobalTab() |
101 | { | 101 | { |
102 | QFrame *topFrame = addPage(i18n("Global"),0,0); | 102 | QFrame *topFrame = addPage(i18n("Global"),0,0); |
103 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | 103 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); |
104 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | 104 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); |
105 | topLayout->addWidget( kdelibcfg ); | 105 | topLayout->addWidget( kdelibcfg ); |
106 | 106 | ||
107 | 107 | ||
108 | } | 108 | } |
109 | void KOPrefsDialog::setupMainTab() | 109 | void KOPrefsDialog::setupMainTab() |
110 | { | 110 | { |
111 | QFrame *topFrame = addPage(i18n("General"),0,0); | 111 | QFrame *topFrame = addPage(i18n("General"),0,0); |
112 | 112 | ||
113 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 113 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
114 | topLayout->setSpacing(spacingHint()); | 114 | topLayout->setSpacing(spacingHint()); |
115 | topLayout->setMargin(marginHint()); | 115 | topLayout->setMargin(marginHint()); |
116 | 116 | ||
117 | 117 | ||
118 | mNameEdit = new QLineEdit(topFrame); | 118 | mNameEdit = new QLineEdit(topFrame); |
119 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 119 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
120 | topLayout->addWidget(mNameLabel,0,0); | 120 | topLayout->addWidget(mNameLabel,0,0); |
121 | topLayout->addWidget(mNameEdit,0,1); | 121 | topLayout->addWidget(mNameEdit,0,1); |
122 | 122 | ||
123 | mEmailEdit = new QLineEdit(topFrame); | 123 | mEmailEdit = new QLineEdit(topFrame); |
124 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 124 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
125 | topLayout->addWidget(mEmailLabel,1,0); | 125 | topLayout->addWidget(mEmailLabel,1,0); |
126 | topLayout->addWidget(mEmailEdit,1,1); | 126 | topLayout->addWidget(mEmailEdit,1,1); |
127 | QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); | 127 | QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); |
128 | topLayout->addMultiCellWidget(lab,2,2,0,1); | 128 | topLayout->addMultiCellWidget(lab,2,2,0,1); |
129 | KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), | 129 | KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), |
130 | &(KOPrefs::instance()->mUseKapi),topFrame); | 130 | &(KOPrefs::instance()->mUseKapi),topFrame); |
131 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); | 131 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); |
132 | } | 132 | } |
133 | 133 | ||
134 | void KOPrefsDialog::setupMailTab() | 134 | void KOPrefsDialog::setupMailTab() |
135 | { | 135 | { |
136 | QFrame *topFrame = addPage(i18n("Mail"),0,0); | 136 | QFrame *topFrame = addPage(i18n("Mail"),0,0); |
137 | 137 | ||
138 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 138 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
139 | topLayout->setSpacing(spacingHint()); | 139 | topLayout->setSpacing(spacingHint()); |
140 | topLayout->setMargin(marginHint()); | 140 | topLayout->setMargin(marginHint()); |
141 | 141 | ||
142 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), | 142 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), |
143 | &(KOPrefs::instance()->mViewAsHtml),topFrame); | 143 | &(KOPrefs::instance()->mViewAsHtml),topFrame); |
144 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); | 144 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); |
145 | 145 | ||
146 | 146 | ||
147 | ttt = addWidBool(i18n("Send mails later"), | 147 | ttt = addWidBool(i18n("Send mails later"), |
148 | &(KOPrefs::instance()->mSendLater),topFrame); | 148 | &(KOPrefs::instance()->mSendLater),topFrame); |
149 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); | 149 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); |
150 | 150 | mCodecEdit = new QLineEdit(topFrame); | |
151 | topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); | ||
152 | topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); | ||
153 | topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); | ||
151 | 154 | ||
152 | } | 155 | } |
153 | void KOPrefsDialog::setupFontsTab() | 156 | void KOPrefsDialog::setupFontsTab() |
154 | { | 157 | { |
155 | 158 | ||
156 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 159 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); |
157 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 160 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
158 | 161 | ||
159 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 162 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); |
160 | topLayout->setSpacing(1); | 163 | topLayout->setSpacing(1); |
161 | topLayout->setMargin(3); | 164 | topLayout->setMargin(3); |
162 | KPrefsDialogWidFont * tVFont; | 165 | KPrefsDialogWidFont * tVFont; |
163 | int i = 0; | 166 | int i = 0; |
164 | KPrefsDialogWidFont *timeLabelsFont = | 167 | KPrefsDialogWidFont *timeLabelsFont = |
165 | addWidFont(i18n("OK"),i18n("Application(nr)"), | 168 | addWidFont(i18n("OK"),i18n("Application(nr)"), |
166 | &(KOPrefs::instance()->mAppFont),topFrame); | 169 | &(KOPrefs::instance()->mAppFont),topFrame); |
167 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 170 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
168 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 171 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
169 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 172 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
170 | ++i; | 173 | ++i; |
171 | 174 | ||
172 | 175 | ||
173 | timeLabelsFont = | 176 | timeLabelsFont = |
174 | addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), | 177 | addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), |
175 | &(KOPrefs::instance()->mComposeFont),topFrame); | 178 | &(KOPrefs::instance()->mComposeFont),topFrame); |
176 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 179 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
177 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 180 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
178 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 181 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
179 | ++i; | 182 | ++i; |
180 | 183 | ||
181 | KPrefsDialogWidFont *timeBarFont = | 184 | KPrefsDialogWidFont *timeBarFont = |
182 | addWidFont(i18n("Hello"),i18n("Read mail:"), | 185 | addWidFont(i18n("Hello"),i18n("Read mail:"), |
183 | &(KOPrefs::instance()->mReadFont),topFrame); | 186 | &(KOPrefs::instance()->mReadFont),topFrame); |
184 | topLayout->addWidget(timeBarFont->label(),i,0); | 187 | topLayout->addWidget(timeBarFont->label(),i,0); |
185 | topLayout->addWidget(timeBarFont->preview(),i,1); | 188 | topLayout->addWidget(timeBarFont->preview(),i,1); |
186 | topLayout->addWidget(timeBarFont->button(),i,2); | 189 | topLayout->addWidget(timeBarFont->button(),i,2); |
187 | ++i; | 190 | ++i; |
188 | 191 | ||
189 | topLayout->setColStretch(1,1); | 192 | topLayout->setColStretch(1,1); |
190 | topLayout->setRowStretch(4,1); | 193 | topLayout->setRowStretch(4,1); |
191 | 194 | ||
192 | } | 195 | } |
193 | void KOPrefsDialog::usrReadConfig() | 196 | void KOPrefsDialog::usrReadConfig() |
194 | { | 197 | { |
195 | 198 | ||
196 | mNameEdit->setText(KOPrefs::instance()->mName); | 199 | mNameEdit->setText(KOPrefs::instance()->mName); |
197 | mEmailEdit->setText(KOPrefs::instance()->mEmail); | 200 | mEmailEdit->setText(KOPrefs::instance()->mEmail); |
201 | mCodecEdit->setText(KOPrefs::instance()->mSendCodec); | ||
198 | kdelibcfg->readConfig(); | 202 | kdelibcfg->readConfig(); |
199 | } | 203 | } |
200 | void KOPrefsDialog::usrWriteConfig() | 204 | void KOPrefsDialog::usrWriteConfig() |
201 | { | 205 | { |
202 | KOPrefs::instance()->mName = mNameEdit->text(); | 206 | KOPrefs::instance()->mName = mNameEdit->text(); |
203 | KOPrefs::instance()->mEmail = mEmailEdit->text(); | 207 | KOPrefs::instance()->mEmail = mEmailEdit->text(); |
204 | kdelibcfg->writeConfig(); | 208 | KOPrefs::instance()->mSendCodec = mCodecEdit->text(); |
209 | kdelibcfg->writeConfig(); | ||
205 | 210 | ||
206 | 211 | ||
207 | } | 212 | } |
208 | 213 | ||
209 | #if 0 | 214 | #if 0 |
210 | void KOPrefsDialog::setupLocaleDateTab() | 215 | void KOPrefsDialog::setupLocaleDateTab() |
211 | { | 216 | { |
212 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 217 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
213 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 218 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
214 | topLayout->setSpacing(spacingHint()); | 219 | topLayout->setSpacing(spacingHint()); |
215 | topLayout->setMargin(marginHint()); | 220 | topLayout->setMargin(marginHint()); |
216 | int iii = 0; | 221 | int iii = 0; |
217 | 222 | ||
218 | 223 | ||
219 | KPrefsWidRadios *syncPrefsGroup = | 224 | KPrefsWidRadios *syncPrefsGroup = |
220 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 225 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
221 | QString format; | 226 | QString format; |
222 | if ( QApplication::desktop()->width() < 480 ) | 227 | if ( QApplication::desktop()->width() < 480 ) |
223 | format = "(%d.%m.%Y)"; | 228 | format = "(%d.%m.%Y)"; |
224 | else | 229 | else |
225 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 230 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
226 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 231 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
227 | if ( QApplication::desktop()->width() < 480 ) | 232 | if ( QApplication::desktop()->width() < 480 ) |
228 | format = "(%m.%d.%Y)"; | 233 | format = "(%m.%d.%Y)"; |
229 | else | 234 | else |
230 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 235 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
231 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 236 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
232 | if ( QApplication::desktop()->width() < 480 ) | 237 | if ( QApplication::desktop()->width() < 480 ) |
233 | format = "(%Y-%m-%d)"; | 238 | format = "(%Y-%m-%d)"; |
234 | else | 239 | else |
235 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 240 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
236 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 241 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
237 | syncPrefsGroup->addRadio(i18n("User defined")); | 242 | syncPrefsGroup->addRadio(i18n("User defined")); |
238 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 243 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
239 | ++iii; | 244 | ++iii; |
240 | ++iii; | 245 | ++iii; |
241 | QLabel * lab; | 246 | QLabel * lab; |
242 | mUserDateFormatLong = new QLineEdit(topFrame); | 247 | mUserDateFormatLong = new QLineEdit(topFrame); |
243 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 248 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
244 | topLayout->addWidget(lab ,iii,0); | 249 | topLayout->addWidget(lab ,iii,0); |
245 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 250 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
246 | ++iii; | 251 | ++iii; |
247 | mUserDateFormatShort = new QLineEdit(topFrame); | 252 | mUserDateFormatShort = new QLineEdit(topFrame); |
248 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 253 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
249 | topLayout->addWidget(lab ,iii,0); | 254 | topLayout->addWidget(lab ,iii,0); |
250 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 255 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
251 | ++iii; | 256 | ++iii; |
252 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 257 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
253 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 258 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
254 | ++iii; | 259 | ++iii; |
255 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 260 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
256 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 261 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
257 | ++iii; | 262 | ++iii; |
258 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 263 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
259 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 264 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
260 | ++iii; | 265 | ++iii; |
261 | 266 | ||
262 | } | 267 | } |
263 | 268 | ||
264 | void KOPrefsDialog::setupLocaleTab() | 269 | void KOPrefsDialog::setupLocaleTab() |
265 | { | 270 | { |
266 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 271 | QFrame *topFrame = addPage(i18n("Locale"),0,0); |
267 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 272 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
268 | topLayout->setSpacing(spacingHint()); | 273 | topLayout->setSpacing(spacingHint()); |