#include <QBackgroundCanvas.h>
Public Member Functions | |
QBackgroundCanvas (QWidget *parent=0) | |
virtual | ~QBackgroundCanvas () |
void | setObjectName (const QString &name) |
void | setArrowsColorPtr (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_ArrowsColor |
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 32 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 52 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::setArrowsColorPtr | ( | VVector * | v | ) |
method for setting the pointer to the arrows color
v | Pointer to VVector |
Definition at line 26 of file QBackgroundCanvas.cpp.
References m_ArrowsColor.
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 43 of file QBackgroundCanvas.cpp.
void QBackgroundCanvas::paintEvent | ( | QPaintEvent * | e | ) | [virtual] |
event callback for the paint event
e | pointer to QPaintEvent |
Definition at line 88 of file QBackgroundCanvas.cpp.
void QBackgroundCanvas::mousePressEvent | ( | QMouseEvent * | e | ) | [virtual] |
event callback for the mousepressevent
e | Pointer to QMouseEvent |
Definition at line 93 of file QBackgroundCanvas.cpp.
References VVector::getX(), VVector::getY(), VVector::getZ(), m_ArrowsColor, m_CanvasColor, 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 110 of file QBackgroundCanvas.cpp.
void QBackgroundCanvas::mouseMoveEvent | ( | QMouseEvent * | e | ) | [virtual] |
event callback for the mousemoveevent
e | Pointer to QMouseEvent |
Definition at line 116 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 129 of file QBackgroundCanvas.cpp.
void QBackgroundCanvas::keyPressEvent | ( | QKeyEvent * | e | ) | [virtual] |
event callback for the keypressevent
e | Pointer to QKeyEvent |
Definition at line 134 of file QBackgroundCanvas.cpp.
void QBackgroundCanvas::keyReleaseEvent | ( | QKeyEvent * | e | ) | [virtual] |
event callback for the keyreleaseevent
e | Pointer to QKeyEvent |
Definition at line 140 of file QBackgroundCanvas.cpp.
const VMouseEvent QBackgroundCanvas::getMouseEvent | ( | QMouseEvent * | e | ) |
Method for creating the current Mousevent
e | Pointer to QMouseEvent |
Definition at line 146 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 168 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 82 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_ArrowsColor [private] |
VVector Pointer pointing at the Color of the mainrenderercanvas.
Definition at line 130 of file QBackgroundCanvas.h.
Referenced by mousePressEvent(), and setArrowsColorPtr().