te::qt::widgets::BasicFillWidget Class Reference

A widget used to build a basic fill element. More...

#include <BasicFillWidget.h>

Inheritance diagram for te::qt::widgets::BasicFillWidget:
te::qt::widgets::AbstractFillWidget

Signals

void fillChanged ()
 

Public Member Functions

Initializer Methods

Methods related to instantiation and destruction.

 BasicFillWidget (QWidget *parent=0, Qt::WindowFlags f=0)
 Constructs a basic fill widget which is a child of parent, with widget flags set to f. More...
 
 ~BasicFillWidget ()
 Destructor. More...
 
Re-implementation of Pure Virtual Method
bool setFill (const te::se::Fill *fill)
 Sets a fill element to this widget. More...
 
te::se::FillgetFill () const
 Gets the configured fill element. More...
 
QString getFillType () const
 Pure virtual method that should return a "user friendly" string that informs the fill type that can be built by the widget. More...
 

Protected Slots

void onColorChanged (const QColor &color)
 
void onFillOpacitySliderValueChanged (int value)
 

Protected Member Functions

void initialize ()
 Internal method to initialize the widget (e.g.: color, combos, icons, etc.) More...
 
void updateUi ()
 Updates the widget form based on internal fill element. More...
 
void updateUiFillColor ()
 Updates the widget form element used to visualize the fill color. More...
 

Private Attributes

QColor m_color
 Auxiliary color attribute. More...
 
ColorPickerToolButtonm_colorPicker
 Widget used to pick a color. More...
 
te::se::Fillm_fill
 Fill element that will be configured by this widget. More...
 
std::auto_ptr< Ui::BasicFillWidgetForm > m_ui
 Widget form. More...
 

Detailed Description

A widget used to build a basic fill element.

See also
AbstractFillWidget, GraphicFillWidget

Definition at line 61 of file BasicFillWidget.h.

Constructor & Destructor Documentation

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

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

te::qt::widgets::BasicFillWidget::~BasicFillWidget ( )

Destructor.

Member Function Documentation

void te::qt::widgets::BasicFillWidget::fillChanged ( )
signal

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

te::se::Fill* te::qt::widgets::BasicFillWidget::getFill ( ) const
virtual

Gets the configured fill element.

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

Implements te::qt::widgets::AbstractFillWidget.

QString te::qt::widgets::BasicFillWidget::getFillType ( ) const
virtual

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

Implements te::qt::widgets::AbstractFillWidget.

void te::qt::widgets::BasicFillWidget::initialize ( )
protected

Internal method to initialize the widget (e.g.: color, combos, icons, etc.)

void te::qt::widgets::BasicFillWidget::onColorChanged ( const QColor &  color)
protectedslot
void te::qt::widgets::BasicFillWidget::onFillOpacitySliderValueChanged ( int  value)
protectedslot
bool te::qt::widgets::BasicFillWidget::setFill ( const te::se::Fill fill)
virtual

Sets a fill element to this widget.

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

Implements te::qt::widgets::AbstractFillWidget.

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

Updates the widget form based on internal fill element.

void te::qt::widgets::BasicFillWidget::updateUiFillColor ( )
protected

Updates the widget form element used to visualize the fill color.

Member Data Documentation

QColor te::qt::widgets::BasicFillWidget::m_color
private

Auxiliary color attribute.

Definition at line 121 of file BasicFillWidget.h.

ColorPickerToolButton* te::qt::widgets::BasicFillWidget::m_colorPicker
private

Widget used to pick a color.

Definition at line 120 of file BasicFillWidget.h.

te::se::Fill* te::qt::widgets::BasicFillWidget::m_fill
private

Fill element that will be configured by this widget.

Definition at line 122 of file BasicFillWidget.h.

std::auto_ptr<Ui::BasicFillWidgetForm> te::qt::widgets::BasicFillWidget::m_ui
private

Widget form.

Definition at line 119 of file BasicFillWidget.h.


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