Elaztek Developer Hub
Blamite Game Engine - Keystone  00427.01.12.25.2146.blamite
A library that enables the use of Qt in Blamite's editing tools.
SapienMainWindow Class Reference

Class representing the main window for Sapien. More...

#include <sapien_main_window.h>

+ Inheritance diagram for SapienMainWindow:
+ Collaboration diagram for SapienMainWindow:

Public Slots

void OnScenarioLoadStarted (std::string tag_path) override
 
void OnScenarioLoadStageChanged (std::string tag_path, int stage) override
 
void OnScenarioLoadFinished (std::string tag_path, bool success) override
 

Public Member Functions

 SapienMainWindow (QWidget *parent=Q_NULLPTR)
 
 ~SapienMainWindow ()
 
void SetStatusBarText (std::string status)
 Updates the current status bar text. More...
 
void SetStatusBarText (std::string status, int progress_bar_value)
 Updates the current status bar text. More...
 
void closeEvent (QCloseEvent *closeEvent) override
 Called when the window is closed. More...
 
void OnMouseClickEvent (MouseClickEvent *event) override
 
void OnKeyPressEvent (KeyPressEvent *event) override
 
- Public Member Functions inherited from BlamEditorWindow
 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)
 Retrieves a specific tool window. More...
 
BlamEditorDocumentGetActiveDocument ()
 Get the current active document. More...
 
void UpdateDefaultIcon ()
 Updates the default icon for the window (and all child MDI subwindows). More...
 
std::string GetApplicationTitle ()
 Retrieves the application title of this Editor Window. More...
 
virtual void OnScenarioLoadStarted (std::string tag_path)
 
virtual void OnScenarioLoadStageChanged (std::string tag_path, int stage)
 
virtual void OnScenarioLoadFinished (std::string tag_path, bool success)
 

Additional Inherited Members

- Public Attributes inherited from BlamEditorWindow
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

Class representing the main window for Sapien.

Constructor & Destructor Documentation

◆ SapienMainWindow()

SapienMainWindow::SapienMainWindow ( QWidget *  parent = Q_NULLPTR)
+ Here is the call graph for this function:

◆ ~SapienMainWindow()

SapienMainWindow::~SapienMainWindow ( )

Member Function Documentation

◆ closeEvent()

void SapienMainWindow::closeEvent ( QCloseEvent *  closeEvent)
override

Called when the window is closed.

Parameters
closeEvent- The close event that was fired.
+ Here is the call graph for this function:

◆ OnKeyPressEvent()

void SapienMainWindow::OnKeyPressEvent ( KeyPressEvent *  event)
override

◆ OnMouseClickEvent()

void SapienMainWindow::OnMouseClickEvent ( MouseClickEvent *  event)
override
+ Here is the call graph for this function:

◆ OnScenarioLoadFinished

void SapienMainWindow::OnScenarioLoadFinished ( std::string  tag_path,
bool  success 
)
overrideslot
+ Here is the call graph for this function:

◆ OnScenarioLoadStageChanged

void SapienMainWindow::OnScenarioLoadStageChanged ( std::string  tag_path,
int  stage 
)
overrideslot
+ Here is the call graph for this function:

◆ OnScenarioLoadStarted

void SapienMainWindow::OnScenarioLoadStarted ( std::string  tag_path)
overrideslot
+ Here is the call graph for this function:

◆ SetStatusBarText() [1/2]

void SapienMainWindow::SetStatusBarText ( std::string  status)

Updates the current status bar text.

Parameters
status- The new status to display on the status bar.
+ Here is the caller graph for this function:

◆ SetStatusBarText() [2/2]

void SapienMainWindow::SetStatusBarText ( std::string  status,
int  progress_bar_value 
)

Updates the current status bar text.

Parameters
status- The new status to display on the status bar.

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