KGameErrorDialog Class Reference

Use error(), warning() and information() to display the information about a network game.Error handling for KGame. More...

#include <kgameerrordialog.h>

Collaboration diagram for KGameErrorDialog:

Collaboration graph
[legend]
List of all members.

Public Slots

void slotError (int error, QString text)
void slotServerConnectionLost ()
 The connection to the KMessageServer has been lost.
void slotClientConnectionLost (Q_UINT32 clientID, bool broken)
 The connection to a client has been lost by accident.
void slotUnsetKGame ()
 Unsets a KGame which has been set using setKGame before.

Public Member Functions

 KGameErrorDialog (QWidget *parent)
 ~KGameErrorDialog ()
void setKGame (const KGame *g)
 Automatically connects the KGame object to all error dependant slots.
void connectionError (QString s=QString::null)
 KGame couldn't establish a connection.

Protected Member Functions

void error (const QString &errorText, QWidget *parent=0)

Detailed Description

Use error(), warning() and information() to display the information about a network game.Error handling for KGame.

Maybe a better solution is to use KMessageBoxes You can connect to the public slots, too - they will call the static functions, so that you can always have a KGameErrorDialog object lying around without losing much memory (a KGameErrorMessageDialog Object will be created)

Author:
Andreas Beckermann <b_mann@gmx.de>

Definition at line 39 of file kgameerrordialog.h.


Constructor & Destructor Documentation

KGameErrorDialog::KGameErrorDialog QWidget *  parent  ) 
 

Definition at line 40 of file kgameerrordialog.cpp.

KGameErrorDialog::~KGameErrorDialog  ) 
 

Definition at line 45 of file kgameerrordialog.cpp.


Member Function Documentation

void KGameErrorDialog::connectionError QString  s = QString::null  ) 
 

KGame couldn't establish a connection.

Use this if KGame::initConnection returns false

Parameters:
s A string that describes the error further (like port is already in use). Will be ignored if QString::null

Definition at line 103 of file kgameerrordialog.cpp.

void KGameErrorDialog::error const QString &  errorText,
QWidget *  parent = 0
[protected]
 

Definition at line 74 of file kgameerrordialog.cpp.

Referenced by slotClientConnectionLost(), slotError(), and slotServerConnectionLost().

void KGameErrorDialog::setKGame const KGame g  ) 
 

Automatically connects the KGame object to all error dependant slots.

Create a KGameErrorDialog object, call this function and forget everything.

Parameters:
g The KGame which will emit the erorrs (or not ;-) )

Definition at line 50 of file kgameerrordialog.cpp.

References KGameErrorDialogPrivate::mGame, slotClientConnectionLost(), slotError(), slotServerConnectionLost(), and slotUnsetKGame().

void KGameErrorDialog::slotClientConnectionLost Q_UINT32  clientID,
bool  broken
[slot]
 

The connection to a client has been lost by accident.

See KGameNetwork::signalClientDisconnected

Definition at line 84 of file kgameerrordialog.cpp.

References error().

Referenced by setKGame().

void KGameErrorDialog::slotError int  error,
QString  text
[slot]
 

Definition at line 97 of file kgameerrordialog.cpp.

References error().

Referenced by setKGame().

void KGameErrorDialog::slotServerConnectionLost  )  [slot]
 

The connection to the KMessageServer has been lost.

See KGameNetwork::signalConnectionBroken

Definition at line 77 of file kgameerrordialog.cpp.

References error().

Referenced by setKGame().

void KGameErrorDialog::slotUnsetKGame  )  [slot]
 

Unsets a KGame which has been set using setKGame before.

This is called automatically when the KGame object is destroyed and you normally don't have to call this yourself.

Note that setKGame also unsets an already existing KGame object if exising.

Definition at line 66 of file kgameerrordialog.cpp.

References KGameErrorDialogPrivate::mGame.

Referenced by setKGame().


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