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

KDEUI

  • kdeui
  • widgets
kcmodule.h
Go to the documentation of this file.
1/*
2 This file is part of the KDE libraries
3
4 Copyright (c) 1999 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20
21*/
22
23#ifndef KCMODULE_H
24#define KCMODULE_H
25
26#include <kdeui_export.h>
27
28#include <QtCore/QVariant>
29#include <QtGui/QWidget>
30
31#ifdef Q_WS_X11
32#include <fixx11h.h>
33#endif
34
35class QStringList;
36class KAboutData;
37class KConfigDialogManager;
38class KCoreConfigSkeleton;
39class KConfigSkeleton;
40class KCModulePrivate;
41class KComponentData;
42
43namespace KAuth {
44 class Action;
45}
46
107class KDEUI_EXPORT KCModule : public QWidget
108{
109 Q_OBJECT
110
111public:
112
120 enum Button { NoAdditionalButton=0, Help=1, Default=2, Apply=4, Export=8 };
121 Q_DECLARE_FLAGS( Buttons, Button )
122
123#ifdef KDE3_SUPPORT
124 KDE_CONSTRUCTOR_DEPRECATED KCModule( QWidget *parent, const char *name, const QStringList& args = QStringList() );
125
126 KDE_CONSTRUCTOR_DEPRECATED KCModule(const KComponentData &componentData, QWidget *parent, const QStringList& args);
127#endif
128
135 explicit KCModule(const KComponentData &componentData, QWidget *parent = 0, const QVariantList& args = QVariantList());
136
140 ~KCModule();
141
151 virtual QString quickHelp() const;
152
160 virtual const KAboutData *aboutData() const;
161
165 void setAboutData( const KAboutData* about );
166
175 Buttons buttons() const;
176
189 QString rootOnlyMessage() const;
190
201 bool useRootOnlyMessage() const;
202
203 KComponentData componentData() const;
204
208 QList<KConfigDialogManager*> configs() const;
209
227 void setNeedsAuthorization(bool needsAuth);
228
234 bool needsAuthorization() const;
235
241 KAuth::Action *authAction() const;
242
246 QString exportText() const;
247
251 void setExportText(const QString &);
252
253public Q_SLOTS:
267 virtual void load();
268
288 virtual void save();
289
301 virtual void defaults();
302
303protected:
313 KConfigDialogManager* addConfig( KCoreConfigSkeleton *config, QWidget* widget );
314
324 KConfigDialogManager* addConfig( KConfigSkeleton *config, QWidget* widget );
325
329 void setQuickHelp( const QString& help );
330
331 virtual void showEvent(QShowEvent *ev);
332
333 friend class KCModuleProxy;
334
335Q_SIGNALS:
336
344 void changed(bool state);
345
354 void quickHelpChanged();
355
364 void rootOnlyMessageChanged(bool use, QString message);
365
366protected Q_SLOTS:
367
371 void changed();
372
377 void widgetChanged();
378
382 void authStatusChanged(int);
383
384protected:
385
400 void setButtons(Buttons btn);
401
410 void setRootOnlyMessage(const QString& message);
411
420 void setUseRootOnlyMessage(bool on);
421
425 bool managedWidgetChangeState() const;
426
431 void unmanagedWidgetChangeState(bool);
432
433private:
434 KCModulePrivate *const d;
435};
436
437Q_DECLARE_OPERATORS_FOR_FLAGS( KCModule::Buttons )
438
439#endif //KCMODULE_H
440
KAboutData
KAuth::Action
KCModule
The base class for configuration modules.
Definition: kcmodule.h:108
KCModule::Button
Button
An enumeration type for the buttons used by this module.
Definition: kcmodule.h:120
KCModule::rootOnlyMessageChanged
void rootOnlyMessageChanged(bool use, QString message)
Indicate that the module's root message has changed.
KCModule::changed
void changed(bool state)
Indicate that the state of the modules contents has changed.
KCModule::quickHelpChanged
void quickHelpChanged()
Indicate that the module's quickhelp has changed.
KComponentData
KConfigDialogManager
Provides a means of automatically retrieving, saving and resetting KConfigSkeleton based settings in ...
Definition: kconfigdialogmanager.h:85
KConfigSkeleton
Class for handling preferences settings for an application.
Definition: kconfigskeleton.h:41
QList
QWidget
fixx11h.h
kdeui_export.h
KAuth
Action
KCoreConfigSkeleton
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.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • 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