1 #ifndef EXPORTERS_GRAPHICS_PREFERENCES_H_INCLUDED
2 #define EXPORTERS_GRAPHICS_PREFERENCES_H_INCLUDED
24 #include <boost/property_tree/ptree.hpp>
25 #include <boost/property_tree/xml_parser.hpp>
26 #include <boost/optional.hpp>
36 std::string m_arrow_color;
39 std::string m_cell_color;
40 int m_cell_number_size;
41 std::string m_cell_outline_color;
42 double m_mesh_magnification;
43 std::array<double, 3> m_mesh_offset;
44 double m_node_magnification;
45 int m_node_number_size;
46 double m_outline_width;
47 std::string m_text_color;
49 double m_window_x_min;
50 double m_window_x_max;
51 double m_window_y_min;
52 double m_window_y_max;
68 : m_mesh_offset{{0.0, 0.0, 0.0}}
71 m_arrow_color =
"darkGreen";
73 m_background_color =
"white";
74 m_cell_color =
"size";
75 m_cell_number_size = 1;
76 m_cell_outline_color =
"forestgreen";
77 m_mesh_magnification = 1.0;
78 m_node_magnification = 1.0;
79 m_node_number_size = 1.0;
80 m_outline_width = 0.0;
82 m_window_preset =
false;
88 m_border_cells =
false;
91 m_cell_centers =
false;
92 m_cell_numbers =
false;
93 m_cell_strain =
false;
96 m_node_numbers =
false;
97 m_only_tissue_boundary =
false;
102 virtual ~GraphicsPreferences() {}
106 auto g = e.source->GetGlobal()->GetChild(
"graphics");
107 m_arrow_color = g->Get<std::string>(
"colors_sizes.arrow_color");
108 m_arrow_size = g->Get<
double>(
"colors_sizes.arrow_size");
109 m_background_color = g->Get<std::string>(
"colors_sizes.background_color");
110 m_cell_color = g->Get<std::string>(
"colors_sizes.cell_color");
111 m_cell_number_size = g->Get<
int>(
"colors_sizes.cell_number_size");
112 m_cell_outline_color = g->Get<std::string>(
"colors_sizes.cell_outline_color");
113 m_mesh_magnification = g->Get<
double>(
"colors_sizes.mesh_magnification", 1.0);
114 m_mesh_offset[0] = g->Get<
double>(
"colors_sizes.mesh_offset_x", 0.0);
115 m_mesh_offset[1] = g->Get<
double>(
"colors_sizes.mesh_offset_x", 0.0);
116 m_node_magnification = g->Get<
double>(
"colors_sizes.node_magnification");
117 m_node_number_size = g->Get<
int>(
"colors_sizes.node_number_size");
118 m_outline_width = g->Get<
double>(
"colors_sizes.outline_width");
119 m_text_color = g->Get<std::string>(
"colors_sizes.text_color");
121 m_window_preset =
false;
123 auto w = e.source->GetChild(
"source_window");
124 m_window_x_min = w->Get<
double>(
"x_min");
125 m_window_x_max = w->Get<
double>(
"x_max");
126 m_window_y_min = w->Get<
double>(
"y_min");
127 m_window_y_max = w->Get<
double>(
"y_max");
128 m_window_preset =
true;
129 }
catch (boost::property_tree::ptree_error& e) {}
131 m_border_cells = g->Get<
bool>(
"visualization.border_cells");
132 m_cells = g->Get<
bool>(
"visualization.cells");
133 m_cell_axes = g->Get<
bool>(
"visualization.cell_axes");
134 m_cell_centers = g->Get<
bool>(
"visualization.cell_centers");
135 m_cell_numbers = g->Get<
bool>(
"visualization.cell_numbers");
136 m_cell_strain = g->Get<
bool>(
"visualization.cell_strain");
137 m_fluxes = g->Get<
bool>(
"visualization.fluxes");
138 m_nodes = g->Get<
bool>(
"visualization.nodes");
139 m_node_numbers = g->Get<
bool>(
"visualization.node_numbers");
140 m_only_tissue_boundary = g->Get<
bool>(
"visualization.only_leaf_boundary");
141 m_tooltips = g->Get<
bool>(
"visualization.tooltips");
142 m_walls = g->Get<
bool>(
"visualization.walls");
bool m_cells
Switch for drawing cells.
bool m_tooltips
Switch for drawing tool tips.
Namespace for SimPT shell package.
bool m_cell_numbers
Switch for drawing cell numbers.
bool m_fluxes
Switch for drawing fluxes.
bool m_node_numbers
Switch for drawing node numbers.
bool m_only_tissue_boundary
Switch for drawing boundary.
std::string m_background_color
Qt color or "transparent".
Preferences for graphics viewer.
Interface for MergedPreferences.
bool m_nodes
Switch for drawing nodes.
bool m_walls
Switch for drawing wall.
bool m_cell_strain
Switch for drawing cell strain.
bool m_cell_axes
Switch for drawing cell axes.
bool m_cell_centers
Switch for drawing cell centers.
bool m_border_cells
Switch for drawing borders.