kaddressbook

kcmkabconfig.cpp
1 /*
2  This file is part of KAddressBook.
3  Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
4 
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
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
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
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 
19  As a special exception, permission is given to link this program
20  with any edition of TQt, and distribute the resulting executable,
21  without including the source code for TQt in the source distribution.
22 */
23 
24 #include <tqlayout.h>
25 
26 #include <tdeaboutdata.h>
27 #include <kdebug.h>
28 #include <tdelocale.h>
29 
30 #include "kabconfigwidget.h"
31 
32 #include "kcmkabconfig.h"
33 
34 #include <kdemacros.h>
35 
36 extern "C"
37 {
38  TDE_EXPORT TDECModule *create_kabconfig( TQWidget *parent, const char * ) {
39  return new KCMKabConfig( parent, "kcmkabconfig" );
40  }
41 }
42 
43 KCMKabConfig::KCMKabConfig( TQWidget *parent, const char *name )
44  : TDECModule( parent, name )
45 {
46  TQVBoxLayout *layout = new TQVBoxLayout( this );
47  mConfigWidget = new KABConfigWidget( this, "mConfigWidget" );
48  layout->addWidget( mConfigWidget );
49 
50  connect( mConfigWidget, TQ_SIGNAL( changed( bool ) ), TQ_SIGNAL( changed( bool ) ) );
51 
52  load();
53 
54  TDEAboutData *about = new TDEAboutData( I18N_NOOP( "kcmkabconfig" ),
55  I18N_NOOP( "KAddressBook Configure Dialog" ),
56  0, 0, TDEAboutData::License_GPL,
57  I18N_NOOP( "(c), 2003 - 2004 Tobias Koenig" ) );
58 
59  about->addAuthor( "Tobias Koenig", 0, "tokoe@kde.org" );
60  setAboutData( about );
61 }
62 
63 void KCMKabConfig::load()
64 {
65  mConfigWidget->restoreSettings();
66 }
67 
68 void KCMKabConfig::save()
69 {
70  mConfigWidget->saveSettings();
71 }
72 
73 void KCMKabConfig::defaults()
74 {
75  mConfigWidget->defaults();
76 }
77 
78 #include "kcmkabconfig.moc"