te::qt::widgets::AbstractGraphicWidget Class Referenceabstract

Abstract class that represents a widget that can be used to build a graphic element. More...

#include <AbstractGraphicWidget.h>

Inheritance diagram for te::qt::widgets::AbstractGraphicWidget:
te::qt::widgets::GlyphGraphicWidget te::qt::widgets::LocalGraphicWidget te::qt::widgets::WellKnownGraphicWidget

Signals

void graphicChanged ()
 

Public Member Functions

te::se::GraphicgetGraphic () const
 Gets the configured graphic element. More...
 
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. More...
 
virtual QString getGraphicType () const =0
 Pure virtual method that should return a "user friendly" string that informs the graphic type that can be built by the widget. More...
 
virtual bool setGraphic (const te::se::Graphic *graphic)=0
 Sets a graphic element to this widget. More...
 
Initializer Methods

Methods related to instantiation and destruction.

 AbstractGraphicWidget (QWidget *parent=0, Qt::WindowFlags f=0)
 Constructs a graphic widget which is a child of parent, with widget flags set to f. More...
 
virtual ~AbstractGraphicWidget ()
 Destructor. More...
 

Protected Slots

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::Graphicm_graphic
 Graphic element that will be configured by this widget. More...
 

Detailed Description

Abstract class that represents a widget that can be used to build a graphic element.

See also
ExternalGraphicWidget, GlyphGraphicWidget, WellKnownGraphicWidget

Definition at line 54 of file AbstractGraphicWidget.h.

Constructor & Destructor Documentation

te::qt::widgets::AbstractGraphicWidget::AbstractGraphicWidget ( QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)

Constructs a graphic widget which is a child of parent, with widget flags set to f.

virtual te::qt::widgets::AbstractGraphicWidget::~AbstractGraphicWidget ( )
virtual

Destructor.

Member Function Documentation

te::se::Graphic* te::qt::widgets::AbstractGraphicWidget::getGraphic ( ) const

Gets the configured graphic element.

Returns
The configured graphic element.
Note
The caller will take the ownership of the returned graphic.
virtual QIcon te::qt::widgets::AbstractGraphicWidget::getGraphicIcon ( const QSize &  size) const
pure virtual

Pure virtual method that should return a QIcon that represents the graphic. i.e. a simple preview.

Implemented in te::qt::widgets::GlyphGraphicWidget, te::qt::widgets::LocalGraphicWidget, and te::qt::widgets::WellKnownGraphicWidget.

virtual QString te::qt::widgets::AbstractGraphicWidget::getGraphicType ( ) const
pure virtual

Pure virtual method that should return a "user friendly" string that informs the graphic type that can be built by the widget.

Implemented in te::qt::widgets::GlyphGraphicWidget, te::qt::widgets::LocalGraphicWidget, and te::qt::widgets::WellKnownGraphicWidget.

void te::qt::widgets::AbstractGraphicWidget::graphicChanged ( )
signal

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

virtual bool te::qt::widgets::AbstractGraphicWidget::setGraphic ( const te::se::Graphic graphic)
pure virtual

Sets a graphic element to this widget.

Parameters
graphicA valid graphic element.
Returns
It return true if the widget can deal with the given graphic. Otherwise, it returns false.
Note
The widget will NOT take the ownership of the given graphic.
The widget form will be update based on given graphic parameters.

Implemented in te::qt::widgets::GlyphGraphicWidget, te::qt::widgets::LocalGraphicWidget, and te::qt::widgets::WellKnownGraphicWidget.

void te::qt::widgets::AbstractGraphicWidget::setGraphicAnchorPoint ( const QString &  ax,
const QString &  ay 
)
protectedslot
void te::qt::widgets::AbstractGraphicWidget::setGraphicAngle ( const QString &  angle)
protectedslot
void te::qt::widgets::AbstractGraphicWidget::setGraphicDisplacement ( const QString &  dx,
const QString &  dy 
)
protectedslot
void te::qt::widgets::AbstractGraphicWidget::setGraphicOpacity ( int  value)
protectedslot
void te::qt::widgets::AbstractGraphicWidget::setGraphicSize ( const QString &  size)
protectedslot

Member Data Documentation

te::se::Graphic* te::qt::widgets::AbstractGraphicWidget::m_graphic
protected

Graphic element that will be configured by this widget.

Definition at line 121 of file AbstractGraphicWidget.h.


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