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

libtdegames

Public Member Functions
KGameDialogConfig Class Reference

#include <kgamedialogconfig.h>

Inheritance diagram for KGameDialogConfig:
KGameDialogChatConfig

List of all members.

Public Member Functions

 KGameDialogConfig (TQWidget *parent=0)
virtual void submitToKGame (KGame *g, KPlayer *p)=0
virtual void setOwner (KPlayer *p)
virtual void setKGame (KGame *g)
virtual void setAdmin (bool admin)
KGame * game () const
KPlayer * owner () const
bool admin () const

Detailed Description

Base class for configuration widgets.

You can inherit from this and implement submitToKGame, setOwner and setKGame to create your personal KGame configuration widget :-) Base class for configuration widgets

Author:
Andreas Beckermann <b_mann@gmx.de>

Definition at line 51 of file kgamedialogconfig.h.


Member Function Documentation

bool KGameDialogConfig::admin ( ) const
Returns:
True if the owner is ADMIN otherwise FALSE. See also setAdmin

Definition at line 88 of file kgamedialogconfig.cpp.

KGame * KGameDialogConfig::game ( ) const

A pointer to the KGame object that has been set by setKGame.

Note that NULL is allowed!

Returns:
The KGame object assigned to this dialog

Definition at line 86 of file kgamedialogconfig.cpp.

KPlayer * KGameDialogConfig::owner ( ) const

A pointer to the KPlayer object that has been set by setOwner.

Note that NULL is allowed!

Returns:
The owner of the dialog

Definition at line 90 of file kgamedialogconfig.cpp.

void KGameDialogConfig::setAdmin ( bool  admin) [virtual]

The admin status has been changed.

If the KGame object of this config widget is the admin the user is allowed to configure it. Otherwise most widgets will have to be disabled. Note that you don't necessarily need to deactivate all widget - e.g. the player name must be configured by the player. Mainly the KGame configuration can be done by the admin only.

By default this does nothing. Changes the value for admin so don't forget to call the default implementation in derived classes!

Parameters:
adminWhether the KGame object of this dialog can be configured

Definition at line 81 of file kgamedialogconfig.cpp.

void KGameDialogConfig::setKGame ( KGame *  g) [virtual]

The KGame object of the dialog has been changed.

The default implementation changes the pointer for game so don't forget to call the default implementation if you overwrite this!

You can use this e.g. to re-read the min/max player settings.

Parameters:
gThe KGame object

Reimplemented in KGameDialogChatConfig.

Definition at line 71 of file kgamedialogconfig.cpp.

void KGameDialogConfig::setOwner ( KPlayer *  p) [virtual]

The owner player of the dialog has been changed.

The default changes the pointer for owner so don't forget to call the default implementation if you overwrite this!

You can use this e.g. to change a line edit widget containing the player name.

Note: even NULL players are allowed!

Parameters:
pThe new owner player of the dialog

Reimplemented in KGameDialogChatConfig.

Definition at line 76 of file kgamedialogconfig.cpp.

virtual void KGameDialogConfig::submitToKGame ( KGame *  g,
KPlayer *  p 
) [pure virtual]

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

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

Parameters:
gA pointer to your KGame.
pA pointer to the player owning this dialog

Implemented in KGameDialogChatConfig.


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

libtdegames

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

libtdegames

Skip menu "libtdegames"
  • libtdegames
Generated for libtdegames by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.