#include <SIDlg.h>
Signals | |
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< Ship > | TShips |
typedef QList< Shot > | TShots |
typedef QList< Score > | TScoreList |
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 |
Classes | |
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... |
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.
typedef QList<Ship> GameWidget::TShips [private] |
typedef QList<Shot> GameWidget::TShots [private] |
typedef QList<Score> GameWidget::TScoreList [private] |
GameWidget::GameWidget | ( | QWidget * | parent | ) |
virtual GameWidget::~GameWidget | ( | ) | [inline, virtual] |
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] |
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] |
TShips GameWidget::m_ships [private] |
TShots GameWidget::m_shots [private] |
int GameWidget::m_gunX [private] |
int GameWidget::m_gunY [private] |
int GameWidget::m_shipXHeading [private] |
int GameWidget::m_shipYheading [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] |
bool GameWidget::m_bSoserEnabled [private] |
TScoreList GameWidget::m_scores [private] |