• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libkdegames/kgame

KGameConnectDialog Class Reference

#include <kgameconnectdialog.h>

Inheritance diagram for KGameConnectDialog:

Inheritance graph
[legend]

List of all members.


Detailed Description

Dialog to ask for host and port.

This Dialog is used to create a game. You call initConnection(port, QString(), 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 115 of file kgameconnectdialog.h.


Signals

void signalNetworkSetup ()

Public Member Functions

 KGameConnectDialog (QWidget *parent=0, ButtonCodes 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 Member Functions

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

Constructor & Destructor Documentation

KGameConnectDialog::KGameConnectDialog ( QWidget *  parent = 0,
ButtonCodes  buttonmask = Ok|Cancel 
) [explicit]

Definition at line 241 of file kgameconnectdialog.cpp.

KGameConnectDialog::~KGameConnectDialog (  )  [virtual]

Definition at line 258 of file kgameconnectdialog.cpp.


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() 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 263 of file kgameconnectdialog.cpp.

void KGameConnectDialog::setHost ( const QString &  host  ) 

Parameters:
host The host to connect to by default

Definition at line 293 of file kgameconnectdialog.cpp.

QString KGameConnectDialog::host (  )  const

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

Definition at line 283 of file kgameconnectdialog.cpp.

void KGameConnectDialog::setPort ( unsigned short int  port  ) 

Parameters:
port The port that will be shown by default

Definition at line 298 of file kgameconnectdialog.cpp.

unsigned short int KGameConnectDialog::port (  )  const

Returns:
The port to connect to / to listen

Definition at line 288 of file kgameconnectdialog.cpp.

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 303 of file kgameconnectdialog.cpp.

void KGameConnectDialog::signalNetworkSetup (  )  [signal]


The documentation for this class was generated from the following files:
  • kgameconnectdialog.h
  • kgameconnectdialog.cpp

libkdegames/kgame

Skip menu "libkdegames/kgame"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • kblackbox
  • kgoldrunner
  • kmahjongg
  • ksquares
  • libkdegames
  •   highscore
  •   kgame
  •   kggzgames
  •   kggzmod
  •   kggznet
  • libkmahjongg
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal