KGameDialogConnectionConfig Class Reference

#include <kgamedialogconfig.h>

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 *g)
 The KGame object of the dialog has been changed.
virtual void setOwner (KPlayer *p)
 The owner player of the dialog has been changed.
virtual void setAdmin (bool admin)
 The admin status has been changed.
virtual void submitToKGame (KGame *g, KPlayer *p)
 Called by KGameDialog to submit all settings to the KGame Object.

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

QListBoxItem * item (KPlayer *p) const

Detailed Description

Definition at line 331 of file kgamedialogconfig.h.


Constructor & Destructor Documentation

KGameDialogConnectionConfig::KGameDialogConnectionConfig QWidget *  parent = 0  ) 
 

Definition at line 602 of file kgamedialogconfig.cpp.

References KGameDialogConnectionConfigPrivate::mPlayerBox.

KGameDialogConnectionConfig::~KGameDialogConnectionConfig  )  [virtual]
 

Definition at line 614 of file kgamedialogconfig.cpp.


Member Function Documentation

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

Parameters:
p A player
Returns:
The QListBoxItem that belongs to the player p

Definition at line 662 of file kgamedialogconfig.cpp.

References KGameDialogConnectionConfigPrivate::mItem2Player.

Referenced by slotPlayerLeftGame().

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(), KGameDialogConnectionConfigPrivate::mPlayerBox, KGameDialogConfig::setAdmin(), and slotKickPlayerOut().

Here is the call graph for this function:

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

Reimplemented from KGameDialogConfig.

Definition at line 621 of file kgamedialogconfig.cpp.

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

Here is the call graph for this function:

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

Reimplemented from KGameDialogConfig.

Definition at line 642 of file kgamedialogconfig.cpp.

References KGameDialogConfig::setOwner().

Here is the call graph for this function:

void KGameDialogConnectionConfig::slotClearPlayers  )  [protected, slot]
 

Definition at line 674 of file kgamedialogconfig.cpp.

References KGameDialogConnectionConfigPrivate::mItem2Player, and slotPlayerLeftGame().

Referenced by setKGame().

void KGameDialogConnectionConfig::slotKickPlayerOut QListBoxItem *  item  )  [protected, slot]
 

Definition at line 725 of file kgamedialogconfig.cpp.

References KGameDialogConfig::admin(), KGameDialogConfig::game(), KGameDialogConnectionConfigPrivate::mItem2Player, KPlayer::name(), KGameDialogConfig::owner(), and KGame::removePlayer().

Referenced by setAdmin().

void KGameDialogConnectionConfig::slotPlayerJoinedGame KPlayer p  )  [protected, slot]
 

Definition at line 693 of file kgamedialogconfig.cpp.

References KPlayer::id(), KGameDialogConnectionConfigPrivate::mItem2Player, KGameDialogConnectionConfigPrivate::mPlayerBox, KPlayer::name(), and slotPropertyChanged().

Referenced by setKGame().

void KGameDialogConnectionConfig::slotPlayerLeftGame KPlayer p  )  [protected, slot]
 

Definition at line 712 of file kgamedialogconfig.cpp.

References KPlayer::id(), item(), and KGameDialogConnectionConfigPrivate::mPlayerBox.

Referenced by setKGame(), and slotClearPlayers().

void KGameDialogConnectionConfig::slotPropertyChanged KGamePropertyBase prop,
KPlayer p
[protected, slot]
 

Definition at line 756 of file kgamedialogconfig.cpp.

References KGamePropertyBase::id(), KGamePropertyBase::IdName, and KGameDialogConnectionConfigPrivate::mItem2Player.

Referenced by slotPlayerJoinedGame().

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


The documentation for this class was generated from the following files:
Generated on Wed Aug 23 18:05:16 2006 for libkdegames by  doxygen 1.4.6