• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • libtdegames
 

libtdegames

Signals | Public Member Functions | Static Public Member Functions | List of all members
KGameConnectDialog Class Reference

#include <kgameconnectdialog.h>

Inherits KDialogBase.

Signals

void signalNetworkSetup ()
 

Public Member Functions

 KGameConnectDialog (TQWidget *parent=0, int buttonmask=Ok|Cancel)
 
void setHost (const TQString &host)
 
TQString 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, TQString &host, TQWidget *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, TQString(), parent, true) to create a network game (as a server) or initConnection(port, host, parent) to join a network game.

Author
Andreas Beckermann b_man.nosp@m.n@gm.nosp@m.x.de

Definition at line 117 of file kgameconnectdialog.h.

Member Function Documentation

◆ host()

TQString KGameConnectDialog::host ( ) const
Returns
The host to connect to or TQString() if the user wants to be the MASTER

Definition at line 250 of file kgameconnectdialog.cpp.

◆ initConnection()

int KGameConnectDialog::initConnection ( unsigned short int &  port,
TQString &  host,
TQWidget *  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
portThe port the user wants to connect to.
hostThe host the user wants to connect to. Will be TQString() if server game is chosen
parentThe parent of the dialog
serverTrue to create a network game per default, false to join a game by default

Definition at line 230 of file kgameconnectdialog.cpp.

◆ port()

unsigned short int KGameConnectDialog::port ( ) const
Returns
The port to connect to / to listen

Definition at line 255 of file kgameconnectdialog.cpp.

◆ setDefault()

void KGameConnectDialog::setDefault ( int  state)

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

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

Definition at line 270 of file kgameconnectdialog.cpp.

◆ setHost()

void KGameConnectDialog::setHost ( const TQString &  host)
Parameters
hostThe host to connect to by default

Definition at line 260 of file kgameconnectdialog.cpp.

◆ setPort()

void KGameConnectDialog::setPort ( unsigned short int  port)
Parameters
portThe port that will be shown by default

Definition at line 265 of file kgameconnectdialog.cpp.


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

libtdegames

Skip menu "libtdegames"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

libtdegames

Skip menu "libtdegames"
  • libtdegames
Generated for libtdegames by doxygen 1.8.13
This website is maintained by Timothy Pearson.