• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KUtils

  • kutils
  • ksettings
pluginpage.cpp
Go to the documentation of this file.
1/* This file is part of the KDE project
2 Copyright (C) 2003 Matthias Kretz <kretz@kde.org>
3
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.
7
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.
12
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.
17
18*/
19
20#define KDE3_SUPPORT
21#include "ksettings/pluginpage.h"
22#undef KDE3_SUPPORT
23#include "kpluginselector.h"
24#include <QtGui/QLayout>
25#include <kdialog.h>
26#include "ksettings/dispatcher.h"
27#include <kcomponentdata.h>
28
29namespace KSettings
30{
31
32class PluginPagePrivate
33{
34 public:
35 PluginPagePrivate()
36 : selwid( 0 )
37 {
38 }
39
40 KPluginSelector * selwid;
41 void _k_reparseConfiguration(const QByteArray &a);
42};
43
44PluginPage::PluginPage(const KComponentData &componentData, QWidget *parent, const QVariantList &args)
45 : KCModule(componentData, parent, args),
46 d_ptr(new PluginPagePrivate)
47{
48 Q_D(PluginPage);
49 //d->q_ptr = this;
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(QByteArray)), this,
54 SLOT(_k_reparseConfiguration(QByteArray)));
55}
56
57void PluginPagePrivate::_k_reparseConfiguration(const QByteArray &a)
58{
59 Dispatcher::reparseConfiguration(a);
60}
61
62PluginPage::~PluginPage()
63{
64 delete d_ptr;
65}
66
67KPluginSelector * PluginPage::pluginSelector()
68{
69 return d_ptr->selwid;
70}
71
72void PluginPage::load()
73{
74 d_ptr->selwid->load();
75}
76
77void PluginPage::save()
78{
79 d_ptr->selwid->save();
80}
81
82void PluginPage::defaults()
83{
84 d_ptr->selwid->defaults();
85}
86
87} //namespace
88
89#include "pluginpage.moc"
KCModule
KCModule::changed
void changed(bool state)
KComponentData
KPluginSelector
A widget to select what plugins to load and configure the plugins.
Definition: kpluginselector.h:60
KSettings::PluginPage
Convenience KCModule for creating a plugins config page.
Definition: pluginpage.h:73
KSettings::PluginPage::~PluginPage
~PluginPage()
Definition: pluginpage.cpp:62
KSettings::PluginPage::pluginSelector
KPluginSelector * pluginSelector()
Definition: pluginpage.cpp:67
KSettings::PluginPage::PluginPage
PluginPage(const KComponentData &componentData, QWidget *parent=0, const QVariantList &args=QVariantList())
Standard KCModule constructor.
Definition: pluginpage.cpp:44
KSettings::PluginPage::d_ptr
PluginPagePrivate *const d_ptr
Definition: pluginpage.h:108
KSettings::PluginPage::save
virtual void save()
Save the state of the plugins to KConfig objects.
Definition: pluginpage.cpp:77
KSettings::PluginPage::defaults
virtual void defaults()
Definition: pluginpage.cpp:82
KSettings::PluginPage::load
virtual void load()
Load the state of the plugins (selected or not) from the KPluginInfo objects.
Definition: pluginpage.cpp:72
QWidget
dispatcher.h
kcomponentdata.h
kdialog.h
kpluginselector.h
KSettings::Dispatcher::reparseConfiguration
void reparseConfiguration(const QString &componentName)
Call this function when the configuration belonging to the associated componentData name has changed.
Definition: dispatcher.cpp:81
KSettings
A collection of classes to create configuration dialogs that work over component boundaries.
Definition: componentsdialog.cpp:34
pluginpage.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KUtils

Skip menu "KUtils"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal