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

libkdegames

kgameprocess.h

00001 /*
00002     This file is part of the KDE games library
00003     Copyright (C) 2001 Martin Heni (martin@heni-online.de)
00004     Copyright (C) 2001 Andreas Beckermann (b_mann@gmx.de)
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License version 2 as published by the Free Software Foundation.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 /*
00021     $Id: kgameprocess.h 1157643 2010-07-31 19:42:31Z tpearson $
00022 */
00023 #ifndef __KGAMEPROCESS_H_
00024 #define __KGAMEPROCESS_H_
00025 
00026 #include <tqstring.h>
00027 #include <tqobject.h>
00028 #include <tqfile.h>
00029 
00030 #include "kgameproperty.h"
00031 #include <krandomsequence.h>
00032 #include <kdemacros.h>
00033 class KPlayer;
00034 class KMessageFilePipe;
00035 
00042 class KDE_EXPORT KGameProcess:  public QObject
00043 {
00044   Q_OBJECT
00045 
00046   public:
00073     KGameProcess();
00077     ~KGameProcess();
00078 
00083     bool exec(int argc, char *argv[]);
00084 
00091     bool terminate() const {return mTerminate;}
00092 
00099     void setTerminate(bool b) {mTerminate=b;}
00100 
00110     void sendMessage(TQDataStream &stream,int msgid,Q_UINT32 receiver=0);
00111 
00131     void sendSystemMessage(TQDataStream &stream,int msgid,Q_UINT32 receiver=0);
00132 
00142     KRandomSequence *random() {return mRandom;}
00143 
00144   protected:
00149     void processArgs(int argc, char *argv[]);
00150 
00151   protected slots:
00156       void receivedMessage(const TQByteArray& receiveBuffer);
00157 
00158   signals:
00180      void signalCommand(TQDataStream &inputStream,int msgid,int receiver,int sender);
00181 
00219      void signalTurn(TQDataStream &stream,bool turn);
00220 
00232      void signalInit(TQDataStream &stream,int userid);
00233 
00234   protected:
00235     bool mTerminate;
00236     KMessageFilePipe *mMessageIO;
00237   private:
00238     TQFile rFile;
00239     TQFile wFile;
00240     KRandomSequence* mRandom;
00241 };
00242 #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