VPTissue Reference Manual
SimPT_Editor::EditableCellItem Class Reference

Editable graphical representation for Cell. More...

#include <EditableCellItem.h>

Inheritance diagram for SimPT_Editor::EditableCellItem:
Inheritance graph
Collaboration diagram for SimPT_Editor::EditableCellItem:
Collaboration graph

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::CellCell () 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.
 

Detailed Description

Editable graphical representation for Cell.

Definition at line 36 of file EditableCellItem.h.

Constructor & Destructor Documentation

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.

Parameters
nodesThe endpoints of the cell. The points should be in order of connection.
edgesThe edges of the cell.
cellThe logical representation of the cell.

Definition at line 34 of file EditableCellItem.cpp.

References ReplaceEdgeWithTwoEdges(), ReplaceTwoEdgesWithEdge(), and Update().

Here is the call graph for this function:

Member Function Documentation

bool SimPT_Editor::EditableCellItem::ContainsEdge ( EditableEdgeItem edge) const

Checks whether this cell contains the given edge.

Parameters
edgeThe given edge.
Returns
True if the cell contains the 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.

Parameters
nodeThe given node.
Returns
True if the cell contains the node.

Definition at line 75 of file EditableCellItem.cpp.

void SimPT_Editor::EditableCellItem::Highlight ( bool  highlighted)
virtual

Highlights the node in the canvas.

Parameters
highlightedTrue if the cell should be highlighted.

Implements SimPT_Editor::EditableItem.

Definition at line 86 of file EditableCellItem.cpp.

bool SimPT_Editor::EditableCellItem::IsAtBoundary ( ) const
virtual

Checks whether the cell is at the boundary of the cell complex.

Returns
True if the cell is at the boundary.

Implements SimPT_Editor::EditableItem.

Definition at line 55 of file EditableCellItem.cpp.

void SimPT_Editor::EditableCellItem::ReplaceEdgeWithTwoEdges ( EditableEdgeItem oldEdge,
EditableEdgeItem edge1,
EditableEdgeItem edge2 
)
slot

Replaces a given edge with two other edges.

Parameters
oldEdgeThe edge which should be replaced.
edge1The first replacement edge.
edge2The 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().

Here is the call graph for this function:

Here is the caller graph for this function:

void SimPT_Editor::EditableCellItem::ReplaceTwoEdgesWithEdge ( EditableEdgeItem oldEdge1,
EditableEdgeItem oldEdge2,
EditableEdgeItem edge 
)
slot

Replaces two given edges with one other edge.

Parameters
oldEdge1The first given edge which should be replaced.
oldEdge2The second given edge which should be replaced.
edgeThe replacement edge.

Definition at line 164 of file EditableCellItem.cpp.

References SimPT_Editor::EditableEdgeItem::ConnectingNode(), ReplaceEdgeWithTwoEdges(), and Update().

Referenced by EditableCellItem(), and ReplaceEdgeWithTwoEdges().

Here is the call graph for this function:

Here is the caller graph for this function:

void SimPT_Editor::EditableCellItem::SetColor ( const QColor &  color)

Set the color of the cell.

The alpha value will be ignored.

Parameters
colorThe given color.

Definition at line 96 of file EditableCellItem.cpp.

void SimPT_Editor::EditableCellItem::SetHighlightColor ( const QColor &  color = DEFAULT_HIGHLIGHT_COLOR)
virtual

Set the color the item should get when it gets highlighted.

The alpha value will be ignored.

Parameters
colorThe 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.

Parameters
transparentTrue if the cell should be transparent.

Definition at line 110 of file EditableCellItem.cpp.

Referenced by SimPT_Editor::TissueGraphicsView::AddCell().

Here is the caller graph for this function:


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