summaryrefslogtreecommitdiffabout
path: root/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
Side-by-side diff
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
@@ -32,24 +32,25 @@ $Id$
#include <qtabwidget.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qbuttongroup.h>
#include <qfile.h>
#include <qvbox.h>
#include <qdir.h>
#include <qregexp.h>
#include <kdialog.h>
+#include <kprefsdialog.h>
#include <klocale.h>
#include <kdateedit.h>
#include <kglobal.h>
#include <stdlib.h>
/*US
#include <qcheckbox.h>
#include <qframe.h>
#include <qpushbutton.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qlabel.h>
@@ -72,24 +73,25 @@ $Id$
#endif // KAB_EMBEDDED
#include "addresseewidget.h"
#include "extensionconfigdialog.h"
#include "extensionwidget.h"
*/
#include "qapplication.h"
#include "kpimglobalprefs.h"
#include "kdepimconfigwidget.h"
+#include <kprefs.h>
KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name )
: KPrefsWidget(prefs, parent, name )
{
mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email"));
mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone"));
mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS"));
mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax"));
mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager"));
mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP"));
@@ -339,26 +341,34 @@ void KDEPIMConfigWidget::setupLocaleTab()
&(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame);
topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1);
++iii;
tabWidget->addTab( topFrame, i18n( "Time Format" ) );
}
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 );
topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
new QLabel( i18n("Timezone:"), timeZoneBox );
mTimeZoneCombo = new QComboBox( timeZoneBox );
if ( QApplication::desktop()->width() < 300 ) {
mTimeZoneCombo->setMaximumWidth(150);
}
@@ -407,29 +417,42 @@ void KDEPIMConfigWidget::setupTimeZoneTab()
lab = new QLabel( i18n("Daylight end:"), topFrame );
topLayout->addWidget(lab, iii,0);
mEndDateSavingEdit = new KDateEdit(topFrame);
topLayout->addWidget(mEndDateSavingEdit, iii,1);
++iii;
QDate current ( 2001, 1,1);
mStartDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingStart-1));
mEndDateSavingEdit->setDate(current.addDays(KPimGlobalPrefs::instance()->mDaylightsavingEnd-1));
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 )
{
// first store the current data
saveEditFieldSettings();
// set mCurrentApp
mCurrentApp = (ExternalAppHandler::Types)newApp;
// set mCurrentClient
switch(mCurrentApp)