libkdegames Library API Documentation

KGameDialogNetworkConfig Class Reference

Inheritance diagram for KGameDialogNetworkConfig:

Inheritance graph
[legend]
Collaboration diagram for KGameDialogNetworkConfig:

Collaboration graph
[legend]
List of all members.

Signals

void signalServerTypeChanged (int)

Public Member Functions

 KGameDialogNetworkConfig (QWidget *parent=0)
virtual ~KGameDialogNetworkConfig ()
void disableInitConnection ()
virtual void submitToKGame (KGame *g, KPlayer *p)
virtual void setKGame (KGame *g)
void setDefaultNetworkInfo (const QString &host, unsigned short int port, bool server=true)
void setDiscoveryInfo (const QString &type, const QString &name=QString::null)

Protected Slots

void slotInitConnection ()
void slotExitConnection ()
void slotConnectionBroken ()

Protected Member Functions

void setConnected (bool connected, bool master=false)

Detailed Description

Definition at line 210 of file kgamedialogconfig.h.


Member Function Documentation

void KGameDialogNetworkConfig::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 214 of file kgamedialogconfig.cpp.

void KGameDialogNetworkConfig::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 218 of file kgamedialogconfig.cpp.

References KGameDialogConfig::game(), setConnected(), and KGameDialogConfig::setKGame().

void KGameDialogNetworkConfig::setDefaultNetworkInfo const QString host,
unsigned short int  port,
bool  server = true
 

This sets the default port and host used in KGameConnectDialog.

The user will be able to change these defaults!

If you don't call this then host "localhost" and port "0" is used. You are strongly encouraged to change at least the port!

Parameters:
port The default port to connect to / listen on
host The default host to connect to

Definition at line 228 of file kgamedialogconfig.cpp.

Referenced by KGameDialogNetworkConfig().

void KGameDialogNetworkConfig::setDiscoveryInfo const QString type,
const QString name = QString::null
 

Set service type that will be published or browsed for and game name that will be displayed in server browser.

Without this publishing and discovery of LAN servers will not be enabled.

Parameters:
name Game name. Important only for server mode. If not set hostname will be used. In case of name conflict -2, -3 and so on will be added to name.
type Service type (something like _kwin4._tcp). It should be unique for application.
Since:
3.4

Definition at line 243 of file kgamedialogconfig.cpp.

void KGameDialogNetworkConfig::signalServerTypeChanged int   )  [signal]
 

This signal is emmited if the user changes the server type (client/server) in the network configuration dialog.

Parameters:
t - type type (0/1) of the connection

Referenced by KGameDialogNetworkConfig().


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:19 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003