GUI::RenderWindow Class Reference

Render window class. Makes interconnection between Qt and OI. More...

#include <render_window.h>

List of all members.

Public Member Functions

 RenderWindow (GameConfiguration gameConfig, QWidget *parent=0, const char *name=0)
 Default constructor.
 ~RenderWindow ()
 Destructor.
void keyPressEvent (QKeyEvent *e)
 Qt key press function.
void mouseMoveEvent (QMouseEvent *e)
 Qt mouse move function.
void mousePressEvent (QMouseEvent *e)
 Qt mouse press function.
void focusInEvent (QFocusEvent *e)
 Qt in focus function.
void focusOutEvent (QFocusEvent *e)
 Qt out focus function.

Static Public Member Functions

static void successGameEndCallback ()
 Function that should be called on successfull game end.
static void failedGameEndCallback ()
 Function that should be called on failed game end.
static void sceneSensorCallback (void *userdata, SoSensor *sensor)
 Function which is called by sensor from Open Inventor.
static void mouseEventCallback (void *userdata, SoEventCallback *node)
 Function which is called by mouse motion.
static void mouseButtonEventCallback (void *userdata, SoEventCallback *node)
 Function which is called by mouse click.

Private Attributes

SoSeparator * _sceneRoot
 The root of the generated scene.
SoOneShotSensor * _sceneSensor
 Scene sensor aka scene alarm. Calls sceneSensorCallback.
SoQtRenderArea * _renderArea
 Qt render area.

Static Private Attributes

static MainWindowmainWindow
 Widget parent (it has to be a MainWindow instance).
static SoEventCallback * eventCallback
 Call back functions (mouse move, mouse click, keyboard click).
static bool stopped
 True if game is stopped.
static Cameracamera
 Camera.
static Scenescene
 Scene.
static SbTime lastTime
 The last time, when sceneSensorCallback was triggered.
static short oldx
 Old x coordinate.
static short oldy
 Old y coordinate.
static bool failedGameEnd
 If true, user failed the game.
static bool successGameEnd
 If true, user won the game.
static bool haveFocus
 Do we have focus?


Detailed Description

Render window class. Makes interconnection between Qt and OI.

This class acts like connection layer between Qt application and scene, which is created in Open Inventor.


Constructor & Destructor Documentation

GUI::RenderWindow::RenderWindow ( GameConfiguration  gameConfig,
QWidget *  parent = 0,
const char *  name = 0 
)

Default constructor.

Parameters:
[in] gameConfig Game configuration values.
[in] parent QWidget parent.
[in] name QWidget name.

GUI::RenderWindow::~RenderWindow (  ) 

Destructor.


Member Function Documentation

static void GUI::RenderWindow::successGameEndCallback (  )  [static]

Function that should be called on successfull game end.

static void GUI::RenderWindow::failedGameEndCallback (  )  [static]

Function that should be called on failed game end.

static void GUI::RenderWindow::sceneSensorCallback ( void *  userdata,
SoSensor *  sensor 
) [static]

Function which is called by sensor from Open Inventor.

Parameters:
[in] userdata Not used.
[in] sensor Sensor pointer. Used to schedule itself.

static void GUI::RenderWindow::mouseEventCallback ( void *  userdata,
SoEventCallback *  node 
) [static]

Function which is called by mouse motion.

Parameters:
[in] userdata Not used.
[in] node Event node pointer. Used to determine mouse position.

static void GUI::RenderWindow::mouseButtonEventCallback ( void *  userdata,
SoEventCallback *  node 
) [static]

Function which is called by mouse click.

Parameters:
[in] userdata Not used.
[in] node Event node pointer. Used to determine mouse click.

void GUI::RenderWindow::keyPressEvent ( QKeyEvent *  e  ) 

Qt key press function.

Parameters:
[in] e Event.

void GUI::RenderWindow::mouseMoveEvent ( QMouseEvent *  e  ) 

Qt mouse move function.

Parameters:
[in] e Event.

void GUI::RenderWindow::mousePressEvent ( QMouseEvent *  e  ) 

Qt mouse press function.

Parameters:
[in] e Event.

void GUI::RenderWindow::focusInEvent ( QFocusEvent *  e  ) 

Qt in focus function.

Parameters:
[in] e Event.

void GUI::RenderWindow::focusOutEvent ( QFocusEvent *  e  ) 

Qt out focus function.

Parameters:
[in] e Event.


Member Data Documentation

SoSeparator* GUI::RenderWindow::_sceneRoot [private]

The root of the generated scene.

SoOneShotSensor* GUI::RenderWindow::_sceneSensor [private]

Scene sensor aka scene alarm. Calls sceneSensorCallback.

SoQtRenderArea* GUI::RenderWindow::_renderArea [private]

Qt render area.

Widget parent (it has to be a MainWindow instance).

SoEventCallback* GUI::RenderWindow::eventCallback [static, private]

Call back functions (mouse move, mouse click, keyboard click).

bool GUI::RenderWindow::stopped [static, private]

True if game is stopped.

Camera* GUI::RenderWindow::camera [static, private]

Scene* GUI::RenderWindow::scene [static, private]

SbTime GUI::RenderWindow::lastTime [static, private]

The last time, when sceneSensorCallback was triggered.

short GUI::RenderWindow::oldx [static, private]

Old x coordinate.

short GUI::RenderWindow::oldy [static, private]

Old y coordinate.

bool GUI::RenderWindow::failedGameEnd [static, private]

If true, user failed the game.

bool GUI::RenderWindow::successGameEnd [static, private]

If true, user won the game.

bool GUI::RenderWindow::haveFocus [static, private]

Do we have focus?


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

Generated on Sat Dec 20 19:21:24 2008 for PGR2008 by  doxygen 1.5.6