VPTissue Reference Manual
|
Class for the composition of a tissue, containing its properties. More...
#include <EditControlLogic.h>
Signals | |
void | Modified () |
Emitted when data has been modified. | |
void | Moved (Node *node, double x, double y) |
Emitted when the given node has been moved to the given coordinates. More... | |
void | SelectionChanged () |
Emitted when selection has changed. | |
void | StatusInfoChanged (const std::string &info) |
Emitted when certain info about the logic has changed. More... | |
void | StoppedMoving () |
Emitted when data has been modified. | |
Public Member Functions | |
EditControlLogic (unsigned int chemical_count) | |
Constructs a default tissue, which is an upward triangle. More... | |
EditControlLogic (const boost::property_tree::ptree &pt) | |
Constructs a tissue from a ptree. More... | |
virtual | ~EditControlLogic () |
Destructor. | |
void | ChangeAttributes (const boost::property_tree::ptree &pt) |
Change the attributes of the selected items to the attributes in the given ptree. More... | |
void | CopyAttributes (const boost::property_tree::ptree &pt) |
Copy the given attributes to the selected cells. | |
Cell * | CreateCell (Node *node1, Node *node2, const QPointF &newPoint) |
See EditableMesh::CreateCell for more information. | |
bool | DeleteCell (Cell *cell) |
Delete the given cell in the mesh. More... | |
void | DeleteCells (const std::list< Cell * > &cells) |
Delete the given cells in the mesh. More... | |
bool | DeleteNode (Node *node) |
Delete the given node in the mesh. More... | |
void | Deselect () |
Deselect the selected items. | |
const std::vector< Cell * > & | GetCells () const |
Get all cells. | |
EditableMesh * | GetMesh () |
Get the mesh. | |
const std::vector< Node * > & | GetNodes () const |
Get all nodes. | |
const boost::property_tree::ptree & | GetParameters () const |
const std::vector< Wall * > & | GetWalls () const |
Get all walls. | |
bool | MoveNode (Node *node, double x, double y) |
See EditableMesh::DisplaceCell for more information. | |
void | ReplaceCell (Cell *cell, std::list< QPolygonF > newCells) |
See EditableMesh::ReplaceCell for more information. | |
void | SelectCells (const std::list< Cell * > &cells) |
Select the given cells. | |
const std::list< Cell * > & | SelectedCells () const |
Get the selected cells. | |
void | SelectEdges (const std::list< Edge > &edges) |
Select the given edges. | |
const std::list< Node * > & | SelectedNodes () const |
Get the selected nodes. | |
const std::list< Wall * > & | SelectedWalls () const |
Get the selected walls. | |
void | SelectNodes (const std::list< Node * > &nodes) |
Select the given nodes. | |
void | SetParameters (const boost::property_tree::ptree &) |
Set parameters ptree. | |
std::vector< Cell * > | SplitCell (Cell *cell, Node *node1, Node *node2, bool modified=false) |
See EditableMesh::SplitCell for more information. | |
std::vector< Cell * > | SplitCell (Node *node1, Node *node2) |
See EditableMesh::SplitCell for more information. | |
Node * | SplitEdge (const Edge &edge) |
Split a given edge at the center. More... | |
void | StopMoveNode () |
Stop moving a node after moving it. | |
const boost::property_tree::ptree & | ToPTree () |
Get the PTree associated with the mesh. | |
Class for the composition of a tissue, containing its properties.
Definition at line 47 of file EditControlLogic.h.
SimPT_Editor::EditControlLogic::EditControlLogic | ( | unsigned int | chemical_count | ) |
Constructs a default tissue, which is an upward triangle.
chemical_count | The chemical count of the mesh. |
Definition at line 49 of file EditControlLogic.cpp.
SimPT_Editor::EditControlLogic::EditControlLogic | ( | const boost::property_tree::ptree & | pt | ) |
Constructs a tissue from a ptree.
pt | Ptree containing parameters and mesh subtrees. |
ptree_error | When ptree doesn't contain a valid tissue. |
void SimPT_Editor::EditControlLogic::ChangeAttributes | ( | const boost::property_tree::ptree & | pt | ) |
Change the attributes of the selected items to the attributes in the given ptree.
The values that should not be changed, should be marked with a '?'.
Definition at line 113 of file EditControlLogic.cpp.
References Modified().
bool SimPT_Editor::EditControlLogic::DeleteCell | ( | Cell * | cell | ) |
Delete the given cell in the mesh.
A cell can only be deleted if it's at the boundary of the mesh.
cell | The given cell. |
Definition at line 185 of file EditControlLogic.cpp.
References DeleteCells().
void SimPT_Editor::EditControlLogic::DeleteCells | ( | const std::list< Cell * > & | cells | ) |
Delete the given cells in the mesh.
The mesh should stay consistent, so use this function with caution.
cells | The cells that will be deleted. |
Definition at line 196 of file EditControlLogic.cpp.
References SimPT_Editor::EditableMesh::DeleteCells(), Deselect(), and Modified().
Referenced by DeleteCell().
bool SimPT_Editor::EditControlLogic::DeleteNode | ( | Node * | node | ) |
Delete the given node in the mesh.
A node can only be deleted if it is part of cells with more than three corners and when it only is part of two edges.
node | The given node. |
Definition at line 204 of file EditControlLogic.cpp.
References SimPT_Editor::EditableMesh::DeleteTwoDegreeNode(), Deselect(), and Modified().
|
signal |
Emitted when the given node has been moved to the given coordinates.
node | The given node |
x | The x-coordinate. |
y | The y-coordinate. |
Referenced by MoveNode().
Split a given edge at the center.
edge | The given edge. |
Definition at line 350 of file EditControlLogic.cpp.
References Modified(), and SimPT_Editor::EditableMesh::SplitEdge().
|
signal |
Emitted when certain info about the logic has changed.
This includes the IDs of the selected items.
info | The information in string form. |
Referenced by Deselect(), SelectCells(), SelectEdges(), and SelectNodes().