ddt  0.1
Public Member Functions | Protected Attributes | List of all members
DdtOverlayRendering Class Reference

#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

DdtGraphicalOverlaygraphics_overlay
 
QList< DdtGraphicalElement * > selected_elements
 
float current_scale
 

Detailed Description

Class for the rendering of graphical overlays

Constructor & Destructor Documentation

◆ DdtOverlayRendering()

DdtOverlayRendering::DdtOverlayRendering ( )
explicit

Constructor

◆ ~DdtOverlayRendering()

DdtOverlayRendering::~DdtOverlayRendering ( )
virtual

Destructor

Member Function Documentation

◆ AddGraphicalElement()

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.

Parameters
element_propertiesthe graphical element properties
x1mouse x coordinate of first position
y1mouse y coordinate of first position
x2mouse x coordinate of second position
y2mouse y coordinate of second position
drawModestring identifying the graphical element

◆ RedrawOverlay()

void DdtOverlayRendering::RedrawOverlay ( QGraphicsScene *  scene)
virtual

Function that draw all overlay elements into the scene of the view

◆ RemoveGraphicalElements()

void DdtOverlayRendering::RemoveGraphicalElements ( QString  selection)

Removes overlays of given type (selection)

Parameters
selectionThe type of overlay to delete

◆ SelectGraphicalElements()

void DdtOverlayRendering::SelectGraphicalElements ( double  x1,
double  y1,
double  x2,
double  y2,
QGraphicsView *  view 
)

Selects a graphical element at the current coordinates

Parameters
x1First x coordinate
y1First y coordinate
x2Second x coordinate
y2Second y coordinate
viewActive graphics view

◆ SetCurrentScale()

void DdtOverlayRendering::SetCurrentScale ( float  current_scale)

Set the current scale factor of the view

Parameters
current_scaleThe current scale

Member Data Documentation

◆ current_scale

float DdtOverlayRendering::current_scale
protected

◆ graphics_overlay

DdtGraphicalOverlay* DdtOverlayRendering::graphics_overlay
protected

◆ selected_elements

QList<DdtGraphicalElement*> DdtOverlayRendering::selected_elements
protected

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