KGameDialogNetworkConfig Class Reference

#include <kgamedialogconfig.h>

Inheritance diagram for KGameDialogNetworkConfig:

Inheritance graph
[legend]
Collaboration diagram for KGameDialogNetworkConfig:

Collaboration graph
[legend]
List of all members.

Signals

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

Public Member Functions

 KGameDialogNetworkConfig (QWidget *parent=0)
virtual ~KGameDialogNetworkConfig ()
void disableInitConnection ()
virtual void submitToKGame (KGame *g, KPlayer *p)
 Called by KGameDialog to submit all settings to the KGame Object.
virtual void setKGame (KGame *g)
 The KGame object of the dialog has been changed.
void setDefaultNetworkInfo (const QString &host, unsigned short int port, bool server=true)
 This sets the default port and host used in KGameConnectDialog.
void 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.

Protected Slots

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

Protected Member Functions

void setConnected (bool connected, bool master=false)

Detailed Description

Definition at line 211 of file kgamedialogconfig.h.


Constructor & Destructor Documentation

KGameDialogNetworkConfig::KGameDialogNetworkConfig QWidget *  parent = 0  ) 
 

Definition at line 119 of file kgamedialogconfig.cpp.

References KGameDialogNetworkConfigPrivate::mConnect, KGameDialogNetworkConfigPrivate::mDisconnectButton, KGameDialogNetworkConfigPrivate::mInitConnection, KGameDialogNetworkConfigPrivate::mNetworkLabel, setConnected(), setDefaultNetworkInfo(), signalServerTypeChanged(), slotExitConnection(), and slotInitConnection().

Here is the call graph for this function:

KGameDialogNetworkConfig::~KGameDialogNetworkConfig  )  [virtual]
 

Definition at line 149 of file kgamedialogconfig.cpp.


Member Function Documentation

void KGameDialogNetworkConfig::disableInitConnection  ) 
 

void KGameDialogNetworkConfig::setConnected bool  connected,
bool  master = false
[protected]
 

Definition at line 197 of file kgamedialogconfig.cpp.

References KGameDialogNetworkConfigPrivate::mDisconnectButton, KGameDialogNetworkConfigPrivate::mInitConnection, and KGameDialogNetworkConfigPrivate::mNetworkLabel.

Referenced by KGameDialogNetworkConfig(), setKGame(), slotConnectionBroken(), and slotExitConnection().

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.

References KGameDialogNetworkConfigPrivate::mConnect, KGameDialogNetworkConfigPrivate::mDefaultHost, KGameDialogNetworkConfigPrivate::mDefaultPort, KGameDialogNetworkConfigPrivate::mDefaultServer, KGameConnectWidget::setDefault(), KGameConnectWidget::setHost(), and KGameConnectWidget::setPort().

Referenced by KGameDialogNetworkConfig().

Here is the call graph for this function:

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.

References KGameDialogNetworkConfigPrivate::mConnect, KGameConnectWidget::setName(), and KGameConnectWidget::setType().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

void KGameDialogNetworkConfig::slotConnectionBroken  )  [protected, slot]
 

Definition at line 190 of file kgamedialogconfig.cpp.

References setConnected().

void KGameDialogNetworkConfig::slotExitConnection  )  [protected, slot]
 

Definition at line 155 of file kgamedialogconfig.cpp.

References KGameNetwork::disconnect(), KGameDialogConfig::game(), and setConnected().

Referenced by KGameDialogNetworkConfig().

void KGameDialogNetworkConfig::slotInitConnection  )  [protected, slot]
 

Definition at line 162 of file kgamedialogconfig.cpp.

References KGameDialogConfig::game(), KGameConnectWidget::gameName(), KGameConnectWidget::host(), KGameDialogNetworkConfigPrivate::mConnect, KGameNetwork::offerConnections(), KGameConnectWidget::port(), KGameNetwork::setDiscoveryInfo(), and KGameConnectWidget::type().

Referenced by KGameDialogNetworkConfig().

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.


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