summaryrefslogtreecommitdiffabout
path: root/libkdepim
authorzautrix <zautrix>2005-06-10 10:31:22 (UTC)
committer zautrix <zautrix>2005-06-10 10:31:22 (UTC)
commite5ca8e0d8d6d08b597253f43de401aa1a99a6abe (patch) (unidiff)
treec319ba89abbe5cd90647bc38deb0ab1ce46f48e5 /libkdepim
parent89c5159208fd982f527117e49d67ea1f90553dbe (diff)
downloadkdepimpi-e5ca8e0d8d6d08b597253f43de401aa1a99a6abe.zip
kdepimpi-e5ca8e0d8d6d08b597253f43de401aa1a99a6abe.tar.gz
kdepimpi-e5ca8e0d8d6d08b597253f43de401aa1a99a6abe.tar.bz2
config dialog fixes
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kprefsdialog.cpp30
-rw-r--r--libkdepim/kprefsdialog.h26
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
@@ -42,22 +42,24 @@
42#include <qradiobutton.h> 42#include <qradiobutton.h>
43#include <qpushbutton.h> 43#include <qpushbutton.h>
44#include <qapplication.h> 44#include <qapplication.h>
45 45
46#include <kcolorbutton.h> 46#include <kcolorbutton.h>
47#include <kdebug.h> 47#include <kdebug.h>
48#include <klocale.h> 48#include <klocale.h>
49#include <kglobal.h> 49#include <kglobal.h>
50#include <kglobalsettings.h>
50#include <kfontdialog.h> 51#include <kfontdialog.h>
51#include <kmessagebox.h> 52#include <kmessagebox.h>
52#include <kcolordialog.h> 53#include <kcolordialog.h>
53#include <kiconloader.h> 54#include <kiconloader.h>
54 55
55#include "kprefs.h" 56#include "kprefs.h"
57#include "kpimglobalprefs.h"
56 58
57#include "kprefsdialog.h" 59#include "kprefsdialog.h"
58//#include "kprefsdialog.moc" 60//#include "kprefsdialog.moc"
59 61
60KPrefsDialogWidBool::KPrefsDialogWidBool(const QString &text,bool *reference, 62KPrefsDialogWidBool::KPrefsDialogWidBool(const QString &text,bool *reference,
61 QWidget *parent) 63 QWidget *parent)
62{ 64{
63 mReference = reference; 65 mReference = reference;
@@ -403,8 +405,36 @@ void KPrefsDialog::accept()
403void KPrefsDialog::slotDefault() 405void KPrefsDialog::slotDefault()
404{ 406{
405 if (KMessageBox::warningContinueCancel(this, 407 if (KMessageBox::warningContinueCancel(this,
406 i18n("You are about to set all\npreferences to default values.\nAll " 408 i18n("You are about to set all\npreferences to default values.\nAll "
407 "custom modifications will be lost."),i18n("Setting Default Preferences"), 409 "custom modifications will be lost."),i18n("Setting Default Preferences"),
408 i18n("Continue")) 410 i18n("Continue"))
409 == KMessageBox::Continue) setDefaults(); 411 == KMessageBox::Continue) setDefaults();
410} 412}
413
414KPimPrefsGlobalDialog::KPimPrefsGlobalDialog(QWidget *parent,char *name,bool modal): KPrefsDialog( KPimGlobalPrefs::instance() ,parent, name, modal )
415{
416 setFont( KGlobalSettings::generalMaxFont() );
417 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), this, "KPrefsGlobalDialog" );
418 setMainWidget( kdelibcfg );
419 setCaption( i18n("KDE-Pim Global Settings"));
420 kdelibcfg->readConfig();
421#ifndef DESKTOP_VERSION
422 if ( QApplication::desktop()->height() <= 480 )
423 hideButtons();
424 showMaximized();
425#endif
426}
427void KPimPrefsGlobalDialog::showTZconfig()
428{
429 kdelibcfg->showTimeZoneTab() ;
430}
431void KPimPrefsGlobalDialog::usrReadConfig()
432{
433 kdelibcfg->readConfig();
434}
435
436void KPimPrefsGlobalDialog::usrWriteConfig()
437{
438 kdelibcfg->writeConfig();
439}
440
diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h
index efcb86a..52ec809 100644
--- a/libkdepim/kprefsdialog.h
+++ b/libkdepim/kprefsdialog.h
@@ -437,9 +437,35 @@ class KPrefsDialog : public KDialogBase
437 virtual void usrWriteConfig() {} 437 virtual void usrWriteConfig() {}
438 438
439 private: 439 private:
440 KPrefs *mPrefs; 440 KPrefs *mPrefs;
441 441
442 QPtrList<KPrefsDialogWid> mPrefsWids; 442 QPtrList<KPrefsDialogWid> mPrefsWids;
443}; 443};
444 444
445
446#include "kcmconfigs/kdepimconfigwidget.h"
447class KPimPrefsGlobalDialog : public KPrefsDialog
448{
449 Q_OBJECT
450 public:
451 KPimPrefsGlobalDialog(QWidget *parent=0,char *name=0,bool modal=true);
452 /**
453 Destructor.
454 */
455 void showTZconfig();
456
457 public slots:
458
459 signals:
460 protected slots:
461
462 protected:
463 void usrReadConfig();
464 virtual void usrWriteConfig() ;
465
466 private:
467 KDEPIMConfigWidget* kdelibcfg;
468
469};
470
445#endif 471#endif