kaddressbook

kcmkabldapconfig.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 <tqcheckbox.h>
25 #include <tqframe.h>
26 #include <tqlayout.h>
27 
28 #include <tdeaboutdata.h>
29 #include <tdelocale.h>
30 
31 #include "ldapoptionswidget.h"
32 
33 #include "kcmkabldapconfig.h"
34 
35 #include <tdemacros.h>
36 
37 extern "C"
38 {
39  TDE_EXPORT TDECModule *create_kabldapconfig( TQWidget *parent, const char * ) {
40  return new KCMKabLdapConfig( parent, "kcmkabldapconfig" );
41  }
42 }
43 
44 KCMKabLdapConfig::KCMKabLdapConfig( TQWidget *parent, const char *name )
45  : TDECModule( parent, name )
46 {
47  TQVBoxLayout *layout = new TQVBoxLayout( this );
48  mConfigWidget = new LDAPOptionsWidget( this );
49  layout->addWidget( mConfigWidget );
50 
51  connect( mConfigWidget, TQ_SIGNAL( changed( bool ) ), TQ_SIGNAL( changed( bool ) ) );
52 
53  load();
54 
55  TDEAboutData *about = new TDEAboutData( I18N_NOOP( "kcmkabldapconfig" ),
56  I18N_NOOP( "KAB LDAP Configure Dialog" ),
57  0, 0, TDEAboutData::License_GPL,
58  I18N_NOOP( "(c), 2003 - 2004 Tobias Koenig" ) );
59 
60  about->addAuthor( "Tobias Koenig", 0, "tokoe@kde.org" );
61  setAboutData( about );
62 }
63 
64 void KCMKabLdapConfig::load()
65 {
66  mConfigWidget->restoreSettings();
67 }
68 
69 void KCMKabLdapConfig::save()
70 {
71  mConfigWidget->saveSettings();
72 }
73 
74 void KCMKabLdapConfig::defaults()
75 {
76  mConfigWidget->defaults();
77 }
78 
79 #include "kcmkabldapconfig.moc"