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

A widget used to build a graphic associate with a well-known mark element. More...

#include <WellKnownGraphicWidget.h>

Inheritance diagram for te::qt::widgets::WellKnownGraphicWidget:
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.

 WellKnownGraphicWidget (QWidget *parent=0, Qt::WindowFlags f=0)
 Constructs a well known graphic widget which is a child of parent, with widget flags set to f. More...
 
 ~WellKnownGraphicWidget ()
 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::WellKnownMarkWidgetm_markWidget
 Well known mark Widget used to configure the mark element. More...
 
std::auto_ptr
< Ui::WellKnownGraphicWidgetForm > 
m_ui
 Widget form. More...
 

Detailed Description

A widget used to build a graphic associate with a well-known mark element.

Definition at line 53 of file WellKnownGraphicWidget.h.

Constructor & Destructor Documentation

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

Destructor.

Definition at line 72 of file WellKnownGraphicWidget.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::WellKnownGraphicWidget::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 114 of file WellKnownGraphicWidget.cpp.

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

QString te::qt::widgets::WellKnownGraphicWidget::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 109 of file WellKnownGraphicWidget.cpp.

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

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

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

Definition at line 142 of file WellKnownGraphicWidget.cpp.

Referenced by WellKnownGraphicWidget().

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

Definition at line 137 of file WellKnownGraphicWidget.cpp.

Referenced by WellKnownGraphicWidget().

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

Definition at line 131 of file WellKnownGraphicWidget.cpp.

Referenced by WellKnownGraphicWidget().

bool te::qt::widgets::WellKnownGraphicWidget::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 76 of file WellKnownGraphicWidget.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::WellKnownGraphicWidget::updateUi ( )
private

Member Data Documentation

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

Graphic element that will be configured by this widget.

Definition at line 121 of file AbstractGraphicWidget.h.

Referenced by te::qt::widgets::GlyphGraphicWidget::GlyphGraphicWidget(), te::qt::widgets::LocalGraphicWidget::LocalGraphicWidget(), and WellKnownGraphicWidget().

te::qt::widgets::WellKnownMarkWidget* te::qt::widgets::WellKnownGraphicWidget::m_markWidget
private

Well known mark Widget used to configure the mark element.

Definition at line 103 of file WellKnownGraphicWidget.h.

Referenced by WellKnownGraphicWidget().

std::auto_ptr<Ui::WellKnownGraphicWidgetForm> te::qt::widgets::WellKnownGraphicWidget::m_ui
private

Widget form.

Definition at line 102 of file WellKnownGraphicWidget.h.

Referenced by WellKnownGraphicWidget().


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