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

CBGGUIBoard Class Reference

CBGGUIBoard. More...

#include <BGGUIBoard.h>

List of all members.

Public Member Functions

 CBGGUIBoard (QWidget *parent=0, const char *name=0)
 CBGGUIBoard.
 ~CBGGUIBoard ()
 ~CBGGUIBoard
void NewBoard ()
 NewBoard.
void AddChecker (int32 number, CBGPiece::COLOR color)
 AddChecker.
void RemoveChecker (int32 number, CBGPiece::COLOR color)
 RemoveChecker.
void SelectTriangle (uint32 number, bool select=true)
 SelectTriangle.
void SelectBar (CBGGUIPiece::COLOR color, bool select=true)
 SelectBar.
bool IsTriangleSelected (uint32 number) const
 IsTriangleSelected.
bool IsBarSelected (CBGGUIPiece::COLOR color) const
 IsBarSelected.
void ClearHighlight ()
 ClearHighlight.

Protected Member Functions

void contentsMousePressEvent (QMouseEvent *event)
 contentsMousePressEvent
void resizeEvent (QResizeEvent *event)
 resizeEvent
void BuildBoard ()
 BuildBoard.
void DestroyBoard ()
 DestroyBoard.


Detailed Description

CBGGUIBoard.

Description: Class is a QCanvasView derived class used for displaying the Backgammon board on the screen.

Limitations: NONE


Constructor & Destructor Documentation

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

CBGGUIBoard.

Description: Class constructor

Limitations: NONE

CBGGUIBoard::~CBGGUIBoard  ) 
 

~CBGGUIBoard

Description: Class deconstructor

Limitations: NONE


Member Function Documentation

void CBGGUIBoard::AddChecker int32  number,
CBGPiece::COLOR  color
 

AddChecker.

Description: Adds a checker of specified color to a triangle or bar.

Parameters:
number is the location of the triangle or CBGMove::BAR in which the checker should be added the piece to.
color is the color of the piece to add.
Returns:
void
Limitations: NONE

void CBGGUIBoard::BuildBoard  )  [protected]
 

BuildBoard.

Description: Creates the board object and all the CBGPiece objects.

Returns:
void
Limitations: NONE

void CBGGUIBoard::ClearHighlight  ) 
 

ClearHighlight.

Description: Makes all the triangles and bars Unhighlighted.

Returns:
void
Limitations: NONE

void CBGGUIBoard::contentsMousePressEvent QMouseEvent *  event  )  [protected]
 

contentsMousePressEvent

Description: Traps a mouse click event so that we can see if the user clicked one of the grid sqaures.

Returns:
void
Limitations: NONE

void CBGGUIBoard::DestroyBoard  )  [protected]
 

DestroyBoard.

Description: Deletes the board and all its contents.

Returns:
void
Limitations: NONE

bool CBGGUIBoard::IsBarSelected CBGGUIPiece::COLOR  color  )  const [inline]
 

IsBarSelected.

Description: Returns true if the bar is selected.

Returns:
color is the color of the bar to poll.
Limitations: NONE

bool CBGGUIBoard::IsTriangleSelected uint32  number  )  const [inline]
 

IsTriangleSelected.

Description: Returns true if the triangle is currently selected.

Returns:
number is the location of the triangle to poll.
Limitations: NONE

void CBGGUIBoard::NewBoard  ) 
 

NewBoard.

Description: Resets all the game squares to the pre-game state.

Returns:
void
Limitations: NONE

void CBGGUIBoard::RemoveChecker int32  number,
CBGPiece::COLOR  color
 

RemoveChecker.

Description: Removes a checker of specified color to a triangle or bar.

Parameters:
number is the location of the triangle or CBGMove::BAR.
color is the color of the checker being removed.
Returns:
void
Limitations: NONE

void CBGGUIBoard::resizeEvent QResizeEvent *  event  )  [protected]
 

resizeEvent

Description: Handles the resize event to redraw the board to the correct size.

Returns:
void
Limitations: NONE

void CBGGUIBoard::SelectBar CBGGUIPiece::COLOR  color,
bool  select = true
 

SelectBar.

Description: Highlights/UnHighlights the specified bar.

Parameters:
color is the color of the bar.
select is true if the bar should be highlighted and false if the bar should be UnHighlighted.
Returns:
void
Limitations: NONE

void CBGGUIBoard::SelectTriangle uint32  number,
bool  select = true
 

SelectTriangle.

Description: Highlights/UnHighlights the specified triangle.

Parameters:
number is the location of the triangle.
select is true if the triangle should be highlighted and false if the triangle should be UnHighlighted.
Returns:
void
Limitations: NONE


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