![]() |
Blamite Game Engine - Keystone
00402.09.29.23.0627.blamite
A library that enables the use of Qt in Blamite's editing tools.
|
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< BlamEditorThemeVariant > | GetVariants () |
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... | |
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.
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.
_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. |
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.
_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. |
bool BlamEditorTheme::ApplyTheme | ( | ) |
Applies this theme to the application.
true
if the theme was successfully applied, otherwise returns false
. bool BlamEditorTheme::ApplyVariant | ( | std::string | variant_name | ) |
Applies a specified theme variant to the application.
variant_name | - The name of the variant to apply. |
true
if the variant was successfully applied, otherwise returns false
. std::string BlamEditorTheme::GetAuthor | ( | ) |
Retrieves the theme author.
std::string BlamEditorTheme::GetDescription | ( | ) |
Retrieves the theme description.
std::string BlamEditorTheme::GetName | ( | ) |
Retrieves the theme name.
std::string BlamEditorTheme::GetResource | ( | std::string | group_id, |
std::string | id | ||
) |
Retrieves a resource path from the theme.
group_id | - The group the resource belongs to. |
id | - The ID of the resource to retrieve. |
std::string BlamEditorTheme::GetStylesheet | ( | ) |
Retrieves the theme stylesheet.
BlamEditorThemeType BlamEditorTheme::GetThemeType | ( | ) |
Retrieves the theme type.
std::vector< BlamEditorThemeVariant > BlamEditorTheme::GetVariants | ( | ) |
Retrieves the list of theme variants.
std::string BlamEditorTheme::GetVersion | ( | ) |
Retrieves the theme version.