Diffstat (limited to 'kaddressbook/kcmconfigs/kcmkabconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/kcmconfigs/kcmkabconfig.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kaddressbook/kcmconfigs/kcmkabconfig.cpp b/kaddressbook/kcmconfigs/kcmkabconfig.cpp index cbfedbd..55ffcd8 100644 --- a/kaddressbook/kcmconfigs/kcmkabconfig.cpp +++ b/kaddressbook/kcmconfigs/kcmkabconfig.cpp | |||
@@ -1,92 +1,94 @@ | |||
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 | //Added by qt3to4: | ||
26 | #include <Q3VBoxLayout> | ||
25 | 27 | ||
26 | #ifndef KAB_EMBEDDED | 28 | #ifndef KAB_EMBEDDED |
27 | #include <kaboutdata.h> | 29 | #include <kaboutdata.h> |
28 | #endif //KAB_EMBEDDED | 30 | #endif //KAB_EMBEDDED |
29 | #include <kdebug.h> | 31 | #include <kdebug.h> |
30 | //#include <klocale.h> | 32 | //#include <klocale.h> |
31 | //#include <stdlib.h> | 33 | //#include <stdlib.h> |
32 | 34 | ||
33 | #include "kabconfigwidget.h" | 35 | #include "kabconfigwidget.h" |
34 | 36 | ||
35 | #include "kcmkabconfig.h" | 37 | #include "kcmkabconfig.h" |
36 | 38 | ||
37 | #include "kabprefs.h" | 39 | #include "kabprefs.h" |
38 | #include "kprefs.h" | 40 | #include "kprefs.h" |
39 | 41 | ||
40 | extern "C" | 42 | extern "C" |
41 | { | 43 | { |
42 | KCModule *create_kabconfig( QWidget *parent, const char * ) { | 44 | KCModule *create_kabconfig( QWidget *parent, const char * ) { |
43 | return new KCMKabConfig( parent, "kcmkabconfig" ); | 45 | return new KCMKabConfig( parent, "kcmkabconfig" ); |
44 | } | 46 | } |
45 | } | 47 | } |
46 | 48 | ||
47 | KCMKabConfig::KCMKabConfig( QWidget *parent, const char *name ) | 49 | KCMKabConfig::KCMKabConfig( QWidget *parent, const char *name ) |
48 | : KCModule( KABPrefs::instance(), parent, name ) | 50 | : KCModule( KABPrefs::instance(), parent, name ) |
49 | { | 51 | { |
50 | //abort(); | 52 | //abort(); |
51 | QVBoxLayout *layout = new QVBoxLayout( this ); | 53 | Q3VBoxLayout *layout = new Q3VBoxLayout( this ); |
52 | mConfigWidget = new KABConfigWidget( (KABPrefs*)getPreferences(), this, "KABConfigWidget" ); | 54 | mConfigWidget = new KABConfigWidget( (KABPrefs*)getPreferences(), this, "KABConfigWidget" ); |
53 | layout->addWidget( mConfigWidget ); | 55 | layout->addWidget( mConfigWidget ); |
54 | layout->setSpacing( 0 ); | 56 | layout->setSpacing( 0 ); |
55 | layout->setMargin( 0 ); | 57 | layout->setMargin( 0 ); |
56 | 58 | ||
57 | connect( mConfigWidget, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) ); | 59 | connect( mConfigWidget, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) ); |
58 | } | 60 | } |
59 | 61 | ||
60 | void KCMKabConfig::load() | 62 | void KCMKabConfig::load() |
61 | { | 63 | { |
62 | mConfigWidget->readConfig(); | 64 | mConfigWidget->readConfig(); |
63 | } | 65 | } |
64 | 66 | ||
65 | void KCMKabConfig::save() | 67 | void KCMKabConfig::save() |
66 | { | 68 | { |
67 | mConfigWidget->writeConfig(); | 69 | mConfigWidget->writeConfig(); |
68 | } | 70 | } |
69 | 71 | ||
70 | void KCMKabConfig::defaults() | 72 | void KCMKabConfig::defaults() |
71 | { | 73 | { |
72 | mConfigWidget->setDefaults(); | 74 | mConfigWidget->setDefaults(); |
73 | } | 75 | } |
74 | 76 | ||
75 | #ifndef KAB_EMBEDDED | 77 | #ifndef KAB_EMBEDDED |
76 | const KAboutData* KCMKabConfig::aboutData() const | 78 | const KAboutData* KCMKabConfig::aboutData() const |
77 | { | 79 | { |
78 | KAboutData *about = new KAboutData( I18N_NOOP( "kcmkabconfig" ), | 80 | KAboutData *about = new KAboutData( I18N_NOOP( "kcmkabconfig" ), |
79 | I18N_NOOP( "KAddressBook Configure Dialog" ), | 81 | I18N_NOOP( "KAddressBook Configure Dialog" ), |
80 | 0, 0, KAboutData::License_GPL, | 82 | 0, 0, KAboutData::License_GPL, |
81 | I18N_NOOP( "(c), 2003 Tobias Koenig" ) ); | 83 | I18N_NOOP( "(c), 2003 Tobias Koenig" ) ); |
82 | 84 | ||
83 | about->addAuthor( "Tobias Koenig", 0, "tokoe@kde.org" ); | 85 | about->addAuthor( "Tobias Koenig", 0, "tokoe@kde.org" ); |
84 | 86 | ||
85 | return about; | 87 | return about; |
86 | 88 | ||
87 | } | 89 | } |
88 | #endif //KAB_EMBEDDED | 90 | #endif //KAB_EMBEDDED |
89 | 91 | ||
90 | #ifndef KAB_EMBEDDED | 92 | #ifndef KAB_EMBEDDED_ |
91 | #include "kcmkabconfig.moc" | 93 | #include "moc_kcmkabconfig.cpp" |
92 | #endif //KAB_EMBEDDED | 94 | #endif //KAB_EMBEDDED |