-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 33 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.cpp | 3 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.h | 1 |
3 files changed, 32 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 @@ -40,8 +40,9 @@ $Id$ #include <qdir.h> #include <qregexp.h> #include <kdialog.h> +#include <kprefsdialog.h> #include <klocale.h> #include <kdateedit.h> #include <kglobal.h> #include <stdlib.h> @@ -80,8 +81,9 @@ $Id$ #include "kpimglobalprefs.h" #include "kdepimconfigwidget.h" +#include <kprefs.h> KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) : KPrefsWidget(prefs, parent, name ) @@ -347,10 +349,18 @@ void KDEPIMConfigWidget::setupLocaleTab() void KDEPIMConfigWidget::setupTimeZoneTab() { - QWidget *topFrame = new QWidget( this ); - QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); + QWidget *topFrame; + QGridLayout *topLayout ; + + + + + + + topFrame = new QWidget( this ); + topLayout = new QGridLayout( topFrame, 5, 2); topLayout->setSpacing(KDialog::spacingHintSmall()); topLayout->setMargin(KDialog::marginHintSmall()); QHBox *timeZoneBox = new QHBox( topFrame ); @@ -415,13 +425,26 @@ void KDEPIMConfigWidget::setupTimeZoneTab() connect( mStartDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); connect( mEndDateSavingEdit, SIGNAL( dateChanged(QDate)), this, SLOT( modified()) ); connect( mTimeZoneCombo, SIGNAL( activated( int ) ), this, SLOT (modified() ) ); - - - tabWidget->addTab( topFrame, i18n( "Time Zone" ) ); + + topFrame = new QWidget( this ); + topLayout = new QGridLayout( topFrame, 3, 2); + topLayout->setSpacing(KDialog::spacingHintSmall()); + topLayout->setMargin(KDialog::marginHintSmall()); + tabWidget->addTab( topFrame, i18n( "Fonts" ) ); + + QLabel* labb = new QLabel( i18n("Global application font for all apps:"), topFrame ); + topLayout->addMultiCellWidget(labb,0,0,0,2); + int i = 1; + KPrefsWidFont *timeLabelsFont = + addWidFont(i18n("Kx/Pi"),i18n("Application Font"), + &(KPimGlobalPrefs::instance()->mApplicationFont),topFrame); + topLayout->addWidget(timeLabelsFont->label(),i,0); + topLayout->addWidget(timeLabelsFont->preview(),i,1); + topLayout->addWidget(timeLabelsFont->button(),i,2); } void KDEPIMConfigWidget::externalapp_changed( int newApp ) { diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index 81e3cb1..ac7d205 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp @@ -31,8 +31,9 @@ $Id$ #include <kglobal.h> #include <kconfig.h> #include <klocale.h> #include <kdebug.h> +#include <kglobalsettings.h> #include <kstaticdeleter.h> #include <qregexp.h> #include <qfile.h> @@ -48,8 +49,10 @@ static KStaticDeleter<KPimGlobalPrefs> staticDeleterGP; KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) : KPrefs("microkdeglobalrc") { mLocaleDict = 0; + KPrefs::setCurrentGroup("Fonts"); + addItemFont("ApplicationFont",&mApplicationFont,KGlobalSettings::generalFont() ); KPrefs::setCurrentGroup("Locale"); addItemInt("PreferredLanguage",&mPreferredLanguage,0); addItemInt("PreferredTime",&mPreferredTime,0); addItemInt("PreferredDate",&mPreferredDate,0); diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h index 5e27e85..bf17338 100644 --- a/libkdepim/kpimglobalprefs.h +++ b/libkdepim/kpimglobalprefs.h @@ -100,8 +100,9 @@ class KPimGlobalPrefs : public KPrefs bool mUseDaylightsaving; int mDaylightsavingStart; int mDaylightsavingEnd; bool mTimeZoneAdd30min; + QFont mApplicationFont; int mEmailClient; QString mEmailOtherChannel; QString mEmailOtherMessage; |