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, const QString timestamp="")
 
void AddGraphicalElement (const DdtGraphicalElementProperties &element_properties, const double x1, const double y1, const double x2, const double y2, const QString drawMode, const QString text="")
 
void RemoveGraphicalElements (const QString selection)
 
void SelectGraphicalElements (const double x1, const double y1, const QGraphicsView *const view)
 
void SetCurrentScale (const float scale)
 
DdtGraphicalOverlayGetGraphicalOverlay ()
 
QStringList GetListOfElementIDs () const
 

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 ( const DdtGraphicalElementProperties element_properties,
const double  x1,
const double  y1,
const double  x2,
const double  y2,
const QString  drawMode,
const 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

◆ GetGraphicalOverlay()

DdtGraphicalOverlay * DdtOverlayRendering::GetGraphicalOverlay ( )

Access to the graphical overlay

Returns
Pointer to used graphical overlay

◆ GetListOfElementIDs()

QStringList DdtOverlayRendering::GetListOfElementIDs ( ) const

◆ RedrawOverlay()

void DdtOverlayRendering::RedrawOverlay ( QGraphicsScene *  scene,
const QString  timestamp = "" 
)
virtual

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

◆ RemoveGraphicalElements()

void DdtOverlayRendering::RemoveGraphicalElements ( const QString  selection)

Removes overlays of given type (selection)

Parameters
selectionThe type of overlay to delete

◆ SelectGraphicalElements()

void DdtOverlayRendering::SelectGraphicalElements ( const double  x1,
const double  y1,
const QGraphicsView *const  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 ( const float  scale)

Set the current scale factor of the view

Parameters
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: