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

A dialog used for general-purpose text and code editing. More...

#include <CodeEditorDialog.h>

+ Inheritance diagram for CodeEditorDialog:
+ Collaboration diagram for CodeEditorDialog:

Public Member Functions

 CodeEditorDialog (std::string contents="", QWidget *parent=Q_NULLPTR)
 Initializes a new code editor dialog. More...
 
 ~CodeEditorDialog ()
 
std::string GetText ()
 Retrieves the updated text. More...
 
bool IsCancelled ()
 Checks if the dialog was cancelled. More...
 
BlamDatarefValueHintType GetDatarefValueHintType ()
 

Detailed Description

A dialog used for general-purpose text and code editing.

Syntax highlighting is provided using the QSourceHighlite library.

Constructor & Destructor Documentation

◆ CodeEditorDialog()

CodeEditorDialog::CodeEditorDialog ( std::string  contents = "",
QWidget *  parent = Q_NULLPTR 
)

Initializes a new code editor dialog.

Parameters
contents- The initial contents of the file. Defaults to a blank string.
parent- The parent of this dialog. Defaults to nullptr.

◆ ~CodeEditorDialog()

CodeEditorDialog::~CodeEditorDialog ( )

Member Function Documentation

◆ GetDatarefValueHintType()

BlamDatarefValueHintType CodeEditorDialog::GetDatarefValueHintType ( )
+ Here is the call graph for this function:

◆ GetText()

std::string CodeEditorDialog::GetText ( )

Retrieves the updated text.

Returns
The modified text if the save button was clicked, otherwise this returns the original contents provided when the dialog was constructed. If no contents were provided and the dialog was cancelled, then this will return an empty string.
+ Here is the call graph for this function:

◆ IsCancelled()

bool CodeEditorDialog::IsCancelled ( )

Checks if the dialog was cancelled.

Returns
true if the user closed without saving, otherwise returns false.

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