CGLSurface Class Reference

#include <CGLSurface.h>

Inheritance diagram for CGLSurface:

CGLHistogram VStudioRenderer

List of all members.

Public Member Functions

 CGLSurface (QGLFormat &requestFormat, QWidget *parent=0)
 ~CGLSurface ()
void Update ()
void StartAnimate (int ms)
void EndAnimate ()
void EnableThread (bool tf)
void EnableOverlay (bool tf)
void registerInputHandler (TSmartPointer< IInputHandler > handler)
void unregisterInputHandler (TSmartPointer< IInputHandler > handler)
void lockGLContext ()
void unlockGLContext ()

Protected Member Functions

virtual void onInitialize ()
virtual void onResize ()
virtual void onDraw ()
virtual void onOverlayDraw (QPainter *painter)
virtual void onAnimate ()
virtual void onFinishRendering ()
virtual void onLOG (QString &)
virtual void onLOG (const char *)
virtual void enterEvent (QEvent *event)
virtual void leaveEvent (QEvent *event)
virtual void keyPressEvent (QKeyEvent *event)
virtual void keyReleaseEvent (QKeyEvent *event)
virtual void mouseMoveEvent (QMouseEvent *event)
virtual void mousePressEvent (QMouseEvent *event)
virtual void mouseReleaseEvent (QMouseEvent *event)
virtual void contextMenuEvent (QContextMenuEvent *event)

Protected Attributes

int oldPosX
int dx
int oldPosY
int dy
int viewportWidth
int viewportHeight

Private Member Functions

void Log (const char *txt)
void initRendering ()
void finishRendering ()
void Render ()
void resizeEvent (QResizeEvent *event)
void paintEvent (QPaintEvent *event)
void closeEvent (QCloseEvent *event)
void showEvent (QShowEvent *event)
void timerEvent (QTimerEvent *)

Private Attributes

Ui::CGLSurface ui
CGLRenderThread renderer
TSmartPointer< IInputHandlerpInputHandler
QMutex render_mutex
QWaitCondition render_condition
QPainter * pPainter
bool bRenderWithOverlay
bool useRenderThread
bool initialized
int timerID

Friends

class CGLRenderThread


Detailed Description

Definition at line 30 of file CGLSurface.h.


Constructor & Destructor Documentation

CGLSurface::CGLSurface ( QGLFormat &  requestFormat,
QWidget *  parent = 0 
)

Definition at line 27 of file CGLSurface.cpp.

References bRenderWithOverlay, initialized, pInputHandler, pPainter, ui, and useRenderThread.

CGLSurface::~CGLSurface (  ) 

Definition at line 42 of file CGLSurface.cpp.


Member Function Documentation

void CGLSurface::closeEvent ( QCloseEvent *  event  )  [private]

Definition at line 149 of file CGLSurface.cpp.

References finishRendering(), onFinishRendering(), and renderer.

void CGLSurface::contextMenuEvent ( QContextMenuEvent *  event  )  [protected, virtual]

Reimplemented in VStudioRenderer.

Definition at line 294 of file CGLSurface.cpp.

void CGLSurface::EnableOverlay ( bool  tf  ) 

void CGLSurface::EnableThread ( bool  tf  ) 

void CGLSurface::EndAnimate (  ) 

Definition at line 56 of file CGLSurface.cpp.

References timerID.

Referenced by VStudioRenderer::ShowPerformance().

void CGLSurface::enterEvent ( QEvent *  event  )  [protected, virtual]

Definition at line 269 of file CGLSurface.cpp.

void CGLSurface::finishRendering (  )  [private]

Definition at line 83 of file CGLSurface.cpp.

References render_condition, CGLRenderThread::render_flag, and renderer.

Referenced by closeEvent(), and EnableThread().

void CGLSurface::initRendering (  )  [private]

Definition at line 76 of file CGLSurface.cpp.

References render_condition, CGLRenderThread::render_flag, and renderer.

Referenced by EnableThread(), and paintEvent().

void CGLSurface::keyPressEvent ( QKeyEvent *  event  )  [protected, virtual]

Reimplemented in VStudioRenderer.

Definition at line 280 of file CGLSurface.cpp.

References pInputHandler.

void CGLSurface::keyReleaseEvent ( QKeyEvent *  event  )  [protected, virtual]

Reimplemented in VStudioRenderer.

Definition at line 287 of file CGLSurface.cpp.

References pInputHandler.

void CGLSurface::leaveEvent ( QEvent *  event  )  [protected, virtual]

Definition at line 275 of file CGLSurface.cpp.

void CGLSurface::lockGLContext (  ) 

void CGLSurface::Log ( const char *  txt  )  [inline, private]

Definition at line 99 of file CGLSurface.h.

References onLOG().

Referenced by EnableThread(), and paintEvent().

void CGLSurface::mouseMoveEvent ( QMouseEvent *  event  )  [protected, virtual]

Reimplemented in CGLHistogram.

Definition at line 298 of file CGLSurface.cpp.

References dx, dy, oldPosX, oldPosY, pInputHandler, and Render().

void CGLSurface::mousePressEvent ( QMouseEvent *  event  )  [protected, virtual]

Reimplemented in CGLHistogram.

Definition at line 314 of file CGLSurface.cpp.

References oldPosX, oldPosY, and pInputHandler.

void CGLSurface::mouseReleaseEvent ( QMouseEvent *  event  )  [protected, virtual]

Reimplemented in CGLHistogram.

Definition at line 327 of file CGLSurface.cpp.

References pInputHandler.

virtual void CGLSurface::onAnimate (  )  [inline, protected, virtual]

Reimplemented in VStudioRenderer.

Definition at line 71 of file CGLSurface.h.

Referenced by timerEvent().

void CGLSurface::onDraw (  )  [protected, virtual]

Reimplemented in CGLHistogram, and VStudioRenderer.

Definition at line 204 of file CGLSurface.cpp.

References viewportHeight, and viewportWidth.

Referenced by Render(), and CGLRenderThread::run().

void CGLSurface::onFinishRendering (  )  [protected, virtual]

Reimplemented in VStudioRenderer.

Definition at line 261 of file CGLSurface.cpp.

Referenced by closeEvent(), and CGLRenderThread::run().

void CGLSurface::onInitialize (  )  [protected, virtual]

Reimplemented in VStudioRenderer.

Definition at line 192 of file CGLSurface.cpp.

Referenced by EnableOverlay(), paintEvent(), and CGLRenderThread::run().

virtual void CGLSurface::onLOG ( const char *   )  [inline, protected, virtual]

Reimplemented in CGLHistogram, and VStudioRenderer.

Definition at line 76 of file CGLSurface.h.

virtual void CGLSurface::onLOG ( QString &   )  [inline, protected, virtual]

Reimplemented in CGLHistogram, and VStudioRenderer.

Definition at line 75 of file CGLSurface.h.

Referenced by Log().

virtual void CGLSurface::onOverlayDraw ( QPainter *  painter  )  [inline, protected, virtual]

Reimplemented in VStudioRenderer.

Definition at line 70 of file CGLSurface.h.

Referenced by Render(), and CGLRenderThread::run().

void CGLSurface::onResize (  )  [protected, virtual]

Reimplemented in VStudioRenderer.

Definition at line 198 of file CGLSurface.cpp.

References viewportHeight, and viewportWidth.

Referenced by paintEvent(), resizeEvent(), and CGLRenderThread::run().

void CGLSurface::paintEvent ( QPaintEvent *  event  )  [private]

void CGLSurface::registerInputHandler ( TSmartPointer< IInputHandler handler  ) 

void CGLSurface::Render (  )  [private]

void CGLSurface::resizeEvent ( QResizeEvent *  event  )  [private]

void CGLSurface::showEvent ( QShowEvent *  event  )  [private]

Definition at line 110 of file CGLSurface.cpp.

void CGLSurface::StartAnimate ( int  ms  ) 

Definition at line 55 of file CGLSurface.cpp.

References timerID.

Referenced by VStudioRenderer::ShowPerformance().

void CGLSurface::timerEvent ( QTimerEvent *   )  [inline, private]

Definition at line 113 of file CGLSurface.h.

References onAnimate().

void CGLSurface::unlockGLContext (  ) 

void CGLSurface::unregisterInputHandler ( TSmartPointer< IInputHandler handler  ) 

Definition at line 50 of file CGLSurface.cpp.

References pInputHandler.

void CGLSurface::Update (  )  [inline]


Friends And Related Function Documentation

friend class CGLRenderThread [friend]

Definition at line 34 of file CGLSurface.h.


Member Data Documentation

Definition at line 133 of file CGLSurface.h.

Referenced by CGLSurface(), EnableOverlay(), Render(), and CGLRenderThread::run().

int CGLSurface::dx [protected]

Definition at line 79 of file CGLSurface.h.

Referenced by mouseMoveEvent(), and CGLHistogram::mouseMoveEvent().

int CGLSurface::dy [protected]

Definition at line 79 of file CGLSurface.h.

Referenced by mouseMoveEvent(), and CGLHistogram::mouseMoveEvent().

bool CGLSurface::initialized [private]

Definition at line 137 of file CGLSurface.h.

Referenced by CGLSurface(), EnableThread(), paintEvent(), resizeEvent(), and CGLRenderThread::run().

int CGLSurface::oldPosX [protected]

int CGLSurface::oldPosY [protected]

QPainter* CGLSurface::pPainter [private]

Definition at line 132 of file CGLSurface.h.

Referenced by CGLSurface(), Render(), and CGLRenderThread::run().

QWaitCondition CGLSurface::render_condition [private]

Definition at line 129 of file CGLSurface.h.

Referenced by finishRendering(), initRendering(), Render(), and CGLRenderThread::run().

QMutex CGLSurface::render_mutex [private]

Definition at line 128 of file CGLSurface.h.

Referenced by lockGLContext(), CGLRenderThread::run(), and unlockGLContext().

int CGLSurface::timerID [private]

Definition at line 138 of file CGLSurface.h.

Referenced by EndAnimate(), and StartAnimate().

Ui::CGLSurface CGLSurface::ui [private]

Definition at line 121 of file CGLSurface.h.

Referenced by CGLSurface().

Definition at line 136 of file CGLSurface.h.

Referenced by CGLSurface(), EnableOverlay(), EnableThread(), paintEvent(), and resizeEvent().

int CGLSurface::viewportHeight [protected]

int CGLSurface::viewportWidth [protected]


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

Generated on Wed Dec 10 03:22:18 2008 for VStudio by  doxygen 1.5.7.1