VPTissue Reference Manual
|
Editable graphical representation for Cell. More...
#include <EditableCellItem.h>
Public Slots | |
void | ReplaceEdgeWithTwoEdges (EditableEdgeItem *oldEdge, EditableEdgeItem *edge1, EditableEdgeItem *edge2) |
Replaces a given edge with two other edges. More... | |
void | ReplaceTwoEdgesWithEdge (EditableEdgeItem *oldEdge1, EditableEdgeItem *oldEdge2, EditableEdgeItem *edge) |
Replaces two given edges with one other edge. More... | |
void | Update () |
Update the cell. | |
Public Slots inherited from SimPT_Editor::EditableItem | |
virtual void | Update () |
Update this item. | |
Public Member Functions | |
EditableCellItem (const std::list< EditableNodeItem * > &nodes, const std::list< EditableEdgeItem * > &edges, SimPT_Sim::Cell *cell) | |
Constructor. More... | |
virtual | ~EditableCellItem () |
Destructor. | |
SimPT_Sim::Cell * | Cell () const |
Get the logical cell. | |
bool | ContainsEdge (EditableEdgeItem *edge) const |
Checks whether this cell contains the given edge. More... | |
bool | ContainsNode (EditableNodeItem *node) const |
Checks whether this cell contains the given node. More... | |
const std::list< EditableEdgeItem * > & | Edges () const |
Get the edges in this cell. | |
virtual void | Highlight (bool highlighted) |
Highlights the node in the canvas. More... | |
virtual bool | IsAtBoundary () const |
Checks whether the cell is at the boundary of the cell complex. More... | |
const std::list< EditableNodeItem * > & | Nodes () const |
Get the nodes in this cell. | |
void | SetColor (const QColor &color) |
Set the color of the cell. More... | |
virtual void | SetHighlightColor (const QColor &color=DEFAULT_HIGHLIGHT_COLOR) |
Set the color the item should get when it gets highlighted. More... | |
void | SetTransparent (bool transparent) |
Set the transparency of a cell. More... | |
Public Member Functions inherited from SimPT_Editor::EditableItem | |
EditableItem () | |
Constructor. | |
virtual | ~EditableItem () |
Destructor. | |
Editable graphical representation for Cell.
Definition at line 36 of file EditableCellItem.h.
SimPT_Editor::EditableCellItem::EditableCellItem | ( | const std::list< EditableNodeItem * > & | nodes, |
const std::list< EditableEdgeItem * > & | edges, | ||
SimPT_Sim::Cell * | cell | ||
) |
Constructor.
Both the endpoints and the edges should be listed in order of connection. The endpoints will correspond to the endpoints of the polygon itself.
nodes | The endpoints of the cell. The points should be in order of connection. |
edges | The edges of the cell. |
cell | The logical representation of the cell. |
Definition at line 34 of file EditableCellItem.cpp.
References ReplaceEdgeWithTwoEdges(), ReplaceTwoEdgesWithEdge(), and Update().
bool SimPT_Editor::EditableCellItem::ContainsEdge | ( | EditableEdgeItem * | edge | ) | const |
Checks whether this cell contains the given edge.
edge | The given edge. |
Definition at line 81 of file EditableCellItem.cpp.
bool SimPT_Editor::EditableCellItem::ContainsNode | ( | EditableNodeItem * | node | ) | const |
Checks whether this cell contains the given node.
node | The given node. |
Definition at line 75 of file EditableCellItem.cpp.
|
virtual |
Highlights the node in the canvas.
highlighted | True if the cell should be highlighted. |
Implements SimPT_Editor::EditableItem.
Definition at line 86 of file EditableCellItem.cpp.
|
virtual |
Checks whether the cell is at the boundary of the cell complex.
Implements SimPT_Editor::EditableItem.
Definition at line 55 of file EditableCellItem.cpp.
|
slot |
Replaces a given edge with two other edges.
oldEdge | The edge which should be replaced. |
edge1 | The first replacement edge. |
edge2 | The second replacement edge. |
Definition at line 120 of file EditableCellItem.cpp.
References SimPT_Editor::EditableEdgeItem::ConnectingNode(), SimPT_Editor::EditableEdgeItem::First(), ReplaceTwoEdgesWithEdge(), SimPT_Editor::EditableEdgeItem::Second(), and Update().
Referenced by EditableCellItem(), and ReplaceTwoEdgesWithEdge().
|
slot |
Replaces two given edges with one other edge.
oldEdge1 | The first given edge which should be replaced. |
oldEdge2 | The second given edge which should be replaced. |
edge | The replacement edge. |
Definition at line 164 of file EditableCellItem.cpp.
References SimPT_Editor::EditableEdgeItem::ConnectingNode(), ReplaceEdgeWithTwoEdges(), and Update().
Referenced by EditableCellItem(), and ReplaceEdgeWithTwoEdges().
void SimPT_Editor::EditableCellItem::SetColor | ( | const QColor & | color | ) |
Set the color of the cell.
The alpha value will be ignored.
color | The given color. |
Definition at line 96 of file EditableCellItem.cpp.
|
virtual |
Set the color the item should get when it gets highlighted.
The alpha value will be ignored.
color | The given color. |
Implements SimPT_Editor::EditableItem.
Definition at line 103 of file EditableCellItem.cpp.
void SimPT_Editor::EditableCellItem::SetTransparent | ( | bool | transparent | ) |
Set the transparency of a cell.
transparent | True if the cell should be transparent. |
Definition at line 110 of file EditableCellItem.cpp.
Referenced by SimPT_Editor::TissueGraphicsView::AddCell().