#include <io.h>

Inheritance diagram for dnai::views::Io:
Inheritance graph
Collaboration diagram for dnai::views::Io:
Collaboration graph

Public Slots

virtual void setIsLink (bool isLink) override
 
virtual void setIsHover (bool isHover) override
 
void setCurveColor (const QColor &curveColor)
 
void redrawLinks (const QColor &color)
 

Signals

void nbSegmentsChanged (uint n)
 
void typeChanged (int type)
 
void linked (const QVariant &name, const QVariant &instructionModel)
 
void unlinked (const QVariant &name, const QVariant &instructionModel)
 
void isLinkChanged (bool isLink)
 
void isHoverChanged (bool isHover)
 
void curveColorChanged (const QColor &curveColor)
 
- Signals inherited from dnai::views::CustomShape
void radiusChanged (qreal radius)
 
void borderWidthChanged (qreal w)
 
void fillColorChanged (const QColor &color)
 
void borderColorChanged (const QColor &color)
 

Public Member Functions

 Io (QQuickItem *parent=nullptr)
 
 ~Io ()
 
virtual void refreshBackendIo ()
 Refresh BackendIo. More...
 
virtual QSGNode * updatePaintNode (QSGNode *, UpdatePaintNodeData *) override
 return the current BaseIO More...
 
virtual QPointF getCanvasPos () const override
 
virtual GenericNodegetNode () override
 
virtual qreal scaleFactor () const override
 Return the current scale factor. More...
 
virtual QPointF scalePos () const override
 Return the position with scale aplyed. More...
 
virtual QPointF realPos () const override
 Return the position without the scale applyed. More...
 
uint nbSegments () const
 
int type () const
 
void setNbSegments (uint n)
 
void setType (int type)
 
bool isLink () const
 
bool isHover () const
 
virtual const QColor & curveColor () const override
 
- Public Member Functions inherited from dnai::views::LinkableBezierItem
 LinkableBezierItem (QQuickItem *parent=nullptr)
 
interfaces::ALinkablegetLinkable () const
 
virtual void updateLink ()=0
 
virtual void componentComplete () override=0
 Make componentComplete Abstract. More...
 
virtual void unlinkAll ()
 
virtual void asyncUnlinkAll ()
 
void connect (LinkableBezierItem *a)
 
virtual void setIsLink (bool isLink)=0
 
virtual void setIsHover (bool isHover)=0
 
- Public Member Functions inherited from dnai::views::CustomShape
 CustomShape (QQuickItem *parent=nullptr)
 
qreal radius () const
 
qreal borderWidth () const
 
const QColor & fillColor () const
 
const QColor & borderColor () const
 
void setRadius (qreal radius)
 
virtual void setBorderWidth (qreal w)
 
virtual void setFillColor (const QColor &color)
 
virtual void setBorderColor (const QColor &color)
 
void resetRadius ()
 
void resetBorderWidth ()
 
void resetBorderColor ()
 
void resetFillColor ()
 
void resetPos ()
 
void resetShape ()
 

Static Public Attributes

static BaseIoCurrentHover = nullptr
 

Protected Attributes

uint m_nbSegments
 
enums::IoTypeRessouce::IoType m_type
 
GenericNodem_genericNode {}
 
bool m_holdClick {}
 
- Protected Attributes inherited from dnai::views::LinkableBezierItem
BezierCurvem_currentCurve
 
CanvasNodem_canvas
 
interfaces::ALinkablem_linkable
 
LinkStatus m_status
 
- Protected Attributes inherited from dnai::views::CustomShape
qreal m_radius
 
qreal m_borderWidth
 
QColor m_fillColor
 
QColor m_borderColor
 
qreal m_saveRadius
 
qreal m_saveBorderWidth
 
QColor m_saveFillColor
 
QColor m_saveBorderColor
 
QPointF m_savePos
 

Properties

uint nbSegments
 
int type
 
bool isLink
 
bool isHover
 
QColor curveColor
 
- Properties inherited from dnai::views::CustomShape
qreal radius
 
qreal borderWidth
 
QColor fillColor
 
QColor borderColor
 

Private Attributes

bool m_isLink
 
bool m_isHover
 
QColor m_curveColor
 

Additional Inherited Members

- Protected Types inherited from dnai::views::LinkableBezierItem
enum  LinkStatus { Normal, Hover, Linked }
 
- Protected Member Functions inherited from dnai::views::LinkableBezierItem
virtual LinkableBezierItemfindLinkableBezierItem (GenericNode *n, const QPointF &p)=0
 return the IO under the point p of the Node n More...
 
virtual void mouseMoveEvent (QMouseEvent *event) override
 Override mouseMoveEvent. More...
 
virtual void mousePressEvent (QMouseEvent *event) override
 Override mousePressEvent. More...
 
virtual void mouseReleaseEvent (QMouseEvent *event) override
 Override mouseReleaseEvent. More...
 
virtual void afterRealease (Link *l)
 

Constructor & Destructor Documentation

dnai::views::Io::Io ( QQuickItem *  parent = nullptr)
explicit
dnai::views::Io::~Io ( )

Member Function Documentation

virtual const QColor& dnai::views::Io::curveColor ( ) const
overridevirtual
void dnai::views::Io::curveColorChanged ( const QColor &  curveColor)
signal
QPointF dnai::views::Io::getCanvasPos ( ) const
overridevirtual
GenericNode * dnai::views::Io::getNode ( )
overridevirtual
bool dnai::views::Io::isHover ( ) const
void dnai::views::Io::isHoverChanged ( bool  isHover)
signal
bool dnai::views::Io::isLink ( ) const
void dnai::views::Io::isLinkChanged ( bool  isLink)
signal
void dnai::views::Io::linked ( const QVariant &  name,
const QVariant &  instructionModel 
)
signal
uint dnai::views::Io::nbSegments ( ) const
inline
void dnai::views::Io::nbSegmentsChanged ( uint  n)
signal
QPointF dnai::views::Io::realPos ( ) const
overridevirtual

Return the position without the scale applyed.

Returns

Implements dnai::interfaces::IScalable.

void dnai::views::Io::redrawLinks ( const QColor &  color)
slot
void dnai::views::Io::refreshBackendIo ( )
virtual

Refresh BackendIo.

Reimplemented in dnai::views::Input, and dnai::views::Output.

qreal dnai::views::Io::scaleFactor ( ) const
overridevirtual

Return the current scale factor.

Returns

Implements dnai::interfaces::IScalable.

QPointF dnai::views::Io::scalePos ( ) const
overridevirtual

Return the position with scale aplyed.

Returns

Implements dnai::interfaces::IScalable.

void dnai::views::Io::setCurveColor ( const QColor &  curveColor)
slot
void dnai::views::Io::setIsHover ( bool  isHover)
overridevirtualslot
void dnai::views::Io::setIsLink ( bool  isLink)
overridevirtualslot
void dnai::views::Io::setNbSegments ( uint  n)
void dnai::views::Io::setType ( int  type)
int dnai::views::Io::type ( ) const
inline
void dnai::views::Io::typeChanged ( int  type)
signal
void dnai::views::Io::unlinked ( const QVariant &  name,
const QVariant &  instructionModel 
)
signal
QSGNode * dnai::views::Io::updatePaintNode ( QSGNode *  oldNode,
UpdatePaintNodeData *  data 
)
overridevirtual

return the current BaseIO

Returns
BaseIO* Override updatePaintNode and draw a beautifull IO

Reimplemented from dnai::views::CustomShape.

Member Data Documentation

BaseIo * dnai::views::Io::CurrentHover = nullptr
static
QColor dnai::views::Io::m_curveColor
private
GenericNode* dnai::views::Io::m_genericNode {}
protected
bool dnai::views::Io::m_holdClick {}
protected
bool dnai::views::Io::m_isHover
private
bool dnai::views::Io::m_isLink
private
uint dnai::views::Io::m_nbSegments
protected
enums::IoTypeRessouce::IoType dnai::views::Io::m_type
protected

Property Documentation

const QColor & dnai::views::Io::curveColor
readwrite
bool dnai::views::Io::isHover
readwrite
bool dnai::views::Io::isLink
readwrite
uint dnai::views::Io::nbSegments
readwrite
int dnai::views::Io::type
readwrite

The documentation for this class was generated from the following files:
  • Gui/app/include/dnai/views/io.h
  • Gui/app/GeneratedFiles/Debug/moc_io.cpp
  • Gui/app/src/dnai/views/io.cpp