• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdeui
 

kdeui

  • kdeui
kcmodule.h
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 <tqwidget.h>
27 
28 #include <kdelibs_export.h>
29 
30 class TQStringList;
31 
32 class KAboutData;
33 class KConfigDialogManager;
34 class KConfigSkeleton;
35 class KCModulePrivate;
36 class KInstance;
37 
69 class KDEUI_EXPORT KCModule : public TQWidget
70 {
71  Q_OBJECT
72 
73 public:
74 
81  enum Button {Help=1, Default=2, Apply=16,
82  Reset=4, /* obsolete, do not use! */
83  Cancel=8, /* obsolete, do not use! */
84  Ok=32, /* obsolete, do not use! */
85  SysDefault=64 /* obsolete, do not use! */ };
86 
87  /*
88  * Base class for all KControlModules.
89  * Make sure you have a TQStringList argument in your
90  * implementation.
91  */
92  KCModule(TQWidget *parent=0, const char *name=0, const TQStringList &args=TQStringList() );
93 
94  KCModule(KInstance *instance, TQWidget *parent=0, const TQStringList &args=TQStringList() );
95 
96  /*
97  * Destroys the module.
98  */
99  ~KCModule();
100 
120  virtual void load();
121  // ### KDE 4: Call load() automatically through a single-shot timer
122  // from the constructor // and change documentation
123 
143  virtual void save();
144 
156  virtual void defaults();
157 
166  virtual void sysdefaults() { defaults(); }
167  // KDE 4 deprecate
168 
178  virtual TQString quickHelp() const;
179 
187  virtual const KAboutData *aboutData() const;
188 
193  void setAboutData( KAboutData* about );
194 
203  int buttons() const { return _btn; }
204 
217  TQString rootOnlyMsg() const;
218 
229  bool useRootOnlyMsg() const;
230 
231  KInstance *instance() const;
232 
237  const TQPtrList<KConfigDialogManager>& configs() const;
238 
239 protected:
250  KConfigDialogManager* addConfig( KConfigSkeleton *config, TQWidget* widget );
251 
257  void setQuickHelp( const TQString& help );
258 
259 signals:
260 
268  void changed(bool state);
269 
278  void quickHelpChanged();
279 
280 protected slots:
281 
286  void changed();
287 
293  void widgetChanged();
294 
295 protected:
296 
309  void setButtons(int btn) { _btn = btn; }
310 
320  void setRootOnlyMsg(const TQString& msg);
321 
330  void setUseRootOnlyMsg(bool on);
331 
336  bool managedWidgetChangeState() const;
337 
343  void unmanagedWidgetChangeState(bool);
344 
345 private:
346 
347  int _btn;
348 protected:
349  virtual void virtual_hook( int id, void* data );
350 private:
351  KCModulePrivate *d;
352 
356  void init();
357 
358 };
359 
360 #endif //KCMODULE_H
361 
KCModule::buttons
int buttons() const
Indicate which buttons will be used.
Definition: kcmodule.h:203
KCModule::setButtons
void setButtons(int btn)
Sets the buttons to display.
Definition: kcmodule.h:309
KConfigDialogManager
KConfigSkeleton
KInstance
KAboutData
KCModule::sysdefaults
virtual void sysdefaults()
Set the configuration to system default values.
Definition: kcmodule.h:166
KCModule::Button
Button
An enumeration type for the buttons used by this module.
Definition: kcmodule.h:81
KCModule
The base class for control center modules.
Definition: kcmodule.h:69

kdeui

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

kdeui

Skip menu "kdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdeui by doxygen 1.8.13
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |