27 #include "../../../se/Config.h" 28 #include "../../../se/ExternalGraphic.h" 29 #include "../../../xlink/SimpleLink.h" 30 #include "../propertybrowser/AbstractPropertyManager.h" 39 #include <QFileDialog> 40 #include <QGridLayout> 41 #include <QImageReader> 42 #include <QMessageBox> 43 #include <QScrollArea> 44 #include <QPushButton> 47 #include <QtPropertyBrowser/QtTreePropertyBrowser> 48 #include <QtPropertyBrowser/QtVariantPropertyManager> 52 m_eg(new
te::se::ExternalGraphic), m_update(false)
63 addProperty(localImgProperty, tr(
"Local Image"), QColor(255, 190, 160));
89 QString path = link->
getHref().c_str();
95 QtProperty* ,
const QString& )
113 QString filter = tr(
"Images") +
" ( ";
114 QList<QByteArray> formats = QImageReader::supportedImageFormats();
115 for(
int i = 0; i < formats.size() - 1; ++i)
116 filter +=
"*." + formats[i] +
" ";
119 QString path = QFileDialog::getOpenFileName(
this, tr(
"Select an Image File"),
"", filter);
127 QMessageBox::critical(
this, tr(
"Error"), tr(
"The selected image cannot be loaded."));
133 link->
setHref(path.toUtf8().data());
137 QString f(QImageReader::imageFormat(path));
void setHref(const std::string &href)
const std::string & getHref() const
A widget used to define a local image graphic for a se symbolizer.
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...
who udp maintains data bases showing who s shell tcp cmd syslog udp printer tcp spooler printer udp spooler videotex tcp videotex videotex udp videotex talk tcp like tenex link
ExternalGraphic * clone() const
It creates a new copy of this object.
static AbstractPropertyManager & getInstance()
It returns a reference to the singleton instance.
A concrete renderer based on Qt4 for conversion of Symbology Enconding External Graphic elements to a...
void setFormat(const std::string &f)
void setOnlineResource(te::xl::SimpleLink *onlineResource)