|
ddt
0.1
|
#include <ddtOverlayRendering.hpp>
Public Member Functions | |
| DdtOverlayRendering () | |
| virtual | ~DdtOverlayRendering () |
| virtual void | RedrawOverlay (QGraphicsScene *scene) |
| void | AddGraphicalElement (DdtGraphicalElementProperties element_properties, double x1, double y1, double x2, double y2, QString drawMode, QString text="") |
| void | RemoveGraphicalElements (QString selection) |
| void | SelectGraphicalElements (double x1, double y1, double x2, double y2, QGraphicsView *view) |
| void | SetCurrentScale (float current_scale) |
Protected Attributes | |
| DdtGraphicalOverlay * | graphics_overlay |
| QList< DdtGraphicalElement * > | selected_elements |
| float | current_scale |
Class for the rendering of graphical overlays
|
explicit |
Constructor
|
virtual |
Destructor
| void DdtOverlayRendering::AddGraphicalElement | ( | DdtGraphicalElementProperties | element_properties, |
| double | x1, | ||
| double | y1, | ||
| double | x2, | ||
| double | y2, | ||
| QString | drawMode, | ||
| QString | text = "" |
||
| ) |
Add a graphical element to the overlay.
| element_properties | the graphical element properties |
| x1 | mouse x coordinate of first position |
| y1 | mouse y coordinate of first position |
| x2 | mouse x coordinate of second position |
| y2 | mouse y coordinate of second position |
| drawMode | string identifying the graphical element |
|
virtual |
Function that draw all overlay elements into the scene of the view
| void DdtOverlayRendering::RemoveGraphicalElements | ( | QString | selection | ) |
Removes overlays of given type (selection)
| selection | The type of overlay to delete |
| void DdtOverlayRendering::SelectGraphicalElements | ( | double | x1, |
| double | y1, | ||
| double | x2, | ||
| double | y2, | ||
| QGraphicsView * | view | ||
| ) |
Selects a graphical element at the current coordinates
| x1 | First x coordinate |
| y1 | First y coordinate |
| x2 | Second x coordinate |
| y2 | Second y coordinate |
| view | Active graphics view |
| void DdtOverlayRendering::SetCurrentScale | ( | float | current_scale | ) |
Set the current scale factor of the view
| current_scale | The current scale |
|
protected |
|
protected |
|
protected |