author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/koprefsdialog.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'korganizer/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koprefsdialog.cpp | 138 |
1 files changed, 72 insertions, 66 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index f1a6c3d..43c488f 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -18,34 +18,40 @@ | |||
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qlabel.h> | 25 | #include <qlabel.h> |
26 | #include <qgroupbox.h> | 26 | #include <q3groupbox.h> |
27 | #include <qbuttongroup.h> | 27 | #include <q3buttongroup.h> |
28 | #include <qlineedit.h> | 28 | #include <qlineedit.h> |
29 | #include <qfont.h> | 29 | #include <qfont.h> |
30 | #include <qslider.h> | 30 | #include <qslider.h> |
31 | #include <qfile.h> | 31 | #include <qfile.h> |
32 | #include <qtextstream.h> | 32 | #include <q3textstream.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qvbox.h> | 34 | #include <q3vbox.h> |
35 | #include <qhbox.h> | 35 | #include <q3hbox.h> |
36 | #include <qregexp.h> | 36 | #include <qregexp.h> |
37 | #include <qspinbox.h> | 37 | #include <qspinbox.h> |
38 | #include <qdatetime.h> | 38 | #include <qdatetime.h> |
39 | #include <qcheckbox.h> | 39 | #include <qcheckbox.h> |
40 | #include <qradiobutton.h> | 40 | #include <qradiobutton.h> |
41 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
42 | #include <qstrlist.h> | 42 | #include <q3strlist.h> |
43 | #include <qapplication.h> | 43 | #include <qapplication.h> |
44 | #include <QDesktopWidget> | ||
45 | //Added by qt3to4: | ||
46 | #include <Q3HBoxLayout> | ||
47 | #include <Q3GridLayout> | ||
48 | #include <QPixmap> | ||
49 | #include <Q3Frame> | ||
44 | 50 | ||
45 | #include <kcolorbutton.h> | 51 | #include <kcolorbutton.h> |
46 | #include <kdebug.h> | 52 | #include <kdebug.h> |
47 | #include <klocale.h> | 53 | #include <klocale.h> |
48 | #include <kglobal.h> | 54 | #include <kglobal.h> |
49 | #include <kfontdialog.h> | 55 | #include <kfontdialog.h> |
50 | #include <kfiledialog.h> | 56 | #include <kfiledialog.h> |
51 | #include <kmessagebox.h> | 57 | #include <kmessagebox.h> |
@@ -111,18 +117,18 @@ KOPrefsDialog::~KOPrefsDialog() | |||
111 | void KOPrefsDialog::setupGlobalTab() | 117 | void KOPrefsDialog::setupGlobalTab() |
112 | { | 118 | { |
113 | 119 | ||
114 | 120 | ||
115 | } | 121 | } |
116 | void KOPrefsDialog::setupLocaleDateTab() | 122 | void KOPrefsDialog::setupLocaleDateTab() |
117 | { | 123 | { |
118 | #if 0 | 124 | #if 0 |
119 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 125 | Q3Frame *topFrame = addPage(i18n("Date Format"),0,0); |
120 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 126 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,3,2); |
121 | topLayout->setSpacing(mSpacingHint); | 127 | topLayout->setSpacing(mSpacingHint); |
122 | topLayout->setMargin(mMarginHint); | 128 | topLayout->setMargin(mMarginHint); |
123 | int iii = 0; | 129 | int iii = 0; |
124 | 130 | ||
125 | 131 | ||
126 | KPrefsDialogWidRadios *syncPrefsGroup = | 132 | KPrefsDialogWidRadios *syncPrefsGroup = |
127 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 133 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
128 | QString format; | 134 | QString format; |
@@ -167,18 +173,18 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0); | |||
167 | ++iii; | 173 | ++iii; |
168 | #endif | 174 | #endif |
169 | 175 | ||
170 | } | 176 | } |
171 | 177 | ||
172 | void KOPrefsDialog::setupLocaleTab() | 178 | void KOPrefsDialog::setupLocaleTab() |
173 | { | 179 | { |
174 | #if 0 | 180 | #if 0 |
175 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 181 | Q3Frame *topFrame = addPage(i18n("Locale"),0,0); |
176 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 182 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); |
177 | topLayout->setSpacing(mSpacingHint); | 183 | topLayout->setSpacing(mSpacingHint); |
178 | topLayout->setMargin(mMarginHint); | 184 | topLayout->setMargin(mMarginHint); |
179 | int iii = 0; | 185 | int iii = 0; |
180 | KPrefsDialogWidRadios *syncPrefsGroup = | 186 | KPrefsDialogWidRadios *syncPrefsGroup = |
181 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); | 187 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); |
182 | syncPrefsGroup->addRadio(i18n("English")); | 188 | syncPrefsGroup->addRadio(i18n("English")); |
183 | syncPrefsGroup->addRadio(i18n("German")); | 189 | syncPrefsGroup->addRadio(i18n("German")); |
184 | syncPrefsGroup->addRadio(i18n("French")); | 190 | syncPrefsGroup->addRadio(i18n("French")); |
@@ -206,17 +212,17 @@ void KOPrefsDialog::setupLocaleTab() | |||
206 | ++iii; | 212 | ++iii; |
207 | sb = | 213 | sb = |
208 | addWidBool(i18n("Use short date in (WN/E) view"), | 214 | addWidBool(i18n("Use short date in (WN/E) view"), |
209 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 215 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
210 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 216 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
211 | } | 217 | } |
212 | else { | 218 | else { |
213 | QWidget * hb = new QWidget( topFrame ); | 219 | QWidget * hb = new QWidget( topFrame ); |
214 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); | 220 | Q3HBoxLayout *hbLayout = new Q3HBoxLayout(hb); |
215 | sb = | 221 | sb = |
216 | addWidBool(i18n("Week starts on Sunday"), | 222 | addWidBool(i18n("Week starts on Sunday"), |
217 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); | 223 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); |
218 | hbLayout->addWidget(sb->checkBox() ); | 224 | hbLayout->addWidget(sb->checkBox() ); |
219 | sb = | 225 | sb = |
220 | addWidBool(i18n("Use short date in (WN/E) view"), | 226 | addWidBool(i18n("Use short date in (WN/E) view"), |
221 | &(KOPrefs::instance()->mShortDateInViewer),hb); | 227 | &(KOPrefs::instance()->mShortDateInViewer),hb); |
222 | hbLayout->addWidget(sb->checkBox() ); | 228 | hbLayout->addWidget(sb->checkBox() ); |
@@ -231,20 +237,20 @@ void KOPrefsDialog::setupLocaleTab() | |||
231 | &(KOPrefs::instance()->mUseQuicksave),topFrame); | 237 | &(KOPrefs::instance()->mUseQuicksave),topFrame); |
232 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 238 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
233 | #endif | 239 | #endif |
234 | #endif | 240 | #endif |
235 | } | 241 | } |
236 | 242 | ||
237 | void KOPrefsDialog::setupMainTab() | 243 | void KOPrefsDialog::setupMainTab() |
238 | { | 244 | { |
239 | QFrame *topFrame = addPage(i18n("General"),0,0); | 245 | Q3Frame *topFrame = addPage(i18n("General"),0,0); |
240 | // DesktopIcon("identity",KIcon::SizeMedium)); | 246 | // DesktopIcon("identity",KIcon::SizeMedium)); |
241 | 247 | ||
242 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 248 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2); |
243 | topLayout->setSpacing(mSpacingHint); | 249 | topLayout->setSpacing(mSpacingHint); |
244 | topLayout->setMargin(mMarginHint); | 250 | topLayout->setMargin(mMarginHint); |
245 | 251 | ||
246 | // KPrefsDialogWidBool *emailControlCenter = | 252 | // KPrefsDialogWidBool *emailControlCenter = |
247 | // addWidBool(i18n("&Use email settings from Control Center"), | 253 | // addWidBool(i18n("&Use email settings from Control Center"), |
248 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); | 254 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); |
249 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); | 255 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); |
250 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), | 256 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), |
@@ -282,22 +288,22 @@ void KOPrefsDialog::setupMainTab() | |||
282 | 288 | ||
283 | int iii = 5; | 289 | int iii = 5; |
284 | widbool = addWidBool(i18n("Block popup until mouse button release"), | 290 | widbool = addWidBool(i18n("Block popup until mouse button release"), |
285 | &(KOPrefs::instance()->mBlockPopupMenu),topFrame); | 291 | &(KOPrefs::instance()->mBlockPopupMenu),topFrame); |
286 | topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1); | 292 | topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1); |
287 | ++iii; | 293 | ++iii; |
288 | if ( QApplication::desktop()->height() <= 240 ) { | 294 | if ( QApplication::desktop()->height() <= 240 ) { |
289 | topFrame = addPage(i18n("General") +" 2",0,0); | 295 | topFrame = addPage(i18n("General") +" 2",0,0); |
290 | topLayout = new QGridLayout(topFrame,4,2); | 296 | topLayout = new Q3GridLayout(topFrame,4,2); |
291 | topLayout->setSpacing(2); | 297 | topLayout->setSpacing(2); |
292 | topLayout->setMargin(3); | 298 | topLayout->setMargin(3); |
293 | iii = 0; | 299 | iii = 0; |
294 | } | 300 | } |
295 | QHBox *dummy = new QHBox(topFrame); | 301 | Q3HBox *dummy = new Q3HBox(topFrame); |
296 | new QLabel(i18n("Days in Next-X-Days:"),dummy); | 302 | new QLabel(i18n("Days in Next-X-Days:"),dummy); |
297 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); | 303 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); |
298 | 304 | ||
299 | topLayout->addMultiCellWidget(dummy,iii,iii,0,1); | 305 | topLayout->addMultiCellWidget(dummy,iii,iii,0,1); |
300 | 306 | ||
301 | ++iii; | 307 | ++iii; |
302 | 308 | ||
303 | 309 | ||
@@ -308,17 +314,17 @@ void KOPrefsDialog::setupMainTab() | |||
308 | 314 | ||
309 | 315 | ||
310 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); | 316 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); |
311 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); | 317 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); |
312 | 318 | ||
313 | // addWidBool(i18n("Enable automatic saving of calendar"), | 319 | // addWidBool(i18n("Enable automatic saving of calendar"), |
314 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); | 320 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); |
315 | 321 | ||
316 | QHBox *intervalBox = new QHBox(topFrame); | 322 | Q3HBox *intervalBox = new Q3HBox(topFrame); |
317 | // intervalBox->setSpacing(mSpacingHint); | 323 | // intervalBox->setSpacing(mSpacingHint); |
318 | topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1); | 324 | topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1); |
319 | ++iii; | 325 | ++iii; |
320 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); | 326 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); |
321 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); | 327 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); |
322 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); | 328 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); |
323 | /* | 329 | /* |
324 | QHBox * agendasize = new QHBox ( topFrame ); | 330 | QHBox * agendasize = new QHBox ( topFrame ); |
@@ -397,24 +403,24 @@ void KOPrefsDialog::setupMainTab() | |||
397 | 403 | ||
398 | topLayout->setRowStretch(14,1); | 404 | topLayout->setRowStretch(14,1); |
399 | */ | 405 | */ |
400 | } | 406 | } |
401 | 407 | ||
402 | 408 | ||
403 | void KOPrefsDialog::setupTimeTab() | 409 | void KOPrefsDialog::setupTimeTab() |
404 | { | 410 | { |
405 | QFrame *topFrame = addPage(i18n("Time"),0,0); | 411 | Q3Frame *topFrame = addPage(i18n("Time"),0,0); |
406 | // DesktopIcon("clock",KIcon::SizeMedium)); | 412 | // DesktopIcon("clock",KIcon::SizeMedium)); |
407 | 413 | ||
408 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 414 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); |
409 | topLayout->setSpacing(mSpacingHint); | 415 | topLayout->setSpacing(mSpacingHint); |
410 | topLayout->setMargin(mMarginHint); | 416 | topLayout->setMargin(mMarginHint); |
411 | 417 | ||
412 | QHBox *dummy = new QHBox(topFrame); | 418 | Q3HBox *dummy = new Q3HBox(topFrame); |
413 | KPrefsDialogWidTime *dayBegins = | 419 | KPrefsDialogWidTime *dayBegins = |
414 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 420 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
415 | dummy); | 421 | dummy); |
416 | //topLayout->addWidget(dayBegins->label(),2,0); | 422 | //topLayout->addWidget(dayBegins->label(),2,0); |
417 | 423 | ||
418 | //topLayout->addWidget(dayBegins->spinBox(),2,1); | 424 | //topLayout->addWidget(dayBegins->spinBox(),2,1); |
419 | topLayout->addMultiCellWidget(dummy,0,0,0,1); | 425 | topLayout->addMultiCellWidget(dummy,0,0,0,1); |
420 | 426 | ||
@@ -436,38 +442,38 @@ void KOPrefsDialog::setupTimeTab() | |||
436 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), | 442 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), |
437 | 3,0); | 443 | 3,0); |
438 | mAlarmTimeCombo = new QComboBox(topFrame); | 444 | mAlarmTimeCombo = new QComboBox(topFrame); |
439 | mAlarmTimeCombo->insertStringList(alarmList); | 445 | mAlarmTimeCombo->insertStringList(alarmList); |
440 | topLayout->addWidget(mAlarmTimeCombo,3,1); | 446 | topLayout->addWidget(mAlarmTimeCombo,3,1); |
441 | int iii = 4; | 447 | int iii = 4; |
442 | if ( QApplication::desktop()->height() <= 240 ) { | 448 | if ( QApplication::desktop()->height() <= 240 ) { |
443 | topFrame = addPage(i18n("Time") +" 2",0,0); | 449 | topFrame = addPage(i18n("Time") +" 2",0,0); |
444 | topLayout = new QGridLayout(topFrame,1,2); | 450 | topLayout = new Q3GridLayout(topFrame,1,2); |
445 | topLayout->setSpacing(2); | 451 | topLayout->setSpacing(2); |
446 | topLayout->setMargin(3); | 452 | topLayout->setMargin(3); |
447 | iii = 0; | 453 | iii = 0; |
448 | } | 454 | } |
449 | 455 | ||
450 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, | 456 | Q3GroupBox *workingHoursGroup = new Q3GroupBox(1,Qt::Horizontal, |
451 | i18n("Working Hours"), | 457 | i18n("Working Hours"), |
452 | topFrame); | 458 | topFrame); |
453 | topLayout->addMultiCellWidget(workingHoursGroup,iii,iii,0,1); | 459 | topLayout->addMultiCellWidget(workingHoursGroup,iii,iii,0,1); |
454 | workingHoursGroup->layout()->setSpacing( 0 ); | 460 | workingHoursGroup->layout()->setSpacing( 0 ); |
455 | workingHoursGroup->layout()->setMargin( 4 ); | 461 | workingHoursGroup->layout()->setMargin( 4 ); |
456 | QHBox *workStartBox = new QHBox(workingHoursGroup); | 462 | Q3HBox *workStartBox = new Q3HBox(workingHoursGroup); |
457 | // workStartBox->setMargin( 0 ); | 463 | // workStartBox->setMargin( 0 ); |
458 | addWidTime(i18n("Daily starting hour:"), | 464 | addWidTime(i18n("Daily starting hour:"), |
459 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); | 465 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); |
460 | 466 | ||
461 | QHBox *workEndBox = new QHBox(workingHoursGroup); | 467 | Q3HBox *workEndBox = new Q3HBox(workingHoursGroup); |
462 | //workEndBox->setMargin( 0 ); | 468 | //workEndBox->setMargin( 0 ); |
463 | addWidTime(i18n("Daily ending hour:"), | 469 | addWidTime(i18n("Daily ending hour:"), |
464 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); | 470 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); |
465 | QVBox *excludeBox = new QVBox(workingHoursGroup); | 471 | Q3VBox *excludeBox = new Q3VBox(workingHoursGroup); |
466 | //excludeBox->setMargin( 0 ); | 472 | //excludeBox->setMargin( 0 ); |
467 | addWidBool(i18n("Exclude holidays"), | 473 | addWidBool(i18n("Exclude holidays"), |
468 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); | 474 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); |
469 | 475 | ||
470 | addWidBool(i18n("Exclude Saturdays"), | 476 | addWidBool(i18n("Exclude Saturdays"), |
471 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); | 477 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); |
472 | 478 | ||
473 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), | 479 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), |
@@ -477,20 +483,20 @@ void KOPrefsDialog::setupTimeTab() | |||
477 | 483 | ||
478 | // topLayout->setRowStretch(6,1); | 484 | // topLayout->setRowStretch(6,1); |
479 | } | 485 | } |
480 | 486 | ||
481 | 487 | ||
482 | void KOPrefsDialog::setupViewsTab() | 488 | void KOPrefsDialog::setupViewsTab() |
483 | { | 489 | { |
484 | 490 | ||
485 | QFrame *topFrame = addPage(i18n("Views"),0,0); | 491 | Q3Frame *topFrame = addPage(i18n("Views"),0,0); |
486 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 492 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
487 | 493 | ||
488 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); | 494 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,1); |
489 | topLayout->setSpacing(mSpacingHint); | 495 | topLayout->setSpacing(mSpacingHint); |
490 | topLayout->setMargin(mMarginHint); | 496 | topLayout->setMargin(mMarginHint); |
491 | 497 | ||
492 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; | 498 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; |
493 | // topLayout->addLayout(dayBeginsLayout,0,0); | 499 | // topLayout->addLayout(dayBeginsLayout,0,0); |
494 | 500 | ||
495 | // KPrefsDialogWidTime *dayBegins = | 501 | // KPrefsDialogWidTime *dayBegins = |
496 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 502 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
@@ -525,17 +531,17 @@ void KOPrefsDialog::setupViewsTab() | |||
525 | 531 | ||
526 | 532 | ||
527 | 533 | ||
528 | #if 0 | 534 | #if 0 |
529 | 535 | ||
530 | topFrame = addPage(i18n("ViewChange"),0,0); | 536 | topFrame = addPage(i18n("ViewChange"),0,0); |
531 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 537 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
532 | 538 | ||
533 | topLayout = new QGridLayout(topFrame,6,1); | 539 | topLayout = new Q3GridLayout(topFrame,6,1); |
534 | topLayout->setSpacing(mSpacingHint); | 540 | topLayout->setSpacing(mSpacingHint); |
535 | topLayout->setMargin(mMarginHint); | 541 | topLayout->setMargin(mMarginHint); |
536 | ii = 0; | 542 | ii = 0; |
537 | 543 | ||
538 | #endif | 544 | #endif |
539 | 545 | ||
540 | dummy = | 546 | dummy = |
541 | addWidBool(i18n("Hold fullscreen on view change"), | 547 | addWidBool(i18n("Hold fullscreen on view change"), |
@@ -589,17 +595,17 @@ void KOPrefsDialog::setupViewsTab() | |||
589 | &(KOPrefs::instance()->mEnableToolTips),topFrame); | 595 | &(KOPrefs::instance()->mEnableToolTips),topFrame); |
590 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); | 596 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); |
591 | #endif | 597 | #endif |
592 | // ********************************************************* | 598 | // ********************************************************* |
593 | 599 | ||
594 | topFrame = addPage(i18n("Agenda View"),0,0); | 600 | topFrame = addPage(i18n("Agenda View"),0,0); |
595 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 601 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
596 | 602 | ||
597 | topLayout = new QGridLayout(topFrame,5,1); | 603 | topLayout = new Q3GridLayout(topFrame,5,1); |
598 | topLayout->setSpacing(mSpacingHint); | 604 | topLayout->setSpacing(mSpacingHint); |
599 | topLayout->setMargin(mMarginHint); | 605 | topLayout->setMargin(mMarginHint); |
600 | ii = 0; | 606 | ii = 0; |
601 | 607 | ||
602 | 608 | ||
603 | dummy = | 609 | dummy = |
604 | addWidBool(i18n("Show time in agenda items"), | 610 | addWidBool(i18n("Show time in agenda items"), |
605 | &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); | 611 | &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); |
@@ -647,22 +653,22 @@ void KOPrefsDialog::setupViewsTab() | |||
647 | 653 | ||
648 | 654 | ||
649 | 655 | ||
650 | 656 | ||
651 | 657 | ||
652 | topFrame = addPage(i18n("Month View"),0,0); | 658 | topFrame = addPage(i18n("Month View"),0,0); |
653 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 659 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
654 | 660 | ||
655 | topLayout = new QGridLayout(topFrame,5,1); | 661 | topLayout = new Q3GridLayout(topFrame,5,1); |
656 | topLayout->setSpacing(mSpacingHint); | 662 | topLayout->setSpacing(mSpacingHint); |
657 | topLayout->setMargin(mMarginHint); | 663 | topLayout->setMargin(mMarginHint); |
658 | ii = 0; | 664 | ii = 0; |
659 | QLabel *lab; | 665 | QLabel *lab; |
660 | QHBox *habo = new QHBox( topFrame ); | 666 | Q3HBox *habo = new Q3HBox( topFrame ); |
661 | if ( QApplication::desktop()->width() <= 480 ) { | 667 | if ( QApplication::desktop()->width() <= 480 ) { |
662 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); | 668 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); |
663 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 669 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
664 | ii++; | 670 | ii++; |
665 | } else { | 671 | } else { |
666 | new QLabel ( i18n("Show events that recur "), habo ); | 672 | new QLabel ( i18n("Show events that recur "), habo ); |
667 | } | 673 | } |
668 | dailyRecur = | 674 | dailyRecur = |
@@ -672,17 +678,17 @@ void KOPrefsDialog::setupViewsTab() | |||
672 | 678 | ||
673 | weeklyRecur = | 679 | weeklyRecur = |
674 | addWidBool(i18n("weekly"), | 680 | addWidBool(i18n("weekly"), |
675 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); | 681 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); |
676 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 682 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
677 | ii++; | 683 | ii++; |
678 | 684 | ||
679 | 685 | ||
680 | habo = new QHBox( topFrame ); | 686 | habo = new Q3HBox( topFrame ); |
681 | if ( QApplication::desktop()->width() <= 480 ) { | 687 | if ( QApplication::desktop()->width() <= 480 ) { |
682 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); | 688 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); |
683 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 689 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
684 | ii++; | 690 | ii++; |
685 | 691 | ||
686 | } else { | 692 | } else { |
687 | new QLabel ( i18n("Show in every cell "), habo ); | 693 | new QLabel ( i18n("Show in every cell "), habo ); |
688 | } | 694 | } |
@@ -725,17 +731,17 @@ void KOPrefsDialog::setupViewsTab() | |||
725 | addWidBool(i18n("Category colors are applied to text"), | 731 | addWidBool(i18n("Category colors are applied to text"), |
726 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); | 732 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); |
727 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 733 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
728 | 734 | ||
729 | 735 | ||
730 | 736 | ||
731 | if ( QApplication::desktop()->height() <= 240 ) { | 737 | if ( QApplication::desktop()->height() <= 240 ) { |
732 | topFrame = addPage(i18n("Month View") +" 2",0,0); | 738 | topFrame = addPage(i18n("Month View") +" 2",0,0); |
733 | topLayout = new QGridLayout(topFrame,4,1); | 739 | topLayout = new Q3GridLayout(topFrame,4,1); |
734 | topLayout->setSpacing(2); | 740 | topLayout->setSpacing(2); |
735 | topLayout->setMargin(1); | 741 | topLayout->setMargin(1); |
736 | ii = 0; | 742 | ii = 0; |
737 | } | 743 | } |
738 | 744 | ||
739 | 745 | ||
740 | coloredCategoriesInMonthView = | 746 | coloredCategoriesInMonthView = |
741 | addWidBool(i18n("Month view uses day colors"), | 747 | addWidBool(i18n("Month view uses day colors"), |
@@ -759,29 +765,29 @@ void KOPrefsDialog::setupViewsTab() | |||
759 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), | 765 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), |
760 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); | 766 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); |
761 | topLayout->addWidget(holidayColor->label(),ii,0); | 767 | topLayout->addWidget(holidayColor->label(),ii,0); |
762 | topLayout->addWidget(holidayColor->button(),ii++,1); | 768 | topLayout->addWidget(holidayColor->button(),ii++,1); |
763 | // *********************** What'sNext View | 769 | // *********************** What'sNext View |
764 | topFrame = addPage(i18n("What's Next View"),0,0); | 770 | topFrame = addPage(i18n("What's Next View"),0,0); |
765 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 771 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
766 | 772 | ||
767 | topLayout = new QGridLayout(topFrame,4,1); | 773 | topLayout = new Q3GridLayout(topFrame,4,1); |
768 | topLayout->setSpacing(mSpacingHint); | 774 | topLayout->setSpacing(mSpacingHint); |
769 | topLayout->setMargin(mMarginHint); | 775 | topLayout->setMargin(mMarginHint); |
770 | ii = 0; | 776 | ii = 0; |
771 | 777 | ||
772 | 778 | ||
773 | QHBox* hdummy = new QHBox(topFrame); | 779 | Q3HBox* hdummy = new Q3HBox(topFrame); |
774 | new QLabel(i18n("Days in What's Next:"),hdummy); | 780 | new QLabel(i18n("Days in What's Next:"),hdummy); |
775 | mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); | 781 | mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); |
776 | 782 | ||
777 | topLayout->addWidget(hdummy,ii++,0); | 783 | topLayout->addWidget(hdummy,ii++,0); |
778 | 784 | ||
779 | QHBox *prioBox = new QHBox(topFrame); | 785 | Q3HBox *prioBox = new Q3HBox(topFrame); |
780 | // intervalBox->setSpacing(mSpacingHint); | 786 | // intervalBox->setSpacing(mSpacingHint); |
781 | topLayout->addWidget(prioBox,ii++,0); | 787 | topLayout->addWidget(prioBox,ii++,0); |
782 | 788 | ||
783 | QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox); | 789 | QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox); |
784 | mPrioSpin = new QSpinBox(0,5,1,prioBox); | 790 | mPrioSpin = new QSpinBox(0,5,1,prioBox); |
785 | if ( QApplication::desktop()->width() < 300 ) | 791 | if ( QApplication::desktop()->width() < 300 ) |
786 | mPrioSpin->setFixedWidth( 40 ); | 792 | mPrioSpin->setFixedWidth( 40 ); |
787 | KPrefsDialogWidBool *passwdk = | 793 | KPrefsDialogWidBool *passwdk = |
@@ -813,17 +819,17 @@ void KOPrefsDialog::setupViewsTab() | |||
813 | 819 | ||
814 | 820 | ||
815 | 821 | ||
816 | // *********************** Todo View | 822 | // *********************** Todo View |
817 | 823 | ||
818 | topFrame = addPage(i18n("Todo View"),0,0); | 824 | topFrame = addPage(i18n("Todo View"),0,0); |
819 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 825 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
820 | 826 | ||
821 | topLayout = new QGridLayout(topFrame,4,1); | 827 | topLayout = new Q3GridLayout(topFrame,4,1); |
822 | topLayout->setSpacing(mSpacingHint); | 828 | topLayout->setSpacing(mSpacingHint); |
823 | topLayout->setMargin(mMarginHint); | 829 | topLayout->setMargin(mMarginHint); |
824 | ii = 0; | 830 | ii = 0; |
825 | dummy = | 831 | dummy = |
826 | addWidBool(i18n("Hide not running Todos in To-do view"), | 832 | addWidBool(i18n("Hide not running Todos in To-do view"), |
827 | &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); | 833 | &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); |
828 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 834 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
829 | 835 | ||
@@ -850,52 +856,52 @@ dummy = | |||
850 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 856 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
851 | 857 | ||
852 | 858 | ||
853 | QWidget* wid = new QWidget( topFrame ); | 859 | QWidget* wid = new QWidget( topFrame ); |
854 | // Todo run today color | 860 | // Todo run today color |
855 | KPrefsDialogWidColor *todoRunColor = | 861 | KPrefsDialogWidColor *todoRunColor = |
856 | addWidColor(i18n("Color for running todos:"), | 862 | addWidColor(i18n("Color for running todos:"), |
857 | &(KOPrefs::instance()->mTodoRunColor),wid); | 863 | &(KOPrefs::instance()->mTodoRunColor),wid); |
858 | QHBoxLayout *widLayout = new QHBoxLayout(wid); | 864 | Q3HBoxLayout *widLayout = new Q3HBoxLayout(wid); |
859 | widLayout->addWidget( todoRunColor->label() ); | 865 | widLayout->addWidget( todoRunColor->label() ); |
860 | widLayout->addWidget( todoRunColor->button() ); | 866 | widLayout->addWidget( todoRunColor->button() ); |
861 | topLayout->addWidget(wid,ii++,0); | 867 | topLayout->addWidget(wid,ii++,0); |
862 | 868 | ||
863 | wid = new QWidget( topFrame ); | 869 | wid = new QWidget( topFrame ); |
864 | // Todo due today color | 870 | // Todo due today color |
865 | KPrefsDialogWidColor *todoDueTodayColor = | 871 | KPrefsDialogWidColor *todoDueTodayColor = |
866 | addWidColor(i18n("Todo due today color:"), | 872 | addWidColor(i18n("Todo due today color:"), |
867 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); | 873 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); |
868 | widLayout = new QHBoxLayout(wid); | 874 | widLayout = new Q3HBoxLayout(wid); |
869 | widLayout->addWidget( todoDueTodayColor->label() ); | 875 | widLayout->addWidget( todoDueTodayColor->label() ); |
870 | widLayout->addWidget( todoDueTodayColor->button() ); | 876 | widLayout->addWidget( todoDueTodayColor->button() ); |
871 | topLayout->addWidget(wid,ii++,0); | 877 | topLayout->addWidget(wid,ii++,0); |
872 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); | 878 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); |
873 | 879 | ||
874 | // Todo overdue color | 880 | // Todo overdue color |
875 | wid = new QWidget( topFrame ); | 881 | wid = new QWidget( topFrame ); |
876 | widLayout = new QHBoxLayout(wid); | 882 | widLayout = new Q3HBoxLayout(wid); |
877 | KPrefsDialogWidColor *todoOverdueColor = | 883 | KPrefsDialogWidColor *todoOverdueColor = |
878 | addWidColor(i18n("Todo overdue color:"), | 884 | addWidColor(i18n("Todo overdue color:"), |
879 | &(KOPrefs::instance()->mTodoOverdueColor),wid); | 885 | &(KOPrefs::instance()->mTodoOverdueColor),wid); |
880 | widLayout->addWidget(todoOverdueColor->label()); | 886 | widLayout->addWidget(todoOverdueColor->label()); |
881 | widLayout->addWidget(todoOverdueColor->button()); | 887 | widLayout->addWidget(todoOverdueColor->button()); |
882 | topLayout->addWidget(wid,ii++,0); | 888 | topLayout->addWidget(wid,ii++,0); |
883 | 889 | ||
884 | dummy = | 890 | dummy = |
885 | addWidBool(i18n("Colors are applied to text"), | 891 | addWidBool(i18n("Colors are applied to text"), |
886 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); | 892 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); |
887 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 893 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
888 | 894 | ||
889 | 895 | ||
890 | 896 | ||
891 | topFrame = addPage(i18n("View Options"),0,0); | 897 | topFrame = addPage(i18n("View Options"),0,0); |
892 | 898 | ||
893 | topLayout = new QGridLayout(topFrame,4,1); | 899 | topLayout = new Q3GridLayout(topFrame,4,1); |
894 | topLayout->setSpacing(mSpacingHint); | 900 | topLayout->setSpacing(mSpacingHint); |
895 | topLayout->setMargin(mMarginHint); | 901 | topLayout->setMargin(mMarginHint); |
896 | ii = 0; | 902 | ii = 0; |
897 | 903 | ||
898 | dummy = | 904 | dummy = |
899 | addWidBool(i18n("Show Sync Events"), | 905 | addWidBool(i18n("Show Sync Events"), |
900 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); | 906 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); |
901 | topLayout->addWidget(dummy->checkBox(), ii++,0); | 907 | topLayout->addWidget(dummy->checkBox(), ii++,0); |
@@ -924,26 +930,26 @@ dummy = | |||
924 | &(KOPrefs::instance()->mWTshowCreated),topFrame); | 930 | &(KOPrefs::instance()->mWTshowCreated),topFrame); |
925 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 931 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
926 | dummy = addWidBool(i18n("Last modified time"), | 932 | dummy = addWidBool(i18n("Last modified time"), |
927 | &(KOPrefs::instance()->mWTshowChanged),topFrame); | 933 | &(KOPrefs::instance()->mWTshowChanged),topFrame); |
928 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 934 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
929 | 935 | ||
930 | topFrame = addPage(i18n("Conflict detection"),0,0); | 936 | topFrame = addPage(i18n("Conflict detection"),0,0); |
931 | 937 | ||
932 | topLayout = new QGridLayout(topFrame,2,1); | 938 | topLayout = new Q3GridLayout(topFrame,2,1); |
933 | topLayout->setSpacing(mSpacingHint); | 939 | topLayout->setSpacing(mSpacingHint); |
934 | topLayout->setMargin(mMarginHint); | 940 | topLayout->setMargin(mMarginHint); |
935 | ii = 0; | 941 | ii = 0; |
936 | dummy = addWidBool(i18n("Enable conflict detection"), | 942 | dummy = addWidBool(i18n("Enable conflict detection"), |
937 | &(KOPrefs::instance()->mDetectConflicts),topFrame); | 943 | &(KOPrefs::instance()->mDetectConflicts),topFrame); |
938 | topLayout->addWidget(dummy->checkBox(), ii++,0); | 944 | topLayout->addWidget(dummy->checkBox(), ii++,0); |
939 | topFrame = new QFrame( topFrame ); | 945 | topFrame = new Q3Frame( topFrame ); |
940 | topLayout->addWidget(topFrame ,ii++,0); | 946 | topLayout->addWidget(topFrame ,ii++,0); |
941 | topLayout = new QGridLayout(topFrame,4,1); | 947 | topLayout = new Q3GridLayout(topFrame,4,1); |
942 | connect ( dummy->checkBox(), SIGNAL( toggled( bool ) ), topFrame, SLOT ( setEnabled( bool ) ) ); | 948 | connect ( dummy->checkBox(), SIGNAL( toggled( bool ) ), topFrame, SLOT ( setEnabled( bool ) ) ); |
943 | dummy = addWidBool(i18n("Include events which \"show as free\""), | 949 | dummy = addWidBool(i18n("Include events which \"show as free\""), |
944 | &(KOPrefs::instance()->mIncludeFree),topFrame); | 950 | &(KOPrefs::instance()->mIncludeFree),topFrame); |
945 | topLayout->addWidget(dummy->checkBox(), ii++,0); | 951 | topLayout->addWidget(dummy->checkBox(), ii++,0); |
946 | topLayout->addWidget( new QLabel ( i18n("Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping."), topFrame ) , ii++,0); | 952 | topLayout->addWidget( new QLabel ( i18n("Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping."), topFrame ) , ii++,0); |
947 | 953 | ||
948 | topLayout->addWidget( new QLabel ( i18n("Filter for the edited event"), topFrame ) , ii++,0); | 954 | topLayout->addWidget( new QLabel ( i18n("Filter for the edited event"), topFrame ) , ii++,0); |
949 | mFilterEditItem = new QComboBox( topFrame ); | 955 | mFilterEditItem = new QComboBox( topFrame ); |
@@ -965,17 +971,17 @@ dummy = | |||
965 | topLayout->addWidget(dummy->checkBox(), ii++,0); | 971 | topLayout->addWidget(dummy->checkBox(), ii++,0); |
966 | 972 | ||
967 | 973 | ||
968 | 974 | ||
969 | 975 | ||
970 | topFrame = addPage(i18n("Alarm"),0,0); | 976 | topFrame = addPage(i18n("Alarm"),0,0); |
971 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 977 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
972 | 978 | ||
973 | topLayout = new QGridLayout(topFrame,2,1); | 979 | topLayout = new Q3GridLayout(topFrame,2,1); |
974 | topLayout->setSpacing(mSpacingHint); | 980 | topLayout->setSpacing(mSpacingHint); |
975 | topLayout->setMargin(mMarginHint); | 981 | topLayout->setMargin(mMarginHint); |
976 | int iii = 0; | 982 | int iii = 0; |
977 | 983 | ||
978 | dummy = | 984 | dummy = |
979 | addWidBool(i18n("Use internal alarm notification"), | 985 | addWidBool(i18n("Use internal alarm notification"), |
980 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); | 986 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); |
981 | topLayout->addWidget(dummy->checkBox(),iii++,0); | 987 | topLayout->addWidget(dummy->checkBox(),iii++,0); |
@@ -984,43 +990,43 @@ dummy = | |||
984 | 990 | ||
985 | lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame); | 991 | lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame); |
986 | 992 | ||
987 | topLayout->addWidget(lab ,iii++,0); | 993 | topLayout->addWidget(lab ,iii++,0); |
988 | } | 994 | } |
989 | #ifndef DESKTOP_VERSION | 995 | #ifndef DESKTOP_VERSION |
990 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 996 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
991 | #else | 997 | #else |
992 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 998 | lab->setAlignment( Qt::AlignLeft|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop); |
993 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 999 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
994 | #endif | 1000 | #endif |
995 | 1001 | ||
996 | QHBox* dummyBox = new QHBox(topFrame); | 1002 | Q3HBox* dummyBox = new Q3HBox(topFrame); |
997 | new QLabel(i18n("Play beeps count:"),dummyBox); | 1003 | new QLabel(i18n("Play beeps count:"),dummyBox); |
998 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); | 1004 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); |
999 | topLayout->addWidget(dummyBox,iii++,0); | 1005 | topLayout->addWidget(dummyBox,iii++,0); |
1000 | 1006 | ||
1001 | dummyBox = new QHBox(topFrame); | 1007 | dummyBox = new Q3HBox(topFrame); |
1002 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); | 1008 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); |
1003 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); | 1009 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); |
1004 | topLayout->addWidget(dummyBox,iii++,0); | 1010 | topLayout->addWidget(dummyBox,iii++,0); |
1005 | 1011 | ||
1006 | dummyBox = new QHBox(topFrame); | 1012 | dummyBox = new Q3HBox(topFrame); |
1007 | new QLabel(i18n("Default suspend time in min:"),dummyBox); | 1013 | new QLabel(i18n("Default suspend time in min:"),dummyBox); |
1008 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); | 1014 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); |
1009 | topLayout->addWidget(dummyBox,iii++,0); | 1015 | topLayout->addWidget(dummyBox,iii++,0); |
1010 | 1016 | ||
1011 | dummyBox = new QHBox(topFrame); | 1017 | dummyBox = new Q3HBox(topFrame); |
1012 | new QLabel(i18n("Auto suspend count:"),dummyBox); | 1018 | new QLabel(i18n("Auto suspend count:"),dummyBox); |
1013 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); | 1019 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); |
1014 | topLayout->addWidget(dummyBox,iii++,0); | 1020 | topLayout->addWidget(dummyBox,iii++,0); |
1015 | 1021 | ||
1016 | 1022 | ||
1017 | 1023 | ||
1018 | QHBox* hbo = new QHBox ( topFrame ); | 1024 | Q3HBox* hbo = new Q3HBox ( topFrame ); |
1019 | mDefaultAlarmFile = new QLineEdit(hbo); | 1025 | mDefaultAlarmFile = new QLineEdit(hbo); |
1020 | QPushButton * loadTemplate = new QPushButton(hbo); | 1026 | QPushButton * loadTemplate = new QPushButton(hbo); |
1021 | QPixmap icon; | 1027 | QPixmap icon; |
1022 | if ( QApplication::desktop()->width() < 321 ) | 1028 | if ( QApplication::desktop()->width() < 321 ) |
1023 | icon = SmallIcon("fileimport16"); | 1029 | icon = SmallIcon("fileimport16"); |
1024 | else | 1030 | else |
1025 | icon = SmallIcon("fileimport"); | 1031 | icon = SmallIcon("fileimport"); |
1026 | loadTemplate->setIconSet (icon ) ; | 1032 | loadTemplate->setIconSet (icon ) ; |
@@ -1050,20 +1056,20 @@ void KOPrefsDialog::selectSoundFile() | |||
1050 | QString fileName = mDefaultAlarmFile->text(); | 1056 | QString fileName = mDefaultAlarmFile->text(); |
1051 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); | 1057 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); |
1052 | if ( fileName.length() > 0 ) | 1058 | if ( fileName.length() > 0 ) |
1053 | mDefaultAlarmFile->setText( fileName ); | 1059 | mDefaultAlarmFile->setText( fileName ); |
1054 | } | 1060 | } |
1055 | void KOPrefsDialog::setupFontsTab() | 1061 | void KOPrefsDialog::setupFontsTab() |
1056 | { | 1062 | { |
1057 | 1063 | ||
1058 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 1064 | Q3Frame *topFrame = addPage(i18n("Fonts"),0,0); |
1059 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 1065 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
1060 | 1066 | ||
1061 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 1067 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3); |
1062 | topLayout->setSpacing(1); | 1068 | topLayout->setSpacing(1); |
1063 | topLayout->setMargin(3); | 1069 | topLayout->setMargin(3); |
1064 | KPrefsDialogWidFont * tVFont; | 1070 | KPrefsDialogWidFont * tVFont; |
1065 | int i = 0; | 1071 | int i = 0; |
1066 | KPrefsDialogWidFont *timeLabelsFont = | 1072 | KPrefsDialogWidFont *timeLabelsFont = |
1067 | addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), | 1073 | addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), |
1068 | &(KOPrefs::instance()->mDateNavigatorFont),topFrame); | 1074 | &(KOPrefs::instance()->mDateNavigatorFont),topFrame); |
1069 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 1075 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
@@ -1120,17 +1126,17 @@ void KOPrefsDialog::setupFontsTab() | |||
1120 | topLayout->setColStretch(1,1); | 1126 | topLayout->setColStretch(1,1); |
1121 | topLayout->setRowStretch(4,1); | 1127 | topLayout->setRowStretch(4,1); |
1122 | 1128 | ||
1123 | 1129 | ||
1124 | i = 0; | 1130 | i = 0; |
1125 | topFrame = addPage(i18n("View Fonts"),0, | 1131 | topFrame = addPage(i18n("View Fonts"),0, |
1126 | DesktopIcon("fonts",KIcon::SizeMedium)); | 1132 | DesktopIcon("fonts",KIcon::SizeMedium)); |
1127 | 1133 | ||
1128 | topLayout = new QGridLayout(topFrame,7,3); | 1134 | topLayout = new Q3GridLayout(topFrame,7,3); |
1129 | topLayout->setSpacing(1); | 1135 | topLayout->setSpacing(1); |
1130 | topLayout->setMargin(3); | 1136 | topLayout->setMargin(3); |
1131 | 1137 | ||
1132 | tVFont = | 1138 | tVFont = |
1133 | addWidFont(i18n("Configure KO"),i18n("What's Next View:"), | 1139 | addWidFont(i18n("Configure KO"),i18n("What's Next View:"), |
1134 | &(KOPrefs::instance()->mWhatsNextFont),topFrame); | 1140 | &(KOPrefs::instance()->mWhatsNextFont),topFrame); |
1135 | topLayout->addWidget(tVFont->label(),i,0); | 1141 | topLayout->addWidget(tVFont->label(),i,0); |
1136 | topLayout->addWidget(tVFont->preview(),i,1); | 1142 | topLayout->addWidget(tVFont->preview(),i,1); |
@@ -1188,30 +1194,30 @@ void KOPrefsDialog::setupFontsTab() | |||
1188 | 1194 | ||
1189 | 1195 | ||
1190 | 1196 | ||
1191 | 1197 | ||
1192 | } | 1198 | } |
1193 | 1199 | ||
1194 | void KOPrefsDialog::setupColorsTab() | 1200 | void KOPrefsDialog::setupColorsTab() |
1195 | { | 1201 | { |
1196 | QFrame *topFrame = addPage(i18n("Colors"),0,0); | 1202 | Q3Frame *topFrame = addPage(i18n("Colors"),0,0); |
1197 | // DesktopIcon("colorize",KIcon::SizeMedium)); | 1203 | // DesktopIcon("colorize",KIcon::SizeMedium)); |
1198 | 1204 | ||
1199 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1205 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2); |
1200 | // topLayout->setSpacing(mSpacingHint); | 1206 | // topLayout->setSpacing(mSpacingHint); |
1201 | // topLayout->setMargin(mMarginHint); | 1207 | // topLayout->setMargin(mMarginHint); |
1202 | 1208 | ||
1203 | topLayout->setSpacing(2); | 1209 | topLayout->setSpacing(2); |
1204 | topLayout->setMargin(3); | 1210 | topLayout->setMargin(3); |
1205 | 1211 | ||
1206 | int ii = 1; | 1212 | int ii = 1; |
1207 | QGroupBox *categoryGroup ; | 1213 | Q3GroupBox *categoryGroup ; |
1208 | 1214 | ||
1209 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), | 1215 | categoryGroup = new Q3GroupBox(1,Qt::Vertical,i18n("Categories"), |
1210 | topFrame); | 1216 | topFrame); |
1211 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); | 1217 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); |
1212 | 1218 | ||
1213 | mCategoryCombo = new QComboBox(categoryGroup); | 1219 | mCategoryCombo = new QComboBox(categoryGroup); |
1214 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); | 1220 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); |
1215 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); | 1221 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); |
1216 | 1222 | ||
1217 | mCategoryButton = new KColorButton(categoryGroup); | 1223 | mCategoryButton = new KColorButton(categoryGroup); |
@@ -1245,17 +1251,17 @@ void KOPrefsDialog::setupColorsTab() | |||
1245 | &(KOPrefs::instance()->mTodoDoneColor),topFrame); | 1251 | &(KOPrefs::instance()->mTodoDoneColor),topFrame); |
1246 | topLayout->addWidget(eventColor->label(),ii,0); | 1252 | topLayout->addWidget(eventColor->label(),ii,0); |
1247 | topLayout->addWidget(eventColor->button(),ii++,1); | 1253 | topLayout->addWidget(eventColor->button(),ii++,1); |
1248 | 1254 | ||
1249 | if ( QApplication::desktop()->height() <= 240 ) { | 1255 | if ( QApplication::desktop()->height() <= 240 ) { |
1250 | topFrame = addPage(i18n("Colors") +" 2",0,0); | 1256 | topFrame = addPage(i18n("Colors") +" 2",0,0); |
1251 | // DesktopIcon("colorize",KIcon::SizeMedium)); | 1257 | // DesktopIcon("colorize",KIcon::SizeMedium)); |
1252 | 1258 | ||
1253 | topLayout = new QGridLayout(topFrame,5,2); | 1259 | topLayout = new Q3GridLayout(topFrame,5,2); |
1254 | // topLayout->setSpacing(mSpacingHint); | 1260 | // topLayout->setSpacing(mSpacingHint); |
1255 | // topLayout->setMargin(mMarginHint); | 1261 | // topLayout->setMargin(mMarginHint); |
1256 | 1262 | ||
1257 | topLayout->setSpacing(2); | 1263 | topLayout->setSpacing(2); |
1258 | topLayout->setMargin(3); | 1264 | topLayout->setMargin(3); |
1259 | } | 1265 | } |
1260 | 1266 | ||
1261 | 1267 | ||
@@ -1312,30 +1318,30 @@ void KOPrefsDialog::updateCategoryColor() | |||
1312 | } | 1318 | } |
1313 | } | 1319 | } |
1314 | 1320 | ||
1315 | void KOPrefsDialog::setupPrinterTab() | 1321 | void KOPrefsDialog::setupPrinterTab() |
1316 | { | 1322 | { |
1317 | mPrinterTab = addPage(i18n("Printing"),0, | 1323 | mPrinterTab = addPage(i18n("Printing"),0, |
1318 | DesktopIcon("fileprint",KIcon::SizeMedium)); | 1324 | DesktopIcon("fileprint",KIcon::SizeMedium)); |
1319 | 1325 | ||
1320 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); | 1326 | Q3GridLayout *topLayout = new Q3GridLayout(mPrinterTab,5,2); |
1321 | topLayout->setSpacing(mSpacingHint); | 1327 | topLayout->setSpacing(mSpacingHint); |
1322 | topLayout->setMargin(mMarginHint); | 1328 | topLayout->setMargin(mMarginHint); |
1323 | 1329 | ||
1324 | topLayout->setRowStretch(4,1); | 1330 | topLayout->setRowStretch(4,1); |
1325 | } | 1331 | } |
1326 | 1332 | ||
1327 | void KOPrefsDialog::setupGroupSchedulingTab() | 1333 | void KOPrefsDialog::setupGroupSchedulingTab() |
1328 | { | 1334 | { |
1329 | #if 0 | 1335 | #if 0 |
1330 | QFrame *topFrame = addPage(i18n("Group Scheduling"),0, | 1336 | Q3Frame *topFrame = addPage(i18n("Group Scheduling"),0, |
1331 | DesktopIcon("personal",KIcon::SizeMedium)); | 1337 | DesktopIcon("personal",KIcon::SizeMedium)); |
1332 | 1338 | ||
1333 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 1339 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); |
1334 | topLayout->setSpacing(mSpacingHint); | 1340 | topLayout->setSpacing(mSpacingHint); |
1335 | topLayout->setMargin(mMarginHint); | 1341 | topLayout->setMargin(mMarginHint); |
1336 | 1342 | ||
1337 | #if 0 | 1343 | #if 0 |
1338 | KPrefsDialogWidRadios *schedulerGroup = | 1344 | KPrefsDialogWidRadios *schedulerGroup = |
1339 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), | 1345 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), |
1340 | topFrame); | 1346 | topFrame); |
1341 | schedulerGroup->addRadio("Dummy"); // Only for debugging | 1347 | schedulerGroup->addRadio("Dummy"); // Only for debugging |
@@ -1348,17 +1354,17 @@ void KOPrefsDialog::setupGroupSchedulingTab() | |||
1348 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), | 1354 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), |
1349 | topFrame); | 1355 | topFrame); |
1350 | sendGroup->addRadio(i18n("Send to outbox")); | 1356 | sendGroup->addRadio(i18n("Send to outbox")); |
1351 | sendGroup->addRadio(i18n("Send directly")); | 1357 | sendGroup->addRadio(i18n("Send directly")); |
1352 | 1358 | ||
1353 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); | 1359 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); |
1354 | 1360 | ||
1355 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); | 1361 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); |
1356 | mAMails = new QListView(topFrame); | 1362 | mAMails = new Q3ListView(topFrame); |
1357 | mAMails->addColumn(i18n("Email"),300); | 1363 | mAMails->addColumn(i18n("Email"),300); |
1358 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); | 1364 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); |
1359 | 1365 | ||
1360 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); | 1366 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); |
1361 | aEmailsEdit = new QLineEdit(topFrame); | 1367 | aEmailsEdit = new QLineEdit(topFrame); |
1362 | aEmailsEdit->setEnabled(false); | 1368 | aEmailsEdit->setEnabled(false); |
1363 | topLayout->addWidget(aEmailsEdit,4,1); | 1369 | topLayout->addWidget(aEmailsEdit,4,1); |
1364 | 1370 | ||
@@ -1366,27 +1372,27 @@ void KOPrefsDialog::setupGroupSchedulingTab() | |||
1366 | topLayout->addWidget(add,5,0); | 1372 | topLayout->addWidget(add,5,0); |
1367 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); | 1373 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); |
1368 | topLayout->addWidget(del,5,1); | 1374 | topLayout->addWidget(del,5,1); |
1369 | 1375 | ||
1370 | //topLayout->setRowStretch(2,1); | 1376 | //topLayout->setRowStretch(2,1); |
1371 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); | 1377 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); |
1372 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); | 1378 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); |
1373 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); | 1379 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); |
1374 | connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); | 1380 | connect(mAMails,SIGNAL(selectionChanged(Q3ListViewItem *)),SLOT(updateInput())); |
1375 | #endif | 1381 | #endif |
1376 | } | 1382 | } |
1377 | 1383 | ||
1378 | void KOPrefsDialog::setupGroupAutomationTab() | 1384 | void KOPrefsDialog::setupGroupAutomationTab() |
1379 | { | 1385 | { |
1380 | return; | 1386 | return; |
1381 | QFrame *topFrame = addPage(i18n("Group Automation"),0, | 1387 | Q3Frame *topFrame = addPage(i18n("Group Automation"),0, |
1382 | DesktopIcon("personal",KIcon::SizeMedium)); | 1388 | DesktopIcon("personal",KIcon::SizeMedium)); |
1383 | 1389 | ||
1384 | QGridLayout *topLayout = new QGridLayout(topFrame,5,1); | 1390 | Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,1); |
1385 | topLayout->setSpacing(mSpacingHint); | 1391 | topLayout->setSpacing(mSpacingHint); |
1386 | topLayout->setMargin(mMarginHint); | 1392 | topLayout->setMargin(mMarginHint); |
1387 | 1393 | ||
1388 | KPrefsDialogWidRadios *autoRefreshGroup = | 1394 | KPrefsDialogWidRadios *autoRefreshGroup = |
1389 | addWidRadios(i18n("Auto Send Refresh"), | 1395 | addWidRadios(i18n("Auto Send Refresh"), |
1390 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); | 1396 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); |
1391 | autoRefreshGroup->addRadio(i18n("Never")); | 1397 | autoRefreshGroup->addRadio(i18n("Never")); |
1392 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); | 1398 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); |
@@ -1510,17 +1516,17 @@ void KOPrefsDialog::usrWriteConfig() | |||
1510 | QStringList cat = KOPrefs::instance()->mCustomCategories; | 1516 | QStringList cat = KOPrefs::instance()->mCustomCategories; |
1511 | int iii = 0; | 1517 | int iii = 0; |
1512 | while ( iii < cat.count() ) { | 1518 | while ( iii < cat.count() ) { |
1513 | if ( *KOPrefs::instance()->categoryColor( cat[ iii ] ) == mCatDefaultColor ) | 1519 | if ( *KOPrefs::instance()->categoryColor( cat[ iii ] ) == mCatDefaultColor ) |
1514 | KOPrefs::instance()->setCategoryColor( cat[ iii ], KOPrefs::instance()->mEventColor ); | 1520 | KOPrefs::instance()->setCategoryColor( cat[ iii ], KOPrefs::instance()->mEventColor ); |
1515 | ++iii; | 1521 | ++iii; |
1516 | } | 1522 | } |
1517 | } | 1523 | } |
1518 | QDictIterator<QColor> it(mCategoryDict); | 1524 | Q3DictIterator<QColor> it(mCategoryDict); |
1519 | while (it.current()) { | 1525 | while (it.current()) { |
1520 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); | 1526 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); |
1521 | ++it; | 1527 | ++it; |
1522 | } | 1528 | } |
1523 | 1529 | ||
1524 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); | 1530 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); |
1525 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); | 1531 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); |
1526 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); | 1532 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); |