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

KLines Class Reference

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

Collaboration diagram for KLines:

Collaboration graph
[legend]
List of all members.

Public Slots

void startGame ()
void stopGame ()
void makeTurn ()
void addScore (int ballsErased)
void switchPrompt ()
void help ()
void undo ()

Public Member Functions

 KLines (QWidget *parent, const char *name, WFlags f)
 ~KLines ()

Static Public Member Functions

static QString appName ()

Protected Member Functions

void resizeEvent (QResizeEvent *)

Private Slots

void setMinSize ()

Private Member Functions

void searchBallsLine ()
void generateRandomBalls ()
void placeBalls ()
void updateStat ()
void endGame ()
void switchUndo (bool bu)

Private Attributes

QMenuBar * menu
int idMenuPrompt
int idMenuUndo
QPopupMenu * game
QPopupMenu * edit
QToolBar * tool
QStatusBar * stat
LinesBoardlsb
MainWidgetmwidget
LinesPromptlPrompt
int score
int prev_score
int nextBalls [BALLSDROP]
int nextBalls_undo [BALLSDROP]
int nextBalls_redo [BALLSDROP]
bool bUndo

Constructor & Destructor Documentation

KLines::KLines QWidget *  parent,
const char *  name,
WFlags  f
 

Definition at line 40 of file klines.cpp.

References edit, game, MainWidget::GetLsb(), MainWidget::GetPrompt(), LinesPrompt::getState(), idMenuPrompt, idMenuUndo, Key_N, Key_P, Key_Q, Key_Z, lPrompt, lsb, makeTurn(), mwidget, prev_score, qApp, score, MainWidget::setMessage(), startGame(), stopGame(), switchPrompt(), t, tr, and undo().

KLines::~KLines  ) 
 

Definition at line 87 of file klines.cpp.


Member Function Documentation

void KLines::addScore int  ballsErased  )  [slot]
 

Definition at line 170 of file klines.cpp.

References LinesPrompt::getState(), lPrompt, score, and updateStat().

static QString KLines::appName  )  [inline, static]
 

Definition at line 39 of file klines.h.

References QString::fromLatin1().

void KLines::endGame  )  [private]
 

Definition at line 183 of file klines.cpp.

References startGame().

Referenced by stopGame().

void KLines::generateRandomBalls  )  [private]
 

Definition at line 129 of file klines.cpp.

References BALLSDROP, bUndo, i, lPrompt, NCOLORS, nextBalls, nextBalls_redo, nextBalls_undo, and LinesPrompt::SetBalls().

Referenced by makeTurn(), and startGame().

void KLines::help  )  [slot]
 

Definition at line 200 of file klines.cpp.

void KLines::makeTurn  )  [slot]
 

Definition at line 163 of file klines.cpp.

References generateRandomBalls(), placeBalls(), switchUndo(), and TRUE.

Referenced by KLines().

void KLines::placeBalls  )  [private]
 

Definition at line 142 of file klines.cpp.

References debug, lsb, nextBalls, and LinesBoard::placeBalls().

Referenced by makeTurn(), and startGame().

void KLines::resizeEvent QResizeEvent *   )  [protected]
 

Definition at line 95 of file klines.cpp.

void KLines::searchBallsLine  )  [private]
 

Definition at line 125 of file klines.cpp.

void KLines::setMinSize  )  [private, slot]
 

Definition at line 100 of file klines.cpp.

void KLines::startGame  )  [slot]
 

Definition at line 106 of file klines.cpp.

References bUndo, Field::clearField(), edit, FALSE, generateRandomBalls(), idMenuUndo, lsb, placeBalls(), prev_score, score, TRUE, and updateStat().

Referenced by endGame(), and KLines().

void KLines::stopGame  )  [slot]
 

Definition at line 119 of file klines.cpp.

References debug, and endGame().

Referenced by KLines().

void KLines::switchPrompt  )  [slot]
 

Definition at line 188 of file klines.cpp.

References game, LinesPrompt::getState(), idMenuPrompt, lPrompt, and LinesPrompt::setPrompt().

Referenced by KLines().

void KLines::switchUndo bool  bu  )  [private]
 

Definition at line 194 of file klines.cpp.

References bUndo, edit, and idMenuUndo.

Referenced by makeTurn(), and undo().

void KLines::undo  )  [slot]
 

Definition at line 148 of file klines.cpp.

References BALLSDROP, bUndo, debug, FALSE, i, lPrompt, lsb, nextBalls, nextBalls_redo, nextBalls_undo, LinesPrompt::SetBalls(), switchUndo(), and LinesBoard::undo().

Referenced by KLines().

void KLines::updateStat  )  [private]
 

Definition at line 178 of file klines.cpp.

References mwidget, score, MainWidget::setMessage(), and tr.

Referenced by addScore(), and startGame().


Member Data Documentation

bool KLines::bUndo [private]
 

Definition at line 76 of file klines.h.

Referenced by generateRandomBalls(), startGame(), switchUndo(), and undo().

QPopupMenu* KLines::edit [private]
 

Definition at line 64 of file klines.h.

Referenced by KLines(), startGame(), and switchUndo().

QPopupMenu* KLines::game [private]
 

Definition at line 63 of file klines.h.

Referenced by KLines(), and switchPrompt().

int KLines::idMenuPrompt [private]
 

Definition at line 60 of file klines.h.

Referenced by KLines(), and switchPrompt().

int KLines::idMenuUndo [private]
 

Definition at line 61 of file klines.h.

Referenced by KLines(), startGame(), and switchUndo().

LinesPrompt* KLines::lPrompt [private]
 

Definition at line 69 of file klines.h.

Referenced by addScore(), generateRandomBalls(), KLines(), switchPrompt(), and undo().

LinesBoard* KLines::lsb [private]
 

Definition at line 67 of file klines.h.

Referenced by KLines(), placeBalls(), startGame(), and undo().

QMenuBar* KLines::menu [private]
 

Definition at line 59 of file klines.h.

MainWidget* KLines::mwidget [private]
 

Definition at line 68 of file klines.h.

Referenced by KLines(), and updateStat().

int KLines::nextBalls[BALLSDROP] [private]
 

Definition at line 73 of file klines.h.

Referenced by generateRandomBalls(), placeBalls(), and undo().

int KLines::nextBalls_redo[BALLSDROP] [private]
 

Definition at line 75 of file klines.h.

Referenced by generateRandomBalls(), and undo().

int KLines::nextBalls_undo[BALLSDROP] [private]
 

Definition at line 74 of file klines.h.

Referenced by generateRandomBalls(), and undo().

int KLines::prev_score [private]
 

Definition at line 71 of file klines.h.

Referenced by KLines(), and startGame().

int KLines::score [private]
 

Definition at line 71 of file klines.h.

Referenced by addScore(), KLines(), startGame(), and updateStat().

QStatusBar* KLines::stat [private]
 

Definition at line 66 of file klines.h.

QToolBar* KLines::tool [private]
 

Definition at line 65 of file klines.h.


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