Elaztek Developer Hub
Blamite Game Engine - Keystone  00433.02.16.25.2127.blamite
A library that enables the use of Qt in Blamite's editing tools.
BlamEditorToolWindow.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <qdockwidget.h>
5 #include <Strings/components/settings/config/config.h>
6 
8 
9 #ifndef KEYSTONE
10 #define KEYSTONE
11 #endif
12 
13 class BlamEditorWindow;
14 
22 {
23  Output,
25  StyleEditor,
28  ToolWindow,
30 };
31 
38 class BlamEditorToolWindow : public QDockWidget
39 {
40 protected:
45 
49  Qt::DockWidgetArea dock_position = Qt::DockWidgetArea::LeftDockWidgetArea;
50 
51 public:
52 
53  std::string config_filename = "";
54  BlamConfigurationFile* config = nullptr;
55 
62 
67 
74 
78  void LoadConfig();
79 
85  virtual void OnThemeChange(BlamEditorTheme* new_theme) {};
86 
90  virtual void OnToolOpen() {};
91 
95  virtual void OnToolClose() {};
96 
102  void closeEvent(QCloseEvent* event);
103 
109  void OnDockAreaChanged(Qt::DockWidgetArea area);
110 
116  Qt::DockWidgetArea GetDockWidgetArea();
117 };
BlamEditorToolWindow
Base class for all editor tool windows.
Definition: BlamEditorToolWindow.h:38
editor_data.h
BlamEditorToolWindow::OnThemeChange
virtual void OnThemeChange(BlamEditorTheme *new_theme)
Called when the active theme is changed.
Definition: BlamEditorToolWindow.h:85
BlamEditorToolWindowType::Unspecified
@ Unspecified
Unspecified tool window type. Should generally be treated as an error.
BlamEditorToolWindow.h
BlamEditorToolWindow::OnToolOpen
virtual void OnToolOpen()
Called when the tool window is being opened.
Definition: BlamEditorToolWindow.h:90
BlamEditorToolWindow::dock_position
Qt::DockWidgetArea dock_position
The dock position of the tool window.
Definition: BlamEditorToolWindow.h:49
BlamEditorToolWindow::GetToolWindowType
BlamEditorToolWindowType GetToolWindowType()
Retrieves the type of tool window that this tool window represents.
Definition: BlamEditorToolWindow.cpp:28
BlamEditorToolWindowType::HierarchyView
@ HierarchyView
The hierarchy view, used to view objects within a scenario. Used in Sapien.
BlamEditorToolWindow::window_type
BlamEditorToolWindowType window_type
The tool window type.
Definition: BlamEditorToolWindow.h:44
themes.h
BlamKeystone::EditorData::GetEditorWindowType
KEYSTONE BlamEditorWindowType GetEditorWindowType()
Definition: editor_data.cpp:86
BlamEditorWindowType::Unspecified
@ Unspecified
Indicates that the editor window type is unknown. This should never happen.
BlamEditorToolWindowType::ExplorerClassic
@ ExplorerClassic
The classic Explorer Bar. Used in Guerilla.
BlamEditorWindowType::Sapien
@ Sapien
The editor window is the main window for Sapien (see #sapien_main_window).
BlamEditorTheme
Class representing a Blamite Editor Theme.
Definition: themes.h:45
BlamEditorToolWindow::closeEvent
void closeEvent(QCloseEvent *event)
Overrides the close event.
Definition: BlamEditorToolWindow.cpp:103
BlamEditorToolWindowType::ToolWindow
@ ToolWindow
The tool window, used to configure tool options. Used in Sapien.
BlamEditorToolWindow::~BlamEditorToolWindow
~BlamEditorToolWindow()
Releases a tool window.
Definition: BlamEditorToolWindow.cpp:17
BlamEditorWindow.h
BlamEditorToolWindowType
BlamEditorToolWindowType
Enumerator containing all possible editor tool window types.
Definition: BlamEditorToolWindow.h:21
BlamEditorWindow::CloseToolWindow
void CloseToolWindow(BlamEditorToolWindowType tool_type)
Closes the specified tool window.
Definition: BlamEditorWindow.cpp:317
BlamEditorToolWindowType::StyleEditor
@ StyleEditor
The style editor, used to test Qt5 stylesheet changes in real-time.
BlamEditorWindowType
BlamEditorWindowType
Enumerator used to identify the type of the main editor window.
Definition: keystone_api.h:53
BlamEditorToolWindow::LoadConfig
void LoadConfig()
Loads or creates the configuration file for this tool window.
Definition: BlamEditorToolWindow.cpp:33
BlamKeystone::EditorData::GetMainEditorWindow
KEYSTONE BlamEditorWindow * GetMainEditorWindow()
Retrieves the main editor window.
Definition: editor_data.cpp:34
BlamEditorToolWindow::GetDockWidgetArea
Qt::DockWidgetArea GetDockWidgetArea()
Retrieves the current dock widget area of the window.
Definition: BlamEditorToolWindow.cpp:114
BlamEditorToolWindow::config_filename
std::string config_filename
The name of the configuration filename.
Definition: BlamEditorToolWindow.h:53
BlamEditorToolWindow::OnDockAreaChanged
void OnDockAreaChanged(Qt::DockWidgetArea area)
Called when the dock area of the tool window is changed.
Definition: BlamEditorToolWindow.cpp:109
BlamEditorWindowType::Foundry
@ Foundry
The editor window is the main window for Foundry (see foundry_main_window).
BlamEditorWindow
Interface class that all main editing tool windows inherit from.
Definition: BlamEditorWindow.h:34
BlamEditorToolWindowType::Output
@ Output
The log output window.
BlamEditorToolWindowType::PropertiesPalette
@ PropertiesPalette
The properties palette, used to view object properties within a scenario. Used in Sapien.
BlamEditorToolWindow::BlamEditorToolWindow
BlamEditorToolWindow(BlamEditorToolWindowType _window_type)
Constructs a new tool window.
Definition: BlamEditorToolWindow.cpp:10
BlamEditorWindowType::Tool
@ Tool
The editor window is the GUI for Tool (see tool_gui_window).
BlamEditorToolWindow::OnToolClose
virtual void OnToolClose()
Called when the tool window is being closed.
Definition: BlamEditorToolWindow.h:95
BlamEditorToolWindow::config
BlamConfigurationFile * config
The configuration file for this tool window. Not always used.
Definition: BlamEditorToolWindow.h:54
BlamEditorWindowType::Guerilla
@ Guerilla
The editor window is the main window for Guerilla (see guerilla_window).