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

A widget used to build a graphic associate with a glyph mark element. More...

#include <GlyphGraphicWidget.h>

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

Signals

void graphicChanged ()
 

Public Member Functions

te::se::GraphicgetGraphic () const
 Gets the configured graphic element. More...
 
Initializer Methods

Methods related to instantiation and destruction.

 GlyphGraphicWidget (QWidget *parent=0, Qt::WindowFlags f=0)
 Constructs a glyph graphic widget which is a child of parent, with widget flags set to f. More...
 
 ~GlyphGraphicWidget ()
 Destructor. More...
 
Re-implementation of Pure Virtual Method
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 onGraphicAnchorPointChanged (const QString &text)
 
void onGraphicDisplacementChanged (const QString &text)
 
void onMarkChanged ()
 
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...
 

Private Member Functions

void updateUi ()
 Updates the widget form based on internal graphic element. More...
 

Private Attributes

te::qt::widgets::GlyphMarkWidgetm_glyphMarkWidget
 Glyph mark widget used to configure the glyph mark element. More...
 
std::auto_ptr
< Ui::GlyphGraphicWidgetForm > 
m_ui
 Widget form. More...
 

Detailed Description

A widget used to build a graphic associate with a glyph mark element.

Definition at line 53 of file GlyphGraphicWidget.h.

Constructor & Destructor Documentation

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

Destructor.

Definition at line 68 of file GlyphGraphicWidget.cpp.

Member Function Documentation

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

Gets the configured graphic element.

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

Definition at line 44 of file AbstractGraphicWidget.cpp.

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

Referenced by te::qt::widgets::GraphicSelectorWidget::getGraphic().

QIcon te::qt::widgets::GlyphGraphicWidget::getGraphicIcon ( const QSize &  size) const
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 107 of file GlyphGraphicWidget.cpp.

References te::common::Free(), te::qt::widgets::GetImage(), and te::common::Singleton< MarkRendererManager >::getInstance().

QString te::qt::widgets::GlyphGraphicWidget::getGraphicType ( ) const
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 102 of file GlyphGraphicWidget.cpp.

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

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

void te::qt::widgets::GlyphGraphicWidget::onGraphicAnchorPointChanged ( const QString &  text)
protectedslot

Definition at line 135 of file GlyphGraphicWidget.cpp.

Referenced by GlyphGraphicWidget().

void te::qt::widgets::GlyphGraphicWidget::onGraphicDisplacementChanged ( const QString &  text)
protectedslot

Definition at line 130 of file GlyphGraphicWidget.cpp.

Referenced by GlyphGraphicWidget().

void te::qt::widgets::GlyphGraphicWidget::onMarkChanged ( )
protectedslot

Definition at line 124 of file GlyphGraphicWidget.cpp.

Referenced by GlyphGraphicWidget().

bool te::qt::widgets::GlyphGraphicWidget::setGraphic ( const te::se::Graphic graphic)
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.

Implements te::qt::widgets::AbstractGraphicWidget.

Definition at line 72 of file GlyphGraphicWidget.cpp.

References te::se::Graphic::clone(), te::se::Graphic::getMarks(), and te::se::Mark::getWellKnownName().

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

Member Data Documentation

te::qt::widgets::GlyphMarkWidget* te::qt::widgets::GlyphGraphicWidget::m_glyphMarkWidget
private

Glyph mark widget used to configure the glyph mark element.

Definition at line 103 of file GlyphGraphicWidget.h.

Referenced by GlyphGraphicWidget().

te::se::Graphic* te::qt::widgets::AbstractGraphicWidget::m_graphic
protectedinherited
std::auto_ptr<Ui::GlyphGraphicWidgetForm> te::qt::widgets::GlyphGraphicWidget::m_ui
private

Widget form.

Definition at line 102 of file GlyphGraphicWidget.h.

Referenced by GlyphGraphicWidget().


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