ddt 1.2.1
Loading...
Searching...
No Matches
Protected Attributes | List of all members
DdtGraphicalElementRefLine Class Reference

#include <ddtGraphicalElementRefLine.hpp>

Inheritance diagram for DdtGraphicalElementRefLine:
DdtGraphicalElement

Protected Attributes

double x1
 
double y1
 
double x2
 
double y2
 
PointGrabberfirst_corner
 
PointGrabbersecond_corner
 
PointGrabbermiddle_point
 
bool installed_event_filters
 
- Protected Attributes inherited from DdtGraphicalElement
DdtGraphicalElementProperties element_properties
 
DdtOverlayType element_type
 
QPointF location
 
QPointF drag_start
 
qreal corner_size
 
bool is_hovering
 
QString object_name
 
QString element_name
 
 DdtGraphicalElementRefLine (const DdtGraphicalElementProperties element_properties, const double x1, const double y1, const double x2, const double y2)
 
virtual ~DdtGraphicalElementRefLine ()
 
virtual void DrawElement (QPainter *painter) override
 
QRectF boundingRect () const override
 
int type () const override
 
void ReDrawLine (const QPointF start, const QPointF end)
 
void RedrawPoints (QGraphicsScene *scene)
 
QPointF Start () const
 
QPointF End () const
 
void ResetEventFilter ()
 

Additional Inherited Members

- Public Member Functions inherited from DdtGraphicalElement
 DdtGraphicalElement (DdtGraphicalElementProperties const &element_properties, const QString obj_name="", const QString elem_name="")
 
virtual ~DdtGraphicalElement ()
 
virtual QRectF RotateBoundingBox (QRectF const &original_bounding_box) const
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
 
void DrawBoundingBox (QPainter *painter) const
 
void EditElementProperties (const DdtGraphicalElementProperties &properties)
 
virtual void HighlightSelectedElement (QPainter *painter) const
 
virtual bool IsHidden ()
 
virtual float ScaleThreshold ()
 
virtual void SetShowFlag (bool show)
 
virtual DdtOverlayType GetType ()
 
virtual QString GetTypeString ()
 
virtual QString GetTag ()
 
virtual void SetTransform (QTransform const &transform)
 
void SetIsEditable (const bool editable)
 
void SetItemIsSelected (const bool is_selected)
 
void SetIsHovering (const bool item_is_hovering)
 
bool GetIsEditable () const
 
bool GetItemIsSelected () const
 
QString GetObjectName () const
 
QString GetElementName () const
 
bool GetIsHovering () const
 
const DdtGraphicalElementPropertiesGetElementProperties ()
 
- Public Attributes inherited from DdtGraphicalElement
const int LIGHTER_FACTOR = 200
 
const int SCALE_DIFFERENCE_FACTOR = 20
 
- Protected Member Functions inherited from DdtGraphicalElement
void mouseMoveEvent (QGraphicsSceneMouseEvent *const event) override
 
void mousePressEvent (QGraphicsSceneMouseEvent *const event) override
 
bool HandleEvent (PointGrabber *const corner, QEvent *const event) const
 

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

Parameters
element_propertiesDDT graphical element properties object.
x1x coordinate of the first point of the graphical element.
y1y coordinate of the first point of the graphical element.
x2x coordinate of the second point of the graphical element.
y2y coordinate of the second point of the graphical element.

◆ ~DdtGraphicalElementRefLine()

DdtGraphicalElementRefLine::~DdtGraphicalElementRefLine ( )
virtual

Destructor

Member Function Documentation

◆ boundingRect()

QRectF DdtGraphicalElementRefLine::boundingRect ( ) const
overridevirtual

Function returning the bounding box of the graphics item

Returns
Rectangle with the bounding box

Reimplemented from DdtGraphicalElement.

◆ DrawElement()

void DdtGraphicalElementRefLine::DrawElement ( QPainter * painter)
overridevirtual

Virtual function for rendering the graphical element

Implements DdtGraphicalElement.

◆ End()

QPointF DdtGraphicalElementRefLine::End ( ) const

Returns the end point of the line

Returns
end point

◆ ReDrawLine()

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

Redraw the line at new coordinates

Parameters
startStart point
endEnd point

◆ RedrawPoints()

void DdtGraphicalElementRefLine::RedrawPoints ( QGraphicsScene * scene)

Redraw the point grabbers

Parameters
sceneScene to add the grabbers

◆ 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
override

Check type of graphics item

Returns
type

Member Data Documentation

◆ first_corner

PointGrabber* DdtGraphicalElementRefLine::first_corner
protected

First point grabber for resizable reference line

◆ installed_event_filters

bool DdtGraphicalElementRefLine::installed_event_filters
protected

Flag for event filters

◆ middle_point

PointGrabber* DdtGraphicalElementRefLine::middle_point
protected

Middle point grabber for moving reference line

◆ second_corner

PointGrabber* DdtGraphicalElementRefLine::second_corner
protected

Second point grabber for resizable reference line

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