DynExp
Highly flexible laboratory automation for dynamically changing experiments.
TextEditor Class Reference
+ Inheritance diagram for TextEditor:

Public Member Functions

 TextEditor (QWidget *parent, const std::filesystem::path &Filename)
 
 ~TextEditor ()=default
 
auto & GetFilename () const
 

Private Types

using IndexType = qulonglong
 

Private Slots

void OnSave ()
 
void OnClose ()
 

Private Member Functions

virtual void showEvent (QShowEvent *event) override
 
virtual void closeEvent (QCloseEvent *event) override
 
bool DoSave ()
 Saves the editor's content to the file Filename. More...
 

Private Attributes

Ui::TextEditor ui
 
const std::filesystem::path Filename
 
QSyntaxHighlighter * SyntaxHighlighter = nullptr
 

Detailed Description

Definition at line 16 of file TextEditor.h.

Member Typedef Documentation

◆ IndexType

using TextEditor::IndexType = qulonglong
private

Definition at line 21 of file TextEditor.h.

Constructor & Destructor Documentation

◆ TextEditor()

TextEditor::TextEditor ( QWidget *  parent,
const std::filesystem::path &  Filename 
)

Definition at line 7 of file TextEditor.cpp.

◆ ~TextEditor()

TextEditor::~TextEditor ( )
default

Member Function Documentation

◆ closeEvent()

void TextEditor::closeEvent ( QCloseEvent *  event)
overrideprivatevirtual

Definition at line 47 of file TextEditor.cpp.

◆ DoSave()

bool TextEditor::DoSave ( )
private

Saves the editor's content to the file Filename.

Returns
Returns true in case of success, false otherwise.

Definition at line 87 of file TextEditor.cpp.

◆ GetFilename()

auto& TextEditor::GetFilename ( ) const
inline

Definition at line 27 of file TextEditor.h.

◆ OnClose

void TextEditor::OnClose ( )
privateslot

Definition at line 104 of file TextEditor.cpp.

◆ OnSave

void TextEditor::OnSave ( )
privateslot

Definition at line 99 of file TextEditor.cpp.

◆ showEvent()

void TextEditor::showEvent ( QShowEvent *  event)
overrideprivatevirtual

Definition at line 21 of file TextEditor.cpp.

Member Data Documentation

◆ Filename

const std::filesystem::path TextEditor::Filename
private

Definition at line 41 of file TextEditor.h.

◆ SyntaxHighlighter

QSyntaxHighlighter* TextEditor::SyntaxHighlighter = nullptr
private

Definition at line 43 of file TextEditor.h.

◆ ui

Ui::TextEditor TextEditor::ui
private

Definition at line 39 of file TextEditor.h.


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