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

tdeutils

Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
TDECModuleContainer Class Reference
KControl module classes

#include <tdecmodulecontainer.h>

Inheritance diagram for TDECModuleContainer:
TDECModule

Public Member Functions

 TDECModuleContainer (TQWidget *parent, const char *name, const TQStringList &mods)
 
 TDECModuleContainer (TQWidget *parent, const char *name, const TQString &mods=TQString())
 
void addModule (const TQString &module)
 
virtual ~TDECModuleContainer ()
 
void save ()
 
void load ()
 
void defaults ()
 
virtual TQString handbookSection () const
 
- Public Member Functions inherited from TDECModule
virtual void load ()
 
virtual void save ()
 
virtual void defaults ()
 
virtual void sysdefaults ()
 
virtual TQString quickHelp () const
 
virtual TQString handbookDocPath () const
 
virtual TQString handbookSection () const
 
virtual const TDEAboutData * aboutData () const
 
void setAboutData (TDEAboutData *about)
 
int buttons () const
 
TQString rootOnlyMsg () const
 
bool useRootOnlyMsg () const
 
const TQPtrList< TDEConfigDialogManager > & configs () const
 

Protected Types

typedef TQValueList< TDECModuleProxy * > ModuleList
 

Protected Member Functions

void finalize ()
 
- Protected Member Functions inherited from TDECModule
TDEConfigDialogManager * addConfig (TDEConfigSkeleton *config, TQWidget *widget)
 
void setQuickHelp (const TQString &help)
 
void setButtons (int btn)
 
void setRootOnlyMsg (const TQString &msg)
 
void setUseRootOnlyMsg (bool on)
 
bool managedWidgetChangeState () const
 
void unmanagedWidgetChangeState (bool)
 

Protected Attributes

ModuleList changedModules
 
ModuleList allModules
 

Additional Inherited Members

- Public Types inherited from TDECModule
enum  Button
 
- Signals inherited from TDECModule
void changed (bool state)
 
void quickHelpChanged ()
 
- Protected Slots inherited from TDECModule
void changed ()
 
void widgetChanged ()
 

Detailed Description

TDECModuleContainer is a convenience class encapsulating several TDECModules.

The TDECModuleContainer class is a convenience class for organizing a multiple set of TDECModule. TDECModuleContainer is a sub class of TDECModule and builds an interface mainly consisting of a tab widget where each tab contains one of the modules specified via one of the constructors. TDECModuleContainer can handle modules which requires root permissions. What you most likely want is the KCMODULECONTAINER macro.
Sometimes it is of interest to detect in runtime whether a module should be loaded or not. This can be achieved by sub classing TDECModuleContainer, doing the probing/testing checks and then manually call addModule for each module which should be displayed. When all calls to addModule is done, call finalize() which performs some necessary final steps.

Author
Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.teli.nosp@m.a.com
Since
3.4

Definition at line 53 of file tdecmodulecontainer.h.

Member Typedef Documentation

◆ ModuleList

typedef TQValueList<TDECModuleProxy*> TDECModuleContainer::ModuleList
protected

Definition at line 137 of file tdecmodulecontainer.h.

Constructor & Destructor Documentation

◆ TDECModuleContainer() [1/2]

TDECModuleContainer::TDECModuleContainer ( TQWidget *  parent,
const char *  name,
const TQStringList &  mods 
)

Creates a TDECModuleContainer with tabs, each one containing one of the specified modules in mods.

    @param parent the parent TQWidget.
    @param name the module's name.
Parameters
modsThe list of TDECModules to be loaded. The name of each TDECModule is its service name, that is the name of the desktop file without the ".desktop" part

Definition at line 82 of file tdecmodulecontainer.cpp.

◆ TDECModuleContainer() [2/2]

TDECModuleContainer::TDECModuleContainer ( TQWidget *  parent,
const char *  name,
const TQString &  mods = TQString() 
)

This is a convenience function, instead of building a TQStringList you can specify the modules in a comma separated TQString.

For example;

TDECModuleContainer* cont = TDECModuleContainer( this, "kcm_misc", TQString("kcm_energy, kcm_keyboard ,kcm_useraccount, kcm_mouse") );
TDECModuleContainer
TDECModuleContainer is a convenience class encapsulating several TDECModules.
Definition: tdecmodulecontainer.h:54
TDECModuleContainer::TDECModuleContainer
TDECModuleContainer(TQWidget *parent, const char *name, const TQStringList &mods)
Creates a TDECModuleContainer with tabs, each one containing one of the specified modules in mods.
Definition: tdecmodulecontainer.cpp:82

The other constructor takes its modules in a QStringlist which also can be constructed from a string and thus you will have to be explicit on the data type.

What you probably want is the KCMODULECONTAINER macro which builds an TDECModule for you, taking the modules you want as argument.

Parameters
parentThe parent widget
nameThe service name
modsThe modules to load
Returns
The TDECModule containing the requested modules.

Definition at line 74 of file tdecmodulecontainer.cpp.

◆ ~TDECModuleContainer()

TDECModuleContainer::~TDECModuleContainer ( )
virtual

Default destructor.

Definition at line 259 of file tdecmodulecontainer.cpp.

Member Function Documentation

◆ addModule()

void TDECModuleContainer::addModule ( const TQString &  module)

Adds the specified module to the tab widget.

Setting the tab icon, text, tool tip, connecting the signals is what it does.

Parameters
modulethe name of the module to add. The name is the desktop file's name without the ".desktop" part.

Definition at line 125 of file tdecmodulecontainer.cpp.

◆ defaults()

void TDECModuleContainer::defaults ( )
virtual

Reimplemented for internal purposes.

Reimplemented from TDECModule.

Definition at line 237 of file tdecmodulecontainer.cpp.

◆ finalize()

void TDECModuleContainer::finalize ( )
protected

Sets this KCM's buttons and adds a AdminMode button if necessary.

If TDECModuleContainer is subclassed finalize() should be called in the constructor after all calls to addModule have been done. Call it once.

Definition at line 108 of file tdecmodulecontainer.cpp.

◆ handbookSection()

TQString TDECModuleContainer::handbookSection ( ) const
virtual

Reimplemented for internal purposes.

Reimplemented from TDECModule.

Definition at line 194 of file tdecmodulecontainer.cpp.

◆ load()

void TDECModuleContainer::load ( )
virtual

Reimplemented for internal purposes.

Reimplemented from TDECModule.

Definition at line 225 of file tdecmodulecontainer.cpp.

◆ save()

void TDECModuleContainer::save ( )
virtual

Reimplemented for internal purposes.

Reimplemented from TDECModule.

Definition at line 212 of file tdecmodulecontainer.cpp.

Member Data Documentation

◆ allModules

ModuleList TDECModuleContainer::allModules
protected

A list of all modules which are encapsulated.

Definition at line 148 of file tdecmodulecontainer.h.

◆ changedModules

ModuleList TDECModuleContainer::changedModules
protected

A list containing TDECModuleProxy objects which have changed and must be saved.

Definition at line 143 of file tdecmodulecontainer.h.


The documentation for this class was generated from the following files:
  • tdecmodulecontainer.h
  • tdecmodulecontainer.cpp

tdeutils

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

tdeutils

Skip menu "tdeutils"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeutils by doxygen 1.9.4
This website is maintained by Timothy Pearson.