30 #include "ui_GraphicSelectorWidgetForm.h"
33 #include <QtGui/QStackedWidget>
37 m_ui(new Ui::GraphicSelectorWidgetForm)
45 std::vector<std::string> keys;
47 std::vector<std::string>::reverse_iterator it;
48 for(it = keys.rbegin(); it != keys.rend(); ++it)
57 QGridLayout* layout =
new QGridLayout(
m_ui->m_graphicWidgetFrame);
58 layout->setSizeConstraint(QLayout::SetFixedSize);
72 for(i = 0; i < m_graphicWidgets->count(); ++i)
79 if(i == m_graphicWidgets->count())
83 m_ui->m_graphicTypeComboBox->setCurrentIndex(i);
84 m_graphicWidgets->setCurrentIndex(i);
101 m_graphicWidgets->setCurrentIndex(index);
102 emit graphicChanged();
108 emit graphicChanged();
static void RegisteredWidgets(std::vector< std::string > &keys)
It informs the key of each registered graphic widget factory.
GraphicSelectorWidget(QWidget *parent=0, Qt::WindowFlags f=0)
Constructs a graphic selector widget dialog which is a child of parent, with widget flags set to f...
QIcon getGraphicIcon(const QSize &size)
Gets the current graphic icon.
QStackedWidget * m_graphicWidgets
Set of Graphic Widgets that can be used to configure the graphic element.
virtual QIcon getGraphicIcon(const QSize &size) const =0
Pure virtual method that should return a QIcon that represents the graphic. i.e. a simple preview...
std::auto_ptr< Ui::GraphicSelectorWidgetForm > m_ui
Widget form.
static AbstractGraphicWidget * make(const std::string &factoryKey)
It creates an object with the appropriated factory.
~GraphicSelectorWidget()
Destructor.
A widget used to select a graphic element.
void onGraphicTypeComboBoxCurrentIndexChanged(int index)
te::se::Graphic * getGraphic() const
Gets the configured graphic element.
virtual QString getGraphicType() const =0
Pure virtual method that should return a "user friendly" string that informs the graphic type that ca...
te::se::Graphic * getGraphic() const
Gets the configured graphic element.
void setGraphic(const te::se::Graphic *graphic)
Sets the graphic element.
The abstract factory of widgets used to configure Symbology Enconding Graphic element.
Abstract class that represents a widget that can be used to build a graphic element.
Abstract class that represents a widget that can be used to build a graphic element.
virtual bool setGraphic(const te::se::Graphic *graphic)=0
Sets a graphic element to this widget.
A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size.