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::StyleManager Class Reference

#include <StyleManager.h>

Inherits QObject.

Inherited by AzQtComponents::O3DEStylesheet.

Public Member Functions

 StyleManager (QObject *parent)
 
void initialize (QApplication *application, const AZ::IO::PathView &engineRootPath)
 
void refresh ()
 
void Refresh ()
 
const QColor & getColorByName (const QString &name)
 
const QColor & GetColorByName (const QString &name)
 

Static Public Member Functions

static bool isInstanced ()
 
static void addSearchPaths (const QString &searchPrefix, const QString &pathOnDisk, const QString &qrcPrefix, const AZ::IO::PathView &engineRootPath)
 
static bool setStyleSheet (QWidget *widget, QString styleFileName)
 
static QStyleSheetStyle * styleSheetStyle (const QWidget *widget)
 
static QStyle * baseStyle (const QWidget *widget)
 
static void repolishStyleSheet (QWidget *widget)
 

Detailed Description

Wrapper around classes dealing with Open 3D Engine style.

New applications should work like this:

int main(int argv, char **argc) { QApplication app(argv, argc);

AzQtComponents::StyleManager styleManager(&app); const bool useUI10 = false; styleManager.Initialize(&app, useUI10); }

Member Function Documentation

◆ getColorByName()

const QColor & AzQtComponents::StyleManager::getColorByName ( const QString &  name)

Used to get a global color value by name. Deprecated; do not use. This was implemented to support skinning of the Editor, but that functionality is no longer supported. If you want to load a color instead of hard coding it, please embed the color into a stylesheet instead of using GetColorByName.

◆ initialize()

void AzQtComponents::StyleManager::initialize ( QApplication *  application,
const AZ::IO::PathView &  engineRootPath 
)

Call to initialize the StyleManager, allowing it to hook into the application and apply the global style The AzQtComponents does not hook in the AZ::Environment, so the Settings Registry isn't available Therefore the engine root path must be supplied via function arguments

◆ refresh()

void AzQtComponents::StyleManager::refresh ( )

Call this to force a refresh of the global stylesheet and a reload of any settings files. Note that you should never need to do this manually.


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