1 #ifndef SIMPT_EDITOR_TISSUE_GRAPHICS_VIEW_H_INCLUDED
2 #define SIMPT_EDITOR_TISSUE_GRAPHICS_VIEW_H_INCLUDED
32 #include <boost/property_tree/ptree.hpp>
33 #include <QGraphicsScene>
38 class QGraphicsPixmapItem;
43 class BackgroundDialog;
44 class EditableCellItem;
45 class EditableEdgeItem;
46 class EditableNodeItem;
47 class EditControlLogic;
48 class SelectByIDWidget;
95 void Initialize(std::shared_ptr<EditControlLogic> tissue,
Mode mode = Mode::DISPLAY);
102 bool SelectedIsAtBoundary()
const;
110 bool SelectedIsDeletable()
const;
118 bool SelectedIsSplitable()
const;
149 Mode GetMode()
const;
160 void SetMode(
Mode mode);
165 void GenerateRegularPattern();
170 void GenerateVoronoiPattern();
177 void SetColorComponent(
const boost::property_tree::ptree& parameters);
195 void CopyAttributes();
220 void UpdateMovedNode();
225 void SetBackground();
231 void SetDisplayModePreferences();
238 void SetTransparentCells(
bool transparent);
251 void ItemsSelected(
unsigned int count);
259 void StatusInfoChanged(
const std::string& info);
265 void UpdateSelection();
270 void FinishSliceAction();
280 void SelectItems(
const std::list<unsigned int>& ids,
bool keepItemsSelected =
false);
302 void EnsureVisible(
const std::vector<QGraphicsItem*>& items);
316 void SetEditableItemFlags(
bool enable =
true);
321 bool IsConsistent()
const;
326 virtual void mouseMoveEvent(QMouseEvent* event);
331 virtual void mousePressEvent(QMouseEvent* event);
336 virtual void mouseReleaseEvent(QMouseEvent* event);
341 virtual void mouseDoubleClickEvent(QMouseEvent* event);
344 std::shared_ptr<EditControlLogic> m_tissue;
345 std::list<EditableCellItem*> m_cells;
346 std::list<EditableEdgeItem*> m_edges;
347 std::list<EditableNodeItem*> m_nodes;
348 QGraphicsPixmapItem* m_background_item;
349 QGraphicsScene m_scene;
353 bool m_cells_transparent;
356 std::shared_ptr<SimPT_Sim::ComponentFactoryProxy> m_factory;
357 boost::property_tree::ptree m_ptree;
358 QString m_colorizer_pref;
366 static constexpr
double g_node_radius = 1;
371 #endif // end_of_include_guard
Dialog for setting the background image.
QGraphicsView with the ability to pan and zoom.
A cell contains walls and nodes.
Namespace for SimPT tissue editor package.
The graphical view on the tissue.
Mode
Different modes for the graphicsview.
Namespace for graphical interface classes.
Functionality and visual representation of slicing a cell complex.
Class for selecting an item by ID.
Editable graphical representation for Edge.
Interface for PanAndZoomView.
Editable graphical representation for Node.
Proxy for dealing with the factories.
Interface for EditableNodeItem.
Editable graphical representation for Cell.
Interface for BitmapGraphicsExporter.
see the online Qt documentation
Namespace for generic graphical shell for simulators.
Interface for EditableEdgeItem.
Interface for EditableCellItem.