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

KUtils

  • sources
  • kde-4.14
  • kdelibs
  • 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 
29 namespace KSettings
30 {
31 
32 class PluginPagePrivate
33 {
34  public:
35  PluginPagePrivate()
36  : selwid( 0 )
37  {
38  }
39 
40  KPluginSelector * selwid;
41  void _k_reparseConfiguration(const QByteArray &a);
42 };
43 
44 PluginPage::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 
57 void PluginPagePrivate::_k_reparseConfiguration(const QByteArray &a)
58 {
59  Dispatcher::reparseConfiguration(a);
60 }
61 
62 PluginPage::~PluginPage()
63 {
64  delete d_ptr;
65 }
66 
67 KPluginSelector * PluginPage::pluginSelector()
68 {
69  return d_ptr->selwid;
70 }
71 
72 void PluginPage::load()
73 {
74  d_ptr->selwid->load();
75 }
76 
77 void PluginPage::save()
78 {
79  d_ptr->selwid->save();
80 }
81 
82 void PluginPage::defaults()
83 {
84  d_ptr->selwid->defaults();
85 }
86 
87 } //namespace
88 
89 #include "pluginpage.moc"
kdialog.h
QWidget
QByteArray
KSettings::PluginPage::d_ptr
PluginPagePrivate *const d_ptr
Definition: pluginpage.h:108
kpluginselector.h
KSettings::PluginPage::load
virtual void load()
Load the state of the plugins (selected or not) from the KPluginInfo objects.
Definition: pluginpage.cpp:72
pluginpage.h
KSettings::PluginPage::save
virtual void save()
Save the state of the plugins to KConfig objects.
Definition: pluginpage.cpp:77
KSettings::PluginPage::PluginPage
PluginPage(const KComponentData &componentData, QWidget *parent=0, const QVariantList &args=QVariantList())
Standard KCModule constructor.
Definition: pluginpage.cpp:44
KSettings::PluginPage
Convenience KCModule for creating a plugins config page.
Definition: pluginpage.h:72
KSettings::PluginPage::pluginSelector
KPluginSelector * pluginSelector()
Definition: pluginpage.cpp:67
dispatcher.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::PluginPage::~PluginPage
~PluginPage()
Definition: pluginpage.cpp:62
KSettings::PluginPage::defaults
virtual void defaults()
Definition: pluginpage.cpp:82
kcomponentdata.h
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
KCModule
KComponentData
KPluginSelector
A widget to select what plugins to load and configure the plugins.
Definition: kpluginselector.h:58
KCModule::changed
void changed()
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:27 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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

Search



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