All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::qt::widgets::LocalImageWidget Class Reference

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>

Inheritance diagram for te::qt::widgets::LocalImageWidget:

Signals

void externalGraphicChanged (const QSize &size)
 This signal is emitted when the internal external graphic element is changed. More...
 

Public Member Functions

te::se::ExternalGraphicgetExternalGraphic () 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::ExternalGraphicm_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::auto_ptr
< Ui::LocalImageWidgetForm > 
m_ui
 Widget form. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

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 ( )

Destructor.

Definition at line 58 of file LocalImageWidget.cpp.

Member Function Documentation

void te::qt::widgets::LocalImageWidget::externalGraphicChanged ( const QSize &  size)
signal

This signal is emitted when the internal external graphic element is changed.

Parameters
sizeThe size of selected image.
te::se::ExternalGraphic * te::qt::widgets::LocalImageWidget::getExternalGraphic ( ) const

Gets the configured external graphic element.

Returns
The configured external graphic element.
Note
The caller will take the ownership of the returned external graphic.

Definition at line 74 of file LocalImageWidget.cpp.

References te::se::ExternalGraphic::clone().

Referenced by te::qt::widgets::LocalGraphicWidget::LocalGraphicWidget().

void te::qt::widgets::LocalImageWidget::onBrowsePushButtonPressed ( )
protectedslot

Definition at line 110 of file LocalImageWidget.cpp.

References te::xl::SimpleLink::setHref().

Referenced by LocalImageWidget().

void te::qt::widgets::LocalImageWidget::setExternalGraphic ( const te::se::ExternalGraphic eg)

Sets an external graphic element to this widget.

Parameters
egA valid external graphic element.
Note
The widget will NOT take the ownership of the given external graphic.
The widget form will be update based on given external graphic parameters.

Definition at line 63 of file LocalImageWidget.cpp.

References te::se::ExternalGraphic::clone().

void te::qt::widgets::LocalImageWidget::updateUi ( )
protected

Updates the widget form based on internal external graphic element.

Definition at line 79 of file LocalImageWidget.cpp.

References te::xl::SimpleLink::getHref().

Member Data Documentation

te::se::ExternalGraphic* te::qt::widgets::LocalImageWidget::m_eg
private

External graphic element that will be configured by this widget.

Definition at line 120 of file LocalImageWidget.h.

QString te::qt::widgets::LocalImageWidget::m_filter
private

String to filter the supported image formats by Qt.

Definition at line 121 of file LocalImageWidget.h.

Referenced by LocalImageWidget().

std::auto_ptr<Ui::LocalImageWidgetForm> te::qt::widgets::LocalImageWidget::m_ui
private

Widget form.

Definition at line 119 of file LocalImageWidget.h.

Referenced by LocalImageWidget().


The documentation for this class was generated from the following files: