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

Interface class that any types of editor documents inherit from. More...

#include <BlamEditorDocument.h>

+ Inheritance diagram for BlamEditorDocument:

Public Member Functions

 BlamEditorDocument (BlamEditorWindow *_window, BlamEditorDocumentType doctype)
 Constructs a new BlamEditorDocument. More...
 
BlamEditorDocumentType GetDocumentType ()
 Retrieves the type of this document. More...
 
virtual void OnThemeChange (BlamEditorTheme *new_theme)
 Called when the active theme is changed. More...
 
void Show ()
 Shows the document within the parent window. More...
 
virtual void Close ()
 Closes the document and releases any resources being used by it. More...
 
virtual void Save ()
 Attempts to save the document, replacing the original file. More...
 
virtual void SaveAs ()
 Attempts to save the document, prompting the user to save as a new file. More...
 

Public Attributes

BlamEditorWindowparent_window = nullptr
 The parent window that owns this document. More...
 
std::string document_title = "document"
 The title of this document. More...
 
BlamEditorDocumentWidgetui = nullptr
 The GUI widget associated with this document. More...
 
bool loaded = true
 Whether or not the document was able to be successfully loaded. More...
 

Detailed Description

Interface class that any types of editor documents inherit from.

Currently, the primary purpose of this is to store a persistent list of all open tags, while allowing the functionality to be expanded later on as needed.

Constructor & Destructor Documentation

◆ BlamEditorDocument()

BlamEditorDocument::BlamEditorDocument ( BlamEditorWindow _window,
BlamEditorDocumentType  doctype 
)

Constructs a new BlamEditorDocument.

Parameters
_window- The parent window that owns this document.
doctype- The document type.

Member Function Documentation

◆ Close()

virtual void BlamEditorDocument::Close ( )
inlinevirtual

Closes the document and releases any resources being used by it.

Reimplemented in BlamEditorDocument_Tag.

◆ GetDocumentType()

BlamEditorDocumentType BlamEditorDocument::GetDocumentType ( )

Retrieves the type of this document.

Returns
The document type for the document.

◆ OnThemeChange()

virtual void BlamEditorDocument::OnThemeChange ( BlamEditorTheme new_theme)
inlinevirtual

Called when the active theme is changed.

Parameters
new_theme- The newly applied theme.

◆ Save()

virtual void BlamEditorDocument::Save ( )
inlinevirtual

Attempts to save the document, replacing the original file.

Reimplemented in BlamEditorDocument_Tag.

◆ SaveAs()

virtual void BlamEditorDocument::SaveAs ( )
inlinevirtual

Attempts to save the document, prompting the user to save as a new file.

Reimplemented in BlamEditorDocument_Tag.

◆ Show()

void BlamEditorDocument::Show ( )

Shows the document within the parent window.

Member Data Documentation

◆ document_title

std::string BlamEditorDocument::document_title = "document"

The title of this document.

◆ loaded

bool BlamEditorDocument::loaded = true

Whether or not the document was able to be successfully loaded.

◆ parent_window

BlamEditorWindow* BlamEditorDocument::parent_window = nullptr

The parent window that owns this document.

◆ ui

BlamEditorDocumentWidget* BlamEditorDocument::ui = nullptr

The GUI widget associated with this document.


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