|
ddt 1.2.1
|
#include <ddtGraphicalElementStatRectangle.hpp>
Protected Attributes | |
| double | x1 |
| double | y1 |
| double | x2 |
| double | y2 |
| PointGrabber * | corners [4] |
| 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 |
| DdtGraphicalElementStatRectangle (const DdtGraphicalElementProperties element_properties, const double x1, const double y1, const double x2, const double y2) | |
| virtual | ~DdtGraphicalElementStatRectangle () |
| virtual void | DrawElement (QPainter *painter) override |
| QRectF | boundingRect () const override |
| void | RedrawCorners (QGraphicsScene *scene) |
| int | type () const override |
| void | ReDrawRectangle (const QPointF p1, const QPointF p2) |
| QPointF | Start () const |
| QPointF | End () const |
| QPointF | UpperRight () const |
| QPointF | LowerLeft () 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 resizeable rectangles
|
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 DdtGraphicalElementStatRectangle::End | ( | ) | const |
Returns the end point of the rectangle
| QPointF DdtGraphicalElementStatRectangle::LowerLeft | ( | ) | const |
Returns the lower left coordinates of the rectangle
| void DdtGraphicalElementStatRectangle::RedrawCorners | ( | QGraphicsScene * | scene | ) |
Method which can be called to redraw the corner grabbers of this rectangle
| scene | Scene to add the corners to |
| void DdtGraphicalElementStatRectangle::ReDrawRectangle | ( | const QPointF | p1, |
| const QPointF | p2 ) |
Redraw the rectangle at new coordinates
| p1 | Start point |
| p2 | End point |
| void DdtGraphicalElementStatRectangle::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 DdtGraphicalElementStatRectangle::Start | ( | ) | const |
Returns the starting point of the rectangle
|
override |
Check type of graphics item
| QPointF DdtGraphicalElementStatRectangle::UpperRight | ( | ) | const |
|
protected |
Corner grabbers for resizable rectangle
|
protected |
Flag for event filters
|
protected |
x position of one corner of the rectangle
|
protected |
x position of the other corner of the rectangle
|
protected |
y position of one corner of the rectangle
|
protected |
x position of the other corner of the rectangle