DynExp
Highly flexible laboratory automation for dynamically changing experiments.
Loading...
Searching...
No Matches
TextEditor Class Reference

#include <TextEditor.h>

+ 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.
 

Private Attributes

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

Detailed Description

Definition at line 20 of file TextEditor.h.

Member Typedef Documentation

◆ IndexType

using TextEditor::IndexType = qulonglong
private

Definition at line 25 of file TextEditor.h.

Constructor & Destructor Documentation

◆ TextEditor()

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

Definition at line 8 of file TextEditor.cpp.

◆ ~TextEditor()

TextEditor::~TextEditor ( )
default

Member Function Documentation

◆ closeEvent()

void TextEditor::closeEvent ( QCloseEvent *  event)
overrideprivatevirtual

Definition at line 49 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 89 of file TextEditor.cpp.

◆ GetFilename()

auto & TextEditor::GetFilename ( ) const
inline

Definition at line 31 of file TextEditor.h.

◆ OnClose

void TextEditor::OnClose ( )
privateslot

Definition at line 106 of file TextEditor.cpp.

◆ OnSave

void TextEditor::OnSave ( )
privateslot

Definition at line 101 of file TextEditor.cpp.

◆ showEvent()

void TextEditor::showEvent ( QShowEvent *  event)
overrideprivatevirtual

Definition at line 23 of file TextEditor.cpp.

Member Data Documentation

◆ Filename

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

Definition at line 45 of file TextEditor.h.

◆ SyntaxHighlighter

QSyntaxHighlighter* TextEditor::SyntaxHighlighter = nullptr
private

Definition at line 47 of file TextEditor.h.

◆ ui

std::unique_ptr<Ui::TextEditor> TextEditor::ui
private

Definition at line 43 of file TextEditor.h.


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