kutils Library API Documentation

KCMultiDialog Class Reference

A method that offers a KDialogBase containing arbitrary KControl Modules. More...

#include <kcmultidialog.h>

Inheritance diagram for KCMultiDialog:

KDialogBase KDialog QDialog List of all members.

Signals

void configCommitted ()
void configCommitted (const QCString &instanceName)

Public Methods

 KCMultiDialog (QWidget *parent=0, const char *name=0, bool modal=false)
 KCMultiDialog (int dialogFace, const QString &caption, QWidget *parent=0, const char *name=0, bool modal=false)
 KCMultiDialog (int dialogFace, const KGuiItem &user2, const KGuiItem &user3=KGuiItem(), int buttonMask=User2, const QString &caption=i18n("Configure"), QWidget *parent=0, const char *name=0, bool modal=false)
virtual ~KCMultiDialog ()
void addModule (const QString &module, bool withfallback=true)
void addModule (const KCModuleInfo &moduleinfo, QStringList parentmodulenames=QStringList(), bool withfallback=false)
void removeAllModules ()
void show ()

Protected Slots

virtual void slotDefault ()
virtual void slotUser1 ()
virtual void slotApply ()
virtual void slotOk ()
virtual void slotHelp ()

Detailed Description

A method that offers a KDialogBase containing arbitrary KControl Modules.

Author:
Matthias Elter <elter@kde.org>, Daniel Molkentin <molkentin@kde.org>
Since:
3.2

Definition at line 42 of file kcmultidialog.h.


Constructor & Destructor Documentation

KCMultiDialog::KCMultiDialog QWidget   parent = 0,
const char *    name = 0,
bool    modal = false
 

Constructs a new KCMultiDialog.

Parameters:
parent  The parent widget
name  The widget name
modal  If you pass true here, the dialog will be modal

Definition at line 42 of file kcmultidialog.cpp.

References KDialogBase::showButton().

KCMultiDialog::KCMultiDialog int    dialogFace,
const QString   caption,
QWidget   parent = 0,
const char *    name = 0,
bool    modal = false
 

Construct a personalized KCMultiDialog.

Parameters:
dialogFace  You can use TreeList, Tabbed, Plain, Swallow or IconList.
caption  The dialog caption. Do not specify the application name here. The class will take care of that.
parent  Parent of the dialog.
name  Dialog name (for internal use only).
modal  Controls dialog modality. If false, the rest of the program interface (example: other dialogs) is accessible while the dialog is open.

Definition at line 52 of file kcmultidialog.cpp.

References KDialogBase::showButton().

KCMultiDialog::KCMultiDialog int    dialogFace,
const KGuiItem &    user2,
const KGuiItem &    user3 = KGuiItem(),
int    buttonMask = User2,
const QString   caption = i18n("Configure"),
QWidget   parent = 0,
const char *    name = 0,
bool    modal = false
 

Constructor for the predefined layout mode where you specify the kind of layout (face) and also add buttons.

Note that the User1 button of KDialogBase is already used to provide a "Reset" button so only two more buttons are available to users of KCMultiDialog. When clicked they trigger slotUser2() and slotUser3().

Parameters:
dialogFace  You can use TreeList, Tabbed, Plain, Swallow or IconList.
user2  User button2 text item.
user3  User button3 text item.
buttonMask  Specifies which buttons will be visible. If zero (0) no extra buttons will be added. You can only use the User2 and User3 buttons. The User1 button is already used internally.
See also:
KDialogBase for more information on this.
Parameters:
caption  The dialog caption. Do not specify the application name here. The class will take care of that.
parent  Parent of the dialog.
name  Dialog name (for internal use only).
modal  Controls dialog modality. If false, the rest of the program interface (example: other dialogs) is accessible while the dialog is open.

Definition at line 62 of file kcmultidialog.cpp.

References KDialogBase::showButton().

KCMultiDialog::~KCMultiDialog   [virtual]
 

Destructor.

Definition at line 83 of file kcmultidialog.cpp.

References QMap< KService::Ptr, KCModuleProxy * >::begin(), and QMap< KService::Ptr, KCModuleProxy * >::end().


Member Function Documentation

void KCMultiDialog::addModule const QString   module,
bool    withfallback = true
 

Add a module.

Parameters:
module  Specify the name of the module that is to be added to the list of modules the dialog will show.
withfallback  Try harder to load the module. Might result in the module appearing outside the dialog.

Definition at line 187 of file kcmultidialog.cpp.

References KService::Ptr, and KService::serviceByStorageId().

void KCMultiDialog::addModule const KCModuleInfo   moduleinfo,
QStringList    parentmodulenames = QStringList(),
bool    withfallback = false
 

Add a module.

Parameters:
moduleinfo  Pass a KCModuleInfo object which will be used for creating the module. It will be added to the list of modules the dialog will show.
parentmodulenames  The names of the modules that should appear as parents in the TreeList. Look at the KDialogBase::addPage documentation for more info on this.
withfallback  Try harder to load the module. Might result in the module appearing outside the dialog.

Definition at line 201 of file kcmultidialog.cpp.

References KDialogBase::aboutToShowPage(), KDialogBase::activePageIndex(), KDialogBase::addHBoxPage(), QValueList< CreatedModule >::append(), KCModuleInfo::comment(), QMap< KService::Ptr, KCModuleProxy * >::contains(), QValueList< CreatedModule >::count(), KCModuleInfo::docPath(), KCModuleInfo::icon(), QPtrDict< QStringList >::insert(), KCModuleInfo::moduleName(), KDialogBase::pageIndex(), KDialogBase::plainPage(), QMap< KService::Ptr, KCModuleProxy * >::remove(), QWidget::reparent(), KCModuleInfo::service(), KDialogBase::showPage(), and KIcon::SizeMedium.

void KCMultiDialog::removeAllModules  
 

Remove all modules from the dialog.

Definition at line 278 of file kcmultidialog.cpp.

References QValueList< CreatedModule >::begin(), QValueList< CreatedModule >::clear(), QValueList< CreatedModule >::end(), KStdAccel::end(), QWidget::hide(), and QWidget::reparent().

void KCMultiDialog::configCommitted   [signal]
 

Emitted after all KCModules have been told to save their configuration.

The applyClicked and okClicked signals are emitted before the configuration is saved.

void KCMultiDialog::configCommitted const QCString   instanceName [signal]
 

Emitted after the KCModules have been told to save their configuration.

It is emitted once for every instance the KCMs that were changed belong to.

You can make use of this if you have more than one component in your application. instanceName tells you the instance that has to reload its configuration.

The applyClicked and okClicked signals are emitted before the configuration is saved.

Parameters:
instanceName  The name of the instance that needs to reload its configuration.

void KCMultiDialog::slotDefault   [protected, virtual, slot]
 

This slot is called when the user presses the "Default" Button You can reimplement it if needed.

Note:
Make sure you call the original implementation!

Reimplemented from KDialogBase.

Definition at line 90 of file kcmultidialog.cpp.

References KDialogBase::activePageIndex(), QValueList< CreatedModule >::begin(), QValueList< CreatedModule >::end(), KStdAccel::end(), and KDialogBase::pageIndex().

void KCMultiDialog::slotUser1   [protected, virtual, slot]
 

This slot is called when the user presses the "Reset" Button You can reimplement it if needed.

Note:
Make sure you call the original implementation!

Reimplemented from KDialogBase.

Definition at line 104 of file kcmultidialog.cpp.

References KDialogBase::activePageIndex(), QValueList< CreatedModule >::begin(), QValueList< CreatedModule >::end(), KStdAccel::end(), and KDialogBase::pageIndex().

void KCMultiDialog::slotApply   [protected, virtual, slot]
 

This slot is called when the user presses the "Apply" Button You can reimplement it if needed.

Note:
Make sure you call the original implementation!

Reimplemented from KDialogBase.

Definition at line 145 of file kcmultidialog.cpp.

References KDialogBase::apply(), and KDialogBase::applyClicked().

void KCMultiDialog::slotOk   [protected, virtual, slot]
 

This slot is called when the user presses the "OK" Button You can reimplement it if needed.

Note:
Make sure you call the original implementation!

Reimplemented from KDialogBase.

Definition at line 152 of file kcmultidialog.cpp.

References QDialog::accept(), KDialogBase::apply(), and KDialogBase::okClicked().

void KCMultiDialog::slotHelp   [protected, virtual, slot]
 

This slot is called when the user presses the "Help" Button You can reimplement it if needed.

Note:
Make sure you call the original implementation!

Reimplemented from KDialogBase.

Definition at line 159 of file kcmultidialog.cpp.

References KProcess::detach(), KProcess::DontCare, KURL::protocol(), KProcess::start(), and KURL::url().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kutils Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun May 16 22:04:34 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003