 |
Blamite Game Engine - Keystone
00402.09.29.23.0627.blamite
A library that enables the use of Qt in Blamite's editing tools.
|
Go to the documentation of this file.
6 #include <Strings/components/resources/resources.h>
15 #define DEFAULT_QT_STYLE "windowsvista"
17 #define THEME_RESOURCE(group_id, id) BlamKeystone::Themes::GetActiveTheme()->GetResource(group_id, id)
50 std::string name =
"";
51 std::string author =
"";
52 std::string description =
"";
53 std::string version =
"";
54 std::string base_qt_style =
"";
58 std::string stylesheet =
"";
59 std::string content_dir =
"";
61 std::vector<BlamEditorThemeVariant> variants;
62 std::map<std::string, BlamResourceGroup> resource_group_overrides;
64 std::string EvaluateVariantPlaceholders(std::map<std::string, std::string> properties, std::string base_stylesheet);
65 std::string EvaluateResourcePlaceholders(std::string base_stylesheet);
96 std::string _qt_style, std::vector<BlamEditorThemeVariant> _variants, std::string _content_dir,
97 std::map<std::string, BlamResourceGroup> _resource_group_overrides);
173 std::string
GetResource(std::string group_id, std::string
id);
#define DEFAULT_QT_STYLE
The default Qt style.
Definition: themes.h:15
std::map< std::string, std::string > properties
The list of properties for this theme variant.
Definition: themes.h:37
std::string GetResource(std::string group_id, std::string id)
Retrieves a resource path from the theme.
Definition: BlamEditorTheme.cpp:158
int active_theme_index
The index of the currently active theme.
Definition: themes.cpp:15
std::string GetAuthor()
Retrieves the theme author.
Definition: BlamEditorTheme.cpp:128
std::vector< BlamEditorTheme > themes
The current list of loaded themes.
Definition: themes.cpp:14
KEYSTONE void UpdateActiveTheme(BlamEditorTheme *theme)
Updates the stored index of the current active theme.
Definition: themes.cpp:345
Namespace containing functions for the Keystone theme component.
Definition: themes.h:179
BlamEditorThemeType
Enumerator for all possible theme types.
Definition: themes.h:22
@ BuiltIn
Indicates the theme is a built-in theme, provided by Elaztek.
Definition: themes.h:24
bool ApplyVariant(std::string variant_name)
Applies a specified theme variant to the application.
Definition: BlamEditorTheme.cpp:78
KEYSTONE QApplication * GetQApplication()
Retrieves the pointer to the current Qt application.
Definition: keystone_main.cpp:93
QHash< QSourceHighliter::Token, QTextCharFormat > theme(QSourceHighliter::Themes)
Definition: qsourcehighliterthemes.cpp:63
Class representing a Blamite Editor Theme.
Definition: themes.h:47
std::string name
The name of this theme variant.
Definition: themes.h:36
#define KEYSTONE
Definition: themes.h:9
std::vector< BlamEditorThemeVariant > GetVariants()
Retrieves the list of theme variants.
Definition: BlamEditorTheme.cpp:153
Structure representing a theme variant.
Definition: themes.h:34
KEYSTONE bool ApplyTheme(std::string name)
Applies a new theme to the application.
Definition: themes.cpp:300
std::string GetVersion()
Retrieves the theme version.
Definition: BlamEditorTheme.cpp:138
KEYSTONE BlamEditorTheme * GetActiveTheme()
Retrieves the currently selected theme.
Definition: themes.cpp:335
bool ApplyTheme()
Applies this theme to the application.
Definition: BlamEditorTheme.cpp:37
bool load_xml_theme(rapidxml::xml_document<> *theme_document, std::string folder_path, std::string xml_file_path, BlamEditorThemeType theme_type)
Loads a theme from an XML file.
Definition: themes.cpp:27
KEYSTONE bool LoadThemes()
Loads all themes from Qt and the keystone theme folders.
Definition: themes.cpp:259
KEYSTONE BlamEditorWindow * GetMainEditorWindow()
Retrieves the main editor window.
Definition: editor_data.cpp:32
std::string GetDescription()
Retrieves the theme description.
Definition: BlamEditorTheme.cpp:133
KEYSTONE BlamEditorTheme * GetTheme(std::string name)
Retrieves a theme.
Definition: themes.cpp:320
virtual void OnThemeChange(BlamEditorTheme *new_theme)
Called when the active theme is changed.
Definition: BlamEditorWindow.cpp:94
std::string GetName()
Retrieves the theme name.
Definition: BlamEditorTheme.cpp:123
BlamEditorThemeType GetThemeType()
Retrieves the theme type.
Definition: BlamEditorTheme.cpp:143
@ User
Indicates the theme is a custom theme added by the user.
Definition: themes.h:25
bool load_themes_in_folder(std::string theme_dir, BlamEditorThemeType theme_type)
Loads all XML themes in a given directory.
Definition: themes.cpp:220
BlamEditorTheme(std::string _name, std::string _author, std::string _desc, std::string _ver, BlamEditorThemeType type, std::string _content_dir)
Prepares a new Editor Theme.
Definition: BlamEditorTheme.cpp:25
std::string GetStylesheet()
Retrieves the theme stylesheet.
Definition: BlamEditorTheme.cpp:148
@ QtTheme
Indicates the theme is a default theme made available from Qt.
Definition: themes.h:26
KEYSTONE std::vector< BlamEditorTheme > * GetThemeList()
Retrieves the list of loaded themes.
Definition: themes.cpp:315