te::qt::widgets::GlyphMarkWidget Class Reference

A widget used to build a mark element represented by a glyph. More...

#include <GlyphMarkWidget.h>

Inheritance diagram for te::qt::widgets::GlyphMarkWidget:
QWidget

Signals

void markChanged ()
 

Public Member Functions

te::se::MarkgetMark () const
 Gets the configured mark element. More...
 
void setMark (const te::se::Mark *mark)
 Sets a mark element to this widget. More...
 
Initializer Methods

Methods related to instantiation and destruction.

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

Protected Slots

void onCharSelected (const unsigned int &charCode)
 
void onCurrentFontChanged (const QFont &font)
 
void onFillChanged ()
 

Protected Member Functions

void updateMarkName ()
 Updates the mark well-known name enconding selected font and selected character. More...
 
void updateUi ()
 Updates the widget form based on internal mark element. More...
 

Private Attributes

te::qt::widgets::CharMapWidgetm_charMapWidget
 Character map widget. More...
 
te::qt::widgets::BasicFillWidgetm_fillWidget
 Basic Fill Widget used to configure the mark fill element. More...
 
te::se::Markm_mark
 Mark element that will be configured by this widget. More...
 
std::unique_ptr< Ui::GlyphMarkWidgetForm > m_ui
 Widget form. More...
 

Detailed Description

A widget used to build a mark element represented by a glyph.

Definition at line 64 of file GlyphMarkWidget.h.

Constructor & Destructor Documentation

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

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

Definition at line 38 of file GlyphMarkWidget.cpp.

References te::qt::widgets::BasicFillWidget::getFill(), m_charMapWidget, m_fillWidget, m_mark, m_ui, onCharSelected(), onCurrentFontChanged(), onFillChanged(), te::se::Mark::setFill(), and updateMarkName().

te::qt::widgets::GlyphMarkWidget::~GlyphMarkWidget ( )

Destructor.

Definition at line 69 of file GlyphMarkWidget.cpp.

References m_mark.

Member Function Documentation

te::se::Mark * te::qt::widgets::GlyphMarkWidget::getMark ( ) const

Gets the configured mark element.

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

Definition at line 85 of file GlyphMarkWidget.cpp.

References te::se::Mark::clone(), and m_mark.

Referenced by te::qt::widgets::GlyphGraphicWidget::getGraphicIcon(), te::qt::widgets::GlyphMarkDialog::getMark(), te::qt::widgets::GlyphGraphicWidget::GlyphGraphicWidget(), and te::qt::widgets::GlyphGraphicWidget::onMarkChanged().

void te::qt::widgets::GlyphMarkWidget::markChanged ( )
signal

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

Referenced by onFillChanged(), and updateMarkName().

void te::qt::widgets::GlyphMarkWidget::onCharSelected ( const unsigned int charCode)
protectedslot

Definition at line 127 of file GlyphMarkWidget.cpp.

References updateMarkName().

Referenced by GlyphMarkWidget().

void te::qt::widgets::GlyphMarkWidget::onCurrentFontChanged ( const QFont &  font)
protectedslot

Definition at line 122 of file GlyphMarkWidget.cpp.

References updateMarkName().

Referenced by GlyphMarkWidget().

void te::qt::widgets::GlyphMarkWidget::onFillChanged ( )
protectedslot
void te::qt::widgets::GlyphMarkWidget::setMark ( const te::se::Mark mark)

Sets a mark element to this widget.

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

Definition at line 74 of file GlyphMarkWidget.cpp.

References te::se::Mark::clone(), m_mark, and updateUi().

Referenced by te::qt::widgets::GlyphMarkDialog::getMark(), and te::qt::widgets::GlyphGraphicWidget::setGraphic().

void te::qt::widgets::GlyphMarkWidget::updateMarkName ( )
protected

Updates the mark well-known name enconding selected font and selected character.

Definition at line 115 of file GlyphMarkWidget.cpp.

References te::qt::widgets::GlyphMarkRenderer::encode(), te::qt::widgets::CharMapWidget::getCurrentChar(), m_charMapWidget, m_mark, m_ui, markChanged(), and te::se::Mark::setWellKnownName().

Referenced by GlyphMarkWidget(), onCharSelected(), and onCurrentFontChanged().

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

Updates the widget form based on internal mark element.

Definition at line 90 of file GlyphMarkWidget.cpp.

References te::qt::widgets::GlyphMarkRenderer::decode(), te::se::Mark::getFill(), te::se::Mark::getWellKnownName(), m_fillWidget, m_mark, m_ui, and te::qt::widgets::BasicFillWidget::setFill().

Referenced by setMark().

Member Data Documentation

te::qt::widgets::CharMapWidget* te::qt::widgets::GlyphMarkWidget::m_charMapWidget
private

Character map widget.

Definition at line 129 of file GlyphMarkWidget.h.

Referenced by GlyphMarkWidget(), and updateMarkName().

te::qt::widgets::BasicFillWidget* te::qt::widgets::GlyphMarkWidget::m_fillWidget
private

Basic Fill Widget used to configure the mark fill element.

Definition at line 128 of file GlyphMarkWidget.h.

Referenced by GlyphMarkWidget(), onFillChanged(), and updateUi().

te::se::Mark* te::qt::widgets::GlyphMarkWidget::m_mark
private

Mark element that will be configured by this widget.

Definition at line 130 of file GlyphMarkWidget.h.

Referenced by getMark(), GlyphMarkWidget(), onFillChanged(), setMark(), updateMarkName(), updateUi(), and ~GlyphMarkWidget().

std::unique_ptr<Ui::GlyphMarkWidgetForm> te::qt::widgets::GlyphMarkWidget::m_ui
private

Widget form.

Definition at line 127 of file GlyphMarkWidget.h.

Referenced by GlyphMarkWidget(), updateMarkName(), and updateUi().


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