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

UI Class Reference

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

Collaboration diagram for UI:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ~UI ()
void restart_timer ()
void kill_timer ()
void initialize (int *argc, char **argv)
void make_mainwin ()
void make_windows ()
void popup_dialog (int dialog)
void set_cursor (int cursor)
void load_cursors ()
void graph_init ()
void clear ()
void refresh ()
void draw (Picture picture, int x, int y)
void draw_centered (Picture picture)
void draw_line (int x1, int y1, int x2, int y2)
void draw_str (char *str, int x, int y)
void set_pausebutton (int action)
int MainLoop ()
void update_scorebox (int level, int score)
void update_hsbox (char *str)

Private Attributes

MCursor defaultcursor
MCursor downcursor
QPEApplicationapp
QTimer * timer
Fieldfield
KBillmain
QPixmap * pix
QPainter paint
QString scorestr
QString highscorestr

Constructor & Destructor Documentation

UI::~UI  ) 
 

Definition at line 30 of file UI.cpp.

References paint, and pix.


Member Function Documentation

void UI::clear  ) 
 

Definition at line 125 of file UI.cpp.

References field, and paint.

Referenced by Game::main(), and Game::update().

void UI::draw Picture  picture,
int  x,
int  y
 

Definition at line 135 of file UI.cpp.

References paint.

Referenced by Computer::draw(), Cable::draw(), Bucket::draw(), Monster::draw_at(), draw_centered(), Monster::draw_std(), and Monster::draw_stray().

void UI::draw_centered Picture  picture  ) 
 

Definition at line 139 of file UI.cpp.

References draw(), field, Picture::height, and Picture::width.

Referenced by Game::main(), and Game::update().

void UI::draw_line int  x1,
int  y1,
int  x2,
int  y2
 

Definition at line 143 of file UI.cpp.

References paint.

Referenced by Cable::draw().

void UI::draw_str char *  str,
int  x,
int  y
 

Definition at line 148 of file UI.cpp.

References paint.

Referenced by Game::update_info().

void UI::graph_init  ) 
 

Definition at line 54 of file UI.cpp.

References Qt::black, field, paint, pix, Game::scrheight, and Game::scrwidth.

Referenced by Game::main().

void UI::initialize int *  argc,
char **  argv
 

Definition at line 47 of file UI.cpp.

References app.

Referenced by Game::main().

void UI::kill_timer  ) 
 

Definition at line 39 of file UI.cpp.

References field, and Field::stopTimer().

Referenced by popup_dialog(), and Game::update().

void UI::load_cursors  ) 
 

Definition at line 119 of file UI.cpp.

References MCursor::cursor, defaultcursor, downcursor, field, MCursor::load(), and MCursor::SEP_MASK.

Referenced by Game::main().

int UI::MainLoop  ) 
 

Definition at line 162 of file UI.cpp.

References app, and QPEApplication::exec().

Referenced by Game::main().

void UI::make_mainwin  ) 
 

Definition at line 60 of file UI.cpp.

References app, field, KBill::getField(), main, and QPEApplication::showMainWidget().

Referenced by Game::main().

void UI::make_windows  )  [inline]
 

Definition at line 40 of file UI.h.

Referenced by Game::main().

void UI::popup_dialog int  dialog  ) 
 

Definition at line 67 of file UI.cpp.

References Game::ENDGAME, endgamestr, Game::ENTERNAME, enternamestr, InputBox::getText(), Game::HIGHSCORE, kill_timer(), main, message, restart_timer(), Game::SCORE, scorestr, and str.

Referenced by Game::update().

void UI::refresh  ) 
 

Definition at line 129 of file UI.cpp.

References FALSE, field, paint, pix, and Field::setPixmap().

Referenced by Game::main(), and Game::update().

void UI::restart_timer  ) 
 

Definition at line 35 of file UI.cpp.

References field, and Field::startTimer().

Referenced by popup_dialog(), and Game::start().

void UI::set_cursor int  cursor  ) 
 

Definition at line 101 of file UI.cpp.

References bucket, Game::BUCKETC, Library::cursor, MCursor::cursor, Bucket::cursor, Game::DEFAULTC, defaultcursor, Game::DOWNC, downcursor, field, and OS.

Referenced by Game::button_press(), Game::button_release(), and Game::setup_level().

void UI::set_pausebutton int  action  ) 
 

Definition at line 157 of file UI.cpp.

References KBill::file, main, and KBill::pauseid.

Referenced by Game::main(), Game::start(), and Game::update().

void UI::update_hsbox char *  str  ) 
 

Definition at line 166 of file UI.cpp.

References highscorestr.

void UI::update_scorebox int  level,
int  score
 

Definition at line 170 of file UI.cpp.

References scorestr, and QString::sprintf().

Referenced by Game::update().


Member Data Documentation

QPEApplication* UI::app [private]
 

Definition at line 61 of file UI.h.

Referenced by initialize(), MainLoop(), and make_mainwin().

MCursor UI::defaultcursor [private]
 

Definition at line 59 of file UI.h.

Referenced by load_cursors(), and set_cursor().

MCursor UI::downcursor [private]
 

Definition at line 59 of file UI.h.

Referenced by load_cursors(), and set_cursor().

Field* UI::field [private]
 

Definition at line 64 of file UI.h.

Referenced by clear(), draw_centered(), graph_init(), kill_timer(), load_cursors(), make_mainwin(), refresh(), restart_timer(), and set_cursor().

QString UI::highscorestr [private]
 

Definition at line 70 of file UI.h.

Referenced by update_hsbox().

KBill* UI::main [private]
 

Definition at line 65 of file UI.h.

Referenced by make_mainwin(), popup_dialog(), and set_pausebutton().

QPainter UI::paint [private]
 

Definition at line 68 of file UI.h.

Referenced by clear(), draw(), draw_line(), draw_str(), graph_init(), refresh(), and ~UI().

QPixmap* UI::pix [private]
 

Definition at line 67 of file UI.h.

Referenced by graph_init(), refresh(), and ~UI().

QString UI::scorestr [private]
 

Definition at line 70 of file UI.h.

Referenced by popup_dialog(), and update_scorebox().

QTimer* UI::timer [private]
 

Definition at line 62 of file UI.h.


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