ddt 1.2.1
|
#include <ddtGraphicsViewDraw.hpp>
Public Member Functions | |
DdtGraphicsViewDraw ()=default | |
void | DrawMeasurements (QPainter &painter, const QPointF start, const QPointF end) const |
void | CreateRefLine (DdtGraphicalElementRefLine *&ref_line_element, QGraphicsScene *const scene, const QPointF start, const QPointF end) const |
void | DrawRefLine (DdtGraphicalElementRefLine *&ref_line_element, QGraphicsScene *const scene, QPainter &painter, const QPointF start, const QPointF end) const |
void | CreateStatisticRect (DdtGraphicalElementStatRectangle *&statistic_rect, QGraphicsScene *const scene, const double x1, const double y1, const double x2, const double y2) const |
void | DrawStatisticRectangle (DdtGraphicalElementStatRectangle *&statistic_rect, QGraphicsScene *const scene, QPainter &painter, const QPointF start, const QPointF end) const |
void | DrawGraphicalElement (QGraphicsScene *const scene, QPainter &painter, const QPointF start, const QPointF end, const QString draw_mode, const DdtGraphicalElementProperties &overlay_properties, const QString overlay_image_file) const |
void | SetConvertPixelToDegrees (const double conv_pixel_degrees) |
Class to support drawing inside the graphic view.
|
default |
Constructor
void DdtGraphicsViewDraw::CreateRefLine | ( | DdtGraphicalElementRefLine *& | ref_line_element, |
QGraphicsScene *const | scene, | ||
const QPointF | start, | ||
const QPointF | end ) const |
Create the reference line graphic item and add it to the scene
void DdtGraphicsViewDraw::CreateStatisticRect | ( | DdtGraphicalElementStatRectangle *& | statistic_rect, |
QGraphicsScene *const | scene, | ||
const double | x1, | ||
const double | y1, | ||
const double | x2, | ||
const double | y2 ) const |
Create the statistic rectangle graphic item and add it to the scene
void DdtGraphicsViewDraw::DrawGraphicalElement | ( | QGraphicsScene *const | scene, |
QPainter & | painter, | ||
const QPointF | start, | ||
const QPointF | end, | ||
const QString | draw_mode, | ||
const DdtGraphicalElementProperties & | overlay_properties, | ||
const QString | overlay_image_file ) const |
Draw a graphical element
scene | the QGraphicsScene to add the element to |
painter | the painter to be used for drawing |
start | the first point to be used for the graphical element |
end | the second point to be used for the graphical element |
draw_mode | the draw mode (which element to draw) |
overlay_properties | the element properties to use for drawing |
overlay_image_file | the path to the overlay image file (draw mode: image) |
void DdtGraphicsViewDraw::DrawMeasurements | ( | QPainter & | painter, |
const QPointF | start, | ||
const QPointF | end ) const |
Draw the measurement lines and texts
painter | the painter to be used for drawing |
start | the start point of the measurement |
end | the end point of the measurement |
void DdtGraphicsViewDraw::DrawRefLine | ( | DdtGraphicalElementRefLine *& | ref_line_element, |
QGraphicsScene *const | scene, | ||
QPainter & | painter, | ||
const QPointF | start, | ||
const QPointF | end ) const |
Draw a line for the reference line dialog
ref_line_element | the reference line element to draw, will be created if necessary |
scene | the QGraphicsScene to add the element to |
painter | the painter to be used for drawing |
start | first point of the line |
end | second point of the line |
void DdtGraphicsViewDraw::DrawStatisticRectangle | ( | DdtGraphicalElementStatRectangle *& | statistic_rect, |
QGraphicsScene *const | scene, | ||
QPainter & | painter, | ||
const QPointF | start, | ||
const QPointF | end ) const |
Draw a rectangle for the statistic dialog
statistic_rect | the statistic rectangle element to draw, will be created if necessary |
scene | the QGraphicsScene to add the element to |
painter | the painter to be used for drawing |
start | the topLeft corner point |
end | the bottomRight corner point |
void DdtGraphicsViewDraw::SetConvertPixelToDegrees | ( | const double | conv_pixel_degrees | ) |
Set the value for the factor to convert pixel distances to degrees
conv_pixel_degrees | the factor to be used to convert pixel distances to degrees |