summaryrefslogtreecommitdiffabout
path: root/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
Unidiff
Diffstat (limited to 'libkdepim/kcmconfigs/kdepimconfigwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp33
1 files changed, 28 insertions, 5 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 6eaf2f2..bbed38d 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -36,16 +36,17 @@ $Id$
36#include <qlineedit.h> 36#include <qlineedit.h>
37#include <qbuttongroup.h> 37#include <qbuttongroup.h>
38#include <qfile.h> 38#include <qfile.h>
39#include <qvbox.h> 39#include <qvbox.h>
40#include <qdir.h> 40#include <qdir.h>
41#include <qregexp.h> 41#include <qregexp.h>
42 42
43#include <kdialog.h> 43#include <kdialog.h>
44#include <kprefsdialog.h>
44#include <klocale.h> 45#include <klocale.h>
45#include <kdateedit.h> 46#include <kdateedit.h>
46#include <kglobal.h> 47#include <kglobal.h>
47#include <stdlib.h> 48#include <stdlib.h>
48 49
49/*US 50/*US
50#include <qcheckbox.h> 51#include <qcheckbox.h>
51#include <qframe.h> 52#include <qframe.h>
@@ -76,16 +77,17 @@ $Id$
76#include "extensionwidget.h" 77#include "extensionwidget.h"
77*/ 78*/
78 79
79#include "qapplication.h" 80#include "qapplication.h"
80 81
81#include "kpimglobalprefs.h" 82#include "kpimglobalprefs.h"
82 83
83#include "kdepimconfigwidget.h" 84#include "kdepimconfigwidget.h"
85#include <kprefs.h>
84 86
85 87
86KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) 88KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name )
87 : KPrefsWidget(prefs, parent, name ) 89 : KPrefsWidget(prefs, parent, name )
88{ 90{
89 mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); 91 mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email"));
90 mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); 92 mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone"));
91 mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); 93 mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS"));
@@ -343,18 +345,26 @@ void KDEPIMConfigWidget::setupLocaleTab()
343 345
344 tabWidget->addTab( topFrame, i18n( "Time Format" ) ); 346 tabWidget->addTab( topFrame, i18n( "Time Format" ) );
345 347
346} 348}
347 349
348 350
349void KDEPIMConfigWidget::setupTimeZoneTab() 351void KDEPIMConfigWidget::setupTimeZoneTab()
350{ 352{
351 QWidget *topFrame = new QWidget( this ); 353 QWidget *topFrame;
352 QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); 354 QGridLayout *topLayout ;
355
356
357
358
359
360
361 topFrame = new QWidget( this );
362 topLayout = new QGridLayout( topFrame, 5, 2);
353 topLayout->setSpacing(KDialog::spacingHintSmall()); 363 topLayout->setSpacing(KDialog::spacingHintSmall());
354 topLayout->setMargin(KDialog::marginHintSmall()); 364 topLayout->setMargin(KDialog::marginHintSmall());
355 365
356 QHBox *timeZoneBox = new QHBox( topFrame ); 366 QHBox *timeZoneBox = new QHBox( topFrame );
357 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); 367 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
358 368
359 new QLabel( i18n("Timezone:"), timeZoneBox ); 369 new QLabel( i18n("Timezone:"), timeZoneBox );
360 mTimeZoneCombo = new QComboBox( timeZoneBox ); 370 mTimeZoneCombo = new QComboBox( timeZoneBox );
@@ -411,21 +421,34 @@ void KDEPIMConfigWidget::setupTimeZoneTab()
411 ++iii; 421 ++iii;
412 QDate current ( 2001, 1,1); 422 QDate current ( 2001, 1,1);
413 mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1)); 423 mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1));
414 mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1)); 424 mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1));
415 425
416 connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); 426 connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) );
417 connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); 427 connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) );
418 connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); 428 connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) );
419
420
421
422 tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); 429 tabWidget->addTab( topFrame, i18n( "Time Zone" ) );
423 430
431
432 topFrame = new QWidget( this );
433 topLayout = new QGridLayout( topFrame, 3, 2);
434 topLayout->setSpacing(KDialog::spacingHintSmall());
435 topLayout->setMargin(KDialog::marginHintSmall());
436 tabWidget->addTab( topFrame, i18n( "Fonts" ) );
437
438 QLabel* labb = new QLabel( i18n("Global application font for all apps:"), topFrame );
439 topLayout->addMultiCellWidget(labb,0,0,0,2);
440 int i = 1;
441 KPrefsWidFont *timeLabelsFont =
442 addWidFont(i18n("Kx/Pi"),i18n("Application Font"),
443 &(KPimGlobalPrefs::instance()->mApplicationFont),topFrame);
444 topLayout->addWidget(timeLabelsFont->label(),i,0);
445 topLayout->addWidget(timeLabelsFont->preview(),i,1);
446 topLayout->addWidget(timeLabelsFont->button(),i,2);
424} 447}
425 448
426void KDEPIMConfigWidget::externalapp_changed( int newApp ) 449void KDEPIMConfigWidget::externalapp_changed( int newApp )
427{ 450{
428 // first store the current data 451 // first store the current data
429 saveEditFieldSettings(); 452 saveEditFieldSettings();
430 453
431 // set mCurrentApp 454 // set mCurrentApp