KChat Class Reference
#include <kchat.h>
Inheritance diagram for KChat:

Detailed Description
A chat widget for non-KGame games.Docu is TODO
- Author:
- Andreas Beckermann <b_mann@gmx.de>
Definition at line 36 of file kchat.h.
Signals | |
void | signalSendMessage (int id, const QString &msg) |
Public Member Functions | |
KChat (QWidget *parent, bool twoPlayerGame=false) | |
virtual const QString & | fromName () const |
void | setFromNickname (const QString &name) |
int | addPlayer (const QString &nick) |
void | removePlayer (const QString &nick) |
void | removePlayer (int id) |
bool | autoAddMessages () const |
void | setAutoAddMessages (bool add) |
const QString & | player (int id) const |
int | fromId () const |
Protected Member Functions | |
virtual void | returnPressed (const QString &) |
int | uniqueId () |
Constructor & Destructor Documentation
|
|
Member Function Documentation
|
Adds a player nickname.
|
|
|
|
|
|
Equivalent to player(fromId()).
Implements KChatBase. |
|
|
|
Removes the player with this id, as returned by addPlayer.
|
|
Removes all players with this nickname. Better don't use this as it will remove *all* players with this nickname. Save the id instead and call removePlayer(id)
|
|
This emits signalSendMessage and, if autoAddMessages is true, calls KChatBase::addMessage.
Implements KChatBase. |
|
Usually the messages which will be sent from here (see signalSendMessage) are added autmatically to this widget. But under some circumstances that would be very unhandy. So you can deactivate this behaviour here and call KChatBase::addMessage yourself
|
|
This sets the name that will be shown on all chat widgets if this widget sends a message. See signalSendMessage
|
|
This signal is emitted when the player wants to send a message. The message is added automatically using KChatBase::addMessage if autoAddMessages is enabled.
|
|
The Id of the next player. Incremented after every call. |
The documentation for this class was generated from the following files: