Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
Public Types | Public Slots | Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes | Protected Member Functions | Private Attributes
Node Class Reference
Inheritance diagram for Node:
[legend]

Public Types

enum  { Type = static_cast<int>(UserType) + 1 }
 

Public Slots

void setName (QString const &t_name)
 
void setNodeSize (qint32 t_size)
 
void setColor (QColor t_color)
 
void setNodeType (qint32 t_nodeType)
 
void changeNode (QAction *action=nullptr)
 
void changeColor ()
 
void changeName ()
 
void moveLabel ()
 
void updateEdge ()
 

Public Member Functions

 Node (Diagram *DiagramWidget)
 
int type () const override
 
QString getName () const
 
qint32 getNodeSize () const
 
QColor getColor () const
 
qint32 getNodeType () const
 
bool hasGraphFocus () const
 
bool isOperator () const
 
void focusInGraph ()
 
void unFocusInGraph ()
 
void setOperator (bool t_op)
 
void setGridPos (qreal x, qreal y)
 
void setDiagramWidget (DiagramWidget *t_widget)
 
QRectF boundingRect () const override
 
QPainterPath shape () const override
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
 
void paintCross (QPainter *painter)
 
void paintDisk (QPainter *painter)
 
void paintCircle (QPainter *painter)
 
void paintHatch (QPainter *painter)
 
void show ()
 
void hide ()
 

Static Public Member Functions

static std::pair< QPointF, QPointF > getEffectiveNodes (Node *first, Node *second)
 

Data Fields

Proxylabel = nullptr
 

Static Public Attributes

static constexpr qint32 size = 16
 
static constexpr qreal zValue = -1
 

Protected Member Functions

QVariant itemChange (GraphicsItemChange change, const QVariant &value) override
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 
void dropEvent (QGraphicsSceneDragDropEvent *event) override
 
void update ()
 

Private Attributes

QPointF oldPos
 
Diagramgraph
 
DiagramWidgetwidget
 
QColor color
 
qint32 nodeSize
 
qint32 nodeType
 
qint32 doubleClicked = 0
 
bool graphFocus
 
bool displayNode
 

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