Elaztek Developer Hub
Blamite Game Engine - Keystone  00386.06.16.23.0646.blamite
A library that enables the use of Qt in Blamite's editing tools.
BlamEditorTheme Class Reference

Class representing a Blamite Editor Theme. More...

#include <themes.h>

Public Member Functions

 BlamEditorTheme (std::string _name, std::string _author, std::string _desc, std::string _ver, BlamEditorThemeType type, std::string _content_dir)
 Prepares a new Editor Theme. More...
 
 BlamEditorTheme (std::string _name, std::string _author, std::string _desc, std::string _ver, BlamEditorThemeType type, std::string _stylesheet, std::string _qt_style, std::vector< BlamEditorThemeVariant > _variants, std::string _content_dir, std::map< std::string, BlamResourceGroup > _resource_group_overrides)
 Prepares a new Editor Theme. More...
 
bool ApplyTheme ()
 Applies this theme to the application. More...
 
bool ApplyVariant (std::string variant_name)
 Applies a specified theme variant to the application. More...
 
std::string GetName ()
 Retrieves the theme name. More...
 
std::string GetAuthor ()
 Retrieves the theme author. More...
 
std::string GetDescription ()
 Retrieves the theme description. More...
 
std::string GetVersion ()
 Retrieves the theme version. More...
 
BlamEditorThemeType GetThemeType ()
 Retrieves the theme type. More...
 
std::string GetStylesheet ()
 Retrieves the theme stylesheet. More...
 
std::vector< BlamEditorThemeVariantGetVariants ()
 Retrieves the list of theme variants. More...
 
std::string GetResource (std::string group_id, std::string id)
 Retrieves a resource path from the theme. More...
 

Detailed Description

Class representing a Blamite Editor Theme.

Editor themes can be used to reskin any Qt-based UI. It consists mainly of a QSS stylesheet and some general theme metadata.

Todo:
Add some proper documentation for Editor Themes.

Constructor & Destructor Documentation

◆ BlamEditorTheme() [1/2]

BlamEditorTheme::BlamEditorTheme ( std::string  _name,
std::string  _author,
std::string  _desc,
std::string  _ver,
BlamEditorThemeType  type,
std::string  _content_dir 
)

Prepares a new Editor Theme.

Parameters
_name- The name of the theme.
_author- The author of the theme.
_desc- The description of the theme.
_ver- The version of the theme.
type- The theme type.
_content_dir- The theme data folder.
Note
This constructor should only be used when adding a base Qt style as a theme.

◆ BlamEditorTheme() [2/2]

BlamEditorTheme::BlamEditorTheme ( std::string  _name,
std::string  _author,
std::string  _desc,
std::string  _ver,
BlamEditorThemeType  type,
std::string  _stylesheet,
std::string  _qt_style,
std::vector< BlamEditorThemeVariant _variants,
std::string  _content_dir,
std::map< std::string, BlamResourceGroup >  _resource_group_overrides 
)

Prepares a new Editor Theme.

Parameters
_name- The name of the theme.
_author- The author of the theme.
_desc- The description of the theme.
_ver- The version of the theme.
type- The theme type.
_stylesheet- The stylesheet of the theme.
_qt_style- The base Qt style of the theme.
_variants- The list of variants of the theme.

Member Function Documentation

◆ ApplyTheme()

bool BlamEditorTheme::ApplyTheme ( )

Applies this theme to the application.

Returns
true if the theme was successfully applied, otherwise returns false.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ApplyVariant()

bool BlamEditorTheme::ApplyVariant ( std::string  variant_name)

Applies a specified theme variant to the application.

Parameters
variant_name- The name of the variant to apply.
Returns
true if the variant was successfully applied, otherwise returns false.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAuthor()

std::string BlamEditorTheme::GetAuthor ( )

Retrieves the theme author.

Returns
The theme author.
+ Here is the caller graph for this function:

◆ GetDescription()

std::string BlamEditorTheme::GetDescription ( )

Retrieves the theme description.

Returns
The theme description.
+ Here is the caller graph for this function:

◆ GetName()

std::string BlamEditorTheme::GetName ( )

Retrieves the theme name.

Returns
The theme name.
+ Here is the caller graph for this function:

◆ GetResource()

std::string BlamEditorTheme::GetResource ( std::string  group_id,
std::string  id 
)

Retrieves a resource path from the theme.

Parameters
group_id- The group the resource belongs to.
id- The ID of the resource to retrieve.
Returns
The full path to the resource within the theme. If the theme does not contain the resource, then the file path to the default resource is used instead.
+ Here is the caller graph for this function:

◆ GetStylesheet()

std::string BlamEditorTheme::GetStylesheet ( )

Retrieves the theme stylesheet.

Returns
The theme stylesheet.

◆ GetThemeType()

BlamEditorThemeType BlamEditorTheme::GetThemeType ( )

Retrieves the theme type.

Returns
The theme type.

◆ GetVariants()

std::vector< BlamEditorThemeVariant > BlamEditorTheme::GetVariants ( )

Retrieves the list of theme variants.

Returns
The theme variant list.
+ Here is the caller graph for this function:

◆ GetVersion()

std::string BlamEditorTheme::GetVersion ( )

Retrieves the theme version.

Returns
The theme version.
+ Here is the caller graph for this function:

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