Logo Search packages:      
Sourcecode: kdegames version File versions

BoardWidget Class Reference

#include <boardwidget.h>

Inheritance diagram for BoardWidget:

List of all members.

Detailed Description

Mathias Mueller

Definition at line 15 of file BoardWidget.h.

Public Slots

void configure ()
void demoMoveTimeout ()
void drawBoard (bool deferUpdate=true)
void drawBoard ()
void helpMove ()
void helpMoveStop ()
void helpMoveTimeout ()
bool loadBackground (const QString &, bool bShowError=true)
bool loadBoard ()
bool loadBoardLayout (const QString &)
void loadSettings ()
bool loadTileset (const QString &)
void matchAnimationTimeout ()
void saveSettings ()
void setDisplayedWidth ()
void shuffle ()
void updateScaleMode ()


void animationFinished (int)
void animationsFinished (void)
void demoModeChanged (bool bActive)
void edited (int)
void gameCalculated ()
void gameOver (unsigned short removed, unsigned short cheats)
void moveChoosen (Move &)
void rightButtonPressed (int, const QPoint &)
void statusTextChanged (const QString &, long)
void tileNumberChanged (int iMaximum, int iCurrent, int iLeft)
void updateSpy (QString)

Public Member Functions

void animateMoveList ()
 BoardWidget (QWidget *parent=0, const char *name=0)
 BoardWidget (Board &, QWidget *parent=0, const char *name=0)
void calculateNewGame (int num=-1)
void choseMove (MoveList *)
void clearPosition ()
void createBallPosition (int, int x, int y, Ball *)
void createBlending (int, int, Ball *, Ball *)
void createPos (int, int, int, Ball *)
void draw ()
void gameLoaded ()
QString & getBoardName ()
int getColor1Count ()
int getColor2Count ()
long getGameNum ()
QString & getLayoutName ()
void initBalls ()
virtual void mouseMoveEvent (QMouseEvent *pEvent)
virtual void mousePressEvent (QMouseEvent *pEvent)
virtual void mouseReleaseEvent (QMouseEvent *pEvent)
virtual void moveEvent (QMoveEvent *)
void paint (QPaintDevice *)
virtual void paintEvent (QPaintEvent *)
void pause ()
void redoMove ()
void renderBalls (bool r)
virtual void resizeEvent (QResizeEvent *)
bool setEditMode (bool)
void setShowMatch (bool)
void showMove (const Move &m, int step, bool updateGUI=true)
void showStart (const Move &m, int step, bool updateGUI=true)
void startAnimation (int pos, int anim, int type=ANIMATION_FORWARD)
void startDemoMode ()
void stopAnimation (int pos)
void stopDemoMode ()
void tileSizeChanged ()
int undoMove ()
void updateBalls ()
void updatePosition (bool updateGUI=false)

Public Attributes


Protected Types

enum  STATES {
  Stop, Demo, Help, Animation,

Protected Member Functions

void calcShadow (int e, int y, int x, int &left, int &right, int &corn)
void cancelUserSelectedTiles ()
void clearRemovedTilePair (POSITION &a, POSITION &b)
void drawBackground ()
void drawTileNumber ()
short findAllMatchingTiles (POSITION &)
bool findMove (POSITION &, POSITION &)
void generatePositionDepends ()
bool generateSolvableGame ()
bool generateStartPosition2 ()
void generateTilePositions ()
void getFaces (POSITION &a, POSITION &b)
void getFileOrDefault (QString filename, QString type, QString &res)
void hilightTile (POSITION &, bool on=true, bool refresh=true)
void initialiseRemovedTiles ()
bool isMatchingTile (POSITION &, POSITION &)
void mousePressEvent (QMouseEvent *)
int moveCount ()
bool onlyFreeInLine (int position)
void paintEvent (QPaintEvent *)
void placeTile (int position, int tile)
void putTile (POSITION &, bool refresh=true)
void randomiseFaces ()
void removeTile (POSITION &, bool refresh=true)
int requiredHeight ()
int requiredWidth ()
int selectPosition (int lastPosition)
void setRemovedTilePair (POSITION &a, POSITION &b)
void setStatusText (const QString &)
void shadowArea (int z, int y, int x, int sx, int sy, int rx, int ry, QPixmap *src)
void shadowBotRight (int depth, int sx, int sy, int rx, int ry, QPixmap *src, bool flag)
void shadowTopLeft (int depth, int sx, int sy, int rx, int ry, QPixmap *src, bool flag)
virtual QSize sizeHint () const
void stackTiles (unsigned char t, unsigned short h, unsigned short x, unsigned short y)
void stopMatchAnimation ()
int tileAt (int x, int y, int z)
void transformPointToPosition (const QPoint &, POSITION &)
void updateDepend (int position)

Protected Attributes

QMemArray< BallAnimation * > animations
QPixmap backBuffer
unsigned short cheatsUsed
long gameGenerationNum
bool gamePaused
int iPosCount
int iTimerStep
short matchCount
POSITION MouseClickPos1
POSITION MouseClickPos2
int numTiles
DEPENDENCY positionDepends [BoardLayout::maxTiles]
QMemArray< BallPosition * > positions
POSITION PosTable [BoardLayout::maxTiles]
KRandomSequence random
unsigned char removedBamboo [9]
unsigned char removedCharacter [9]
unsigned char removedDragon [3]
unsigned char removedFlower [4]
unsigned char removedRod [9]
unsigned char removedSeason [4]
unsigned char removedWind [9]
bool showHelp
bool showMatch
Background theBackground
BoardLayout theBoardLayout
Tileset theTiles
UCHAR tilePair [144]
POSITION tilePositions [BoardLayout::maxTiles]
int tilesAllocated
int tilesUsed
QTimer * timer
enum BoardWidget::STATES TimerState
bool updateBackBuffer

Private Member Functions

bool isValidEnd (int pos)
bool isValidStart (int pos, bool)
int positionOf (int x, int y)

Private Attributes

int actField
Move actMove
int actPos
int actValue
QCursor * arrow [7]
QCursor * arrowAll
QString backgroundFile
Board & board
QColor * boardColor
bool boardOK
QPixmap boardPM
int color
int color1Count
int color2Count
int editColor
bool editMode
int field [Board::AllFields]
bool gettingMove
QString layout
bool mbDown
int oldField
int oldPos
MoveList * pList
QPixmap pm
QColor * redColor
QColor * redHColor
bool renderMode
int shownDirection
int startField
int startField2
int startPos
bool startShown
int startType
bool startValid
QString tileFile
QColor * yellowColor
QColor * yellowHColor

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

Generated by  Doxygen 1.6.0   Back to index