Open 3D Engine AzQtComponents API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzQtComponents::Text Class Reference

#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)
 

Detailed Description

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.

Member Function Documentation

◆ addBlackStyle()

static void AzQtComponents::Text::addBlackStyle ( QLabel *  text)
static

Applies the Black color styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "blackText");

◆ addButtonStyle()

static void AzQtComponents::Text::addButtonStyle ( QLabel *  text)
static

Applies the Button styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Button");

◆ addHeadlineStyle()

static void AzQtComponents::Text::addHeadlineStyle ( QLabel *  text)
static

Applies the Headline styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Headline");

◆ addHighlightedStyle()

static void AzQtComponents::Text::addHighlightedStyle ( QLabel *  text)
static

Applies the Highlighted color styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "highlightedText");

◆ addLabelStyle()

static void AzQtComponents::Text::addLabelStyle ( QLabel *  text)
static

Applies the Label styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Label");

◆ addMenuStyle()

static void AzQtComponents::Text::addMenuStyle ( QLabel *  text)
static

Applies the Data/Menu styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Menu");

◆ addParagraphStyle()

static void AzQtComponents::Text::addParagraphStyle ( QLabel *  text)
static

Applies the Paragraph styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Paragraph");

◆ addPrimaryStyle()

static void AzQtComponents::Text::addPrimaryStyle ( QLabel *  text)
static

Applies the Primary color styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "primaryText");

◆ addSecondaryStyle()

static void AzQtComponents::Text::addSecondaryStyle ( QLabel *  text)
static

Applies the Secondary color styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "secondaryText");

◆ addSubtitleStyle()

static void AzQtComponents::Text::addSubtitleStyle ( QLabel *  text)
static

Applies the Subtitle styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Subtitle");

◆ addTitleStyle()

static void AzQtComponents::Text::addTitleStyle ( QLabel *  text)
static

Applies the Title styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Title");

◆ addTooltipStyle()

static void AzQtComponents::Text::addTooltipStyle ( QLabel *  text)
static

Applies the Tooltip styling to a QLabel. Same as AzQtComponents::Style::addClass(label, "Tooltip");

◆ defaultConfig()

static Config AzQtComponents::Text::defaultConfig ( )
static

Returns default Text config data.

◆ loadConfig()

static Config AzQtComponents::Text::loadConfig ( QSettings &  settings)
static

Loads the Text config data from a settings object.


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