27 #include "../../../maptools/MarkRendererManager.h"
28 #include "../../../se/Mark.h"
31 #include "ui_WellKnownMarkWidgetForm.h"
39 m_ui(new
Ui::WellKnownMarkWidgetForm),
40 m_mark(new
te::se::Mark)
48 QGridLayout* fillLayout =
new QGridLayout(
m_ui->m_fillGroupBox);
55 QGridLayout* strokeLayout =
new QGridLayout(
m_ui->m_strokeGroupBox);
87 m_mark = mark->
clone();
94 return m_mark->
clone();
99 const std::string* name = m_mark->getWellKnownName();
102 QString qName(name->c_str());
103 int index = m_ui->m_markTypeComboBox->findText(qName, Qt::MatchFixedString);
105 m_ui->m_markTypeComboBox->setCurrentIndex(index);
110 m_strokeWidget->setStroke(stroke);
111 m_ui->m_strokeGroupBox->setChecked(
true);
114 m_ui->m_strokeGroupBox->setChecked(
false);
119 m_fillWidget->setFill(fill);
120 m_ui->m_fillGroupBox->setChecked(
true);
123 m_ui->m_fillGroupBox->setChecked(
false);
128 m_mark->setWellKnownName(
new std::string(currentText.toStdString()));
134 m_mark->setStroke(m_strokeWidget->getStroke());
141 m_mark->setStroke(0);
143 m_mark->setStroke(m_strokeWidget->getStroke());
149 m_mark->setFill(m_fillWidget->getFill());
158 m_mark->setFill(m_fillWidget->getFill());
A Mark specifies a geometric shape and applies coloring to it.
static MarkRendererManager & getInstance()
It returns a reference to the singleton instance.
A Fill specifies the pattern for filling an area geometry.
A Stroke specifies the appearance of a linear geometry.
void setStroke(Stroke *s)
Mark * clone() const
It creates a new copy of this object.
void setWellKnownName(std::string *name)
The WellKnownName element gives the well-known name of the shape of the mark.