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.
BlamEditorWindow Class Reference

Interface class that all main editing tool windows inherit from. More...

#include <BlamEditorWindow.h>

+ Inheritance diagram for BlamEditorWindow:
+ Collaboration diagram for BlamEditorWindow:

Public Member Functions

 BlamEditorWindow (BlamEditorWindowType window_type)
 Constructs a new editor window. More...
 
void SetupWindow ()
 Prepares the main window layout. More...
 
BlamEditorWindowType GetEditorWindowType ()
 Retrieves the type of the editor window. More...
 
virtual void OnThemeChange (BlamEditorTheme *new_theme)
 Called when the active theme is changed. More...
 
bool OpenDocument (std::string file_path, BlamTagTreeNode *tree_node, BlamEditorDocumentType doctype)
 Attempts to open the specified document in the main window. More...
 
void OpenDocument (BlamEditorDocument *document)
 Opens a pre-prepared document and associates it with this window. More...
 
void CloseDocument (int index)
 Attempts to close the specified document. More...
 
void CloseDocument (BlamEditorDocument *document)
 Attempts to close the specified document. More...
 
void CloseAllDocuments ()
 Closes all open documents. More...
 
void SaveAllDocuments ()
 Attempts to save all open documents. More...
 
bool OpenToolWindow (BlamEditorToolWindowType tool_type, Qt::DockWidgetArea position)
 Opens the specified tool window within the main window. More...
 
bool OpenToolWindow (BlamEditorToolWindowType tool_type)
 Opens the specified tool window within the main window. More...
 
void CloseToolWindow (BlamEditorToolWindowType tool_type)
 Closes the specified tool window. More...
 
void CloseAllToolWindows ()
 Closes all tool windows. More...
 
void ToggleToolWindow (BlamEditorToolWindowType tool_type)
 Toggles the specified tool window. More...
 
bool IsToolWindowOpen (BlamEditorToolWindowType tool_type)
 Checks if a given tool window type is open. More...
 
BlamEditorToolWindowGetToolWindow (BlamEditorToolWindowType tool_type)
 
BlamEditorDocumentGetActiveDocument ()
 Get the current active document. More...
 
void UpdateDefaultIcon ()
 
std::string GetApplicationTitle ()
 

Public Attributes

BlamWorkspaceLayoutType workspace_type = BlamWorkspaceLayoutType::MDI
 The layout type the window is currently using. More...
 
SkinnableMdiAreamdi_area = nullptr
 The MDI area used for documents. Only set when using MDI layout. More...
 
QTabWidget * tab_area = nullptr
 The tab widget used for documents. Only set when using Tab layout. More...
 
std::vector< BlamEditorToolWindow * > open_tool_windows = std::vector<BlamEditorToolWindow*>()
 The list of open tool windows. More...
 
std::vector< BlamEditorDocument * > open_documents = std::vector<BlamEditorDocument*>()
 The list of open documents. More...
 
BlamConfigurationFile * config = nullptr
 The configuration file for this editor window. More...
 

Detailed Description

Interface class that all main editing tool windows inherit from.

Currently, the primary purpose of this class is to allow for the main editor window to be known at all times, and to allow for most functionality to work cross-tool (ie, using the Guerilla explorer bar in Foundry).

Constructor & Destructor Documentation

◆ BlamEditorWindow()

BlamEditorWindow::BlamEditorWindow ( BlamEditorWindowType  window_type)

Constructs a new editor window.

Parameters
window_type- The type of window being created.

Member Function Documentation

◆ CloseAllDocuments()

void BlamEditorWindow::CloseAllDocuments ( )

Closes all open documents.

+ Here is the caller graph for this function:

◆ CloseAllToolWindows()

void BlamEditorWindow::CloseAllToolWindows ( )

Closes all tool windows.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CloseDocument() [1/2]

void BlamEditorWindow::CloseDocument ( BlamEditorDocument document)

Attempts to close the specified document.

If no document was found, then no actions are performed.

Parameters
document- The document to close.
+ Here is the call graph for this function:

◆ CloseDocument() [2/2]

void BlamEditorWindow::CloseDocument ( int  index)

Attempts to close the specified document.

If no document was found, then no actions are performed.

Parameters
index- The index of the document to close.

◆ CloseToolWindow()

void BlamEditorWindow::CloseToolWindow ( BlamEditorToolWindowType  tool_type)

Closes the specified tool window.

If the specified window is not open, then no action is performed.

Parameters
tool_type- The tool window to close.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetActiveDocument()

BlamEditorDocument * BlamEditorWindow::GetActiveDocument ( )

Get the current active document.

+ Here is the caller graph for this function:

◆ GetApplicationTitle()

std::string BlamEditorWindow::GetApplicationTitle ( )
+ Here is the caller graph for this function:

◆ GetEditorWindowType()

BlamEditorWindowType BlamEditorWindow::GetEditorWindowType ( )

Retrieves the type of the editor window.

Returns
The editor window type.
+ Here is the caller graph for this function:

◆ GetToolWindow()

BlamEditorToolWindow * BlamEditorWindow::GetToolWindow ( BlamEditorToolWindowType  tool_type)
+ Here is the caller graph for this function:

◆ IsToolWindowOpen()

bool BlamEditorWindow::IsToolWindowOpen ( BlamEditorToolWindowType  tool_type)

Checks if a given tool window type is open.

Parameters
tool_type- The type of window to check the open state of.
Returns
true if the specified tool window is open, otherwise returns false.
+ Here is the caller graph for this function:

◆ OnThemeChange()

void BlamEditorWindow::OnThemeChange ( BlamEditorTheme new_theme)
virtual

Called when the active theme is changed.

Parameters
new_theme- The newly applied theme.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OpenDocument() [1/2]

void BlamEditorWindow::OpenDocument ( BlamEditorDocument document)

Opens a pre-prepared document and associates it with this window.

Parameters
document- The document to open.
+ Here is the call graph for this function:

◆ OpenDocument() [2/2]

bool BlamEditorWindow::OpenDocument ( std::string  file_path,
BlamTagTreeNode *  tree_node,
BlamEditorDocumentType  doctype 
)

Attempts to open the specified document in the main window.

Parameters
file_path- Path to the document file.
doctype- The type of document that the file should be treated as.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OpenToolWindow() [1/2]

bool BlamEditorWindow::OpenToolWindow ( BlamEditorToolWindowType  tool_type)

Opens the specified tool window within the main window.

Parameters
tool_type- The type of tool window to show.
Returns
true if the window was shown successfully. If the specified tool window type is not supported for this window's BlamEditorWindowType, then this will return false and the window will not be shown.
+ Here is the call graph for this function:

◆ OpenToolWindow() [2/2]

bool BlamEditorWindow::OpenToolWindow ( BlamEditorToolWindowType  tool_type,
Qt::DockWidgetArea  position 
)

Opens the specified tool window within the main window.

Parameters
tool_type- The type of tool window to show.
position- The dock position to place the window at.
Returns
true if the window was shown successfully. If the specified tool window type is not supported for this window's BlamEditorWindowType, then this will return false and the window will not be shown.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveAllDocuments()

void BlamEditorWindow::SaveAllDocuments ( )

Attempts to save all open documents.

◆ SetupWindow()

void BlamEditorWindow::SetupWindow ( )

Prepares the main window layout.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToggleToolWindow()

void BlamEditorWindow::ToggleToolWindow ( BlamEditorToolWindowType  tool_type)

Toggles the specified tool window.

If the specified window is open, it will be closed. If the specified window does not exist, it will be opened (only if the tool window is supported within the given tool).

Parameters
tool_type- The tool window to toggle.
+ Here is the call graph for this function:

◆ UpdateDefaultIcon()

void BlamEditorWindow::UpdateDefaultIcon ( )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ config

BlamConfigurationFile* BlamEditorWindow::config = nullptr

The configuration file for this editor window.

◆ mdi_area

SkinnableMdiArea* BlamEditorWindow::mdi_area = nullptr

The MDI area used for documents. Only set when using MDI layout.

◆ open_documents

std::vector<BlamEditorDocument*> BlamEditorWindow::open_documents = std::vector<BlamEditorDocument*>()

The list of open documents.

◆ open_tool_windows

std::vector<BlamEditorToolWindow*> BlamEditorWindow::open_tool_windows = std::vector<BlamEditorToolWindow*>()

The list of open tool windows.

◆ tab_area

QTabWidget* BlamEditorWindow::tab_area = nullptr

The tab widget used for documents. Only set when using Tab layout.

◆ workspace_type

BlamWorkspaceLayoutType BlamEditorWindow::workspace_type = BlamWorkspaceLayoutType::MDI

The layout type the window is currently using.


The documentation for this class was generated from the following files: