libkdegames Library API Documentation

KGameConnectDialog Class Reference

Dialog to ask for host and port. More...

#include <kgameconnectdialog.h>

List of all members.

Signals

void signalNetworkSetup ()

Public Methods

 KGameConnectDialog (QWidget *parent=0, int buttonmask=Ok|Cancel)
virtual ~KGameConnectDialog ()
void setHost (const QString &host)
QString host () const
void setPort (unsigned short int port)
unsigned short int port () const
void setDefault (int state)

Static Public Methods

int initConnection (unsigned short int &port, QString &host, QWidget *parent, bool server=false)


Detailed Description

Dialog to ask for host and port.

This Dialog is used to create a game. You call initConnection(port, QString::null, parent, true) to create a network game (as a server) or initConnection(port, host, parent) to join a network game.

Author:
Andreas Beckermann <b_mann@gmx.de>

Definition at line 88 of file kgameconnectdialog.h.


Member Function Documentation

int KGameConnectDialog::initConnection unsigned short int &    port,
QString   host,
QWidget   parent,
bool    server = false
[static]
 

Shows a dialog to either connect to an existing game or to create a server game, depending on user's choice.

Parameters:
port  The port the user wants to connect to.
host  The host the user wants to connect to. Will be QString::null if server game is chosen
parent  The parent of the dialog
server  True to create a network game per default, false to join a game by default

Definition at line 145 of file kgameconnectdialog.cpp.

References host(), port(), setDefault(), setHost(), and setPort().

void KGameConnectDialog::setHost const QString   host
 

Parameters:
host  The host to connect to by default

Definition at line 175 of file kgameconnectdialog.cpp.

Referenced by initConnection().

QString KGameConnectDialog::host   const
 

Returns:
The host to connect to or QString::null if the user wants to be the MASTER

Definition at line 165 of file kgameconnectdialog.cpp.

Referenced by initConnection().

void KGameConnectDialog::setPort unsigned short int    port
 

Parameters:
port  The port that will be shown by default

Definition at line 180 of file kgameconnectdialog.cpp.

References port().

Referenced by initConnection().

unsigned short int KGameConnectDialog::port   const
 

Returns:
The port to connect to / to listen

Definition at line 170 of file kgameconnectdialog.cpp.

Referenced by initConnection(), and setPort().

void KGameConnectDialog::setDefault int    state
 

Specifies which state is the default (0 = server game; 1 = join game).

Parameters:
state  The default state. 0 For a server game, 1 to join a game

Definition at line 185 of file kgameconnectdialog.cpp.

Referenced by initConnection().


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.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 10:06:38 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003