1 /* This file is part of the KDE project
2 Copyright (C) 2003 Matthias Kretz <kretz@kde.org>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
21 #include "ksettings/pluginpage.h"
23 #include "kpluginselector.h"
24 #include <QtGui/QLayout>
26 #include "ksettings/dispatcher.h"
27 #include <kcomponentdata.h>
32 class PluginPagePrivate
40 KPluginSelector
* selwid
;
41 void _k_reparseConfiguration(const QByteArray
&a
);
44 PluginPage::PluginPage(const KComponentData
&componentData
, QWidget
*parent
, const QVariantList
&args
)
45 : KCModule(componentData
, parent
, args
),
46 d_ptr(new PluginPagePrivate
)
50 // ( new QVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
51 d
->selwid
= new KPluginSelector( this );
52 connect( d
->selwid
, SIGNAL( changed( bool ) ), this, SIGNAL( changed( bool ) ) );
53 connect(d
->selwid
, SIGNAL(configCommitted(const QByteArray
&)), this,
54 SLOT(_k_reparseConfiguration(const QByteArray
&)));
57 void PluginPagePrivate::_k_reparseConfiguration(const QByteArray
&a
)
59 Dispatcher::reparseConfiguration(a
);
62 PluginPage::~PluginPage()
67 KPluginSelector
* PluginPage::pluginSelector()
72 void PluginPage::load()
74 d_ptr
->selwid
->load();
77 void PluginPage::save()
79 d_ptr
->selwid
->save();
82 void PluginPage::defaults()
84 d_ptr
->selwid
->defaults();
89 #include "pluginpage.moc"