Elaztek Developer Hub
Blamite Game Engine - Keystone  00367.02.08.23.1815.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
BlamEditorToolWindow::OnThemeChange
virtual void OnThemeChange(BlamEditorTheme *new_theme)
Called when the active theme is changed.
Definition: BlamEditorToolWindow.h:81
BlamEditorToolWindowType::Unspecified
@ Unspecified
BlamEditorToolWindow::OnToolOpen
virtual void OnToolOpen()
Called when the tool window is being opened.
Definition: BlamEditorToolWindow.h:86
BlamEditorToolWindow::dock_position
Qt::DockWidgetArea dock_position
Definition: BlamEditorToolWindow.h:45
BlamEditorToolWindow::GetToolWindowType
BlamEditorToolWindowType GetToolWindowType()
Retrieves the type of tool window that this tool window represents.
Definition: BlamEditorToolWindow.cpp:24
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:102
BlamEditorToolWindow::~BlamEditorToolWindow
~BlamEditorToolWindow()
Releases a tool window.
Definition: BlamEditorToolWindow.cpp:17
BlamEditorToolWindowType
BlamEditorToolWindowType
Enumerator containing all possible editor tool window types.
Definition: BlamEditorToolWindow.h:21
BlamEditorToolWindowType::StyleEditor
@ StyleEditor
BlamEditorToolWindow::LoadConfig
void LoadConfig()
Loads or creates the configuration file for this tool window.
Definition: BlamEditorToolWindow.cpp:29
BlamEditorToolWindow::GetDockWidgetArea
Qt::DockWidgetArea GetDockWidgetArea()
Definition: BlamEditorToolWindow.cpp:113
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:108
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
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