A widget used to build an external graphic element that references a local image. e.g. a SVG file, a PNG file, etc. More...
#include <LocalImageWidget.h>
Signals | |
| void | externalGraphicChanged (const QSize &size) |
| This signal is emitted when the internal external graphic element is changed. More... | |
Public Member Functions | |
| te::se::ExternalGraphic * | getExternalGraphic () const |
| Gets the configured external graphic element. More... | |
| void | setExternalGraphic (const te::se::ExternalGraphic *eg) |
| Sets an external graphic element to this widget. More... | |
Initializer Methods | |
Methods related to instantiation and destruction. | |
| LocalImageWidget (QWidget *parent=0, Qt::WindowFlags f=0) | |
| Constructs a local image widget which is a child of parent, with widget flags set to f. More... | |
| ~LocalImageWidget () | |
| Destructor. More... | |
Protected Slots | |
| void | onBrowsePushButtonPressed () |
Protected Member Functions | |
| void | updateUi () |
| Updates the widget form based on internal external graphic element. More... | |
Private Attributes | |
| te::se::ExternalGraphic * | m_eg |
| External graphic element that will be configured by this widget. More... | |
| QString | m_filter |
| String to filter the supported image formats by Qt. More... | |
| std::unique_ptr< Ui::LocalImageWidgetForm > | m_ui |
| Widget form. More... | |
A widget used to build an external graphic element that references a local image. e.g. a SVG file, a PNG file, etc.
Definition at line 59 of file LocalImageWidget.h.
| te::qt::widgets::LocalImageWidget::LocalImageWidget | ( | QWidget * | parent = 0, |
| Qt::WindowFlags | f = 0 |
||
| ) |
Constructs a local image widget which is a child of parent, with widget flags set to f.
Definition at line 40 of file LocalImageWidget.cpp.
References m_filter, m_ui, and onBrowsePushButtonPressed().
| te::qt::widgets::LocalImageWidget::~LocalImageWidget | ( | ) |
|
signal |
This signal is emitted when the internal external graphic element is changed.
| size | The size of selected image. |
Referenced by onBrowsePushButtonPressed().
| te::se::ExternalGraphic * te::qt::widgets::LocalImageWidget::getExternalGraphic | ( | ) | const |
Gets the configured external graphic element.
Definition at line 74 of file LocalImageWidget.cpp.
References te::se::ExternalGraphic::clone(), and m_eg.
Referenced by te::qt::widgets::LocalGraphicWidget::LocalGraphicWidget(), and te::qt::widgets::LocalGraphicWidget::onExternalGraphicChanged().
|
protectedslot |
Definition at line 110 of file LocalImageWidget.cpp.
References externalGraphicChanged(), link, m_eg, m_filter, te::se::ExternalGraphic::setFormat(), te::xl::SimpleLink::setHref(), te::se::ExternalGraphic::setOnlineResource(), and updateUi().
Referenced by LocalImageWidget().
| void te::qt::widgets::LocalImageWidget::setExternalGraphic | ( | const te::se::ExternalGraphic * | eg | ) |
Sets an external graphic element to this widget.
| eg | A valid external graphic element. |
Definition at line 63 of file LocalImageWidget.cpp.
References te::se::ExternalGraphic::clone(), m_eg, and updateUi().
Referenced by te::qt::widgets::LocalGraphicWidget::setGraphic().
|
protected |
Updates the widget form based on internal external graphic element.
Definition at line 79 of file LocalImageWidget.cpp.
References te::xl::SimpleLink::getHref(), te::se::ExternalGraphic::getOnlineResource(), link, m_eg, and m_ui.
Referenced by onBrowsePushButtonPressed(), and setExternalGraphic().
|
private |
External graphic element that will be configured by this widget.
Definition at line 120 of file LocalImageWidget.h.
Referenced by getExternalGraphic(), onBrowsePushButtonPressed(), setExternalGraphic(), updateUi(), and ~LocalImageWidget().
|
private |
String to filter the supported image formats by Qt.
Definition at line 121 of file LocalImageWidget.h.
Referenced by LocalImageWidget(), and onBrowsePushButtonPressed().
|
private |
Widget form.
Definition at line 119 of file LocalImageWidget.h.
Referenced by LocalImageWidget(), and updateUi().