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

KUtils

  • kutils
kcmodulecontainer.h
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 Copyright (C) 2004 Frans Englich <frans.englich@telia.com>
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 as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KCMODULECONTAINER_H
21#define KCMODULECONTAINER_H
22
23#include <QtCore/QString>
24#include <QtCore/QStringList>
25
26#include <kcmodule.h>
27#include <kcmoduleloader.h>
28#include <QtCore/QList>
29
30class QWidget;
31
32class KCModuleProxy;
33
49class KCMUTILS_EXPORT KCModuleContainer : public KCModule
50{
51 Q_OBJECT
52 public:
63 KCModuleContainer( QWidget* parent, const QStringList& mods );
64
81 explicit KCModuleContainer( QWidget *parent, const QString& mods = QString() );
82
90 void addModule( const QString& module );
91
95 virtual ~KCModuleContainer();
96
101 void save();
102
107 void load();
108
113 void defaults();
114
115 protected:
116 typedef QList<KCModuleProxy*> ModuleList;
117
122 ModuleList changedModules;
123
127 ModuleList allModules; // KDE 4 put in the Private class and abstract with getter
128
129 private Q_SLOTS:
130
134 void tabSwitched(int);
135
136 void moduleChanged(KCModuleProxy *proxy);
137
138 private:
139
140 void init();
141
142 class KCModuleContainerPrivate;
143 KCModuleContainerPrivate* const d;
144
145};
146
162#define KCMODULECONTAINER(modules, factoryName) \
163class KCModuleContainer##factoryName : public KCModuleContainer \
164{ \
165 public: \
166 KCModuleContainer##factoryName(QWidget *parent, const QVariantList &) \
167 : KCModuleContainer(parent, QLatin1String(modules)) \
168 { \
169 } \
170}; \
171K_PLUGIN_FACTORY(KCModuleContainer##factoryName##Factory, \
172 registerPlugin<KCModuleContainer#factoryName>(); \
173 ) \
174K_EXPORT_PLUGIN(KCModuleContainer##factoryName##Factory)
175
176#endif // KCMODULECONTAINER_H
177
178
KCModuleContainer
KCModuleContainer is a convenience class encapsulating several KCModules.
Definition: kcmodulecontainer.h:50
KCModuleContainer::allModules
ModuleList allModules
A list of all modules which are encapsulated.
Definition: kcmodulecontainer.h:127
KCModuleContainer::changedModules
ModuleList changedModules
A list containing KCModuleProxy objects which have changed and must be saved.
Definition: kcmodulecontainer.h:122
KCModuleContainer::ModuleList
QList< KCModuleProxy * > ModuleList
Definition: kcmodulecontainer.h:116
KCModuleProxy
Encapsulates a KCModule for embedding.
Definition: kcmoduleproxy.h:68
KCModule
QList
QWidget
kcmodule.h
kcmoduleloader.h
save
KAction * save(const QObject *recvr, const char *slot, QObject *parent)
defaults
KGuiItem defaults()
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