kcmkabconfig.cpp
00001 /* 00002 This file is part of KAddressBook. 00003 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00018 00019 As a special exception, permission is given to link this program 00020 with any edition of TQt, and distribute the resulting executable, 00021 without including the source code for TQt in the source distribution. 00022 */ 00023 00024 #include <tqlayout.h> 00025 00026 #include <kaboutdata.h> 00027 #include <kdebug.h> 00028 #include <klocale.h> 00029 00030 #include "kabconfigwidget.h" 00031 00032 #include "kcmkabconfig.h" 00033 00034 #include <kdepimmacros.h> 00035 00036 extern "C" 00037 { 00038 KDE_EXPORT KCModule *create_kabconfig( TQWidget *parent, const char * ) { 00039 return new KCMKabConfig( parent, "kcmkabconfig" ); 00040 } 00041 } 00042 00043 KCMKabConfig::KCMKabConfig( TQWidget *parent, const char *name ) 00044 : KCModule( parent, name ) 00045 { 00046 TQVBoxLayout *layout = new TQVBoxLayout( this ); 00047 mConfigWidget = new KABConfigWidget( this, "mConfigWidget" ); 00048 layout->addWidget( mConfigWidget ); 00049 00050 connect( mConfigWidget, TQT_SIGNAL( changed( bool ) ), TQT_SIGNAL( changed( bool ) ) ); 00051 00052 load(); 00053 00054 KAboutData *about = new KAboutData( I18N_NOOP( "kcmkabconfig" ), 00055 I18N_NOOP( "KAddressBook Configure Dialog" ), 00056 0, 0, KAboutData::License_GPL, 00057 I18N_NOOP( "(c), 2003 - 2004 Tobias Koenig" ) ); 00058 00059 about->addAuthor( "Tobias Koenig", 0, "tokoe@kde.org" ); 00060 setAboutData( about ); 00061 } 00062 00063 void KCMKabConfig::load() 00064 { 00065 mConfigWidget->restoreSettings(); 00066 } 00067 00068 void KCMKabConfig::save() 00069 { 00070 mConfigWidget->saveSettings(); 00071 } 00072 00073 void KCMKabConfig::defaults() 00074 { 00075 mConfigWidget->defaults(); 00076 } 00077 00078 #include "kcmkabconfig.moc"