Seamly2D
Code documentation
VisToolSplinePath Class Reference

#include <vistoolsplinepath.h>

Inheritance diagram for VisToolSplinePath:
Collaboration diagram for VisToolSplinePath:

Public Types

enum  { Type = UserType + static_cast<int>(Vis::ToolSplinePath) }
 
- 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)
 

Signals

void PathChanged (const VSplinePath &path)
 
- Signals inherited from Visualization
void ToolTip (const QString &toolTip)
 

Public Member Functions

 VisToolSplinePath (const VContainer *data, QGraphicsItem *parent=nullptr)
 
virtual ~VisToolSplinePath ()
 
virtual void RefreshGeometry () Q_DECL_OVERRIDE
 
void setPath (const VSplinePath &value)
 
VSplinePath getPath ()
 
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 Member Functions

VScaledEllipsegetPoint (quint32 i)
 
void Creating (const QPointF &pSpl, int size)
 
- 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 ()
 

Protected Attributes

QVector< VScaledEllipse * > points
 
QVector< VControlPointSpline * > ctrlPoints
 
VCurvePathItemnewCurveSegment
 
VSplinePath path
 
bool isLeftMousePressed
 
bool pointIsSelected
 
QPointF ctrlPoint
 
- 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

- 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)
 
- Static Protected Member Functions inherited from Visualization
static VScaledEllipseGetPointItem (QVector< VScaledEllipse * > &points, quint32 i, const QColor &color, QGraphicsItem *parent)
 

Detailed Description

Definition at line 70 of file vistoolsplinepath.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

Definition at line 83 of file vistoolsplinepath.h.

Constructor & Destructor Documentation

◆ VisToolSplinePath()

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

Definition at line 72 of file vistoolsplinepath.cpp.

References Visualization::mainColor, and newCurveSegment.

◆ ~VisToolSplinePath()

VisToolSplinePath::~VisToolSplinePath ( )
virtual

Definition at line 86 of file vistoolsplinepath.cpp.

References Visualization::ToolTip().

Member Function Documentation

◆ Creating()

◆ getPath()

VSplinePath VisToolSplinePath::getPath ( )

Definition at line 158 of file vistoolsplinepath.cpp.

References path.

◆ getPoint()

VScaledEllipse * VisToolSplinePath::getPoint ( quint32  i)
protected

◆ MouseLeftPressed

void VisToolSplinePath::MouseLeftPressed ( )
slot

◆ MouseLeftReleased

void VisToolSplinePath::MouseLeftReleased ( )
slot

◆ PathChanged

void VisToolSplinePath::PathChanged ( const VSplinePath path)
signal

◆ RefreshGeometry()

◆ setPath()

void VisToolSplinePath::setPath ( const VSplinePath value)

Definition at line 151 of file vistoolsplinepath.cpp.

References path.

Referenced by VToolSplinePath::SetVisualization().

◆ type()

virtual int VisToolSplinePath::type ( ) const
inlinevirtual

Reimplemented from VisPath.

Definition at line 82 of file vistoolsplinepath.h.

References Type.

Member Data Documentation

◆ ctrlPoint

QPointF VisToolSplinePath::ctrlPoint
protected

Definition at line 101 of file vistoolsplinepath.h.

Referenced by Creating().

◆ ctrlPoints

QVector<VControlPointSpline *> VisToolSplinePath::ctrlPoints
protected

Definition at line 94 of file vistoolsplinepath.h.

Referenced by Creating(), getPoint(), and RefreshGeometry().

◆ isLeftMousePressed

bool VisToolSplinePath::isLeftMousePressed
protected

Definition at line 98 of file vistoolsplinepath.h.

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

◆ newCurveSegment

VCurvePathItem* VisToolSplinePath::newCurveSegment
protected

Definition at line 95 of file vistoolsplinepath.h.

Referenced by Creating(), and VisToolSplinePath().

◆ path

VSplinePath VisToolSplinePath::path
protected

Definition at line 96 of file vistoolsplinepath.h.

Referenced by Creating(), getPath(), RefreshGeometry(), and setPath().

◆ pointIsSelected

bool VisToolSplinePath::pointIsSelected
protected

Definition at line 99 of file vistoolsplinepath.h.

Referenced by Creating(), and getPoint().

◆ points

QVector<VScaledEllipse *> VisToolSplinePath::points
protected

Definition at line 93 of file vistoolsplinepath.h.

Referenced by getPoint().


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