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

#include <ddtGraphicalElementStatRectangle.hpp>

Inheritance diagram for DdtGraphicalElementStatRectangle:
DdtGraphicalElement

Protected Attributes

double x1
 
double y1
 
double x2
 
double y2
 
PointGrabbercorners [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 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 resizeable rectangles

Constructor & Destructor Documentation

◆ DdtGraphicalElementStatRectangle()

DdtGraphicalElementStatRectangle::DdtGraphicalElementStatRectangle ( 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.

◆ ~DdtGraphicalElementStatRectangle()

DdtGraphicalElementStatRectangle::~DdtGraphicalElementStatRectangle ( )
virtual

Destructor

Member Function Documentation

◆ boundingRect()

QRectF DdtGraphicalElementStatRectangle::boundingRect ( ) const
overridevirtual

Function returning the bounding box of the graphics item

Returns
Rectangle with the bounding box

Reimplemented from DdtGraphicalElement.

◆ DrawElement()

void DdtGraphicalElementStatRectangle::DrawElement ( QPainter * painter)
overridevirtual

Virtual function for rendering the graphical element

Implements DdtGraphicalElement.

◆ End()

QPointF DdtGraphicalElementStatRectangle::End ( ) const

Returns the end point of the rectangle

Returns
end point

◆ LowerLeft()

QPointF DdtGraphicalElementStatRectangle::LowerLeft ( ) const

Returns the lower left coordinates of the rectangle

Returns
lower left point

◆ RedrawCorners()

void DdtGraphicalElementStatRectangle::RedrawCorners ( QGraphicsScene * scene)

Method which can be called to redraw the corner grabbers of this rectangle

Parameters
sceneScene to add the corners to

◆ ReDrawRectangle()

void DdtGraphicalElementStatRectangle::ReDrawRectangle ( const QPointF p1,
const QPointF p2 )

Redraw the rectangle at new coordinates

Parameters
p1Start point
p2End point

◆ ResetEventFilter()

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

◆ Start()

QPointF DdtGraphicalElementStatRectangle::Start ( ) const

Returns the starting point of the rectangle

Returns
starting point

◆ type()

int DdtGraphicalElementStatRectangle::type ( ) const
override

Check type of graphics item

Returns
type

◆ UpperRight()

QPointF DdtGraphicalElementStatRectangle::UpperRight ( ) const

Member Data Documentation

◆ corners

PointGrabber* DdtGraphicalElementStatRectangle::corners[4]
protected

Corner grabbers for resizable rectangle

◆ installed_event_filters

bool DdtGraphicalElementStatRectangle::installed_event_filters
protected

Flag for event filters

◆ x1

double DdtGraphicalElementStatRectangle::x1
protected

x position of one corner of the rectangle

◆ x2

double DdtGraphicalElementStatRectangle::x2
protected

x position of the other corner of the rectangle

◆ y1

double DdtGraphicalElementStatRectangle::y1
protected

y position of one corner of the rectangle

◆ y2

double DdtGraphicalElementStatRectangle::y2
protected

x position of the other corner of the rectangle


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