00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "kcmakonadicontactactions.h"
00023
00024 #include "contactactionssettings.h"
00025 #include "ui_akonadicontactactions.h"
00026
00027 #include <QtGui/QVBoxLayout>
00028
00029 #include <kaboutdata.h>
00030 #include <kcomponentdata.h>
00031 #include <kconfigdialogmanager.h>
00032 #include <kdemacros.h>
00033 #include <kgenericfactory.h>
00034 #include <klocale.h>
00035
00036 K_PLUGIN_FACTORY( KCMAkonadiContactActionsFactory, registerPlugin<KCMAkonadiContactActions>(); )
00037 K_EXPORT_PLUGIN( KCMAkonadiContactActionsFactory( "kcm_akonadicontact_actions" ) )
00038
00039 KCMAkonadiContactActions::KCMAkonadiContactActions( QWidget *parent, const QVariantList& )
00040 : KCModule( KCMAkonadiContactActionsFactory::componentData(), parent )
00041 {
00042 KAboutData *about = new KAboutData( I18N_NOOP( "kcmakonadicontactactions" ), 0,
00043 ki18n( "Contact Actions Settings" ),
00044 0, KLocalizedString(), KAboutData::License_LGPL,
00045 ki18n( "(c) 2009 Tobias Koenig" ) );
00046
00047 about->addAuthor( ki18n("Tobias Koenig"), KLocalizedString(), "tokoe@kde.org" );
00048
00049 setAboutData( about );
00050
00051 QVBoxLayout *layout = new QVBoxLayout( this );
00052 QWidget *wdg = new QWidget;
00053 layout->addWidget( wdg );
00054
00055 Ui_AkonadiContactActions ui;
00056 ui.setupUi( wdg );
00057
00058 mConfigManager = addConfig( ContactActionsSettings::self(), wdg );
00059
00060 load();
00061 }
00062
00063 void KCMAkonadiContactActions::load()
00064 {
00065 mConfigManager->updateWidgets();
00066 }
00067
00068 void KCMAkonadiContactActions::save()
00069 {
00070 mConfigManager->updateSettings();
00071 }
00072
00073 void KCMAkonadiContactActions::defaults()
00074 {
00075 mConfigManager->updateWidgetsDefault();
00076 }
00077
00078 #include "kcmakonadicontactactions.moc"