Elaztek Developer Hub
Blamite Game Engine - Keystone  00307.01.26.21.0804.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"
9 #include "../windows/console_output/guerilla_console_output.h"
12 #include "ui_guerilla_window.h"
13 
18 {
21 };
22 
26 class guerilla_window : public QMainWindow, public KeystoneThemeChangeReceiver
27 {
28  Q_OBJECT
29 
30 private:
31  Ui::guerilla_window ui;
32 
33  guerilla_menubar* menu_bar = nullptr;
34  explorer_bar* explorer = nullptr;
35  guerilla_console_output* output = nullptr;
36 
40  void CreateMdiLayout();
41 
45  void CreateTabLayout();
46 
52  void ShowTagEditor(tag_editor* editor);
53 
54 public:
55  BlamConfigurationFile* config;
56 
57  bool show_explorer = false;
58  bool show_output_window = false;
59 
61  QTabWidget* tab_area = nullptr;
63 
69  guerilla_window(BlamConfigurationFile* guerilla_config, QWidget* parent = Q_NULLPTR);
71 
79  BlamResult OpenTag(QString file_path);
80 
86  void OpenNewTag(BlamTag* new_tag);
87 
91  void ToggleExplorer();
92 
96  void ToggleOutput();
97 
103  void OnThemeChange(BlamEditorTheme* new_theme);
104 
106 };
guerilla_window::layout_type
GuerillaLayoutType layout_type
The layout type the window is currently using.
Definition: guerilla_window.h:62
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:60
SkinnableMdiArea.h
guerilla_console_output
The Guerilla output window.
Definition: guerilla_console_output.h:14
guerilla_window::tab_area
QTabWidget * tab_area
The tab widget used for tag documents. Only set when using Tab layout.
Definition: guerilla_window.h:61
guerilla_window::OpenTag
BlamResult OpenTag(QString file_path)
Attempts to open a tag for editing.
Definition: guerilla_window.cpp:150
guerilla_window::OpenNewTag
void OpenNewTag(BlamTag *new_tag)
Opens a tag for editing.
Definition: guerilla_window.cpp:159
tag_editor
The tag editor widget.
Definition: tag_editor.h:15
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
GuerillaLayoutType
GuerillaLayoutType
Enumerator used to specify the layout method Guerilla should use.
Definition: guerilla_window.h:17
SkinnableMdiArea
Wrapper class around a QMdiArea, made to simplify skinning.
Definition: SkinnableMdiArea.h:18
guerilla_window::GetCurrentTagEditor
tag_editor * GetCurrentTagEditor()
Definition: guerilla_window.cpp:246
GuerillaLayoutType::GuerillaLayout_Tabs
@ GuerillaLayout_Tabs
Indicates Guerilla should display tags using tabs, similar to more modern editing tools.
guerilla_window::OnThemeChange
void OnThemeChange(BlamEditorTheme *new_theme)
Updates the window icon when the active theme changes.
Definition: guerilla_window.cpp:241
guerilla_window::config
BlamConfigurationFile * config
Pointer to the Guerilla configuration file.
Definition: guerilla_window.h:55
guerilla_window::ToggleOutput
void ToggleOutput()
Toggles the console output window.
Definition: guerilla_window.cpp:218
GuerillaLayoutType::GuerillaLayout_MDI
@ GuerillaLayout_MDI
Indicates Guerilla should display tags using MDI (Multiple Document Interface).
guerilla_window::ToggleExplorer
void ToggleExplorer()
Toggles the Explorer Bar.
Definition: guerilla_window.cpp:164
guerilla_window::show_explorer
bool show_explorer
Whether or not the Explorer Bar is currently being displayed.
Definition: guerilla_window.h:57
guerilla_window::guerilla_window
guerilla_window(BlamConfigurationFile *guerilla_config, QWidget *parent=Q_NULLPTR)
Initializes the application window.
Definition: guerilla_window.cpp:5
explorer_bar
The Guerilla Explorer Bar.
Definition: explorer_bar.h:11
guerilla_window::~guerilla_window
~guerilla_window()
Definition: guerilla_window.cpp:92
guerilla_window
The main Guerilla window.
Definition: guerilla_window.h:26
guerilla_window::show_output_window
bool show_output_window
Whether or not the output window is currently being displayed.
Definition: guerilla_window.h:58