KUtils
pluginpage.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #define KDE3_SUPPORT
00021 #include "ksettings/pluginpage.h"
00022 #undef KDE3_SUPPORT
00023 #include "kpluginselector.h"
00024 #include <QtGui/QLayout>
00025 #include <kdialog.h>
00026 #include "ksettings/dispatcher.h"
00027 #include <kcomponentdata.h>
00028
00029 namespace KSettings
00030 {
00031
00032 class PluginPagePrivate
00033 {
00034 public:
00035 PluginPagePrivate()
00036 : selwid( 0 )
00037 {
00038 }
00039
00040 KPluginSelector * selwid;
00041 void _k_reparseConfiguration(const QByteArray &a);
00042 };
00043
00044 PluginPage::PluginPage(const KComponentData &componentData, QWidget *parent, const QVariantList &args)
00045 : KCModule(componentData, parent, args),
00046 d_ptr(new PluginPagePrivate)
00047 {
00048 Q_D(PluginPage);
00049
00050
00051 d->selwid = new KPluginSelector( this );
00052 connect( d->selwid, SIGNAL( changed( bool ) ), this, SIGNAL( changed( bool ) ) );
00053 connect(d->selwid, SIGNAL(configCommitted(const QByteArray &)), this,
00054 SLOT(_k_reparseConfiguration(const QByteArray &)));
00055 }
00056
00057 void PluginPagePrivate::_k_reparseConfiguration(const QByteArray &a)
00058 {
00059 Dispatcher::reparseConfiguration(a);
00060 }
00061
00062 PluginPage::~PluginPage()
00063 {
00064 delete d_ptr;
00065 }
00066
00067 KPluginSelector * PluginPage::pluginSelector()
00068 {
00069 return d_ptr->selwid;
00070 }
00071
00072 void PluginPage::load()
00073 {
00074 d_ptr->selwid->load();
00075 }
00076
00077 void PluginPage::save()
00078 {
00079 d_ptr->selwid->save();
00080 }
00081
00082 void PluginPage::defaults()
00083 {
00084 d_ptr->selwid->defaults();
00085 }
00086
00087 }
00088
00089 #include "pluginpage.moc"