27 #include "../../../se/ExternalGraphic.h"
28 #include "../../../se/AnchorPoint.h"
29 #include "../../../se/Displacement.h"
30 #include "../../../se/Graphic.h"
31 #include "../../../se/Utils.h"
32 #include "../../../xlink/SimpleLink.h"
35 #include "ui_LocalGraphicWidgetForm.h"
42 m_ui(new
Ui::LocalGraphicWidgetForm)
50 QGridLayout* layout =
new QGridLayout(
m_ui->m_imageGroupBox);
57 connect(
m_ui->m_graphicSizeDoubleSpinBox, SIGNAL(valueChanged(
const QString&)), SLOT(
setGraphicSize(
const QString&)));
58 connect(
m_ui->m_graphicAngleDoubleSpinBox, SIGNAL(valueChanged(
const QString&)), SLOT(
setGraphicAngle(
const QString&)));
77 m_graphic = graphic->
clone();
81 if(extGraphics.empty())
89 const std::string href = link->
getHref();
94 if(!img.load(href.c_str()))
98 m_localImageWidget->setExternalGraphic(g);
107 return tr(
"Local Image");
112 const std::vector<te::se::ExternalGraphic*> extGraphics = m_graphic->getExternalGraphics();
113 if(extGraphics.empty())
121 const std::string href = link->
getHref();
126 if(!img.load(href.c_str()))
129 return QIcon(QPixmap::fromImage(img.scaledToWidth(size.width(), Qt::SmoothTransformation)));
134 m_graphic->setExternalGraphic(0, m_localImageWidget->getExternalGraphic());
136 m_ui->m_graphicSizeDoubleSpinBox->setValue(size.height());
141 setGraphicDisplacement(m_ui->m_displacementXDoubleSpinBox->text(), m_ui->m_displacementXDoubleSpinBox->text());
146 setGraphicAnchorPoint(m_ui->m_anchorPointXDoubleSpinBox->text(), m_ui->m_anchorPointYDoubleSpinBox->text());
const ParameterValue * getDisplacementX() const
A Displacement gives X and Y offset displacements to use for rendering a text label, graphic or other Symbolizer near a point.
const std::vector< ExternalGraphic * > getExternalGraphics() const
const std::string & getHref() const
TESEEXPORT double GetDouble(const te::se::ParameterValue *param)
It gets the parameter value as a double.
A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size.
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters...
void add(ExternalGraphic *g)
Graphics can either be referenced from an external URL in a common format (such as GIF or SVG)...
An AnchorPoint identifies the location inside of a text label to use an 'anchor' for positioning it r...
const ParameterValue * getDisplacementY() const
const te::xl::SimpleLink * getOnlineResource() const
The ExternalGraphic allows a reference to be made to an external graphic file with a Web URL or to in...
Graphic * clone() const
It creates a new copy of this object.
const ParameterValue * getAnchorPointX() const
const ParameterValue * getAnchorPointY() const