24 {
"NoPen",
"SolidLine",
"DashLine",
"DotLine",
"DashDotLine",
"DashDotDotLine"},
"SolidLine");
25 const int pen_default_width = 1;
26 const int pen_min_width = 0;
27 const int pen_max_width = 7;
28 const int penstyle_index_solid = 1;
29 const int penstyle_index_dashline = 2;
33 const int default_title_size = 10;
34 const std::string default_title_family =
"Noto Sans";
46 addProperty(
P_COLOR, QColor(Qt::black))->setDisplayName(
"Color")->setToolTip(
"Pen color");
49 ->setDisplayName(
"Width")
51 ->setToolTip(
"Pen width");
58 auto combo = penStyleCombo;
59 combo.
setCurrentIndex(is_selected ? penstyle_index_dashline : penstyle_index_solid);
68 return property<QColor>(
P_COLOR).name().toStdString();
Custom property to define list of string values with multiple selections.
static ComboProperty createFrom(const std::vector< std::string > &values, const std::string ¤t_value={})
void setCurrentIndex(int index)
Complex item holding mixed SessionItem types (single properties and other CompountItems).
T * addProperty(const std::string &name)
Adds property item of given type.
static const std::string P_STYLE
static const std::string P_COLOR
static const std::string P_WIDTH
void setSelected(bool is_selected)
Sets style of the pen to represent selected object (dash line).
std::string colorName() const
Returns color name in #RRGGBB format.
void setNamedColor(const std::string &named_color)
Sets named color following schema from https://www.w3.org/TR/css-color-3/#svg-color.
static RealLimits limited(double left_bound_value, double right_bound_value)
Creates an object bounded from the left and right.
void setProperty(const std::string &tag, const T &value)
Sets value to property item.
static const std::string P_SIZE
static const std::string P_FONT
static const std::string P_TEXT
const model_type TextItemType
const model_type PenItemType
materialitems.h Collection of materials to populate MaterialModel.