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

#include <ddtGraphicalElementRefLine.hpp>

Inheritance diagram for DdtGraphicalElementRefLine:
DdtGraphicalElement

Public Member Functions

 DdtGraphicalElementRefLine (const DdtGraphicalElementProperties element_properties, const double x1, const double y1, const double x2, const double y2)
 
virtual ~DdtGraphicalElementRefLine ()
 
virtual void DrawElement (QPainter *painter)
 
QRectF boundingRect () const
 
int type () const
 
void ReDrawLine (const QPointF start, const QPointF end)
 
void RedrawCorners (QGraphicsScene *scene)
 
QPointF Start () const
 
QPointF End () const
 
void ResetEventFilter ()
 
- Public Member Functions inherited from DdtGraphicalElement
 DdtGraphicalElement (DdtGraphicalElementProperties element_properties)
 
virtual ~DdtGraphicalElement ()
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 
virtual bool IsHidden ()
 
virtual float ScaleThreshold ()
 
virtual void SetShowFlag (bool show)
 
virtual DdtOverlayType GetType ()
 
virtual QString GetTypeString ()
 
virtual QString GetTag ()
 

Protected Attributes

double x1
 
double y1
 
double x2
 
double y2
 
CornerGrabbercorners [2]
 
bool installed_event_filters
 
- Protected Attributes inherited from DdtGraphicalElement
DdtGraphicalElementProperties element_properties
 
DdtOverlayType element_type
 

Detailed Description

Class for the graphical elements drawing a resizeable reference line

Constructor & Destructor Documentation

◆ DdtGraphicalElementRefLine()

DdtGraphicalElementRefLine::DdtGraphicalElementRefLine ( const DdtGraphicalElementProperties  element_properties,
const double  x1,
const double  y1,
const double  x2,
const double  y2 
)
explicit

Constructor

◆ ~DdtGraphicalElementRefLine()

DdtGraphicalElementRefLine::~DdtGraphicalElementRefLine ( )
virtual

Destructor

Member Function Documentation

◆ boundingRect()

QRectF DdtGraphicalElementRefLine::boundingRect ( ) const
virtual

Function returning the bounding box of the graphics item

Returns
Rectangle with the bounding box

Reimplemented from DdtGraphicalElement.

◆ DrawElement()

void DdtGraphicalElementRefLine::DrawElement ( QPainter *  painter)
virtual

Virtual function for rendering the graphical element

Implements DdtGraphicalElement.

◆ End()

QPointF DdtGraphicalElementRefLine::End ( ) const

Returns the end point of the line

Returns
end point

◆ RedrawCorners()

void DdtGraphicalElementRefLine::RedrawCorners ( QGraphicsScene *  scene)

Redraw the corner grabbers

Parameters
sceneScene to add the grabbers

◆ ReDrawLine()

void DdtGraphicalElementRefLine::ReDrawLine ( const QPointF  start,
const QPointF  end 
)

Redraw the line at new coordinates

Parameters
startStart point
endEnd point

◆ ResetEventFilter()

void DdtGraphicalElementRefLine::ResetEventFilter ( )

Reset the event filter flag; used after item had been removed from the scene, so that the event filter is re-installed in the corner grabbers

◆ Start()

QPointF DdtGraphicalElementRefLine::Start ( ) const

Returns the starting point of the line

Returns
starting point

◆ type()

int DdtGraphicalElementRefLine::type ( ) const

Check type of graphics item

Returns
type

Member Data Documentation

◆ corners

CornerGrabber* DdtGraphicalElementRefLine::corners[2]
protected

Corner grabbers for resizable reference line

◆ installed_event_filters

bool DdtGraphicalElementRefLine::installed_event_filters
protected

Flag for event filters

◆ x1

double DdtGraphicalElementRefLine::x1
protected

x position of one end of the line

◆ x2

double DdtGraphicalElementRefLine::x2
protected

x position of the other end of the line

◆ y1

double DdtGraphicalElementRefLine::y1
protected

y position of one end of the line

◆ y2

double DdtGraphicalElementRefLine::y2
protected

x position of the other end of the line


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