Elaztek Developer Hub
Blamite Game Engine - Keystone  00390.07.02.23.1947.blamite
A library that enables the use of Qt in Blamite's editing tools.
shared_settings.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <QDialog>
4 #include <Strings/components/classes/events/events.h>
5 
8 #include "ui_shared_settings.h"
9 
11 
18 class shared_settings : public QDialog, public BlamEventListener
19 {
20  Q_OBJECT
21 
22 private:
23  Ui::shared_settings ui;
24 
25  std::vector<BlamConfigurationFile*> configuration_files = std::vector<BlamConfigurationFile*>();
26 
27  std::vector<QWidget*> current_child_items = std::vector<QWidget*>();
28 
29  BlamEditorConfigField_String* theme_menu = nullptr;
30  BlamEditorConfigField_String* theme_variant_menu = nullptr;
31  bool dialog_ready = true;
32 
36  void AddSettingControl(BlamConfigurationSetting* setting);
37 
38 public:
44  shared_settings(QWidget* parent = Q_NULLPTR);
45 
50 
57 
58  void OnEditorThemeChangeEvent(EditorThemeChangeEvent* event);
59 
60  void ApplyNewTheme();
61 private slots:
62 
66  void TreeWidgetSelectionChanged();
67 
68  void Button_ResetConfig_Clicked();
69  void Button_OpenDataFolder_Clicked();
70  void Button_SaveAndClose_Clicked();
71  void Button_Apply_Clicked();
72  void Button_Cancel_Clicked();
73 };
shared_settings::~shared_settings
~shared_settings()
Destroys the settings dialog and cleans up any resources used.
Definition: shared_settings.cpp:79
SharedSettingsGenericTreeItem
Class representing a generic shared settings tree widget item.
Definition: settings_treewidgets.h:23
BlamEditorConfigField_String::is_theme_list
bool is_theme_list
Definition: BlamEditorConfigField_String.h:15
editor_data.h
BlamEditorConfigField_String::is_theme_variant_list
bool is_theme_variant_list
Definition: BlamEditorConfigField_String.h:16
BlamEditorWindowType
BlamEditorWindowType
Enumerator used to identify the type of the main editor window.
Definition: BlamEditorWindow.h:33
SharedSettingsTreeItemType::Section
@ Section
Indicates the tree widget represents a configuration section.
BlamEditorConfigField_Generic
Definition: BlamEditorConfigField_Generic.h:10
SharedSettingsSectionTreeItem::section
BlamConfigurationSection * section
The section associated with this tree item.
Definition: settings_treewidgets.h:37
QSourceHighlite::QSourceHighliterTheme::theme
QHash< QSourceHighliter::Token, QTextCharFormat > theme(QSourceHighliter::Themes)
Definition: qsourcehighliterthemes.cpp:63
BlamEditorWindow::GetEditorWindowType
BlamEditorWindowType GetEditorWindowType()
Retrieves the type of the editor window.
Definition: BlamEditorWindow.cpp:89
BlamEditorWindowType::Sapien
@ Sapien
The editor window is the main window for Sapien (see sapien_main_window).
BlamEditorConfigField_String::RebuildEnumOptions
void RebuildEnumOptions()
Definition: BlamEditorConfigField_String.cpp:36
SharedSettingsGenericTreeItem::tree_item_type
SharedSettingsTreeItemType tree_item_type
The type of the tree widget item.
Definition: settings_treewidgets.h:26
themes.h
SharedSettingsFileTreeItem
Class representing a file shared settings tree widget item.
Definition: settings_treewidgets.h:53
SharedSettingsTreeItemType::File
@ File
Indicates the tree widget represents a configuration file.
BlamEditorTheme
Class representing a Blamite Editor Theme.
Definition: themes.h:47
BlamEditorWindowType::Guerilla
@ Guerilla
The editor window is the main window for Guerilla (see guerilla_window).
BlamEditorConfigField_String.h
shared_settings::shared_settings
shared_settings(QWidget *parent=Q_NULLPTR)
Constructs the settings dialog.
Definition: shared_settings.cpp:18
KeystoneMessageBoxButtons::YesNo
@ YesNo
Dialog is shown with a [Yes] and [No] button.
shared_settings::UpdateActiveSettingControl
void UpdateActiveSettingControl(BlamEditorConfigField_Generic *field)
TBA.
Definition: shared_settings.cpp:91
SharedSettingsFileTreeItem::file
BlamConfigurationFile * file
The file associated with this tree item.
Definition: settings_treewidgets.h:56
BlamKeystone::EditorData::GetRegisteredToolWindowList
KEYSTONE std::map< BlamEditorToolWindowType, BlamEditorToolWindow * > GetRegisteredToolWindowList()
Retrieves the list of registered tool windows.
Definition: editor_data.cpp:47
KeystoneMessageBoxType::Warning
@ Warning
Dialog icon will be a yellow triangle with an exclamation mark.
settings_treewidgets.h
qt_message_box.h
KeystoneDialogResult::Yes
@ Yes
The user pressed the 'Yes' button.
BlamKeystone::EditorData::GetMainEditorWindow
KEYSTONE BlamEditorWindow * GetMainEditorWindow()
Retrieves the main editor window.
Definition: editor_data.cpp:32
BlamEditorConfigField_String
Definition: BlamEditorConfigField_String.h:7
SharedSettingsSectionTreeItem
Class representing a section shared settings tree widget item.
Definition: settings_treewidgets.h:34
BlamEditorConfigField_Generic::setting
BlamConfigurationSetting * setting
Definition: BlamEditorConfigField_Generic.h:19
config_fields.h
BlamKeystone::Themes::GetTheme
KEYSTONE BlamEditorTheme * GetTheme(std::string name)
Retrieves a theme.
Definition: themes.cpp:320
qt_message_box::GetResult
KeystoneDialogResult GetResult()
Retrieves the dialog result.
Definition: qt_message_box.cpp:167
theme_changing_dialog.h
BlamEditorConfigField_Generic.h
BlamKeystone::EditorData::GetDocumentTypeConfigurations
KEYSTONE std::map< BlamEditorDocumentType, BlamConfigurationFile * > GetDocumentTypeConfigurations()
Retrieves the list of loaded document type configuration files.
Definition: document_config.cpp:117
shared_settings::ApplyNewTheme
void ApplyNewTheme()
Definition: shared_settings.cpp:247
BlamKeystone::UI::Controls::CreateConfigSettingControl
KEYSTONE BlamEditorConfigField_Generic * CreateConfigSettingControl(shared_settings *settings_dialog, BlamConfigurationSetting *setting)
Creates a new configuration setting control.
Definition: config_fields.cpp:13
theme_changing_dialog
A theme changing notice dialog.
Definition: theme_changing_dialog.h:14
shared_settings::OnEditorThemeChangeEvent
void OnEditorThemeChangeEvent(EditorThemeChangeEvent *event)
Definition: shared_settings.cpp:234
BlamEditorWindowType::Foundry
@ Foundry
The editor window is the main window for Foundry (see foundry_main_window).
shared_settings
Class for the new unified Settings dialog.
Definition: shared_settings.h:18
qt_message_box
A basic message box dialog.
Definition: qt_message_box.h:39
shared_settings.h