 |
Blamite Game Engine - Keystone
00427.01.12.25.2146.blamite
A library that enables the use of Qt in Blamite's editing tools.
|
Go to the documentation of this file.
4 #include <qmdisubwindow.h>
6 #include <Strings/components/settings/config/config.h>
107 virtual bool ConfirmClose(std::string confirmation_message =
"");
122 virtual bool Close();
131 virtual bool Close(
bool force_close);
std::string custom_icon_id
The resource ID of the custom icon. Only used when override_icon is true.
Definition: BlamEditorDocument.h:57
int mdi_default_height
The default starting height of the document's MDI window.
Definition: BlamEditorDocument.h:63
int mdi_default_width
The default starting width of the document's MDI window.
Definition: BlamEditorDocument.h:62
BlamEditorDocumentType GetDocumentType()
Retrieves the type of this document.
Definition: BlamEditorDocument.cpp:18
BlamEditorWindow * parent_window
The parent window that owns this document.
Definition: BlamEditorDocument.h:48
std::string file_path
The path to the file associated with this document.
Definition: BlamEditorDocument.h:59
@ GameWindow
Special document type used for the Game Viewport window.
@ Tabs
Sub-windows will be organized using tabs, similar to more modern editing tools.
KeystoneDialogResult
Enumerator containing all possible generic dialog results.
Definition: keystone_api.h:30
BlamWorkspaceLayoutType workspace_type
The layout type the window is currently using.
Definition: BlamEditorWindow.h:47
std::string GetApplicationTitle()
Retrieves the application title of this Editor Window.
Definition: BlamEditorWindow.cpp:426
std::vector< BlamEditorDocument * > open_documents
The list of open documents.
Definition: BlamEditorWindow.h:53
BlamEditorDocumentType
Enumerator containing all possible editor document types.
Definition: BlamEditorDocument.h:23
std::string document_title
The title of this document.
Definition: BlamEditorDocument.h:50
@ Unspecified
Indicates that the editor window type is unknown. This should never happen.
KEYSTONE void UnloadDocumentConfigurations()
Unloads all document type configurations.
Definition: document_config.cpp:91
Class representing a Blamite Editor Theme.
Definition: themes.h:45
virtual void FlagAsModified(bool new_modified_state=true)
Flags the document as being modified.
Definition: BlamEditorDocument.cpp:79
BlamEditorDocument(BlamEditorWindow *_window, BlamEditorDocumentType doctype)
Constructs a new BlamEditorDocument.
Definition: BlamEditorDocument.cpp:12
KEYSTONE KeystoneDialogResult ShowMessageBox(std::string message)
Definition: utils.cpp:294
void UpdateDefaultIcon()
Updates the document's icon.
Definition: BlamEditorDocument.cpp:215
bool modified
Whether or not the document has been modified.
Definition: BlamEditorDocument.h:53
BlamWorkspaceLayoutType
Enumerator used to specify the workspace layout method that an application should use.
Definition: BlamEditorWindow.h:22
@ TagDesigner
Special document type used for the Tag Designer window.
@ Tag
Indicates the document represents a tag file.
@ YesNoCancel
Dialog is shown with a [Yes], [No], and [Cancel] button.
BlamEditorDocument * document
The document associated with this widget.
Definition: BlamEditorDocument.h:157
KEYSTONE BlamEditorTheme * GetActiveTheme()
Retrieves the currently selected theme.
Definition: themes.cpp:335
KEYSTONE void LoadDocumentConfigurations()
Loads all document type configurations.
Definition: document_config.cpp:83
virtual void SaveAs()
Attempts to save the document, prompting the user to save as a new file.
Definition: BlamEditorDocument.h:141
@ Yes
The user pressed the 'Yes' button.
@ MDI
Sub-windows will be organized using MDI (Multiple Document Interface).
virtual void OnUnfocused()
Called when the document is unfocused.
Definition: BlamEditorDocument.h:151
KEYSTONE BlamEditorWindow * GetMainEditorWindow()
Retrieves the main editor window.
Definition: editor_data.cpp:34
BlamEditorDocumentSubWindow(QWidget *parent=nullptr)
Definition: BlamEditorDocument.h:159
std::string document_context
The context of this document. Will generally be a project or tag folder.
Definition: BlamEditorDocument.h:60
virtual void Save()
Attempts to save the document, replacing the original file.
Definition: BlamEditorDocument.h:136
@ Question
Dialog icon will be a speech bubble with a question mark.
Interface class that any types of editor documents inherit from.
Definition: BlamEditorDocument.h:38
std::string custom_icon_group
The resource group containing the custom icon name. Only used when override_icon is true.
Definition: BlamEditorDocument.h:56
QTabWidget * tab_area
The tab widget used for documents. Only set when using Tab layout.
Definition: BlamEditorWindow.h:50
SkinnableMdiArea * mdi_area
The MDI area used for documents. Only set when using MDI layout.
Definition: BlamEditorWindow.h:49
KEYSTONE std::map< BlamEditorDocumentType, BlamConfigurationFile * > GetDocumentTypeConfigurations()
Retrieves the list of loaded document type configuration files.
Definition: document_config.cpp:117
virtual void OnThemeChange(BlamEditorTheme *new_theme)
Called when the active theme is changed.
Definition: BlamEditorDocument.h:85
void Show()
Shows the document within the parent window.
Definition: BlamEditorDocument.cpp:23
bool loaded
Whether or not the document was able to be successfully loaded.
Definition: BlamEditorDocument.h:52
Interface class that all main editing tool windows inherit from.
Definition: BlamEditorWindow.h:34
@ Unspecified
Indicates the document type is unspecified or invalid.
void closeEvent(QCloseEvent *closeEvent)
Definition: BlamEditorDocumentSubWindow.cpp:5
#define KEYSTONE
Definition: BlamEditorDocument.h:11
@ No
The user pressed the 'No' button.
Definition: BlamEditorDocument.h:154
virtual bool Close()
Closes the document and releases any resources being used by it.
Definition: BlamEditorDocument.cpp:178
Namespace contianing functions for accessing common editor data.
Definition: BlamEditorDocument.h:177
KEYSTONE QIcon GetDefaultApplicationIcon()
Retrieves the default application icon.
Definition: editor_data.cpp:91
virtual bool ConfirmClose(std::string confirmation_message="")
Called immediately before closing a document.
Definition: BlamEditorDocument.cpp:265
@ File
Indicates the document represents a generic file.
bool override_icon
Whether or not this document uses a custom icon other than the application default.
Definition: BlamEditorDocument.h:55
virtual void OnFocused()
Called when the document is focused.
Definition: BlamEditorDocument.h:146
BlamEditorDocumentWidget * ui
The GUI widget associated with this document.
Definition: BlamEditorDocument.h:51
KEYSTONE BlamConfigurationFile * GetDocumentTypeConfiguration(BlamEditorDocumentType type)
Attempts to locate the configuration file for the specified document type.
Definition: document_config.cpp:107