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

#include <ddtGraphicalElementLine.hpp>

Inheritance diagram for DdtGraphicalElementLine:
DdtGraphicalElement

Protected Attributes

double x1
 
double y1
 
double x2
 
double y2
 
- 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
 
 DdtGraphicalElementLine (DdtGraphicalElementProperties const &element_properties, const double x1_coord, const double y1_coord, const double x2_coord, const double y2_coord, const QString obj_name="", const QString elem_name="")
 
virtual ~DdtGraphicalElementLine ()
 
virtual void DrawElement (QPainter *painter) override
 
QRectF boundingRect () const override
 
int type () const override
 

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 lines

Constructor & Destructor Documentation

◆ DdtGraphicalElementLine()

DdtGraphicalElementLine::DdtGraphicalElementLine ( DdtGraphicalElementProperties const & element_properties,
const double x1_coord,
const double y1_coord,
const double x2_coord,
const double y2_coord,
const QString obj_name = "",
const QString elem_name = "" )
explicit

Constructor

Parameters
element_propertiesDDT graphical element properties object.
x1_coordx coordinate of the first point of the graphical element.
y1_coordy coordinate of the first point of the graphical element.
x2_coordx coordinate of the second point of the graphical element.
y2_coordy coordinate of the second point of the graphical element.
obj_nameThe name of the overlay object this element belongs to
elem_nameThe name of this element

◆ ~DdtGraphicalElementLine()

DdtGraphicalElementLine::~DdtGraphicalElementLine ( )
virtualdefault

Destructor

Member Function Documentation

◆ boundingRect()

QRectF DdtGraphicalElementLine::boundingRect ( ) const
overridevirtual

Function returning the bounding box of the graphics item

Returns
Rectangle with the bounding box

Reimplemented from DdtGraphicalElement.

◆ DrawElement()

void DdtGraphicalElementLine::DrawElement ( QPainter * painter)
overridevirtual

Virtual function for rendering the graphical element

Implements DdtGraphicalElement.

◆ type()

int DdtGraphicalElementLine::type ( ) const
override

Check type of graphics item

Returns
type

Member Data Documentation

◆ x1

double DdtGraphicalElementLine::x1
protected

x position of first point

◆ x2

double DdtGraphicalElementLine::x2
protected

x position of second point

◆ y1

double DdtGraphicalElementLine::y1
protected

y position of first point

◆ y2

double DdtGraphicalElementLine::y2
protected

y position of second point


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