summaryrefslogtreecommitdiffabout
path: root/libkdepim/kprefsdialog.cpp
Side-by-side diff
Diffstat (limited to 'libkdepim/kprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kprefsdialog.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp
index b6ae775..6dc741d 100644
--- a/libkdepim/kprefsdialog.cpp
+++ b/libkdepim/kprefsdialog.cpp
@@ -18,70 +18,72 @@
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
// $Id$
#include <qlayout.h>
#include <qlabel.h>
#include <qgroupbox.h>
#include <qbuttongroup.h>
#include <qlineedit.h>
#include <qfont.h>
#include <qslider.h>
#include <qfile.h>
#include <qtextstream.h>
#include <qvbox.h>
#include <qhbox.h>
#include <qspinbox.h>
#include <qdatetime.h>
#include <qframe.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
#include <qapplication.h>
#include <kcolorbutton.h>
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
+#include <kglobalsettings.h>
#include <kfontdialog.h>
#include <kmessagebox.h>
#include <kcolordialog.h>
#include <kiconloader.h>
#include "kprefs.h"
+#include "kpimglobalprefs.h"
#include "kprefsdialog.h"
//#include "kprefsdialog.moc"
KPrefsDialogWidBool::KPrefsDialogWidBool(const QString &text,bool *reference,
QWidget *parent)
{
mReference = reference;
mCheck = new QCheckBox(text,parent);
}
void KPrefsDialogWidBool::readConfig()
{
mCheck->setChecked(*mReference);
}
void KPrefsDialogWidBool::writeConfig()
{
*mReference = mCheck->isChecked();
}
QCheckBox *KPrefsDialogWidBool::checkBox()
{
return mCheck;
}
KPrefsDialogWidColor::KPrefsDialogWidColor(const QString &text,QColor *reference,
QWidget *parent)
{
mReference = reference;
@@ -379,32 +381,60 @@ void KPrefsDialog::writeConfig()
// kdDebug(5300) << "KPrefsDialog::writeConfig() now writing..." << endl;
mPrefs->writeConfig();
// kdDebug(5300) << "KPrefsDialog::writeConfig() done" << endl;
}
void KPrefsDialog::slotApply()
{
writeConfig();
emit configChanged();
}
void KPrefsDialog::slotOk()
{
slotApply();
QDialog::accept();
}
void KPrefsDialog::accept()
{
slotOk();
}
void KPrefsDialog::slotDefault()
{
if (KMessageBox::warningContinueCancel(this,
i18n("You are about to set all\npreferences to default values.\nAll "
"custom modifications will be lost."),i18n("Setting Default Preferences"),
i18n("Continue"))
== KMessageBox::Continue) setDefaults();
}
+
+KPimPrefsGlobalDialog::KPimPrefsGlobalDialog(QWidget *parent,char *name,bool modal): KPrefsDialog( KPimGlobalPrefs::instance() ,parent, name, modal )
+{
+ setFont( KGlobalSettings::generalMaxFont() );
+ kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), this, "KPrefsGlobalDialog" );
+ setMainWidget( kdelibcfg );
+ setCaption( i18n("KDE-Pim Global Settings"));
+ kdelibcfg->readConfig();
+#ifndef DESKTOP_VERSION
+ if ( QApplication::desktop()->height() <= 480 )
+ hideButtons();
+ showMaximized();
+#endif
+}
+void KPimPrefsGlobalDialog::showTZconfig()
+{
+ kdelibcfg->showTimeZoneTab() ;
+}
+void KPimPrefsGlobalDialog::usrReadConfig()
+{
+ kdelibcfg->readConfig();
+}
+
+void KPimPrefsGlobalDialog::usrWriteConfig()
+{
+ kdelibcfg->writeConfig();
+}
+