Diffstat (limited to 'kaddressbook/kcmconfigs/kcmkabconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/kcmconfigs/kcmkabconfig.cpp | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/kaddressbook/kcmconfigs/kcmkabconfig.cpp b/kaddressbook/kcmconfigs/kcmkabconfig.cpp index a278042..26398f8 100644 --- a/kaddressbook/kcmconfigs/kcmkabconfig.cpp +++ b/kaddressbook/kcmconfigs/kcmkabconfig.cpp | |||
@@ -1,25 +1,25 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KAddressBook. | 2 | This file is part of KAddressBook. |
3 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> | 3 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | 25 | ||
@@ -27,13 +27,16 @@ | |||
27 | #include <kaboutdata.h> | 27 | #include <kaboutdata.h> |
28 | #endif //KAB_EMBEDDED | 28 | #endif //KAB_EMBEDDED |
29 | #include <kdebug.h> | 29 | #include <kdebug.h> |
30 | #include <klocale.h> | 30 | //#include <klocale.h> |
31 | #include <stdlib.h> | 31 | //#include <stdlib.h> |
32 | 32 | ||
33 | #include "kabconfigwidget.h" | 33 | #include "kabconfigwidget.h" |
34 | 34 | ||
35 | #include "kcmkabconfig.h" | 35 | #include "kcmkabconfig.h" |
36 | 36 | ||
37 | #include "kabprefs.h" | ||
38 | #include "kprefs.h" | ||
39 | |||
37 | extern "C" | 40 | extern "C" |
38 | { | 41 | { |
39 | KCModule *create_kabconfig( QWidget *parent, const char * ) { | 42 | KCModule *create_kabconfig( QWidget *parent, const char * ) { |
@@ -50,24 +53,23 @@ KCMKabConfig::KCMKabConfig( QWidget *parent, const char *name ) | |||
50 | layout->addWidget( mConfigWidget ); | 53 | layout->addWidget( mConfigWidget ); |
51 | layout->setSpacing( 0 ); | 54 | layout->setSpacing( 0 ); |
52 | layout->setMargin( 0 ); | 55 | layout->setMargin( 0 ); |
53 | 56 | ||
54 | connect( mConfigWidget, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) ); | 57 | connect( mConfigWidget, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) ); |
55 | load(); | ||
56 | } | 58 | } |
57 | 59 | ||
58 | void KCMKabConfig::load() | 60 | void KCMKabConfig::load(KPrefs* prefs) |
59 | { | 61 | { |
60 | mConfigWidget->restoreSettings(); | 62 | mConfigWidget->restoreSettings((KABPrefs*)prefs); |
61 | } | 63 | } |
62 | 64 | ||
63 | void KCMKabConfig::save() | 65 | void KCMKabConfig::save(KPrefs* prefs) |
64 | { | 66 | { |
65 | mConfigWidget->saveSettings(); | 67 | mConfigWidget->saveSettings((KABPrefs*)prefs); |
66 | } | 68 | } |
67 | 69 | ||
68 | void KCMKabConfig::defaults() | 70 | void KCMKabConfig::defaults(KPrefs* prefs) |
69 | { | 71 | { |
70 | mConfigWidget->defaults(); | 72 | mConfigWidget->defaults((KABPrefs*)prefs); |
71 | } | 73 | } |
72 | 74 | ||
73 | #ifndef KAB_EMBEDDED | 75 | #ifndef KAB_EMBEDDED |
@@ -81,7 +83,7 @@ const KAboutData* KCMKabConfig::aboutData() const | |||
81 | about->addAuthor( "Tobias Koenig", 0, "tokoe@kde.org" ); | 83 | about->addAuthor( "Tobias Koenig", 0, "tokoe@kde.org" ); |
82 | 84 | ||
83 | return about; | 85 | return about; |
84 | 86 | ||
85 | } | 87 | } |
86 | #endif //KAB_EMBEDDED | 88 | #endif //KAB_EMBEDDED |
87 | 89 | ||