![]() |
VPTissue Reference Manual
|
Editable graphical representation for Edge. More...
#include <EditableEdgeItem.h>


Public Slots | |
| virtual void | Update () |
| Update the edge. | |
Public Slots inherited from SimPT_Editor::EditableItem | |
| virtual void | Update () |
| Update this item. | |
Signals | |
| void | EdgeMerged (EditableEdgeItem *oldEdge1, EditableEdgeItem *oldEdge2, EditableEdgeItem *edge) |
| Emitted when the two given edges should be replaced by the new edge. More... | |
| void | EdgeSplitted (EditableEdgeItem *oldEdge, EditableEdgeItem *edge1, EditableEdgeItem *edge2) |
| Emitted when a given edge should be replaced with two other edges. More... | |
Public Member Functions | |
| EditableEdgeItem (EditableNodeItem *node1, EditableNodeItem *node2) | |
| Constructor. More... | |
| virtual | ~EditableEdgeItem () |
| Destructor. | |
| EditableNodeItem * | ConnectingNode (EditableEdgeItem *edge) const |
| Returns the connecting node when this edge and the given edge connect. More... | |
| bool | ContainsEndpoint (EditableNodeItem *endpoint) const |
| Checks whether the given endpoint is an endpoint of this edge. More... | |
| bool | ContainsEndpoints (EditableNodeItem *endpoint1, EditableNodeItem *endpoint2) const |
| Checks whether the given endpoints match the endpoints of this edge. More... | |
| SimPT_Sim::Edge | Edge () const |
| Returns the edge associated with this item. More... | |
| EditableNodeItem * | First () const |
| Returns the first endpoint of the edge item. | |
| virtual void | Highlight (bool highlighted) |
| Highlights the edge in the canvas. More... | |
| virtual bool | IsAtBoundary () const |
| Checks whether the endpoints of the edge are at the boundary of the cell complex. More... | |
| EditableEdgeItem * | MergeEdge (EditableEdgeItem *edge) |
| Merge the given edge with this edge into one. More... | |
| EditableNodeItem * | Second () const |
| Returns the second endpoint of the edge item. | |
| virtual void | SetHighlightColor (const QColor &color=DEFAULT_HIGHLIGHT_COLOR) |
| Set the color the item should get when it gets highlighted. More... | |
| std::pair< EditableEdgeItem *, EditableEdgeItem * > | SplitEdge (EditableNodeItem *node) |
| Split the edge in two edges on the given node. More... | |
Public Member Functions inherited from SimPT_Editor::EditableItem | |
| EditableItem () | |
| Constructor. | |
| virtual | ~EditableItem () |
| Destructor. | |
Editable graphical representation for Edge.
Definition at line 35 of file EditableEdgeItem.h.
| SimPT_Editor::EditableEdgeItem::EditableEdgeItem | ( | EditableNodeItem * | node1, |
| EditableNodeItem * | node2 | ||
| ) |
Constructor.
Remember that the order of the endpoints doesn't matter.
| node1 | The first endpoint of the edge. |
| node2 | The second endpoint of the edge. |
Definition at line 38 of file EditableEdgeItem.cpp.
References Update().
Referenced by MergeEdge(), and SplitEdge().


| EditableNodeItem * SimPT_Editor::EditableEdgeItem::ConnectingNode | ( | EditableEdgeItem * | edge | ) | const |
Returns the connecting node when this edge and the given edge connect.
| edge | The given edge. |
Definition at line 66 of file EditableEdgeItem.cpp.
Referenced by MergeEdge(), SimPT_Editor::EditableCellItem::ReplaceEdgeWithTwoEdges(), and SimPT_Editor::EditableCellItem::ReplaceTwoEdgesWithEdge().

| bool SimPT_Editor::EditableEdgeItem::ContainsEndpoint | ( | EditableNodeItem * | endpoint | ) | const |
Checks whether the given endpoint is an endpoint of this edge.
| endpoint | The given endpoint. |
Definition at line 56 of file EditableEdgeItem.cpp.
Referenced by ContainsEndpoints().

| bool SimPT_Editor::EditableEdgeItem::ContainsEndpoints | ( | EditableNodeItem * | endpoint1, |
| EditableNodeItem * | endpoint2 | ||
| ) | const |
Checks whether the given endpoints match the endpoints of this edge.
| endpoint1 | The first endpoint of the edge. |
| endpoint2 | The second endpoint of the edge. |
Definition at line 61 of file EditableEdgeItem.cpp.
References ContainsEndpoint().
Referenced by MergeEdge().


| SimPT_Sim::Edge SimPT_Editor::EditableEdgeItem::Edge | ( | ) | const |
Returns the edge associated with this item.
Definition at line 79 of file EditableEdgeItem.cpp.
References SimPT_Editor::EditableNodeItem::Node().

|
signal |
Emitted when the two given edges should be replaced by the new edge.
| oldEdge1 | The edge which should be replaced. |
| oldEdge2 | The first replacement edge. |
| edge | The second replacement edge. |
Referenced by MergeEdge().

|
signal |
Emitted when a given edge should be replaced with two other edges.
| oldEdge | The edge which should be replaced. |
| edge1 | The first replacement edge. |
| edge2 | The second replacement edge. |
Referenced by SplitEdge().

|
virtual |
Highlights the edge in the canvas.
| highlighted | True if the edge should be highlighted. |
Implements SimPT_Editor::EditableItem.
Definition at line 84 of file EditableEdgeItem.cpp.
|
virtual |
Checks whether the endpoints of the edge are at the boundary of the cell complex.
Implements SimPT_Editor::EditableItem.
Definition at line 51 of file EditableEdgeItem.cpp.
References SimPT_Editor::EditableNodeItem::IsAtBoundary().

| EditableEdgeItem * SimPT_Editor::EditableEdgeItem::MergeEdge | ( | EditableEdgeItem * | edge | ) |
Merge the given edge with this edge into one.
The edges should have exactly one connection point.
| edge | The given edge. |
Definition at line 98 of file EditableEdgeItem.cpp.
References ConnectingNode(), ContainsEndpoints(), EdgeMerged(), EditableEdgeItem(), First(), and Second().

|
virtual |
Set the color the item should get when it gets highlighted.
| color | The given color. |
Implements SimPT_Editor::EditableItem.
Definition at line 93 of file EditableEdgeItem.cpp.
| std::pair< EditableEdgeItem *, EditableEdgeItem * > SimPT_Editor::EditableEdgeItem::SplitEdge | ( | EditableNodeItem * | node | ) |
Split the edge in two edges on the given node.
| node | The given node. |
Definition at line 126 of file EditableEdgeItem.cpp.
References EdgeSplitted(), and EditableEdgeItem().
