Elaztek Developer Hub
Blamite Game Engine - Keystone  00326.06.27.21.0407.blamite
A library that enables the use of Qt in Blamite's editing tools.
BlamKeystone::Themes Namespace Reference

Namespace containing functions for the Keystone theme component. More...

Functions

KEYSTONE bool LoadThemes ()
 Loads all themes from Qt and the keystone theme folders. More...
 
KEYSTONE bool ApplyTheme (std::string name)
 Applies a new theme to the application. More...
 
KEYSTONE std::vector< BlamEditorTheme > * GetThemeList ()
 Retrieves the list of loaded themes. More...
 
KEYSTONE BlamEditorThemeGetTheme (std::string name)
 Retrieves a theme. More...
 
KEYSTONE BlamEditorThemeGetActiveTheme ()
 Retrieves the currently selected theme. More...
 
KEYSTONE void UpdateActiveTheme (BlamEditorTheme *theme)
 Updates the stored index of the current active theme. More...
 
KEYSTONE void AddReceiver (KeystoneThemeChangeReceiver *receiver)
 Registers a new theme change receiver, which will be notified whenever the active theme changes. More...
 
KEYSTONE void RemoveReceiver (KeystoneThemeChangeReceiver *receiver)
 Unregisters a theme change receiver. More...
 

Detailed Description

Namespace containing functions for the Keystone theme component.

Function Documentation

◆ AddReceiver()

void BlamKeystone::Themes::AddReceiver ( KeystoneThemeChangeReceiver receiver)

Registers a new theme change receiver, which will be notified whenever the active theme changes.

Parameters
receiver- The new receiver to add.

◆ ApplyTheme()

bool BlamKeystone::Themes::ApplyTheme ( std::string  name)

Applies a new theme to the application.

Parameters
name- The name of the theme to apply.
Returns
true if the theme was applied, otherwise returns false.

◆ GetActiveTheme()

BlamEditorTheme * BlamKeystone::Themes::GetActiveTheme ( )

Retrieves the currently selected theme.

Returns
A pointer to the currently selected theme. If the active index is invalid, nullptr is returned.

◆ GetTheme()

BlamEditorTheme * BlamKeystone::Themes::GetTheme ( std::string  name)

Retrieves a theme.

Parameters
name- The name of the desired theme.
Returns
A pointer to the specified theme if one with the provided name was found, otherwise returns nullptr.

◆ GetThemeList()

std::vector< BlamEditorTheme > * BlamKeystone::Themes::GetThemeList ( )

Retrieves the list of loaded themes.

Returns
A pointer to the list of loaded themes.

◆ LoadThemes()

bool BlamKeystone::Themes::LoadThemes ( )

Loads all themes from Qt and the keystone theme folders.

Returns
true if all themes were loaded successfully, otherwise returns false.

◆ RemoveReceiver()

void BlamKeystone::Themes::RemoveReceiver ( KeystoneThemeChangeReceiver receiver)

Unregisters a theme change receiver.

The receiver will no longer receive theme change notifications.

Parameters
receiver- The receiver to remove.

◆ UpdateActiveTheme()

void BlamKeystone::Themes::UpdateActiveTheme ( BlamEditorTheme theme)

Updates the stored index of the current active theme.

This is neccessary to ensure that GetActiveTheme returns the correct value.

Note
This should only be called from BlamEditorTheme::ApplyTheme.
Parameters
theme- The currently active theme.