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

CGuiPiece Class Reference

CGuiPiece. More...

#include <GUIPiece.h>

Inheritance diagram for CGuiPiece:

CBGGUIBar CBGGUIPiece CBGGUITriangle CGUIDie COthelloGUIPiece CTicTacToeGUIPiece List of all members.

Public Member Functions

 CGuiPiece (QCanvas *pParent)
 CGuiPiece.
virtual int32 getStatus () const
 getStatus
virtual void setStatus (const int32 status)
 setStatus
virtual int32 getStyle () const
 getStyle
virtual void setStyle (const int32 style)
 setStyle

Protected Member Functions

virtual void draw (QPainter &p)
 draw
virtual void move (const int32 x, const int32 y)
 move

Detailed Description

CGuiPiece.

Description: This class represents a piece on the GUI game board and is used for drawing the piece on the board.

Limitations: NONE


Constructor & Destructor Documentation

CGuiPiece::CGuiPiece QCanvas *  pParent  ) 
 

CGuiPiece.

Description: Class constructor

Parameters:
pParent is the parent canvas object.
Limitations: NONE


Member Function Documentation

void CGuiPiece::draw QPainter &  p  )  [protected, virtual]
 

draw

Description: Draws the proper pixmap on the canvas.

Parameters:
p is the QPainter object to draw to.
Returns:
void
Limitations: NONE

int32 CGuiPiece::getStatus  )  const [inline, virtual]
 

getStatus

Description: Returns the status of the piece. (Unhighlighted or Highlighted)

Returns:
The status of the piece.
Limitations: NONE

int32 CGuiPiece::getStyle  )  const [inline, virtual]
 

getStyle

Description: Returns the style of the piece. (Empty, White, Black)

Returns:
The style of the piece.
Limitations: NONE

void CGuiPiece::move const int32  x,
const int32  y
[protected, virtual]
 

move

Description: Moves a piece object to the specified location.

Parameters:
row is the row of the grid in which to place the piece object.
col is the column of the grid in which to place the piece object.
Returns:
void
Limitations: NONE

void CGuiPiece::setStatus const int32  status  )  [virtual]
 

setStatus

Description: Set the status of the piece.

Parameters:
status the status to set.
Returns:
void
Limitations: The status value must be valid for the object.

void CGuiPiece::setStyle const int32  style  )  [virtual]
 

setStyle

Description: Sets the style of the piece.

Parameters:
style is the style to set.
Returns:
void
Limitations: The style value must be valid for the object.


The documentation for this class was generated from the following files:
Copyright (c) 2005 Matt Bruns, Pat Hammond, Kevin Markussen, Travis Service, Brain Shaver

SourceForge.net Logo