Logo Search packages:      
Sourcecode: kdegames version File versions

KBgEngineFIBS Class Reference

#include <kbgfibs.h>

Inheritance diagram for KBgEngineFIBS:


List of all members.

Detailed Description

The FIBS backgammon engine.

Special backgammon engine for games on the First Internet Backgammon Server

Jens Hoefkens <jens@hoefkens.com>

Definition at line 60 of file kbgfibs.h.

Public Types

enum  Command {
  Redo, Undo, Roll, Cube,
  Done, Load

Public Slots

void connected ()
void connectFIBS ()
void connectionClosed ()
void connError (int f)
void disconnectFIBS ()
virtual void done ()
virtual void doubleCube (const int w)
void fibsRequestInvitation (const QString &player)
void handleCommand (const QString &cmd)
virtual void handleMove (QString *s)
virtual bool haveNewGame ()
void hostFound ()
void keepAlive ()
void newAccount ()
virtual void newGame ()
void personalMessage (const QString &msg)
virtual void readConfig ()
void readData ()
virtual void redo ()
virtual void rollDice (const int w)
virtual void saveConfig ()
void sendData (const QString &s)
virtual void undo ()


void allowCommand (int cmd, bool f)
void allowMoving (const bool fl)
void changePlayerStatus (const QString &, int, bool)
void chatMessage (const QString &msg)
void fibsConnectionClosed ()
void fibsLogin (const QString &p)
void fibsLogout (const QString &p)
void fibsStartNewGame (const QString &msg)
void fibsWhoEnd ()
void fibsWhoInfo (const QString &line)
void gameOver ()
void getState (KBgStatus *)
void infoText (const QString &msg)
void newState (const KBgStatus &)
void redoMove ()
void serverString (const QString &s)
void setEditMode (const bool f)
void statText (const QString &msg)
void undoMove ()

Public Member Functions

virtual void getSetupPages (KDialogBase *nb)
virtual void hideEvent ()
 KBgEngineFIBS (QWidget *parent=0, QString *name=0, QPopupMenu *pmenu=0)
virtual bool queryClose ()
virtual bool queryExit ()
void setCommit (const double com=2.5)
virtual void setupCancel ()
virtual void setupDefault ()
virtual void setupOk ()
virtual void showEvent ()
virtual void start ()
virtual ~KBgEngineFIBS ()

Protected Types

enum  Pattern {
  Welcome, OwnInfo, NoLogin, BegRate,
  EndRate, HTML_lt, HTML_gt, BoardSY,
  BoardSN, WhoisBG, WhoisE1, WhoisE2,
  WhoEnde, WhoInfo, MotdBeg, MotdEnd,
  MsgPers, MsgDeli, MsgSave, ChatSay,
  ChatSht, ChatWis, ChatKib, SelfSay,
  SelfSlf, SelfSht, SelfWis, SelfKib,
  UserLin, UserLot, Goodbye, GameSav,
  RawBord, YouTurn, PlsMove, BegWtch,
  EndWtch, BegBlnd, EndBlnd, BegGame,
  OneWave, TwoWave, YouWave, Reload1,
  Reload2, GameBG1, GameBG2, GameRE1,
  GameRE2, GameEnd, EndLose, EndVict,
  MatchB1, MatchB2, MatchB3, MatchB4,
  RejAcpt, YouAway, YouAcpt, HelpTxt,
  Invite0, Invite1, Invite2, Invite3,
  ConLeav, TabChar, PlsChar, OneName,
  TypJoin, YouBack, YouMove, YouRoll,
  TwoStar, BoxHori, BoxVer1, BoxVer2,
  OthrNam, YourNam, GivePwd, RetypeP,
  GreedyY, GreedyN, RejCont, AcptWin,
  YouGive, DoubleY, DoubleN, KeepAlv,
  RatingY, RatingN, NumPattern
enum  RxStatus {
  RxIgnore, RxConnect, RxWhois, RxMotd,
  RxRating, RxNewLogin, RxGoodbye, RxNormal

Protected Slots

void accept ()
void away ()
void back ()
void cancelJoin (const QString &info)
void changeJoin (const QString &info)
virtual void cube ()
void endGame ()
void handleServerData (QString &line)
void invitationDone ()
void inviteDialog ()
void join (const QString &msg)
void join_0 ()
void join_1 ()
void join_2 ()
void join_3 ()
void join_4 ()
void join_5 ()
void join_6 ()
void join_7 ()
virtual void load ()
void match_conti ()
void match_leave ()
void reject ()
virtual void roll ()
void showChat ()
void showList ()
void toggle_double ()
void toggle_greedy ()
void toggle_ratings ()
void toggle_ready ()

Protected Member Functions

void handleMessageConnect (const QString &line, const QString &rawline)
void handleMessageMotd (const QString &line)
void handleMessageNewLogin (const QString &line)
void handleMessageNormal (QString &line, QString &rawline)
void handleMessageRating (const QString &line)
void handleMessageWhois (const QString &line)
void initPattern ()
bool queryConnection (const bool newlogin)

Protected Attributes

int cl
QTimer * ct
QPopupMenu * menu
QRegExp pat [NumPattern]
QString rxCollect
int rxCount
int rxStatus

Private Types

enum  AutoMessages { MsgBeg, MsgLos, MsgWin, NumMsg }
enum  FIBSInfo {
  FIBSHost, FIBSPort, FIBSUser, FIBSPswd,
enum  FIBSOpt {
  OptReady, OptGreedy, OptDouble, OptAllowPip,
  OptAutoMove, OptCrawford, OptSilent, OptRatings,
  OptMoves, NumFIBSOpt

Private Attributes

KAction * actAccept
KAction * actAway
KAction * actBack
KAction * actConti
KAction * actJoin [8]
KAction * actLeave
KAction * actReject
QString autoMsg [NumMsg]
QString caption
QCheckBox * cbi
QCheckBox * cbk
QCheckBox * cbm [NumMsg]
QCheckBox * cbp
KToggleAction * chatAct
QPopupMenu * cmdMenu
int cmdMenuID
KAction * conAction
QSocket * connection
QString currBoard
KAction * disAction
KToggleAction * fibsOpt [NumFIBSOpt]
QString infoFIBS [NumFIBS]
KAction * invAction
QStringList invitations
QPopupMenu * joinMenu
int joinMenuID
bool keepalive
QTimer * keepaliveTimer
QString lastAway
QString lastMove
QLineEdit * lec [NumFIBS]
QLineEdit * lem [NumMsg]
KToggleAction * listAct
bool login
KAction * newAction
int numJoin
QPopupMenu * optsMenu
int optsMenuID
bool playing
QString pname [2]
bool redoPossible
QPopupMenu * respMenu
int respMenuID
bool showMsg
int toMove
int undoCounter
bool useAutoMsg [NumMsg]
bool whoisInvite

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index