Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Field Class Reference

#include </home/clem/local/src/opie/noncore/games/kbill/field.h>

Inheritance diagram for Field:

Inheritance graph
[legend]
Collaboration diagram for Field:

Collaboration graph
[legend]
List of all members.

Public Slots

void Timer ()

Signals

void click (int)

Public Member Functions

 Field (QWidget *parent=0, const char *name=0)
 ~Field ()
void stopTimer ()
void startTimer ()
void setPixmap (QPixmap *pix)
 Field (QWidget *, int)
void setFrame (QImage *)
void setPicture (QImage *)
void setPattern (QImage *)
void setLabel (const QString &)
void clearField ()

Protected Member Functions

void mouseReleaseEvent (QMouseEvent *e)
void mousePressEvent (QMouseEvent *e)
void enterEvent (QEvent *)
void leaveEvent (QEvent *)
void paintEvent (QPaintEvent *)
void paintEvent (QPaintEvent *)
void mousePressEvent (QMouseEvent *)
 Field (QWidget *parent, const char *name)
 ~Field ()
void putBall (int x, int y, int color)
void putBallRun (int x, int y, int color)
void removeBall (int x, int y)
int getBall (int x, int y)
int getAnim (int x, int y)
void setAnim (int x, int y, int anim)
void clearAnim ()
int deleteAnimatedBalls ()
void moveBall (int xa, int ya, int xb, int yb)
bool checkBounds (int x, int y)
int freeSpace ()
void saveUndo ()
void restoreUndo ()

Private Member Functions

void draw ()

Private Attributes

QTimer * timer
QPixmap * pix
bool playing
int number
QImage * frame
QImage * picture
QImage * pattern
QString label
QPixmap * pixmap
Cell field [NUMCELLSH][NUMCELLSW]
Cell field_undo [NUMCELLSH][NUMCELLSW]

Constructor & Destructor Documentation

Field::Field QWidget *  parent = 0,
const char *  name = 0
 

Definition at line 23 of file field.cpp.

References game, playing, Game::scrheight, Game::scrwidth, Timer(), and timer.

Field::~Field  ) 
 

Definition at line 33 of file field.cpp.

References timer.

Field::Field QWidget *  ,
int 
 

Definition at line 7 of file field.cpp.

References frame, NULL, number, pattern, picture, pixmap, and SIZE.

Field::Field QWidget *  parent,
const char *  name
[protected]
 

Field::~Field  )  [protected]
 


Member Function Documentation

bool Field::checkBounds int  x,
int  y
[protected]
 

Definition at line 59 of file field.cpp.

References NUMCELLSH.

Referenced by getAnim(), getBall(), LinesBoard::mousePressEvent(), moveBall(), putBall(), removeBall(), and setAnim().

void Field::clearAnim  )  [protected]
 

Definition at line 38 of file field.cpp.

References ANIM_NO, field, NUMCELLSH, NUMCELLSW, Cell::setAnim(), Opie::MM::x, and Opie::MM::y.

Referenced by LinesBoard::AnimJump(), LinesBoard::placeBall(), and saveUndo().

void Field::clearField  ) 
 

Definition at line 32 of file field.cpp.

References Cell::clear(), field, NUMCELLSH, NUMCELLSW, Opie::MM::x, and Opie::MM::y.

Referenced by KLines::startGame().

void Field::click int   )  [signal]
 

int Field::deleteAnimatedBalls  )  [protected]
 

Definition at line 44 of file field.cpp.

References ANIM_NO, Cell::clear(), field, getAnim(), NUMCELLSH, NUMCELLSW, Opie::MM::x, and Opie::MM::y.

Referenced by LinesBoard::AnimEnd().

void Field::draw  )  [private]
 

Definition at line 32 of file field.cpp.

References frame, label, QString::length(), pattern, picture, and pixmap.

Referenced by setFrame(), setLabel(), setPattern(), and setPicture().

void Field::enterEvent QEvent *   )  [protected]
 

Definition at line 51 of file field.cpp.

References FALSE, playing, and timer.

int Field::freeSpace  )  [protected]
 

Definition at line 111 of file field.cpp.

References field, Cell::isFree(), NUMCELLSH, NUMCELLSW, s, Opie::MM::x, and Opie::MM::y.

Referenced by LinesBoard::AnimEnd().

int Field::getAnim int  x,
int  y
[protected]
 

Reimplemented in LinesBoard.

Definition at line 93 of file field.cpp.

References checkBounds(), field, Cell::getAnim(), and NOBALL.

Referenced by deleteAnimatedBalls(), and LinesBoard::getAnim().

int Field::getBall int  x,
int  y
[protected]
 

Definition at line 86 of file field.cpp.

References checkBounds(), field, Cell::getColor(), and NOBALL.

Referenced by LinesBoard::AnimJump(), LinesBoard::erase5Balls(), LinesBoard::existPath(), LinesBoard::mousePressEvent(), LinesBoard::paintEvent(), and LinesBoard::placeBall().

void Field::leaveEvent QEvent *   )  [protected]
 

Definition at line 58 of file field.cpp.

References playing, and timer.

void Field::mousePressEvent QMouseEvent *   )  [protected]
 

Reimplemented in LinesBoard.

void Field::mousePressEvent QMouseEvent *  e  )  [protected]
 

Reimplemented in LinesBoard.

Definition at line 43 of file field.cpp.

References Game::button_press(), and game.

void Field::mouseReleaseEvent QMouseEvent *  e  )  [protected]
 

Definition at line 47 of file field.cpp.

References Game::button_release(), and game.

void Field::moveBall int  xa,
int  ya,
int  xb,
int  yb
[protected]
 

Definition at line 78 of file field.cpp.

References checkBounds(), field, Cell::isFree(), and Cell::moveBall().

Referenced by LinesBoard::AnimEnd(), and LinesBoard::AnimNext().

void Field::paintEvent QPaintEvent *   )  [protected]
 

Reimplemented in LinesBoard.

void Field::paintEvent QPaintEvent *   )  [protected]
 

Reimplemented in LinesBoard.

Definition at line 81 of file field.cpp.

References bitBlt(), and pix.

void Field::putBall int  x,
int  y,
int  color
[protected]
 

Definition at line 64 of file field.cpp.

References checkBounds(), field, and Cell::setColor().

Referenced by LinesBoard::placeBall().

void Field::putBallRun int  x,
int  y,
int  color
[protected]
 

void Field::removeBall int  x,
int  y
[protected]
 

Definition at line 106 of file field.cpp.

References checkBounds(), Cell::clear(), and field.

void Field::restoreUndo  )  [protected]
 

Definition at line 126 of file field.cpp.

References field, field_undo, NUMCELLSH, NUMCELLSW, Opie::MM::x, and Opie::MM::y.

Referenced by LinesBoard::undo().

void Field::saveUndo  )  [protected]
 

Definition at line 119 of file field.cpp.

References clearAnim(), field, field_undo, NUMCELLSH, NUMCELLSW, Opie::MM::x, and Opie::MM::y.

Referenced by LinesBoard::mousePressEvent().

void Field::setAnim int  x,
int  y,
int  anim
[protected]
 

Definition at line 100 of file field.cpp.

References checkBounds(), field, and Cell::setAnim().

Referenced by LinesBoard::AnimJump(), LinesBoard::erase5Balls(), and LinesBoard::placeBall().

void Field::setFrame QImage *   ) 
 

Definition at line 55 of file field.cpp.

References draw(), and frame.

Referenced by KCheckers::click(), KCheckers::setPattern(), and KCheckers::unselect().

void Field::setLabel const QString  ) 
 

Definition at line 76 of file field.cpp.

References draw(), and label.

Referenced by KCheckers::drawNumeration(), and KCheckers::showNumeration().

void Field::setPattern QImage *   ) 
 

Definition at line 69 of file field.cpp.

References draw(), and pattern.

Referenced by KCheckers::setPattern().

void Field::setPicture QImage *   ) 
 

Definition at line 62 of file field.cpp.

References draw(), and picture.

Referenced by KCheckers::drawBoard().

void Field::setPixmap QPixmap *  pix  ) 
 

Definition at line 37 of file field.cpp.

Referenced by UI::refresh().

void Field::startTimer  ) 
 

Definition at line 71 of file field.cpp.

References FALSE, playing, and timer.

Referenced by KBill::NewGame(), KBill::Pause(), UI::restart_timer(), KBill::Rules(), and KBill::Story().

void Field::stopTimer  ) 
 

Definition at line 65 of file field.cpp.

References playing, and timer.

Referenced by UI::kill_timer(), KBill::NewGame(), KBill::Pause(), KBill::Quit(), KBill::Rules(), and KBill::Story().

void Field::Timer  )  [slot]
 

Definition at line 77 of file field.cpp.

References game, and Game::update().

Referenced by Field().


Member Data Documentation

Cell Field::field[NUMCELLSH][NUMCELLSW] [private]
 

Definition at line 57 of file field.h.

Referenced by clearAnim(), clearField(), deleteAnimatedBalls(), freeSpace(), getAnim(), getBall(), moveBall(), putBall(), removeBall(), restoreUndo(), saveUndo(), and setAnim().

Cell Field::field_undo[NUMCELLSH][NUMCELLSW] [private]
 

Definition at line 58 of file field.h.

Referenced by restoreUndo(), and saveUndo().

QImage* Field::frame [private]
 

Definition at line 35 of file field.h.

Referenced by draw(), Field(), and setFrame().

QString Field::label [private]
 

Definition at line 38 of file field.h.

Referenced by draw(), and setLabel().

int Field::number [private]
 

Definition at line 31 of file field.h.

Referenced by Field().

QImage* Field::pattern [private]
 

Definition at line 37 of file field.h.

Referenced by draw(), Field(), and setPattern().

QImage* Field::picture [private]
 

Definition at line 36 of file field.h.

Referenced by draw(), Field(), and setPicture().

QPixmap* Field::pix [private]
 

Definition at line 44 of file field.h.

Referenced by paintEvent().

QPixmap* Field::pixmap [private]
 

Definition at line 40 of file field.h.

Referenced by draw(), Field(), and LinesBoard::paintEvent().

bool Field::playing [private]
 

Definition at line 45 of file field.h.

Referenced by enterEvent(), Field(), leaveEvent(), startTimer(), and stopTimer().

QTimer* Field::timer [private]
 

Reimplemented in LinesBoard.

Definition at line 43 of file field.h.

Referenced by enterEvent(), Field(), leaveEvent(), startTimer(), stopTimer(), and ~Field().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:32:32 2005 for OPIE by  doxygen 1.4.2