34#include <NDEVR/BaseValues.h>
35#include <NDEVR/Resource.h>
36#include <NDEVR/TranslatedString.h>
fltp04 m_font_multiplier
The current font size multiplier.
TranslatedString m_translated_text
The stored translated text.
Theme
Options for how to display the label.
@ e_header_a
For titles: standard foreground color with bold font.
@ e_label_a
Default label style: uses highlight color.
@ e_label_b
Alternative label style: standard foreground color.
bool event(QEvent *event) override
Handles generic events such as theme and font changes.
QCustomLabel(const TranslatedString &text, QWidget *parent=nullptr)
Constructs a QCustomLabel with translated text and the given parent widget.
void setBold(bool is_bold)
Sets whether the label text is rendered in bold.
QSize minimumSizeHint() const override
Returns the minimum size hint, accounting for vertical orientation.
bool m_is_flipped
Whether the text is rendered upside-down.
void setFontMultiplier(fltp04 font_multiplier)
Sets a multiplier applied to the base font size.
bool m_is_bold
Whether the text is rendered in bold.
void init()
Initializes the label with default settings.
void setText(const char *text)
Sets the label text from a C-string.
QCustomLabel(QWidget *parent=nullptr)
Constructs a QCustomLabel with the given parent widget.
Theme m_theme
The current visual theme.
void setFlipped(bool flipped)
Sets whether the label text is rendered upside-down (flipped 180 degrees).
bool m_is_vertical
Whether the text is rendered vertically.
QSize sizeHint() const override
Returns the recommended size, accounting for vertical orientation.
void setLabelTheme(Theme theme)
Sets the visual theme of the label.
void setVertical(bool vertical)
Sets whether the label text is rendered vertically.
void setText(const String &text)
Sets the label text from an NDEVR String.
TranslatedString text() const
Returns the current label text as a TranslatedString.
static Resource< fltp08 > default_multiplier_touch
Default font multiplier for touch mode.
void setText(const QString &text)
Sets the label text from a QString.
void paintEvent(QPaintEvent *e) override
Custom paint event that handles vertical and flipped text rendering.
static Resource< fltp08 > default_multiplier_desktop
Default font multiplier for desktop mode.
QCustomLabel(const QString &text, QWidget *parent=nullptr)
Constructs a QCustomLabel with a QString and the given parent widget.
void setText(const TranslatedString &text)
Sets the label text from a TranslatedString.
void updateFont()
Updates the font based on the current multiplier, bold, and theme settings.
A core part of the engine, stores variables that can be listened to with ResourceListener which will ...
The core String class for the NDEVR API.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...