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

tdeutils

  • KSettings
  • Dialog
Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Friends | List of all members
KSettings::Dialog Class Reference
Main classes | Settings UI classes

#include <dialog.h>

Inherits TQObject.

Public Types

enum  ContentInListView { Static , Configurable }
 

Public Slots

void show ()
 

Signals

void pluginSelectionChanged ()
 

Public Member Functions

 Dialog (TQWidget *parent=0, const char *name=0)
 
 Dialog (ContentInListView content=Static, TQWidget *parent=0, const char *name=0)
 
 Dialog (const TQStringList &components, TQWidget *parent=0, const char *name=0)
 
 Dialog (const TQStringList &components, ContentInListView content, TQWidget *parent=0, const char *name=0)
 
void addPluginInfos (const TQValueList< KPluginInfo * > &plugininfos)
 
KCMultiDialog * dialog ()
 

Protected Slots

void configureTree ()
 
void updateTreeList ()
 

Friends

class PageNode
 

Detailed Description

Generic configuration dialog that even works over component boundaries.

For more information see KSettings.

This class aims to standardize the use of configuration dialogs in KDE applications. Especially when using KParts and/or Plugins you face problems creating a consistent config dialog.

To show a configuration dialog you only have to call the show method and be done with it. A code example:

You initialize m_cfgdlg with

m_cfgdlg = new Dialog( Dialog::Static, this );
KSettings::Dialog::Static
@ Static
Static listview, while running no entries are added or deleted.
Definition: dialog.h:88
KSettings::Dialog::Dialog
Dialog(TQWidget *parent=0, const char *name=0)
Construct a new Preferences Dialog for the application.
Definition: dialog.cpp:358

If you use a KPart that was not especially designed for your app you can use the second constructor:

TQStringList tdepartslist;
for( all my tdeparts )
tdepartslist += m_mypart->instance().instanceName();
m_cfgdlg = new Dialog( tdepartslist, this );

and the action for the config dialog is connected to the show slot:

KStdAction::preferences( m_cfgdlg, TQ_SLOT( show() ), actionCollection() );
KSettings::Dialog::show
void show()
Show the config dialog.
Definition: dialog.cpp:413
KStdAction::preferences
TDEAction * preferences(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)

If you need to be informed when the config was changed and applied in the dialog you might want to take a look at Dispatcher.

For more information see KSettings.

Author
Matthias Kretz kretz.nosp@m.@kde.nosp@m..org
Since
3.2

Definition at line 73 of file dialog.h.

Member Enumeration Documentation

◆ ContentInListView

enum KSettings::Dialog::ContentInListView

Tells the dialog whether the entries in the listview are all static or whether it should add a Configure... button to select which parts of the optional functionality should be active or not.

Enumerator
Static 

Static listview, while running no entries are added or deleted.

Configurable 

Configurable listview.

The user can select what functionality he wants.

Definition at line 83 of file dialog.h.

Constructor & Destructor Documentation

◆ Dialog() [1/4]

KSettings::Dialog::Dialog ( TQWidget *  parent = 0,
const char *  name = 0 
)

Construct a new Preferences Dialog for the application.

It uses all KCMs with X-TDE-ParentApp set to TDEGlobal::instance()->instanceName().

Parameters
parentThe parent is only used as the parent for the dialog - centering the dialog over the parent widget.
namename

Definition at line 358 of file dialog.cpp.

◆ Dialog() [2/4]

KSettings::Dialog::Dialog ( ContentInListView  content = Static,
TQWidget *  parent = 0,
const char *  name = 0 
)

Construct a new Preferences Dialog for the application.

It uses all KCMs with X-TDE-ParentApp set to TDEGlobal::instance()->instanceName().

Parameters
contentSelect whether you want a static or configurable config dialog.
parentThe parent is only used as the parent for the dialog - centering the dialog over the parent widget.
namename

Definition at line 367 of file dialog.cpp.

◆ Dialog() [3/4]

KSettings::Dialog::Dialog ( const TQStringList &  components,
TQWidget *  parent = 0,
const char *  name = 0 
)

Construct a new Preferences Dialog with the pages for the selected instance names.

For example if you want to have the configuration pages for the kviewviewer KPart you would pass a TQStringList consisting of only the name of the part "kviewviewer".

Parameters
componentsA list of the names of the components that your config dialog should merge the config pages in.
parentThe parent is only used as the parent for the dialog - centering the dialog over the parent widget.
namename

Definition at line 377 of file dialog.cpp.

◆ Dialog() [4/4]

KSettings::Dialog::Dialog ( const TQStringList &  components,
ContentInListView  content,
TQWidget *  parent = 0,
const char *  name = 0 
)

Construct a new Preferences Dialog with the pages for the selected instance names.

For example if you want to have the configuration pages for the kviewviewer KPart you would pass a TQStringList consisting of only the name of the part "kviewviewer".

Parameters
componentsA list of the names of the components that your config dialog should merge the config pages in.
contentSelect whether you want a static or configurable config dialog.
parentThe parent is only used as the parent for the dialog - centering the dialog over the parent widget.
namename

Definition at line 387 of file dialog.cpp.

◆ ~Dialog()

KSettings::Dialog::~Dialog ( )

Definition at line 397 of file dialog.cpp.

Member Function Documentation

◆ addPluginInfos()

void KSettings::Dialog::addPluginInfos ( const TQValueList< KPluginInfo * > &  plugininfos)

If you use a Configurable dialog you need to pass KPluginInfo objects that the dialog should configure.

Definition at line 402 of file dialog.cpp.

◆ configureTree

void KSettings::Dialog::configureTree ( )
protectedslot

Definition at line 606 of file dialog.cpp.

◆ dialog()

KCMultiDialog * KSettings::Dialog::dialog ( )

Definition at line 421 of file dialog.cpp.

◆ pluginSelectionChanged

void KSettings::Dialog::pluginSelectionChanged ( )
signal

If you use the dialog in Configurable mode and want to be notified when the user changes the plugin selections use this signal.

It's emitted if the selection has changed and the user pressed Apply or Ok. In the slot you would then load and unload the plugins as requested.

◆ show

void KSettings::Dialog::show ( void  )
slot

Show the config dialog.

The slot immediatly returns since the dialog is non-modal.

Definition at line 413 of file dialog.cpp.

◆ updateTreeList

void KSettings::Dialog::updateTreeList ( )
protectedslot

Definition at line 621 of file dialog.cpp.

Friends And Related Function Documentation

◆ PageNode

friend class PageNode
friend

Definition at line 75 of file dialog.h.


The documentation for this class was generated from the following files:
  • dialog.h
  • dialog.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.