1 #ifndef SIMPT_EDITOR_EDITABLE_EDGE_ITEM_H_INCLUDED
2 #define SIMPT_EDITOR_EDITABLE_EDGE_ITEM_H_INCLUDED
25 #include <QGraphicsLineItem>
26 #include <QGraphicsScene>
30 class EditableNodeItem;
107 virtual void Highlight(
bool highlighted);
163 virtual void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option,
QWidget* widget = 0);
172 QColor m_highlight_color;
175 static const QColor DEFAULT_HIGHLIGHT_COLOR;
180 #endif // end_of_include_guard
virtual void Highlight(bool highlighted)
Highlights the edge in the canvas.
EditableNodeItem * Second() const
Returns the second endpoint of the edge item.
Interface for an editable graphical representation.
Namespace for SimPT tissue editor package.
bool ContainsEndpoint(EditableNodeItem *endpoint) const
Checks whether the given endpoint is an endpoint of this edge.
see the online Qt documentation
virtual void SetHighlightColor(const QColor &color=DEFAULT_HIGHLIGHT_COLOR)
Set the color the item should get when it gets highlighted.
SimPT_Sim::Edge Edge() const
Returns the edge associated with this item.
virtual void Update()
Update the edge.
An Edge connects two nodes and is ambidextrous.
EditableEdgeItem * MergeEdge(EditableEdgeItem *edge)
Merge the given edge with this edge into one.
void EdgeMerged(EditableEdgeItem *oldEdge1, EditableEdgeItem *oldEdge2, EditableEdgeItem *edge)
Emitted when the two given edges should be replaced by the new edge.
Editable graphical representation for Edge.
EditableEdgeItem(EditableNodeItem *node1, EditableNodeItem *node2)
Constructor.
Editable graphical representation for Node.
EditableNodeItem * First() const
Returns the first endpoint of the edge item.
EditableNodeItem * ConnectingNode(EditableEdgeItem *edge) const
Returns the connecting node when this edge and the given edge connect.
bool ContainsEndpoints(EditableNodeItem *endpoint1, EditableNodeItem *endpoint2) const
Checks whether the given endpoints match the endpoints of this edge.
std::pair< EditableEdgeItem *, EditableEdgeItem * > SplitEdge(EditableNodeItem *node)
Split the edge in two edges on the given node.
virtual bool IsAtBoundary() const
Checks whether the endpoints of the edge are at the boundary of the cell complex. ...
Interface for EditableItem.
see the online Qt documentation
virtual ~EditableEdgeItem()
Destructor.
void EdgeSplitted(EditableEdgeItem *oldEdge, EditableEdgeItem *edge1, EditableEdgeItem *edge2)
Emitted when a given edge should be replaced with two other edges.