libkdegames Library API Documentation

KGameDialogGeneralConfig Class Reference

The main game configuration widget. More...

#include <kgamedialogconfig.h>

Inheritance diagram for KGameDialogGeneralConfig:

KGameDialogConfig QWidget List of all members.

Public Member Functions

 KGameDialogGeneralConfig (QWidget *parent=0, bool initializeGUI=true)
virtual void submitToKGame (KGame *g, KPlayer *p)
virtual void setOwner (KPlayer *p)
virtual void setKGame (KGame *g)
virtual void setAdmin (bool admin)

Protected Slots

void slotPropertyChanged (KGamePropertyBase *, KPlayer *)

Protected Member Functions

void setPlayerName (const QString &name)
QString playerName () const

Detailed Description

The main game configuration widget.

It currently contains a line edit for the name of the player only. You can add widgets by using the KGameDialogGeneralConfig as parent parameter as it uses QLayout::autoAdd == true. The main KGameDialog configuration widget

Author:
Andreas Beckermann <b_mann@gmx.de>

Definition at line 144 of file kgamedialogconfig.h.


Constructor & Destructor Documentation

KGameDialogGeneralConfig::KGameDialogGeneralConfig QWidget parent = 0,
bool  initializeGUI = true
 

Construct a KGameDialogGeneralConfig.

Currently it contains a line edit widget to change the player name only.

Parameters:
initializeGUI If you really don't want to use the predefined widget and/or layout use FALSE here. Note that then none of the predefined widgets (currently only the name of the player) will exist anymore.
If you just want to add more widgets you can just create your widgets with the KGameDialogGeneralConfig as parent as it uses QLayout::setAutoAdd(true).

Definition at line 257 of file kgamedialogconfig.cpp.


Member Function Documentation

void KGameDialogGeneralConfig::submitToKGame KGame g,
KPlayer p
[virtual]
 

Called by KGameDialog to submit all settings to the KGame Object.

You have to replace this if you add your own widgets!

Parameters:
g A pointer to your KGame.
p A pointer to the player owning this dialog

Implements KGameDialogConfig.

Definition at line 329 of file kgamedialogconfig.cpp.

References KPlayer::setName().

Referenced by KGameDialog::submitToKGame().

void KGameDialogGeneralConfig::setOwner KPlayer p  )  [virtual]
 

Change the owner of the config widget.

Changes the playername in the line edit

Parameters:
p The new owner player

Reimplemented from KGameDialogConfig.

Definition at line 294 of file kgamedialogconfig.cpp.

References KGameDialogConfig::owner(), and KGameDialogConfig::setOwner().

Referenced by KGameDialog::setOwner().

void KGameDialogGeneralConfig::setKGame KGame g  )  [virtual]
 

See KGameDialogConfig::setKGame.

Sets the default values of all KGame related predefined widgets (currently none)

Reimplemented from KGameDialogConfig.

Definition at line 311 of file kgamedialogconfig.cpp.

References KGameDialogConfig::setKGame().

Referenced by KGameDialog::setKGame().

void KGameDialogGeneralConfig::setAdmin bool  admin  )  [virtual]
 

See KGameDialogConfig::setAdmin.

This deactivates the min/max player widgets

Reimplemented from KGameDialogConfig.

Definition at line 322 of file kgamedialogconfig.cpp.

References KGameDialogConfig::setAdmin().

Referenced by KGameDialog::setAdmin().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for libkdegames Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Jan 20 04:22:44 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003