#include <QBackgroundCanvas.h>
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 |
VVector * | m_VolCanvasColor |
Definition at line 18 of file QBackgroundCanvas.h.
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.
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
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
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
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
e | pointer to QPaintEvent |
Definition at line 90 of file QBackgroundCanvas.cpp.
void QBackgroundCanvas::mousePressEvent | ( | QMouseEvent * | e | ) | [virtual] |
event callback for the mousepressevent
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
e | Pointer to QMouseEvent |
Definition at line 112 of file QBackgroundCanvas.cpp.
void QBackgroundCanvas::mouseMoveEvent | ( | QMouseEvent * | e | ) | [virtual] |
event callback for the mousemoveevent
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
e | Pointer to QMouseEvent |
Definition at line 131 of file QBackgroundCanvas.cpp.
void QBackgroundCanvas::keyPressEvent | ( | QKeyEvent * | e | ) | [virtual] |
event callback for the keypressevent
e | Pointer to QKeyEvent |
Definition at line 136 of file QBackgroundCanvas.cpp.
void QBackgroundCanvas::keyReleaseEvent | ( | QKeyEvent * | e | ) | [virtual] |
event callback for the keyreleaseevent
e | Pointer to QKeyEvent |
Definition at line 142 of file QBackgroundCanvas.cpp.
const VMouseEvent QBackgroundCanvas::getMouseEvent | ( | QMouseEvent * | e | ) |
Method for creating the current Mousevent
e | Pointer to QMouseEvent |
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
e | QKeyEvent |
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().
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().