Elaztek Developer Hub
Blamite Game Engine - Keystone  00317.05.31.21.2243.blamite
A library that enables the use of Qt in Blamite's editing tools.
guerilla_window.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <QMainWindow>
4 #include <qmdisubwindow.h>
5 #include <Strings/components/settings/config/config.h>
6 
7 #include "../windows/explorer_bar/explorer_bar.h"
8 #include "../widgets/menubar/guerilla_menubar.h"
13 #include "ui_guerilla_window.h"
14 
15 class BlamTagTreeNode;
16 
20 class guerilla_window : public QMainWindow, public KeystoneThemeChangeReceiver
21 {
22  Q_OBJECT
23 
24 private:
25  Ui::guerilla_window ui;
26 
27  guerilla_menubar* menu_bar = nullptr;
28  explorer_bar* explorer = nullptr;
29  console_output* output = nullptr;
30 
34  void CreateMdiLayout();
35 
39  void CreateTabLayout();
40 
46  void ShowTagEditor(tag_editor* editor);
47 
48 public:
49  BlamConfigurationFile* config;
50 
51  bool show_explorer = false;
52  bool show_output_window = false;
53 
55  QTabWidget* tab_area = nullptr;
57 
63  guerilla_window(BlamConfigurationFile* guerilla_config, QWidget* parent = Q_NULLPTR);
65 
73  BlamResult OpenTag(QString file_path, bool binary, BlamTagTreeNode* tag_node);
74 
80  void OpenNewTag(BlamTag* new_tag);
81 
85  void ToggleExplorer();
86 
90  void ToggleOutput();
91 
97  void OnThemeChange(BlamEditorTheme* new_theme);
98 
100 };
KeystoneThemeChangeReceiver
Interface used to listen to theme change events.
Definition: KeystoneThemeChangeReceiver.h:8
guerilla_window::mdi_area
SkinnableMdiArea * mdi_area
The MDI area used for tag documents. Only set when using MDI layout.
Definition: guerilla_window.h:54
SkinnableMdiArea.h
guerilla_window::tab_area
QTabWidget * tab_area
The tab widget used for tag documents. Only set when using Tab layout.
Definition: guerilla_window.h:55
console_output
The console output window.
Definition: console_output.h:13
guerilla_window::layout_type
BlamWorkspaceLayoutType layout_type
The layout type the window is currently using.
Definition: guerilla_window.h:56
guerilla_window::OpenTag
BlamResult OpenTag(QString file_path, bool binary, BlamTagTreeNode *tag_node)
Attempts to open a tag for editing.
Definition: guerilla_window.cpp:177
console_output.h
guerilla_window::OpenNewTag
void OpenNewTag(BlamTag *new_tag)
Opens a tag for editing.
Definition: guerilla_window.cpp:186
tag_editor
The tag editor widget.
Definition: tag_editor.h:16
BlamEditorTheme
Class representing a Blamite Editor Theme.
Definition: themes.h:47
tag_editor.h
guerilla_menubar
The Guerilla menu bar.
Definition: guerilla_menubar.h:13
new_tag
Definition: new_tag.h:9
SkinnableMdiArea
Wrapper class around a QMdiArea, made to simplify skinning.
Definition: SkinnableMdiArea.h:18
BlamWorkspaceLayoutType
BlamWorkspaceLayoutType
Enumerator used to specify the workspace layout method that an application should use.
Definition: ui_shared.h:6
guerilla_window::GetCurrentTagEditor
tag_editor * GetCurrentTagEditor()
Definition: guerilla_window.cpp:273
guerilla_window::OnThemeChange
void OnThemeChange(BlamEditorTheme *new_theme)
Updates the window icon when the active theme changes.
Definition: guerilla_window.cpp:268
guerilla_window::config
BlamConfigurationFile * config
Pointer to the Guerilla configuration file.
Definition: guerilla_window.h:49
ui_shared.h
guerilla_window::ToggleOutput
void ToggleOutput()
Toggles the console output window.
Definition: guerilla_window.cpp:245
guerilla_window::ToggleExplorer
void ToggleExplorer()
Toggles the Explorer Bar.
Definition: guerilla_window.cpp:191
guerilla_window::show_explorer
bool show_explorer
Whether or not the Explorer Bar is currently being displayed.
Definition: guerilla_window.h:51
guerilla_window::guerilla_window
guerilla_window(BlamConfigurationFile *guerilla_config, QWidget *parent=Q_NULLPTR)
Initializes the application window.
Definition: guerilla_window.cpp:10
explorer_bar
The Guerilla Explorer Bar.
Definition: explorer_bar.h:14
guerilla_window::~guerilla_window
~guerilla_window()
Definition: guerilla_window.cpp:104
guerilla_window
The main Guerilla window.
Definition: guerilla_window.h:20
guerilla_window::show_output_window
bool show_output_window
Whether or not the output window is currently being displayed.
Definition: guerilla_window.h:52