1 #ifndef SIMPT_EDITOR_EDIT_CONTROL_LOGIC_H_INCLUDED
2 #define SIMPT_EDITOR_EDIT_CONTROL_LOGIC_H_INCLUDED
31 #include <boost/property_tree/ptree_fwd.hpp>
73 void ChangeAttributes(
const boost::property_tree::ptree& pt);
76 void CopyAttributes(
const boost::property_tree::ptree& pt);
79 Cell* CreateCell(
Node* node1,
Node* node2,
const QPointF& newPoint);
87 bool DeleteCell(
Cell* cell);
94 void DeleteCells(
const std::list<Cell*>& cells);
102 bool DeleteNode(
Node* node);
108 const std::vector<Cell*>&
GetCells()
const {
return m_mesh->GetMesh()->GetCells();}
114 const boost::property_tree::ptree& GetParameters()
const;
117 const std::vector<Node*>&
GetNodes()
const {
return m_mesh->GetMesh()->GetNodes();}
120 const std::vector<Wall*>&
GetWalls()
const {
return m_mesh->GetMesh()->GetWalls();}
123 bool MoveNode(
Node* node,
double x,
double y);
126 const boost::property_tree::ptree& ToPTree();
129 void ReplaceCell(
Cell* cell, std::list<QPolygonF> newCells);
141 void SelectCells(
const std::list<Cell*>& cells);
144 void SelectEdges(
const std::list<Edge>& edges);
147 void SelectNodes(
const std::list<Node*>& nodes);
150 void SetParameters(
const boost::property_tree::ptree&);
156 std::vector<Cell*> SplitCell(
Cell* cell,
157 Node* node1,
Node* node2,
bool modified =
false);
160 std::vector<Cell*> SplitCell(
Node* node1,
Node* node2);
179 void Moved(
Node* node,
double x,
double y);
182 void SelectionChanged();
189 void StatusInfoChanged(
const std::string& info);
192 void StoppedMoving();
196 Mesh BuildTwoSquaresMesh(
unsigned int chemical_count);
207 static boost::property_tree::ptree UpdatePTree(boost::property_tree::ptree pt1, boost::property_tree::ptree pt2);
212 boost::property_tree::ptree m_ptree;
214 std::list<Cell*> m_selected_cells;
215 std::list<Node*> m_selected_nodes;
216 std::list<Wall*> m_selected_walls;
222 #endif // end_of_include_guard
const std::list< Cell * > & SelectedCells() const
Get the selected cells.
const std::list< Node * > & SelectedNodes() const
Get the selected nodes.
A cell contains walls and nodes.
Namespace for SimPT tissue editor package.
Class for the composition of a tissue, containing its properties.
const std::list< Wall * > & SelectedWalls() const
Get the selected walls.
Interface for EditableMesh.
EditableMesh * GetMesh()
Get the mesh.
Namespace for the core simulator.
An Edge connects two nodes and is ambidextrous.
const std::vector< Node * > & GetNodes() const
Get all nodes.
const std::vector< Cell * > & GetCells() const
Get all cells.
Structure of cells; key data structure.
see the online Qt documentation
An editable mesh with actions to alter the construction of the mesh.
const std::vector< Wall * > & GetWalls() const
Get all walls.