GameView Class Reference

The view object which shows the graphics in a Qt graphics view. More...

#include <gameview.h>

Collaboration diagram for GameView:

Collaboration graph
[legend]
List of all members.

Public Slots

void updateAndAdvance ()
 The update and advance for the canvas.

Signals

void signalLeftMousePress (QPoint point)
 Emit the signal on mouse clicks.

Public Member Functions

 GameView (QSize size, int advancePeriod, QGraphicsScene *scene, ThemeManager *theme, QWidget *parent=0)
 Constructor for the canvas view.

Protected Member Functions

void mousePressEvent (QMouseEvent *event)
 React to mouse clicks.
void resizeEvent (QResizeEvent *e)
 Will be called by the Qt View when its contents are resized.
void paintEvent (QPaintEvent *event)
 Paint function for the widget, temporary fix while we wait for QGV 4.3.

Detailed Description

The view object which shows the graphics in a Qt graphics view.

Definition at line 41 of file gameview.h.


Constructor & Destructor Documentation

GameView::GameView QSize  size,
int  advancePeriod,
QGraphicsScene *  scene,
ThemeManager theme,
QWidget *  parent = 0
 

Constructor for the canvas view.

Parameters:
size The canvas fixed size
advancePeriod The canvas advance period
scene The graphics scene
theme The theme manager
parent The parent window

Definition at line 39 of file gameview.cpp.

References ThemeManager::rescale(), and updateAndAdvance().

Here is the call graph for this function:


Member Function Documentation

void GameView::mousePressEvent QMouseEvent *  event  )  [protected]
 

React to mouse clicks.

Parameters:
event The mouse event

Definition at line 115 of file gameview.cpp.

References signalLeftMousePress().

void GameView::paintEvent QPaintEvent *  event  )  [protected]
 

Paint function for the widget, temporary fix while we wait for QGV 4.3.

Parameters:
event The paint event

Definition at line 106 of file gameview.cpp.

void GameView::resizeEvent QResizeEvent *  e  )  [protected]
 

Will be called by the Qt View when its contents are resized.

We adapt the canvas then.

Parameters:
e The resize event

Definition at line 85 of file gameview.cpp.

References ThemeManager::aspectRatio(), global_debug, and ThemeManager::rescale().

Here is the call graph for this function:

void GameView::signalLeftMousePress QPoint  point  )  [signal]
 

Emit the signal on mouse clicks.

Parameters:
point The mouse coordinate.

Referenced by mousePressEvent().

void GameView::updateAndAdvance  )  [slot]
 

The update and advance for the canvas.

This is called by a timer at regular intervals.

Definition at line 73 of file gameview.cpp.

Referenced by GameView().


The documentation for this class was generated from the following files:
Generated on Tue May 1 09:34:40 2007 for LSkat by  doxygen 1.4.6