• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • @topname@
  • Sitemap
  • Contact Us
 

libkdegames

kchat.h

00001 /*
00002     This file is part of the KDE games library
00003     Copyright (C) 2001 Andreas Beckermann (b_mann@gmx.de)
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License version 2 as published by the Free Software Foundation.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
00018 */
00019 #ifndef __KCHAT_H__
00020 #define __KCHAT_H__
00021 
00022 #include <tqstring.h>
00023 
00024 #include "kchatbase.h"
00025 #include <kdemacros.h>
00026 
00027 class KChatPrivate;
00028 
00036 class KDE_EXPORT KChat : public KChatBase
00037 {
00038     Q_OBJECT
00039 public:
00046     KChat(TQWidget* parent, bool twoPlayerGame = false);
00047 
00048     virtual ~KChat();
00049 
00055     virtual const TQString& fromName() const;
00056 
00062     void setFromNickname(const TQString& name);
00063 
00064 //  TODO:
00065 //  void setPlayerList(TQIntDict<TQString>);// use this for non-KGame use
00066 
00071     int addPlayer(const TQString& nick);
00072 
00079     void removePlayer(const TQString& nick);
00080 
00085     void removePlayer(int id);
00086 
00087 
00093     bool autoAddMessages() const;
00094 
00103     void setAutoAddMessages(bool add);
00104 
00108     const TQString& player(int id) const;
00109 
00114     int fromId() const;
00115     
00116 
00117 signals:
00127     void signalSendMessage(int id, const TQString& msg);
00128     
00129 protected:
00134     virtual void returnPressed(const TQString&);
00135 
00139     int uniqueId();
00140 
00141 private:
00142     void init();
00143 
00144     KChatPrivate* d;
00145 };
00146 
00147 #endif

libkdegames

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

@topname@

Skip menu "@topname@"
  • libkdegames
Generated for @topname@ by doxygen 1.5.6
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