16#include <QtGui/qpen.h>
17#include <QtCore/qrect.h>
34 virtual void paint(QPainter* _painter,
const QStyleOptionGraphicsItem* _opt, QWidget* _widget)
override;
48 QPointF
destPos(
void)
const {
return m_dest; };
54 void calculateSmoothLinePoints(QPointF& _control1, QPointF& _control2)
const;
55 void calculateSmoothLineStep(
const QPointF& _origin,
const QPointF& _destination,
double _halfdistX,
double _halfdistY, QPointF& _control,
ot::ConnectionDirection _direction)
const;
This file contains defines that may be used simplyfy class creation.
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
ConnectionShape
Definition GraphicsConnectionCfg.h:24
Definition GraphicsConnectionPreviewItem.h:23
void setDestDir(ot::ConnectionDirection _direction)
Definition GraphicsConnectionPreviewItem.cpp:106
void setOriginDir(ot::ConnectionDirection _direction)
Definition GraphicsConnectionPreviewItem.cpp:94
ot::GraphicsConnectionCfg::ConnectionShape getConnectionShape(void) const
Definition GraphicsConnectionPreviewItem.h:39
QPointF originPos(void) const
Definition GraphicsConnectionPreviewItem.h:42
virtual void paint(QPainter *_painter, const QStyleOptionGraphicsItem *_opt, QWidget *_widget) override
Definition GraphicsConnectionPreviewItem.cpp:52
QPointF destPos(void) const
Definition GraphicsConnectionPreviewItem.h:48
void setDestPos(const QPointF &_dest)
Definition GraphicsConnectionPreviewItem.cpp:100
ot::ConnectionDirection originDir(void) const
Definition GraphicsConnectionPreviewItem.h:45
virtual ~GraphicsConnectionPreviewItem()
Definition GraphicsConnectionPreviewItem.cpp:22
GraphicsConnectionPreviewItem()
Definition GraphicsConnectionPreviewItem.cpp:16
void setOriginPos(const QPointF &_origin)
Definition GraphicsConnectionPreviewItem.cpp:88
ot::ConnectionDirection destDir(void) const
Definition GraphicsConnectionPreviewItem.h:51
void setConnectionShape(ot::GraphicsConnectionCfg::ConnectionShape _shape)
Definition GraphicsConnectionPreviewItem.cpp:82
virtual QRectF boundingRect(void) const override
Definition GraphicsConnectionPreviewItem.cpp:29
ConnectionDirection
Describes in which direction a connetion from an item is starting.
Definition GuiTypes.h:65