![]() |
NDEVR
API Documentation
|
A series of widgets that allow the user to adjust a font. More...
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. | |
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.
| FontEditor::FontEditor | ( | QWidget * | parent | ) |
Constructs a FontEditor widget.
| [in] | parent | The parent widget. |
| Font FontEditor::getFont | ( | ) | const |
| QFont FontEditor::getQFont | ( | ) | const |
Returns the currently configured font as a QFont.
| void FontEditor::setFont | ( | const Font & | font | ) |
Sets the font to display and edit.
| [in] | font | The Font to set. |
| void FontEditor::setFontID | ( | const StringView & | app_font | ) |
Sets the font by its application font ID string.
| [in] | app_font | The application font identifier. |
| void FontEditor::showColorOption | ( | bool | show_color | ) |
Sets whether the color editing option is visible.
| [in] | show_color | Whether to show the color option. |