|
ddt 1.2.1
|
#include <ddtGraphicalElementRefLine.hpp>
Protected Attributes | |
| double | x1 |
| double | y1 |
| double | x2 |
| double | y2 |
| PointGrabber * | first_corner |
| PointGrabber * | second_corner |
| PointGrabber * | middle_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 DdtGraphicalElementProperties & | GetElementProperties () |
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 |
Class for the graphical elements drawing a resizeable reference line
|
explicit |
Constructor
| element_properties | DDT graphical element properties object. |
| x1 | x coordinate of the first point of the graphical element. |
| y1 | y coordinate of the first point of the graphical element. |
| x2 | x coordinate of the second point of the graphical element. |
| y2 | y coordinate of the second point of the graphical element. |
|
virtual |
Destructor
|
overridevirtual |
Function returning the bounding box of the graphics item
Reimplemented from DdtGraphicalElement.
|
overridevirtual |
Virtual function for rendering the graphical element
Implements DdtGraphicalElement.
| QPointF DdtGraphicalElementRefLine::End | ( | ) | const |
Returns the end point of the line
| void DdtGraphicalElementRefLine::ReDrawLine | ( | const QPointF | start, |
| const QPointF | end ) |
Redraw the line at new coordinates
| start | Start point |
| end | End point |
| void DdtGraphicalElementRefLine::RedrawPoints | ( | QGraphicsScene * | scene | ) |
Redraw the point grabbers
| scene | Scene to add the grabbers |
| 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
| QPointF DdtGraphicalElementRefLine::Start | ( | ) | const |
Returns the starting point of the line
|
override |
Check type of graphics item
|
protected |
First point grabber for resizable reference line
|
protected |
Flag for event filters
|
protected |
Middle point grabber for moving reference line
|
protected |
Second point grabber for resizable reference line
|
protected |
x position of one end of the line
|
protected |
x position of the other end of the line
|
protected |
y position of one end of the line
|
protected |
x position of the other end of the line