From 618dec7bf4371c2085048cc1f95a93220bc8a233 Mon Sep 17 00:00:00 2001 From: ulf69 Date: Tue, 21 Sep 2004 19:54:39 +0000 Subject: modified configdialog to work properly with global configwidget from (libkdepim) --- (limited to 'kaddressbook/kcmconfigs/kcmkabconfig.cpp') diff --git a/kaddressbook/kcmconfigs/kcmkabconfig.cpp b/kaddressbook/kcmconfigs/kcmkabconfig.cpp index b460a81..cbfedbd 100644 --- a/kaddressbook/kcmconfigs/kcmkabconfig.cpp +++ b/kaddressbook/kcmconfigs/kcmkabconfig.cpp @@ -39,17 +39,17 @@ extern "C" { - KCModule *create_kabconfig( KABPrefs* prefs, QWidget *parent, const char * ) { - return new KCMKabConfig( prefs, parent, "kcmkabconfig" ); + KCModule *create_kabconfig( QWidget *parent, const char * ) { + return new KCMKabConfig( parent, "kcmkabconfig" ); } } -KCMKabConfig::KCMKabConfig( KABPrefs* prefs, QWidget *parent, const char *name ) - : KCModule( prefs, parent, name ) +KCMKabConfig::KCMKabConfig( QWidget *parent, const char *name ) + : KCModule( KABPrefs::instance(), parent, name ) { //abort(); QVBoxLayout *layout = new QVBoxLayout( this ); - mConfigWidget = new KABConfigWidget( this, "mConfigWidget" ); + mConfigWidget = new KABConfigWidget( (KABPrefs*)getPreferences(), this, "KABConfigWidget" ); layout->addWidget( mConfigWidget ); layout->setSpacing( 0 ); layout->setMargin( 0 ); @@ -59,17 +59,17 @@ KCMKabConfig::KCMKabConfig( KABPrefs* prefs, QWidget *parent, const char *name ) void KCMKabConfig::load() { - mConfigWidget->restoreSettings((KABPrefs*)getPreferences()); + mConfigWidget->readConfig(); } void KCMKabConfig::save() { - mConfigWidget->saveSettings((KABPrefs*)getPreferences()); + mConfigWidget->writeConfig(); } void KCMKabConfig::defaults() { - mConfigWidget->defaults((KABPrefs*)getPreferences()); + mConfigWidget->setDefaults(); } #ifndef KAB_EMBEDDED -- cgit v0.9.0.2