1 #ifndef SIMPT_EDITOR_EDITABLE_CELL_ITEM_H_INCLUDED
2 #define SIMPT_EDITOR_EDITABLE_CELL_ITEM_H_INCLUDED
25 #include <QGraphicsPolygonItem>
26 #include <QGraphicsScene>
30 class EditableEdgeItem;
31 class EditableNodeItem;
71 const std::list<EditableNodeItem*>&
Nodes()
const;
76 const std::list<EditableEdgeItem*>&
Edges()
const;
150 virtual void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option,
QWidget* widget = 0);
154 std::list<EditableEdgeItem*> m_edges;
155 std::list<EditableNodeItem*> m_nodes;
158 QColor m_highlight_color;
161 static const QColor DEFAULT_HIGHLIGHT_COLOR;
166 #endif // end_of_include_guard
A cell contains walls and nodes.
Interface for an editable graphical representation.
Namespace for SimPT tissue editor package.
virtual void SetHighlightColor(const QColor &color=DEFAULT_HIGHLIGHT_COLOR)
Set the color the item should get when it gets highlighted.
void SetColor(const QColor &color)
Set the color of the cell.
void SetTransparent(bool transparent)
Set the transparency of a cell.
const std::list< EditableNodeItem * > & Nodes() const
Get the nodes in this cell.
const std::list< EditableEdgeItem * > & Edges() const
Get the edges in this cell.
see the online Qt documentation
void ReplaceTwoEdgesWithEdge(EditableEdgeItem *oldEdge1, EditableEdgeItem *oldEdge2, EditableEdgeItem *edge)
Replaces two given edges with one other edge.
Editable graphical representation for Edge.
virtual bool IsAtBoundary() const
Checks whether the cell is at the boundary of the cell complex.
Editable graphical representation for Node.
EditableCellItem(const std::list< EditableNodeItem * > &nodes, const std::list< EditableEdgeItem * > &edges, SimPT_Sim::Cell *cell)
Constructor.
Editable graphical representation for Cell.
bool ContainsEdge(EditableEdgeItem *edge) const
Checks whether this cell contains the given edge.
SimPT_Sim::Cell * Cell() const
Get the logical cell.
Interface for EditableItem.
void Update()
Update the cell.
see the online Qt documentation
virtual void Highlight(bool highlighted)
Highlights the node in the canvas.
bool ContainsNode(EditableNodeItem *node) const
Checks whether this cell contains the given node.
virtual ~EditableCellItem()
Destructor.
void ReplaceEdgeWithTwoEdges(EditableEdgeItem *oldEdge, EditableEdgeItem *edge1, EditableEdgeItem *edge2)
Replaces a given edge with two other edges.