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

Rack Class Reference

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

Collaboration diagram for Rack:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Rack (int ntiles, QWidget *parent)
 ~Rack ()
void readConfig (Config &)
void writeConfig (Config &)
bool isFull () const
int max () const
int count () const
void addTile (const Tile &t)
Tile tile (int i) const
const TiletileRef (int i) const
void remove (int i)
void remove (Tile)
bool arrangeTiles (const Tile **s, int sn)
void setBlanks (const Tile *)
void setPlayerName (const QString &name)
QString playerName () const
void setComputerization (int level)
bool computerized () const
QSize sizeHint () const

Protected Member Functions

void resizeEvent (QResizeEvent *e)
void contentsMousePressEvent (QMouseEvent *)
void contentsMouseMoveEvent (QMouseEvent *)
void contentsMouseReleaseEvent (QMouseEvent *)

Private Member Functions

void clear ()
void layoutTiles ()

Private Attributes

int n
QArray< TileItem * > item
int dragging_adj
QPoint dragstart
QCanvasItem * dragging
QString nm
int cpu

Constructor & Destructor Documentation

Rack::Rack int  ntiles,
QWidget *  parent
 

Definition at line 1199 of file wordgame.cpp.

References dragging, height, i, item, n, and sizeHint().

Rack::~Rack  ) 
 

Definition at line 1215 of file wordgame.cpp.

References clear().


Member Function Documentation

void Rack::addTile const Tile t  ) 
 

Definition at line 1314 of file wordgame.cpp.

References i, item, layoutTiles(), n, and TRUE.

Referenced by WordGame::refillRack().

bool Rack::arrangeTiles const Tile **  s,
int  sn
 

Definition at line 1292 of file wordgame.cpp.

References f, FALSE, i, item, layoutTiles(), n, and TRUE.

Referenced by ComputerPlayer::step().

void Rack::clear  )  [private]
 

Definition at line 1226 of file wordgame.cpp.

References i, item, and n.

Referenced by readConfig(), and ~Rack().

bool Rack::computerized  )  const [inline]
 

Definition at line 149 of file wordgame.h.

References cpu.

Referenced by Board::checkTurn(), contentsMouseMoveEvent(), Board::contentsMouseMoveEvent(), contentsMousePressEvent(), and contentsMouseReleaseEvent().

void Rack::contentsMouseMoveEvent QMouseEvent *   )  [protected]
 

Definition at line 1359 of file wordgame.cpp.

References TileItem::bigWidth(), computerized(), dragging, dragging_adj, dragstart, and layoutTiles().

void Rack::contentsMousePressEvent QMouseEvent *   )  [protected]
 

Definition at line 1346 of file wordgame.cpp.

References computerized(), dragging, dragstart, and list.

void Rack::contentsMouseReleaseEvent QMouseEvent *   )  [protected]
 

Definition at line 1373 of file wordgame.cpp.

References computerized(), dragging, and layoutTiles().

int Rack::count  )  const [inline]
 

Definition at line 137 of file wordgame.h.

References n.

Referenced by Board::checkTurn(), WordGame::endGame(), ComputerPlayer::findBest(), isFull(), WordGame::refillRack(), and Board::scoreTurn().

bool Rack::isFull  )  const [inline]
 

Definition at line 135 of file wordgame.h.

References count(), and max().

Referenced by WordGame::refillRack().

void Rack::layoutTiles  )  [private]
 

Definition at line 1262 of file wordgame.cpp.

References TileItem::bigWidth(), cmp_tileitem(), dragging, dragging_adj, i, item, and n.

Referenced by addTile(), arrangeTiles(), contentsMouseMoveEvent(), contentsMouseReleaseEvent(), readConfig(), and remove().

int Rack::max  )  const [inline]
 

Definition at line 136 of file wordgame.h.

References item.

Referenced by isFull().

QString Rack::playerName  )  const [inline]
 

Definition at line 147 of file wordgame.h.

References nm.

void Rack::readConfig Config  ) 
 

Definition at line 1241 of file wordgame.cpp.

References QValueList< T >::begin(), clear(), QValueList< T >::end(), i, item, l, layoutTiles(), n, Config::readListEntry(), TRUE, and Opie::MM::x.

void Rack::remove Tile   ) 
 

Definition at line 1322 of file wordgame.cpp.

References i, item, n, remove(), and tile().

void Rack::remove int  i  ) 
 

Definition at line 1331 of file wordgame.cpp.

References item, layoutTiles(), and n.

Referenced by Board::finalizeTurn(), and remove().

void Rack::resizeEvent QResizeEvent *  e  )  [protected]
 

Definition at line 1340 of file wordgame.cpp.

References height, and width.

void Rack::setBlanks const Tile  ) 
 

Definition at line 1280 of file wordgame.cpp.

References Tile::isBlank(), item, n, Tile::setText(), and Tile::text().

Referenced by ComputerPlayer::step().

void Rack::setComputerization int  level  )  [inline]
 

Definition at line 148 of file wordgame.h.

References cpu.

Referenced by WordGame::addPlayer().

void Rack::setPlayerName const QString name  )  [inline]
 

Definition at line 146 of file wordgame.h.

References nm.

Referenced by WordGame::addPlayer().

QSize Rack::sizeHint  )  const
 

Definition at line 1221 of file wordgame.cpp.

References TileItem::bigHeight().

Referenced by Rack().

Tile Rack::tile int  i  )  const [inline]
 

Definition at line 139 of file wordgame.h.

References item.

Referenced by remove(), Board::showTurn(), and writeConfig().

const Tile* Rack::tileRef int  i  )  const [inline]
 

Definition at line 140 of file wordgame.h.

References item.

Referenced by Board::checkTurn(), WordGame::endGame(), ComputerPlayer::findBest(), Board::scoreTurn(), and ComputerPlayer::step().

void Rack::writeConfig Config  ) 
 

Definition at line 1233 of file wordgame.cpp.

References QValueList< T >::append(), i, l, n, tile(), and Config::writeEntry().


Member Data Documentation

int Rack::cpu [private]
 

Definition at line 168 of file wordgame.h.

Referenced by computerized(), and setComputerization().

QCanvasItem* Rack::dragging [private]
 

Definition at line 166 of file wordgame.h.

Referenced by contentsMouseMoveEvent(), contentsMousePressEvent(), contentsMouseReleaseEvent(), layoutTiles(), and Rack().

int Rack::dragging_adj [private]
 

Definition at line 164 of file wordgame.h.

Referenced by contentsMouseMoveEvent(), and layoutTiles().

QPoint Rack::dragstart [private]
 

Definition at line 165 of file wordgame.h.

Referenced by contentsMouseMoveEvent(), and contentsMousePressEvent().

QArray<TileItem*> Rack::item [private]
 

Definition at line 163 of file wordgame.h.

Referenced by addTile(), arrangeTiles(), clear(), layoutTiles(), max(), Rack(), readConfig(), remove(), setBlanks(), tile(), and tileRef().

int Rack::n [private]
 

Definition at line 162 of file wordgame.h.

Referenced by addTile(), arrangeTiles(), clear(), count(), layoutTiles(), Rack(), readConfig(), remove(), setBlanks(), and writeConfig().

QString Rack::nm [private]
 

Definition at line 167 of file wordgame.h.

Referenced by playerName(), and setPlayerName().


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