NDEVR
API Documentation
FontEditor

A series of widgets that allow the user to adjust a font. More...

Collaboration diagram for FontEditor:
[legend]

Public Member Functions

 FontEditor (QWidget *parent)
 Constructs a FontEditor widget.
void fontEdited ()
 Emitted when the font has been modified by the user.
Font getFont () const
 Returns the currently configured Font.
QFont getQFont () const
 Returns the currently configured font as a QFont.
void setFont (const Font &font)
 Sets the font to display and edit.
void setFontID (const StringView &app_font)
 Sets the font by its application font ID string.
void showColorOption (bool show_color)
 Sets whether the color editing option is visible.

Protected Member Functions

void fontEditedSlot ()
 Slot called when the user edits the font through the UI.

Protected Attributes

String m_app_font
 The application font ID string.
bool m_is_updating = false
 Guard flag to prevent recursive updates.
Font m_last_font
 The last font set, used for change detection.
Ui::FontEditorUI * ui
 The auto-generated UI form.

Detailed Description

A series of widgets that allow the user to adjust a font.


Supports choosing a font, setting a size, bolding, underlining, etc.

Definition at line 18 of file FontEditor.h.

Constructor & Destructor Documentation

◆ FontEditor()

FontEditor::FontEditor ( QWidget * parent)

Constructs a FontEditor widget.

Parameters
[in]parentThe parent widget.

Member Function Documentation

◆ getFont()

Font FontEditor::getFont ( ) const

Returns the currently configured Font.

Returns
The Font as configured by the user.

◆ getQFont()

QFont FontEditor::getQFont ( ) const

Returns the currently configured font as a QFont.

Returns
The QFont representation.

◆ setFont()

void FontEditor::setFont ( const Font & font)

Sets the font to display and edit.

Parameters
[in]fontThe Font to set.

◆ setFontID()

void FontEditor::setFontID ( const StringView & app_font)

Sets the font by its application font ID string.

Parameters
[in]app_fontThe application font identifier.

◆ showColorOption()

void FontEditor::showColorOption ( bool show_color)

Sets whether the color editing option is visible.

Parameters
[in]show_colorWhether to show the color option.

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