A widget used to build a graphic associate with an external graphic element that references a local image. e.g. a SVG file, a PNG file, etc. More...
#include <LocalGraphicWidget.h>
Signals | |
| void | graphicChanged () |
Public Member Functions | |
| te::se::Graphic * | getGraphic () const |
| Gets the configured graphic element. More... | |
Initializer Methods | |
Methods related to instantiation and destruction. | |
| LocalGraphicWidget (QWidget *parent=0, Qt::WindowFlags f=0) | |
| Constructs a local graphic widget which is a child of parent, with widget flags set to f. More... | |
| ~LocalGraphicWidget () | |
| Destructor. More... | |
Re-implementation of Pure Virtual Method | |
AbstractGraphicWidget methods. | |
| bool | setGraphic (const te::se::Graphic *graphic) |
| Sets a graphic element to this widget. More... | |
| QString | getGraphicType () const |
| Pure virtual method that should return a "user friendly" string that informs the graphic type that can be built by the widget. More... | |
| QIcon | getGraphicIcon (const QSize &size) const |
| Pure virtual method that should return a QIcon that represents the graphic. i.e. a simple preview. More... | |
Protected Slots | |
| void | onExternalGraphicChanged (const QSize &size) |
| void | onGraphicAnchorPointChanged (const QString &text) |
| void | onGraphicDisplacementChanged (const QString &text) |
| void | setGraphicAnchorPoint (const QString &ax, const QString &ay) |
| void | setGraphicAngle (const QString &angle) |
| void | setGraphicDisplacement (const QString &dx, const QString &dy) |
| void | setGraphicOpacity (int value) |
| void | setGraphicSize (const QString &size) |
Protected Attributes | |
| te::se::Graphic * | m_graphic |
| Graphic element that will be configured by this widget. More... | |
Private Member Functions | |
| void | updateUi () |
| Updates the widget form based on internal graphic element. More... | |
Private Attributes | |
| te::qt::widgets::LocalImageWidget * | m_localImageWidget |
| Local image widget used to configure the external graphic element. More... | |
| std::unique_ptr< Ui::LocalGraphicWidgetForm > | m_ui |
| Widget form. More... | |
A widget used to build a graphic associate with an external graphic element that references a local image. e.g. a SVG file, a PNG file, etc.
Definition at line 53 of file LocalGraphicWidget.h.
| te::qt::widgets::LocalGraphicWidget::LocalGraphicWidget | ( | QWidget * | parent = 0, |
| Qt::WindowFlags | f = 0 |
||
| ) |
Constructs a local graphic widget which is a child of parent, with widget flags set to f.
Definition at line 40 of file LocalGraphicWidget.cpp.
References te::se::Graphic::add(), te::qt::widgets::LocalImageWidget::getExternalGraphic(), te::qt::widgets::AbstractGraphicWidget::m_graphic, m_localImageWidget, m_ui, onExternalGraphicChanged(), onGraphicAnchorPointChanged(), onGraphicDisplacementChanged(), te::qt::widgets::AbstractGraphicWidget::setGraphicAngle(), te::qt::widgets::AbstractGraphicWidget::setGraphicOpacity(), te::qt::widgets::AbstractGraphicWidget::setGraphicSize(), and ~LocalGraphicWidget().
|
default |
Destructor.
Referenced by LocalGraphicWidget().
|
inherited |
Gets the configured graphic element.
Definition at line 44 of file AbstractGraphicWidget.cpp.
References te::se::Graphic::clone(), and te::qt::widgets::AbstractGraphicWidget::m_graphic.
Referenced by te::qt::widgets::GraphicSelectorWidget::getGraphic().
|
virtual |
Pure virtual method that should return a QIcon that represents the graphic. i.e. a simple preview.
Implements te::qt::widgets::AbstractGraphicWidget.
Definition at line 108 of file LocalGraphicWidget.cpp.
References te::se::Graphic::getExternalGraphics(), te::xl::SimpleLink::getHref(), te::se::ExternalGraphic::getOnlineResource(), link, and te::qt::widgets::AbstractGraphicWidget::m_graphic.
|
virtual |
Pure virtual method that should return a "user friendly" string that informs the graphic type that can be built by the widget.
Implements te::qt::widgets::AbstractGraphicWidget.
Definition at line 103 of file LocalGraphicWidget.cpp.
|
signalinherited |
This signal is emitted when the internal graphic element is changed.
Referenced by te::qt::widgets::GlyphGraphicWidget::onMarkChanged(), te::qt::widgets::WellKnownGraphicWidget::onMarkChanged(), te::qt::widgets::AbstractGraphicWidget::setGraphicAnchorPoint(), te::qt::widgets::AbstractGraphicWidget::setGraphicAngle(), te::qt::widgets::AbstractGraphicWidget::setGraphicDisplacement(), te::qt::widgets::AbstractGraphicWidget::setGraphicOpacity(), and te::qt::widgets::AbstractGraphicWidget::setGraphicSize().
|
protectedslot |
Definition at line 130 of file LocalGraphicWidget.cpp.
References te::qt::widgets::LocalImageWidget::getExternalGraphic(), te::qt::widgets::AbstractGraphicWidget::m_graphic, m_localImageWidget, m_ui, and te::se::Graphic::setExternalGraphic().
Referenced by LocalGraphicWidget().
|
protectedslot |
Definition at line 142 of file LocalGraphicWidget.cpp.
References m_ui, and te::qt::widgets::AbstractGraphicWidget::setGraphicAnchorPoint().
Referenced by LocalGraphicWidget().
|
protectedslot |
Definition at line 137 of file LocalGraphicWidget.cpp.
References m_ui, and te::qt::widgets::AbstractGraphicWidget::setGraphicDisplacement().
Referenced by LocalGraphicWidget().
|
virtual |
Sets a graphic element to this widget.
| graphic | A valid graphic element. |
Implements te::qt::widgets::AbstractGraphicWidget.
Definition at line 69 of file LocalGraphicWidget.cpp.
References te::se::Graphic::clone(), te::se::Graphic::getExternalGraphics(), te::xl::SimpleLink::getHref(), te::se::ExternalGraphic::getOnlineResource(), link, te::qt::widgets::AbstractGraphicWidget::m_graphic, m_localImageWidget, te::qt::widgets::LocalImageWidget::setExternalGraphic(), and updateUi().
|
protectedslotinherited |
Definition at line 77 of file AbstractGraphicWidget.cpp.
References te::qt::widgets::AbstractGraphicWidget::graphicChanged(), te::qt::widgets::AbstractGraphicWidget::m_graphic, te::se::Graphic::setAnchorPoint(), te::se::AnchorPoint::setAnchorPointX(), and te::se::AnchorPoint::setAnchorPointY().
Referenced by te::qt::widgets::GlyphGraphicWidget::onGraphicAnchorPointChanged(), te::qt::widgets::WellKnownGraphicWidget::onGraphicAnchorPointChanged(), and onGraphicAnchorPointChanged().
|
protectedslotinherited |
Definition at line 55 of file AbstractGraphicWidget.cpp.
References te::qt::widgets::AbstractGraphicWidget::graphicChanged(), te::qt::widgets::AbstractGraphicWidget::m_graphic, and te::se::Graphic::setRotation().
Referenced by te::qt::widgets::GlyphGraphicWidget::GlyphGraphicWidget(), LocalGraphicWidget(), and te::qt::widgets::WellKnownGraphicWidget::WellKnownGraphicWidget().
|
protectedslotinherited |
Definition at line 68 of file AbstractGraphicWidget.cpp.
References te::qt::widgets::AbstractGraphicWidget::graphicChanged(), te::qt::widgets::AbstractGraphicWidget::m_graphic, te::se::Graphic::setDisplacement(), te::se::Displacement::setDisplacementX(), and te::se::Displacement::setDisplacementY().
Referenced by te::qt::widgets::GlyphGraphicWidget::onGraphicDisplacementChanged(), te::qt::widgets::WellKnownGraphicWidget::onGraphicDisplacementChanged(), and onGraphicDisplacementChanged().
|
protectedslotinherited |
Definition at line 61 of file AbstractGraphicWidget.cpp.
References te::qt::widgets::AbstractGraphicWidget::graphicChanged(), te::qt::widgets::AbstractGraphicWidget::m_graphic, and te::se::Graphic::setOpacity().
Referenced by LocalGraphicWidget(), and te::qt::widgets::WellKnownGraphicWidget::WellKnownGraphicWidget().
|
protectedslotinherited |
Definition at line 49 of file AbstractGraphicWidget.cpp.
References te::qt::widgets::AbstractGraphicWidget::graphicChanged(), te::qt::widgets::AbstractGraphicWidget::m_graphic, and te::se::Graphic::setSize().
Referenced by te::qt::widgets::GlyphGraphicWidget::GlyphGraphicWidget(), LocalGraphicWidget(), and te::qt::widgets::WellKnownGraphicWidget::WellKnownGraphicWidget().
|
private |
Updates the widget form based on internal graphic element.
Definition at line 147 of file LocalGraphicWidget.cpp.
References te::se::Graphic::getAnchorPoint(), te::se::AnchorPoint::getAnchorPointX(), te::se::AnchorPoint::getAnchorPointY(), te::se::Graphic::getDisplacement(), te::se::Displacement::getDisplacementX(), te::se::Displacement::getDisplacementY(), te::se::GetDouble(), te::se::Graphic::getOpacity(), te::se::Graphic::getRotation(), te::se::Graphic::getSize(), te::qt::widgets::AbstractGraphicWidget::m_graphic, and m_ui.
Referenced by setGraphic().
|
protectedinherited |
Graphic element that will be configured by this widget.
Definition at line 121 of file AbstractGraphicWidget.h.
Referenced by te::qt::widgets::AbstractGraphicWidget::getGraphic(), getGraphicIcon(), te::qt::widgets::GlyphGraphicWidget::GlyphGraphicWidget(), LocalGraphicWidget(), onExternalGraphicChanged(), te::qt::widgets::WellKnownGraphicWidget::onMarkChanged(), te::qt::widgets::GlyphGraphicWidget::onMarkChanged(), te::qt::widgets::WellKnownGraphicWidget::setGraphic(), te::qt::widgets::GlyphGraphicWidget::setGraphic(), setGraphic(), te::qt::widgets::AbstractGraphicWidget::setGraphicAnchorPoint(), te::qt::widgets::AbstractGraphicWidget::setGraphicAngle(), te::qt::widgets::AbstractGraphicWidget::setGraphicDisplacement(), te::qt::widgets::AbstractGraphicWidget::setGraphicOpacity(), te::qt::widgets::AbstractGraphicWidget::setGraphicSize(), updateUi(), te::qt::widgets::WellKnownGraphicWidget::updateUi(), te::qt::widgets::GlyphGraphicWidget::updateUi(), te::qt::widgets::WellKnownGraphicWidget::WellKnownGraphicWidget(), and te::qt::widgets::AbstractGraphicWidget::~AbstractGraphicWidget().
|
private |
Local image widget used to configure the external graphic element.
Definition at line 103 of file LocalGraphicWidget.h.
Referenced by LocalGraphicWidget(), onExternalGraphicChanged(), and setGraphic().
|
private |
Widget form.
Definition at line 102 of file LocalGraphicWidget.h.
Referenced by LocalGraphicWidget(), onExternalGraphicChanged(), onGraphicAnchorPointChanged(), onGraphicDisplacementChanged(), and updateUi().