NDEVR
API Documentation
FontEditor.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/String.h>
4#include <NDEVR/Font.h>
5#include <QWidget>
6namespace Ui
7{
8 class FontEditorUI;
9}
10namespace NDEVR
11{
12 class Font;
18 class NDEVR_WIDGETS_API FontEditor : public QWidget
19 {
20 Q_OBJECT
21 public:
26 FontEditor(QWidget* parent);
31 void setFont(const Font& font);
36 void setFontID(const StringView& app_font);
41 Font getFont() const;
46 QFont getQFont() const;
51 void showColorOption(bool show_color);
52 protected slots:
55 signals:
56 void fontEdited();
57 protected:
58 Ui::FontEditorUI* ui;
61 bool m_is_updating = false;
62 };
63}
void fontEdited()
Emitted when the font has been modified by the user.
QFont getQFont() const
Returns the currently configured font as a QFont.
Font getFont() const
Returns the currently configured Font.
Ui::FontEditorUI * ui
The auto-generated UI form.
Definition FontEditor.h:58
Font m_last_font
The last font set, used for change detection.
Definition FontEditor.h:60
bool m_is_updating
Guard flag to prevent recursive updates.
Definition FontEditor.h:61
void showColorOption(bool show_color)
Sets whether the color editing option is visible.
FontEditor(QWidget *parent)
Constructs a FontEditor widget.
String m_app_font
The application font ID string.
Definition FontEditor.h:59
void setFontID(const StringView &app_font)
Sets the font by its application font ID string.
void setFont(const Font &font)
Sets the font to display and edit.
void fontEditedSlot()
Slot called when the user edits the font through the UI.
Information for how to display text data.
Definition Font.h:46
The core String View class for the NDEVR API.
Definition StringView.h:58
The core String class for the NDEVR API.
Definition String.h:95
The primary namespace for the NDEVR SDK.