Elaztek Developer Hub
Blamite Game Engine - Keystone  00344.11.30.21.1210.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,
27 };
28 
35 class BlamEditorToolWindow : public QDockWidget
36 {
37 protected:
42 
43 public:
44 
45  std::string config_filename = "";
46  BlamConfigurationFile* config = nullptr;
47 
48  Qt::DockWidgetArea dock_position = Qt::DockWidgetArea::LeftDockWidgetArea;
49 
56 
61 
68 
72  void LoadConfig();
73 
79  virtual void OnThemeChange(BlamEditorTheme* new_theme) {};
80 
84  virtual void OnToolOpen() {};
85 
89  virtual void OnToolClose() {};
90 
96  void closeEvent(QCloseEvent* event);
97 };
BlamEditorToolWindow
Base class for all editor tool windows.
Definition: BlamEditorToolWindow.h:35
BlamEditorToolWindow::OnThemeChange
virtual void OnThemeChange(BlamEditorTheme *new_theme)
Called when the active theme is changed.
Definition: BlamEditorToolWindow.h:79
BlamEditorToolWindowType::Unspecified
@ Unspecified
BlamEditorToolWindow::OnToolOpen
virtual void OnToolOpen()
Called when the tool window is being opened.
Definition: BlamEditorToolWindow.h:84
BlamEditorToolWindow::dock_position
Qt::DockWidgetArea dock_position
Definition: BlamEditorToolWindow.h:48
BlamEditorToolWindow::GetToolWindowType
BlamEditorToolWindowType GetToolWindowType()
Retrieves the type of tool window that this tool window represents.
Definition: BlamEditorToolWindow.cpp:22
BlamEditorToolWindow::window_type
BlamEditorToolWindowType window_type
The tool window type.
Definition: BlamEditorToolWindow.h:41
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:100
BlamEditorToolWindow::~BlamEditorToolWindow
~BlamEditorToolWindow()
Releases a tool window.
Definition: BlamEditorToolWindow.cpp:15
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:27
BlamEditorToolWindow::config_filename
std::string config_filename
The name of the configuration filename.
Definition: BlamEditorToolWindow.h:45
BlamEditorWindow
Interface class that all main editing tool windows inherit from.
Definition: BlamEditorWindow.h:47
BlamEditorDocumentType::Unspecified
@ Unspecified
Indicates the document type is unspecified or invalid.
BlamEditorToolWindowType::Output
@ Output
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:89
BlamEditorToolWindow::config
BlamConfigurationFile * config
The configuration file for this tool window. Not always used.
Definition: BlamEditorToolWindow.h:46