The ExternalGraphic allows a reference to be made to an external graphic file with a Web URL or to in-line content. More...
#include <ExternalGraphic.h>
Public Member Functions | |
ExternalGraphic * | clone () const |
It creates a new copy of this object. More... | |
Initializer Methods | |
Methods related to instantiation and destruction. | |
ExternalGraphic () | |
It initializes a new ExternalGraphic. More... | |
~ExternalGraphic () | |
Destructor. More... | |
Accessor methods | |
Methods used to get or set properties. | |
void | setOnlineResource (te::xl::SimpleLink *onlineResource) |
const te::xl::SimpleLink * | getOnlineResource () const |
void | setInlineContent (InlineContent *inlineContent) |
const InlineContent * | getInlineContent () const |
void | setFormat (const std::string &f) |
const std::string & | getFormat () const |
void | add (Recode *r) |
Private Attributes | |
std::vector< Recode * > | m_colorReplacements |
Transformation of discrete values to other values. (Optional) More... | |
std::string | m_format |
It identifies the expected document MIME type of a successful fetch. (Mandatory) More... | |
InlineContent * | m_inlineContent |
It allows the content of an external graphic object to be included in-line. (Mandatory if m_onlineResource is absent) More... | |
te::xl::SimpleLink * | m_onlineResource |
The URL of the external graphic. (Mandatory if m_inlineContent is absent) More... | |
The ExternalGraphic allows a reference to be made to an external graphic file with a Web URL or to in-line content.
The OnlineResource sub-element gives the URL and the Format sub-element identifies the expected document MIME type of a successful fetch. Knowing the MIME type in advance allows the styler to select the best-supported format from the list of URLs with equivalent content. Users should avoid referencing external graphics that may change at arbitrary times, since many systems may cache or permanently store graphic content for improved efficiency and reliability. Graphic content should be static when at all possible.
The InlineContent sub-element allows the content of an external graphic object to be included in-line. The two choices for encoding are XML and Base-64-encoded binary, as indicated by the encoding attribute. An issue with the XML encoding is that the <?xml ...?> tag of the object cannot be present inside of the InlineContent tag. The external graphic object will be extracted and used like the content fetched from an ExternalContent tag.
The ColorReplacement element, which may occur multiple times, allows to replace a color in the ExternalGraphic, the color specified in the OriginalColor sub-element, by another color as a result of a recode function. LookUpValue is in this case set to ExternalGraphic, both Data and Value elements are set to color values.
Definition at line 86 of file ExternalGraphic.h.
te::se::ExternalGraphic::ExternalGraphic | ( | ) |
It initializes a new ExternalGraphic.
Definition at line 33 of file ExternalGraphic.cpp.
te::se::ExternalGraphic::~ExternalGraphic | ( | ) |
Destructor.
Definition at line 39 of file ExternalGraphic.cpp.
References te::common::FreeContents().
void te::se::ExternalGraphic::add | ( | Recode * | r | ) |
Definition at line 79 of file ExternalGraphic.cpp.
Referenced by te::qt::widgets::GraphicProperty::onLocalImageChanged().
te::se::ExternalGraphic * te::se::ExternalGraphic::clone | ( | ) | const |
It creates a new copy of this object.
Definition at line 84 of file ExternalGraphic.cpp.
References setFormat(), setInlineContent(), and setOnlineResource().
Referenced by te::se::Graphic::clone(), te::qt::widgets::LocalImagePropertyItem::getExternalGraphic(), te::qt::widgets::LocalImageWidget::getExternalGraphic(), te::qt::widgets::LocalImagePropertyItem::setExternalGraphic(), and te::qt::widgets::LocalImageWidget::setExternalGraphic().
const std::string & te::se::ExternalGraphic::getFormat | ( | ) | const |
Definition at line 74 of file ExternalGraphic.cpp.
Referenced by te::se::serialize::Save().
const te::se::InlineContent * te::se::ExternalGraphic::getInlineContent | ( | ) | const |
Definition at line 64 of file ExternalGraphic.cpp.
Referenced by te::se::serialize::Save().
const te::xl::SimpleLink * te::se::ExternalGraphic::getOnlineResource | ( | ) | const |
Definition at line 53 of file ExternalGraphic.cpp.
Referenced by te::qt::widgets::LocalGraphicWidget::getGraphicIcon(), te::qt::widgets::ExternalGraphicRenderer::render(), te::se::serialize::Save(), te::qt::widgets::LocalGraphicWidget::setGraphic(), and te::qt::widgets::GraphicProperty::setGraphic().
void te::se::ExternalGraphic::setFormat | ( | const std::string & | f | ) |
Definition at line 69 of file ExternalGraphic.cpp.
Referenced by clone().
void te::se::ExternalGraphic::setInlineContent | ( | InlineContent * | inlineContent | ) |
Definition at line 58 of file ExternalGraphic.cpp.
Referenced by clone().
void te::se::ExternalGraphic::setOnlineResource | ( | te::xl::SimpleLink * | onlineResource | ) |
Definition at line 47 of file ExternalGraphic.cpp.
Referenced by clone().
|
private |
Transformation of discrete values to other values. (Optional)
Definition at line 132 of file ExternalGraphic.h.
|
private |
It identifies the expected document MIME type of a successful fetch. (Mandatory)
Definition at line 131 of file ExternalGraphic.h.
|
private |
It allows the content of an external graphic object to be included in-line. (Mandatory if m_onlineResource is absent)
Definition at line 130 of file ExternalGraphic.h.
|
private |
The URL of the external graphic. (Mandatory if m_inlineContent is absent)
Definition at line 129 of file ExternalGraphic.h.