author | zautrix <zautrix> | 2005-06-10 10:31:22 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-10 10:31:22 (UTC) |
commit | e5ca8e0d8d6d08b597253f43de401aa1a99a6abe (patch) (side-by-side diff) | |
tree | c319ba89abbe5cd90647bc38deb0ab1ce46f48e5 /libkdepim | |
parent | 89c5159208fd982f527117e49d67ea1f90553dbe (diff) | |
download | kdepimpi-e5ca8e0d8d6d08b597253f43de401aa1a99a6abe.zip kdepimpi-e5ca8e0d8d6d08b597253f43de401aa1a99a6abe.tar.gz kdepimpi-e5ca8e0d8d6d08b597253f43de401aa1a99a6abe.tar.bz2 |
config dialog fixes
-rw-r--r-- | libkdepim/kprefsdialog.cpp | 30 | ||||
-rw-r--r-- | libkdepim/kprefsdialog.h | 26 |
2 files changed, 56 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 @@ -44,18 +44,20 @@ #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) @@ -405,6 +407,34 @@ 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(); +} + diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h index efcb86a..52ec809 100644 --- a/libkdepim/kprefsdialog.h +++ b/libkdepim/kprefsdialog.h @@ -439,7 +439,33 @@ class KPrefsDialog : public KDialogBase private: KPrefs *mPrefs; QPtrList<KPrefsDialogWid> mPrefsWids; }; + +#include "kcmconfigs/kdepimconfigwidget.h" +class KPimPrefsGlobalDialog : public KPrefsDialog +{ + Q_OBJECT + public: + KPimPrefsGlobalDialog(QWidget *parent=0,char *name=0,bool modal=true); + /** + Destructor. + */ + void showTZconfig(); + + public slots: + + signals: + protected slots: + + protected: + void usrReadConfig(); + virtual void usrWriteConfig() ; + + private: + KDEPIMConfigWidget* kdelibcfg; + +}; + #endif |