Open 3D Engine AzQtComponents API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <Text.h>
Classes | |
struct | Config |
Static Public Member Functions | |
static Config | loadConfig (QSettings &settings) |
static Config | defaultConfig () |
static void | addHeadlineStyle (QLabel *text) |
static void | addTitleStyle (QLabel *text) |
static void | addSubtitleStyle (QLabel *text) |
static void | addMenuStyle (QLabel *text) |
static void | addLabelStyle (QLabel *text) |
static void | addParagraphStyle (QLabel *text) |
static void | addTooltipStyle (QLabel *text) |
static void | addButtonStyle (QLabel *text) |
static void | addPrimaryStyle (QLabel *text) |
static void | addSecondaryStyle (QLabel *text) |
static void | addHighlightedStyle (QLabel *text) |
static void | addBlackStyle (QLabel *text) |
Special class to handle styling and painting of Text (labels, to be specific).
All of the styling of QLabel objects is done via CSS, in Text.qss
There are 4 css text styles that can be added to QLabel objects (Headline, Title, Subtitle, and Paragraph). Use the appropriate method below to apply one.
Note that a QLabel without a custom css "class" still gets styled according to the Text.qss file. Note also that Qt doesn't properly support the line-height css property, so if non-default Qt line-height spacing is required for multi-line blocks of text, some extra effort will be required beyond the scope of this class/code.
There are also 4 css color styles that can be added to QLabel objects (Primary, Secondary, Highlighted and Black). Use the appropriate method below to apply one.
|
static |
Applies the Black color styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "blackText");
|
static |
Applies the Button styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Button");
|
static |
Applies the Headline styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Headline");
|
static |
Applies the Highlighted color styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "highlightedText");
|
static |
Applies the Label styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Label");
|
static |
Applies the Data/Menu styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Menu");
|
static |
Applies the Paragraph styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Paragraph");
|
static |
Applies the Primary color styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "primaryText");
|
static |
Applies the Secondary color styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "secondaryText");
|
static |
Applies the Subtitle styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Subtitle");
|
static |
Applies the Title styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Title");
|
static |
Applies the Tooltip styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Tooltip");
|
static |
Loads the Text config data from a settings object.