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

libtdegames

  • libtdegames
kchat.h
1/*
2 This file is part of the TDE games library
3 Copyright (C) 2001 Andreas Beckermann (b_mann@gmx.de)
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19#ifndef __KCHAT_H__
20#define __KCHAT_H__
21
22#include <tqstring.h>
23
24#include "kchatbase.h"
25#include <tdemacros.h>
26
27class KChatPrivate;
28
36class TDE_EXPORT KChat : public KChatBase
37{
38 TQ_OBJECT
39
40public:
47 KChat(TQWidget* parent, bool twoPlayerGame = false);
48
49 virtual ~KChat();
50
56 virtual const TQString& fromName() const;
57
63 void setFromNickname(const TQString& name);
64
65// TODO:
66// void setPlayerList(TQIntDict<TQString>);// use this for non-KGame use
67
72 int addPlayer(const TQString& nick);
73
80 void removePlayer(const TQString& nick);
81
86 void removePlayer(int id);
87
88
94 bool autoAddMessages() const;
95
104 void setAutoAddMessages(bool add);
105
109 const TQString& player(int id) const;
110
115 int fromId() const;
116
117
118signals:
128 void signalSendMessage(int id, const TQString& msg);
129
130protected:
135 virtual void returnPressed(const TQString&);
136
140 int uniqueId();
141
142private:
143 void init();
144
145 KChatPrivate* d;
146};
147
148#endif
KChatBase
The base class for chat widgets.
Definition: kchatbase.h:185
KChatBase::fromName
virtual const TQString & fromName() const =0
KChatBase::returnPressed
virtual void returnPressed(const TQString &text)=0
This is called whenever the user pushed return ie wants to send a message.
KChat
A chat widget for non-KGame games.
Definition: kchat.h:37
KChat::signalSendMessage
void signalSendMessage(int id, const TQString &msg)
This signal is emitted when the player wants to send a message.

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.9.4
This website is maintained by Timothy Pearson.