libkdegames Library API Documentation

KGameDialogConnectionConfig Class Reference

Inheritance diagram for KGameDialogConnectionConfig:

Inheritance graph
[legend]
Collaboration diagram for KGameDialogConnectionConfig:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 KGameDialogConnectionConfig (QWidget *parent=0)
virtual ~KGameDialogConnectionConfig ()
virtual void setKGame (KGame *)
virtual void setOwner (KPlayer *)
virtual void setAdmin (bool admin)
virtual void submitToKGame (KGame *, KPlayer *)

Protected Slots

void slotKickPlayerOut (QListBoxItem *item)
void slotPropertyChanged (KGamePropertyBase *prop, KPlayer *p)
void slotPlayerLeftGame (KPlayer *p)
void slotPlayerJoinedGame (KPlayer *p)
void slotClearPlayers ()

Protected Member Functions

QListBoxItemitem (KPlayer *p) const

Detailed Description

Definition at line 330 of file kgamedialogconfig.h.


Member Function Documentation

void KGameDialogConnectionConfig::setKGame KGame  )  [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:
g The KGame object

Reimplemented from KGameDialogConfig.

Definition at line 621 of file kgamedialogconfig.cpp.

References QPtrList::first(), KGameDialogConfig::game(), QPtrList::next(), KGame::playerList(), KGameDialogConfig::setKGame(), slotClearPlayers(), slotPlayerJoinedGame(), and slotPlayerLeftGame().

void KGameDialogConnectionConfig::setOwner KPlayer  )  [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:
p The new owner player of the dialog

Reimplemented from KGameDialogConfig.

Definition at line 642 of file kgamedialogconfig.cpp.

References KGameDialogConfig::setOwner().

void KGameDialogConnectionConfig::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:
admin Whether the KGame object of this dialog can be configured

Reimplemented from KGameDialogConfig.

Definition at line 647 of file kgamedialogconfig.cpp.

References KGameDialogConfig::admin(), KGameDialogConfig::game(), KGameDialogConfig::setAdmin(), and slotKickPlayerOut().

virtual void KGameDialogConnectionConfig::submitToKGame KGame ,
KPlayer
[inline, 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 341 of file kgamedialogconfig.h.

QListBoxItem * KGameDialogConnectionConfig::item KPlayer p  )  const [protected]
 

Returns:
The QListBoxItem that belongs to the player p

Definition at line 662 of file kgamedialogconfig.cpp.

References QPtrDictIterator::current(), and QPtrDictIterator::currentKey().

Referenced by slotPlayerLeftGame().


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.4.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Oct 9 09:38:18 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003