27 #include "../../../common/StringUtils.h" 28 #include "../../../se/SvgParameter.h" 29 #include "../../../se/TextSymbolizer.h" 30 #include "../../../se/Utils.h" 31 #include "../propertybrowser/AbstractPropertyManager.h" 42 m_textSymbolizer(new
te::se::TextSymbolizer)
48 QStringList emptyList;
57 addProperty(textProperty, tr(
"Text Properties"), QColor(89, 230, 226));
101 int fontStyle = f.style();
102 int weightStyle = f.weight();
106 font->
setFamily(f.family().toUtf8().data());
144 for (std::size_t i = 0; i < labels.size(); ++i)
146 list << labels[i].c_str();
173 if (weightValue ==
"light")
175 else if (weightValue ==
"normal")
177 else if (weightValue ==
"demibold")
179 else if (weightValue ==
"bold")
181 else if (weightValue ==
"black")
189 for (std::size_t t = 0; t <
m_labels.size(); ++t)
A TextSymbolizer is used to render text labels according to various graphical parameters.
std::vector< std::string > m_labels
void setLabels(std::vector< std::string > labels)
~TextPropertyItem()
Destructor.
virtual void valueChanged(QtProperty *p, int value)
te::qt::widgets::BasicFillPropertyItem * m_bf
void setTextSymbolizer(const te::se::TextSymbolizer *ts)
const SvgParameter * getFamily() const
void setSize(const std::string &size)
TESEEXPORT double GetDouble(const te::se::ParameterValue *param)
It gets the parameter value as a double.
te::se::TextSymbolizer * m_textSymbolizer
Fill element that will be configured by this widget.
const SvgParameter * getWeight() const
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters...
const SvgParameter * getSize() const
Symbolizer * clone() const
It creates a new copy of this object.
static AbstractPropertyManager & getInstance()
It returns a reference to the singleton instance.
A Font specifies the text font to use in a text symbolizer.
A widget used to define the text se object.
FontStyleType
It defines the style to use for a font.
const Font * getFont() const
QtProperty * m_fontProperty
TextPropertyItem(QtTreePropertyBrowser *pb, QColor c=QColor())
Constructor.
void setWeight(const FontWeightType &weight)
void setLabel(ParameterValue *l)
const ParameterValue * getLabel() const
void setFamily(const std::string &family)
QtProperty * m_labelProperty
TESEEXPORT int GetInt(const te::se::ParameterValue *param)
It gets the parameter value as an integer.
const SvgParameter * getStyle() const
void updateUi()
Updates the widget form based on internal fill element.
const Fill * getFill() const
std::string Convert2String(boost::int16_t value)
It converts a short integer value to a string.
void setStyle(const FontStyleType &style)
FontWeightType
It gives the amount of weight or boldness to use for a font.
A widget used to define the basic fill se object.
TESEEXPORT std::string GetString(const te::se::ParameterValue *param)
It gets the parameter value as a string.
te::se::TextSymbolizer * getTextSymbolizer() const