GameWidget Class Reference

GameWidget impelents the easter egg game functionality. More...

#include <SIDlg.h>

List of all members.


void levelChanged (int level)
void scoreChanged (int score)
void livesChanged (int lives)

Public Member Functions

 GameWidget (QWidget *parent)
virtual ~GameWidget ()

Protected Member Functions

virtual void paintEvent (QPaintEvent *e)
virtual void mouseMoveEvent (QMouseEvent *e)
virtual void mousePressEvent (QMouseEvent *e)
virtual void resizeEvent (QResizeEvent *e)

Private Types

typedef QList< ShipTShips
typedef QList< ShotTShots
typedef QList< ScoreTScoreList

Private Slots

void shotTimeout ()
void shipTimeout ()
void soserShowTimeout ()
void soserMoveTimeout ()
void levelFinTimeout ()

Private Member Functions

void die ()
void initLevel (int level)
void stopSoser ()
void endGame ()
void loadScores ()
void loadDefaultScores ()
void saveScores ()

Private Attributes

QTimer * m_shottimer
QTimer * m_shiptimer
QTimer * m_soserShowTimer
QTimer * m_soserMoveTimer
QTimer * m_levelFinTimer
TShips m_ships
TShots m_shots
int m_gunX
int m_gunY
int m_shipXHeading
int m_shipYheading
int sizeX
int sizeY
QPixmap m_soser
QRegion m_soserMask
bool m_bShowSoser
int m_soserX
QRegion m_shotspreg
int m_level
int m_score
int m_lives
float m_shipTimeInt
bool m_bInteract
bool m_bSoserEnabled
TScoreList m_scores


struct  Score
 Score is a single entity with a name and a score. More...
struct  Ship
 Ship represents a single space invader. More...
struct  Shot
 Shot represents a single shot shot from the gun. More...

Detailed Description

GameWidget impelents the easter egg game functionality.

The game has a single gun ship at the bottom of the screen and multiple ships in a pattern above it. from time to time a soser (Saucer) hovers above it all.

Member Typedef Documentation

typedef QList<Ship> GameWidget::TShips [private]

typedef QList<Shot> GameWidget::TShots [private]

typedef QList<Score> GameWidget::TScoreList [private]

Constructor & Destructor Documentation

GameWidget::GameWidget ( QWidget *  parent  ) 

virtual GameWidget::~GameWidget (  )  [inline, virtual]

Member Function Documentation

void GameWidget::paintEvent ( QPaintEvent *  e  )  [protected, virtual]

void GameWidget::mouseMoveEvent ( QMouseEvent *  e  )  [protected, virtual]

void GameWidget::mousePressEvent ( QMouseEvent *  e  )  [protected, virtual]

void GameWidget::resizeEvent ( QResizeEvent *  e  )  [protected, virtual]

void GameWidget::shotTimeout (  )  [private, slot]

void GameWidget::shipTimeout (  )  [private, slot]

void GameWidget::soserShowTimeout (  )  [private, slot]

void GameWidget::soserMoveTimeout (  )  [private, slot]

void GameWidget::levelFinTimeout (  )  [private, slot]

void GameWidget::levelChanged ( int  level  )  [signal]

void GameWidget::scoreChanged ( int  score  )  [signal]

void GameWidget::livesChanged ( int  lives  )  [signal]

void GameWidget::die (  )  [private]

void GameWidget::initLevel ( int  level  )  [private]

void GameWidget::stopSoser (  )  [private]

void GameWidget::endGame (  )  [private]

void GameWidget::loadScores (  )  [private]

void GameWidget::loadDefaultScores (  )  [private]

void GameWidget::saveScores (  )  [private]

Member Data Documentation

QTimer* GameWidget::m_shottimer [private]

QTimer* GameWidget::m_shiptimer [private]

QTimer* GameWidget::m_soserShowTimer [private]

QTimer* GameWidget::m_soserMoveTimer [private]

QTimer* GameWidget::m_levelFinTimer [private]

int GameWidget::m_gunX [private]

int GameWidget::m_gunY [private]

int GameWidget::sizeX [private]

int GameWidget::sizeY [private]

QPixmap GameWidget::m_soser [private]

QRegion GameWidget::m_soserMask [private]

bool GameWidget::m_bShowSoser [private]

int GameWidget::m_soserX [private]

QRegion GameWidget::m_shotspreg [private]

int GameWidget::m_level [private]

int GameWidget::m_score [private]

int GameWidget::m_lives [private]

float GameWidget::m_shipTimeInt [private]

bool GameWidget::m_bInteract [private]

The documentation for this class was generated from the following files: