• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libkdegames/kgame

kgameprocess.h

Go to the documentation of this file.
00001 /*
00002     This file is part of the KDE games library
00003     Copyright (C) 2001 Martin Heni (kde at 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 #ifndef __KGAMEPROCESS_H_
00022 #define __KGAMEPROCESS_H_
00023 
00024 #include <QtCore/QObject>
00025 
00026 #include "kgameproperty.h"
00027 #include <libkdegames_export.h>
00028 
00029 class KRandomSequence;
00030 
00031 class KPlayer;
00032 class KMessageFilePipe;
00033 class KGameProcessPrivate;
00034 
00043 class KDEGAMES_EXPORT KGameProcess:  public QObject
00044 {
00045   Q_OBJECT
00046 
00047   public:
00074     KGameProcess();
00078     ~KGameProcess();
00079 
00084     bool exec(int argc, char *argv[]);
00085 
00092     bool terminate() const {return mTerminate;}
00093 
00100     void setTerminate(bool b) {mTerminate=b;}
00101 
00111     void sendMessage(QDataStream &stream,int msgid,quint32 receiver=0);
00112 
00132     void sendSystemMessage(QDataStream &stream,int msgid,quint32 receiver=0);
00133 
00143     KRandomSequence *random();
00144 
00145   protected:
00150     void processArgs(int argc, char *argv[]);
00151 
00152   protected Q_SLOTS:
00157       void receivedMessage(const QByteArray& receiveBuffer);
00158 
00159   Q_SIGNALS:
00181      void signalCommand(QDataStream &inputStream,int msgid,int receiver,int sender);
00182 
00220      void signalTurn(QDataStream &stream,bool turn);
00221 
00233      void signalInit(QDataStream &stream,int userid);
00234 
00235   protected:
00236     bool mTerminate;
00237     KMessageFilePipe *mMessageIO;
00238   private:
00239     friend class KGameProcessPrivate;
00240     KGameProcessPrivate *const d;
00241 
00242     Q_DISABLE_COPY(KGameProcess)
00243 };
00244 #endif

libkdegames/kgame

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

API Reference

Skip menu "API Reference"
  • kblackbox
  • kgoldrunner
  • kmahjongg
  • ksquares
  • libkdegames
  •   highscore
  •   kgame
  •   kggzgames
  •   kggzmod
  •   kggznet
  • libkmahjongg
Generated for API Reference by doxygen 1.5.4
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