Seamly2D
Code documentation
VisToolSpline Class Reference

#include <vistoolspline.h>

Inheritance diagram for VisToolSpline:
Collaboration diagram for VisToolSpline:

Public Types

enum  { Type = UserType + static_cast<int>(Vis::ToolSpline) }
 
- Public Types inherited from VisPath
enum  { Type = UserType + static_cast<int>(Vis::Path) }
 
- Public Types inherited from VCurvePathItem
enum  { Type = UserType + static_cast<int>(Vis::CurvePathItem) }
 

Public Slots

void MouseLeftPressed ()
 
void MouseLeftReleased ()
 
- Public Slots inherited from Visualization
void mousePos (const QPointF &scenePos)
 

Public Member Functions

 VisToolSpline (const VContainer *data, QGraphicsItem *parent=nullptr)
 
virtual ~VisToolSpline ()
 
virtual void RefreshGeometry () Q_DECL_OVERRIDE
 
void setObject4Id (const quint32 &value)
 
void SetAngle1 (const qreal &value)
 
void SetAngle2 (const qreal &value)
 
void SetKAsm1 (const qreal &value)
 
void SetKAsm2 (const qreal &value)
 
void SetKCurve (const qreal &value)
 
QPointF GetP2 () const
 
QPointF GetP3 () const
 
virtual int type () const Q_DECL_OVERRIDE
 
- Public Member Functions inherited from VisPath
 VisPath (const VContainer *data, QGraphicsItem *parent=nullptr)
 
virtual ~VisPath ()=default
 
- Public Member Functions inherited from Visualization
 Visualization (const VContainer *data)
 
virtual ~Visualization () Q_DECL_EQ_DEFAULT
 
void setObject1Id (const quint32 &value)
 
void setLineStyle (const Qt::PenStyle &value)
 
void setLineWeight (const QString &value)
 
void setScenePos (const QPointF &value)
 
virtual void VisualMode (const quint32 &pointId)
 
void setMainColor (const QColor &value)
 
const VContainergetData () const
 
void setData (const VContainer *data)
 
Mode GetMode () const
 
void SetMode (const Mode &value)
 
QString CurrentToolTip () const
 
- Public Member Functions inherited from VCurvePathItem
 VCurvePathItem (QGraphicsItem *parent=nullptr)
 
virtual ~VCurvePathItem ()=default
 
virtual QPainterPath shape () const Q_DECL_OVERRIDE
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) Q_DECL_OVERRIDE
 
void SetDirectionArrows (const QVector< QPair< QLineF, QLineF >> &arrows)
 
void SetPoints (const QVector< QPointF > &points)
 

Protected Attributes

quint32 object4Id
 
VScaledEllipsepoint1
 
VScaledEllipsepoint4
 
qreal angle1
 
qreal angle2
 
qreal kAsm1
 
qreal kAsm2
 
qreal kCurve
 
bool isLeftMousePressed
 
bool p2Selected
 
bool p3Selected
 
QPointF p2
 
QPointF p3
 
QVector< VControlPointSpline * > controlPoints
 
- Protected Attributes inherited from Visualization
const VContainerdata
 
QPointF scenePos
 
QColor mainColor
 
QColor supportColor
 
Qt::PenStyle lineStyle
 
qreal lineWeight
 
quint32 object1Id
 
QString toolTip
 
Mode mode
 

Additional Inherited Members

- Signals inherited from Visualization
void ToolTip (const QString &toolTip)
 
- Static Public Member Functions inherited from Visualization
static qreal FindLength (const QString &expression, const QHash< QString, QSharedPointer< VInternalVariable > > *vars)
 
static qreal FindVal (const QString &expression, const QHash< QString, QSharedPointer< VInternalVariable > > *vars)
 
- Protected Member Functions inherited from VisPath
virtual void initPen () Q_DECL_OVERRIDE
 
virtual void AddOnScene () Q_DECL_OVERRIDE
 
VSimplePointGetPoint (QVector< VSimplePoint * > &points, quint32 i, const QColor &color)
 
- Protected Member Functions inherited from Visualization
VScaledEllipseInitPoint (const QColor &color, QGraphicsItem *parent, qreal z=0) const
 
void DrawPoint (QGraphicsEllipseItem *point, const QPointF &pos, const QColor &color, Qt::PenStyle style=Qt::SolidLine)
 
virtual void DrawLine (VScaledLine *lineItem, const QLineF &line, const QColor &color, const qreal &lineWeight, Qt::PenStyle style=Qt::SolidLine)
 
void DrawPath (VCurvePathItem *pathItem, const QPainterPath &path, const QColor &color, Qt::PenStyle style=Qt::SolidLine, const qreal &weight=0.35, Qt::PenCapStyle cap=Qt::SquareCap)
 
void DrawPath (VCurvePathItem *pathItem, const QPainterPath &path, const QVector< DirectionArrow > &directionArrows, const QColor &color, Qt::PenStyle style=Qt::SolidLine, const qreal &weight=0.35, Qt::PenCapStyle cap=Qt::SquareCap)
 
void drawArrowedLine (ArrowedLineItem *item, const QLineF &line, const QColor &color, Qt::PenStyle style=Qt::SolidLine)
 
void drawArrow (const QLineF &axis, QPainterPath &path, const qreal &arrow_size)
 
template<typename Item >
void addItem (Item *item)
 
template<class Item >
ItemInitItem (const QColor &color, QGraphicsItem *parent)
 
- Protected Member Functions inherited from VCurvePathItem
virtual void ScalePenWidth ()
 
- Static Protected Member Functions inherited from Visualization
static VScaledEllipseGetPointItem (QVector< VScaledEllipse * > &points, quint32 i, const QColor &color, QGraphicsItem *parent)
 

Detailed Description

Definition at line 69 of file vistoolspline.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

Definition at line 89 of file vistoolspline.h.

Constructor & Destructor Documentation

◆ VisToolSpline()

VisToolSpline::VisToolSpline ( const VContainer data,
QGraphicsItem *  parent = nullptr 
)
explicit

◆ ~VisToolSpline()

VisToolSpline::~VisToolSpline ( )
virtual

Definition at line 103 of file vistoolspline.cpp.

References Visualization::ToolTip().

Member Function Documentation

◆ GetP2()

QPointF VisToolSpline::GetP2 ( ) const

Definition at line 237 of file vistoolspline.cpp.

References p2.

◆ GetP3()

QPointF VisToolSpline::GetP3 ( ) const

Definition at line 243 of file vistoolspline.cpp.

References p3.

◆ MouseLeftPressed

void VisToolSpline::MouseLeftPressed ( )
slot

Definition at line 249 of file vistoolspline.cpp.

References Creation, isLeftMousePressed, and Visualization::mode.

Referenced by DialogSpline::DialogSpline().

◆ MouseLeftReleased

void VisToolSpline::MouseLeftReleased ( )
slot

◆ RefreshGeometry()

◆ SetAngle1()

void VisToolSpline::SetAngle1 ( const qreal &  value)

Definition at line 207 of file vistoolspline.cpp.

References angle1.

Referenced by VToolSpline::SetVisualization().

◆ SetAngle2()

void VisToolSpline::SetAngle2 ( const qreal &  value)

Definition at line 213 of file vistoolspline.cpp.

References angle2.

Referenced by VToolSpline::SetVisualization().

◆ SetKAsm1()

void VisToolSpline::SetKAsm1 ( const qreal &  value)

Definition at line 219 of file vistoolspline.cpp.

References kAsm1.

Referenced by VToolSpline::SetVisualization().

◆ SetKAsm2()

void VisToolSpline::SetKAsm2 ( const qreal &  value)

Definition at line 225 of file vistoolspline.cpp.

References kAsm2.

Referenced by VToolSpline::SetVisualization().

◆ SetKCurve()

void VisToolSpline::SetKCurve ( const qreal &  value)

Definition at line 231 of file vistoolspline.cpp.

References kCurve.

Referenced by VToolSpline::SetVisualization().

◆ setObject4Id()

void VisToolSpline::setObject4Id ( const quint32 &  value)

Definition at line 201 of file vistoolspline.cpp.

References object4Id.

Referenced by VToolSpline::SetVisualization().

◆ type()

virtual int VisToolSpline::type ( ) const
inlinevirtual

Reimplemented from VisPath.

Definition at line 88 of file vistoolspline.h.

References Type.

Member Data Documentation

◆ angle1

qreal VisToolSpline::angle1
protected

Definition at line 99 of file vistoolspline.h.

Referenced by RefreshGeometry(), and SetAngle1().

◆ angle2

qreal VisToolSpline::angle2
protected

Definition at line 100 of file vistoolspline.h.

Referenced by RefreshGeometry(), and SetAngle2().

◆ controlPoints

QVector<VControlPointSpline *> VisToolSpline::controlPoints
protected

Definition at line 112 of file vistoolspline.h.

Referenced by RefreshGeometry(), and VisToolSpline().

◆ isLeftMousePressed

bool VisToolSpline::isLeftMousePressed
protected

Definition at line 105 of file vistoolspline.h.

Referenced by MouseLeftPressed(), MouseLeftReleased(), and RefreshGeometry().

◆ kAsm1

qreal VisToolSpline::kAsm1
protected

Definition at line 101 of file vistoolspline.h.

Referenced by RefreshGeometry(), and SetKAsm1().

◆ kAsm2

qreal VisToolSpline::kAsm2
protected

Definition at line 102 of file vistoolspline.h.

Referenced by RefreshGeometry(), and SetKAsm2().

◆ kCurve

qreal VisToolSpline::kCurve
protected

Definition at line 103 of file vistoolspline.h.

Referenced by RefreshGeometry(), and SetKCurve().

◆ object4Id

quint32 VisToolSpline::object4Id
protected

Definition at line 96 of file vistoolspline.h.

Referenced by RefreshGeometry(), and setObject4Id().

◆ p2

QPointF VisToolSpline::p2
protected

Definition at line 109 of file vistoolspline.h.

Referenced by GetP2(), and RefreshGeometry().

◆ p2Selected

bool VisToolSpline::p2Selected
protected

Definition at line 106 of file vistoolspline.h.

Referenced by RefreshGeometry().

◆ p3

QPointF VisToolSpline::p3
protected

Definition at line 110 of file vistoolspline.h.

Referenced by GetP3(), and RefreshGeometry().

◆ p3Selected

bool VisToolSpline::p3Selected
protected

Definition at line 107 of file vistoolspline.h.

Referenced by RefreshGeometry().

◆ point1

VScaledEllipse* VisToolSpline::point1
protected

Definition at line 97 of file vistoolspline.h.

Referenced by RefreshGeometry(), and VisToolSpline().

◆ point4

VScaledEllipse* VisToolSpline::point4
protected

Definition at line 98 of file vistoolspline.h.

Referenced by RefreshGeometry(), and VisToolSpline().


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