30 #include "../../../se/Config.h" 
   31 #include "../../../se/ExternalGraphic.h" 
   32 #include "../../../xlink/SimpleLink.h" 
   36 #include <QtGui/QDialog> 
   37 #include <QtGui/QFileDialog> 
   38 #include <QtGui/QGridLayout> 
   39 #include <QtGui/QImageReader> 
   40 #include <QtGui/QMessageBox> 
   41 #include <QtGui/QScrollArea> 
   42 #include <QtGui/QPushButton> 
   44 #include "../../../../../third-party/qt/propertybrowser/qtpropertybrowser.h" 
   51   m_eg(new te::se::ExternalGraphic), m_update(false)
 
   62   addProperty(localImgProperty, tr(
"Local Image"), QColor(255, 190, 160));
 
   90   QString path = link->
getHref().c_str();
 
  102   if(prop == m_imgProperty)
 
  106     connect(m_dlg, SIGNAL(showDlg()), 
this, SLOT(showImgDlg()));
 
  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.toStdString());
 
  134   m_eg->setOnlineResource(link);
 
  137   QString f(QImageReader::imageFormat(path));
 
  138   m_eg->setFormat(
"image/" + f.toStdString()); 
 
  140   emit externalGraphicChanged();
 
~LocalImagePropertyItem()
Destructor. 
void setHref(const std::string &href)
void updateUi()
Updates the widget form based on internal mark element. 
ExternalGraphic * clone() const 
It creates a new copy of this object. 
QtStringPropertyManager * m_strDlgManager
const std::string & getHref() const 
The ExternalGraphic allows a reference to be made to an external graphic file with a Web URL or to in...
te::se::ExternalGraphic * getExternalGraphic() const 
Gets the configured mark element. 
LocalImagePropertyItem(QtTreePropertyBrowser *pb, QColor c=QColor())
Constructor. 
QtProperty * m_imgProperty
A concrete renderer based on Qt4 for conversion of Symbology Enconding External Graphic elements to a...
A widget used to define the main property items that can be used to describe a se object...
void setExternalGraphic(const te::se::ExternalGraphic *eg)
Sets a mark element to this widget. 
void setDlg(QWidget *parent, QtProperty *prop)
A widget used to define a local image graphic for a se symbolizer. 
void addProperty(QtProperty *property, const QString &id, QColor c)
static AbstractPropertyManager & getInstance()
It returns a reference to the singleton instance. 
virtual void valueChanged(QtProperty *p, const QString &value)