QBackgroundCanvas Class Reference

#include <QBackgroundCanvas.h>

List of all members.

Public Member Functions

 QBackgroundCanvas (QWidget *parent=0)
virtual ~QBackgroundCanvas ()
void setObjectName (const QString &name)
void setVolBackColorPtr (VVector *v)
virtual void resizeGL (int w, int h)
virtual void paintEvent (QPaintEvent *e)
virtual void mousePressEvent (QMouseEvent *e)
virtual void mouseReleaseEvent (QMouseEvent *e)
virtual void mouseMoveEvent (QMouseEvent *e)
virtual void mouseDoubleClickEvent (QMouseEvent *e)
virtual void keyPressEvent (QKeyEvent *e)
virtual void keyReleaseEvent (QKeyEvent *e)
const VMouseEvent getMouseEvent (QMouseEvent *e)
const VKeyboardEvent getKeyboardEvent (QKeyEvent *e)
virtual void redraw ()

Protected Member Functions

virtual void initializeGL ()
virtual void paintGL ()

Private Attributes

VVector m_CanvasColor
VVectorm_VolCanvasColor


Detailed Description

class for rendering the color of the background, when clicked it provides the user with a color picker dialog

Definition at line 18 of file QBackgroundCanvas.h.


Constructor & Destructor Documentation

QBackgroundCanvas::QBackgroundCanvas ( QWidget *  parent = 0  ) 

constructor with given QWidget Pointer

Definition at line 6 of file QBackgroundCanvas.cpp.

References m_CanvasColor, VVector::setX(), VVector::setY(), and VVector::setZ().

QBackgroundCanvas::~QBackgroundCanvas (  )  [virtual]

default destructor

Definition at line 16 of file QBackgroundCanvas.cpp.


Member Function Documentation

void QBackgroundCanvas::initializeGL (  )  [protected, virtual]

method to initialize opengl

Definition at line 34 of file QBackgroundCanvas.cpp.

References VVector::getX(), VVector::getY(), VVector::getZ(), and m_CanvasColor.

void QBackgroundCanvas::paintGL (  )  [protected, virtual]

method for repainting. called in every refresh

Definition at line 54 of file QBackgroundCanvas.cpp.

References VVector::getX(), VVector::getY(), VVector::getZ(), and m_CanvasColor.

void QBackgroundCanvas::setObjectName ( const QString &  name  ) 

sets the name of the Object

Parameters:
name reference to a QString containing the name

Definition at line 21 of file QBackgroundCanvas.cpp.

Referenced by Ui_QMain::setupUi().

void QBackgroundCanvas::setVolBackColorPtr ( VVector v  ) 

method for setting the pointer to the volumerenderers backgroundcolor

Parameters:
v Pointer to VVector

Definition at line 25 of file QBackgroundCanvas.cpp.

References m_VolCanvasColor.

Referenced by QMain::QMain().

void QBackgroundCanvas::resizeGL ( int  w,
int  h 
) [virtual]

method called when window is resized

Parameters:
w width of widget
h height of widget

Definition at line 45 of file QBackgroundCanvas.cpp.

void QBackgroundCanvas::paintEvent ( QPaintEvent *  e  )  [virtual]

event callback for the paint event

Parameters:
e pointer to QPaintEvent

Definition at line 90 of file QBackgroundCanvas.cpp.

void QBackgroundCanvas::mousePressEvent ( QMouseEvent *  e  )  [virtual]

event callback for the mousepressevent

Parameters:
e Pointer to QMouseEvent

Definition at line 95 of file QBackgroundCanvas.cpp.

References VVector::getX(), VVector::getY(), VVector::getZ(), m_CanvasColor, m_VolCanvasColor, redraw(), VVector::setX(), VVector::setY(), and VVector::setZ().

void QBackgroundCanvas::mouseReleaseEvent ( QMouseEvent *  e  )  [virtual]

event callback for the mousereleaseevent

Parameters:
e Pointer to QMouseEvent

Definition at line 112 of file QBackgroundCanvas.cpp.

void QBackgroundCanvas::mouseMoveEvent ( QMouseEvent *  e  )  [virtual]

event callback for the mousemoveevent

Parameters:
e Pointer to QMouseEvent

Definition at line 118 of file QBackgroundCanvas.cpp.

References getMouseEvent(), and VMouseEvent::getPosition().

void QBackgroundCanvas::mouseDoubleClickEvent ( QMouseEvent *  e  )  [virtual]

event callback for the mousedoubleclickevent

Parameters:
e Pointer to QMouseEvent

Definition at line 131 of file QBackgroundCanvas.cpp.

void QBackgroundCanvas::keyPressEvent ( QKeyEvent *  e  )  [virtual]

event callback for the keypressevent

Parameters:
e Pointer to QKeyEvent

Definition at line 136 of file QBackgroundCanvas.cpp.

void QBackgroundCanvas::keyReleaseEvent ( QKeyEvent *  e  )  [virtual]

event callback for the keyreleaseevent

Parameters:
e Pointer to QKeyEvent

Definition at line 142 of file QBackgroundCanvas.cpp.

const VMouseEvent QBackgroundCanvas::getMouseEvent ( QMouseEvent *  e  ) 

Method for creating the current Mousevent

Parameters:
e Pointer to QMouseEvent
Returns:
VMouseEvent

Definition at line 148 of file QBackgroundCanvas.cpp.

References VMouseEvent::BUTTON_LEFT, VMouseEvent::BUTTON_MIDDLE, VMouseEvent::BUTTON_NONE, VMouseEvent::BUTTON_RIGHT, VKeyboardEvent::MODIFIER_ALT, VKeyboardEvent::MODIFIER_CTRL, VKeyboardEvent::MODIFIER_SHIFT, VMouseEvent::STATE_DOWN, and VMouseEvent::STATE_UP.

Referenced by mouseMoveEvent().

const VKeyboardEvent QBackgroundCanvas::getKeyboardEvent ( QKeyEvent *  e  ) 

Method for creating the Keybard event

Parameters:
e QKeyEvent
Returns:
VKeyboardEvent

Definition at line 170 of file QBackgroundCanvas.cpp.

References VKeyboardEvent::key, VKeyboardEvent::MODIFIER_ALT, VKeyboardEvent::MODIFIER_CTRL, and VKeyboardEvent::MODIFIER_SHIFT.

void QBackgroundCanvas::redraw (  )  [virtual]

method called when Canvas is readrawn. Calls paintGl

Definition at line 84 of file QBackgroundCanvas.cpp.

Referenced by mousePressEvent().


Member Data Documentation

VVector QBackgroundCanvas::m_CanvasColor [private]

VVector containing the Color of the Canvas.

Definition at line 129 of file QBackgroundCanvas.h.

Referenced by initializeGL(), mousePressEvent(), paintGL(), and QBackgroundCanvas().

VVector* QBackgroundCanvas::m_VolCanvasColor [private]

VVector Pointer pointing at the Color of the mainrenderercanvas.

Definition at line 130 of file QBackgroundCanvas.h.

Referenced by mousePressEvent(), and setVolBackColorPtr().


The documentation for this class was generated from the following files:
Generated on Wed Dec 5 05:15:09 2007 for VolRendering by  doxygen 1.5.4