Elaztek Developer Hub
Blamite Game Engine - Keystone  00402.09.29.23.0627.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,
29 };
30 
37 class BlamEditorToolWindow : public QDockWidget
38 {
39 protected:
44 
45  Qt::DockWidgetArea dock_position = Qt::DockWidgetArea::LeftDockWidgetArea;
46 
47 public:
48 
49  std::string config_filename = "";
50  BlamConfigurationFile* config = nullptr;
51 
58 
63 
70 
74  void LoadConfig();
75 
81  virtual void OnThemeChange(BlamEditorTheme* new_theme) {};
82 
86  virtual void OnToolOpen() {};
87 
91  virtual void OnToolClose() {};
92 
98  void closeEvent(QCloseEvent* event);
99 
105  void OnDockAreaChanged(Qt::DockWidgetArea area);
106 
107  Qt::DockWidgetArea GetDockWidgetArea();
108 };
BlamEditorToolWindow
Base class for all editor tool windows.
Definition: BlamEditorToolWindow.h:37
editor_data.h
BlamEditorToolWindow::OnThemeChange
virtual void OnThemeChange(BlamEditorTheme *new_theme)
Called when the active theme is changed.
Definition: BlamEditorToolWindow.h:81
BlamEditorWindowType::Tool
@ Tool
The editor window is the GUI for Tool (see tool_gui_window).
BlamEditorWindowType
BlamEditorWindowType
Enumerator used to identify the type of the main editor window.
Definition: BlamEditorWindow.h:33
BlamEditorToolWindowType::Unspecified
@ Unspecified
BlamEditorToolWindow.h
BlamEditorToolWindow::OnToolOpen
virtual void OnToolOpen()
Called when the tool window is being opened.
Definition: BlamEditorToolWindow.h:86
BlamEditorWindow::GetEditorWindowType
BlamEditorWindowType GetEditorWindowType()
Retrieves the type of the editor window.
Definition: BlamEditorWindow.cpp:89
BlamEditorToolWindow::dock_position
Qt::DockWidgetArea dock_position
Definition: BlamEditorToolWindow.h:45
BlamEditorWindowType::Sapien
@ Sapien
The editor window is the main window for Sapien (see sapien_main_window).
BlamEditorToolWindow::GetToolWindowType
BlamEditorToolWindowType GetToolWindowType()
Retrieves the type of tool window that this tool window represents.
Definition: BlamEditorToolWindow.cpp:28
BlamEditorToolWindowType::HierarchyView
@ HierarchyView
BlamEditorToolWindow::window_type
BlamEditorToolWindowType window_type
The tool window type.
Definition: BlamEditorToolWindow.h:43
themes.h
BlamEditorToolWindowType::ExplorerClassic
@ ExplorerClassic
BlamEditorTheme
Class representing a Blamite Editor Theme.
Definition: themes.h:47
BlamEditorToolWindow::closeEvent
void closeEvent(QCloseEvent *event)
Overrides the close event.
Definition: BlamEditorToolWindow.cpp:106
BlamEditorWindowType::Guerilla
@ Guerilla
The editor window is the main window for Guerilla (see guerilla_window).
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:275
BlamEditorToolWindowType::StyleEditor
@ StyleEditor
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:32
BlamEditorToolWindow::GetDockWidgetArea
Qt::DockWidgetArea GetDockWidgetArea()
Definition: BlamEditorToolWindow.cpp:117
BlamEditorToolWindow::config_filename
std::string config_filename
The name of the configuration filename.
Definition: BlamEditorToolWindow.h:49
BlamEditorToolWindow::OnDockAreaChanged
void OnDockAreaChanged(Qt::DockWidgetArea area)
Called when the dock area of the tool window is changed.
Definition: BlamEditorToolWindow.cpp:112
BlamEditorWindow
Interface class that all main editing tool windows inherit from.
Definition: BlamEditorWindow.h:48
BlamEditorDocumentType::Unspecified
@ Unspecified
Indicates the document type is unspecified or invalid.
BlamEditorToolWindowType::Output
@ Output
BlamEditorToolWindowType::PropertiesPalette
@ PropertiesPalette
BlamEditorToolWindow::BlamEditorToolWindow
BlamEditorToolWindow(BlamEditorToolWindowType _window_type)
Constructs a new tool window.
Definition: BlamEditorToolWindow.cpp:10
BlamEditorWindowType::Foundry
@ Foundry
The editor window is the main window for Foundry (see foundry_main_window).
BlamEditorToolWindow::OnToolClose
virtual void OnToolClose()
Called when the tool window is being closed.
Definition: BlamEditorToolWindow.h:91
BlamEditorToolWindow::config
BlamConfigurationFile * config
The configuration file for this tool window. Not always used.
Definition: BlamEditorToolWindow.h:50