Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::ScriptEditor Class Reference

#include <ScriptEditor.h>

Inheritance diagram for sf::ScriptEditor:
Collaboration diagram for sf::ScriptEditor:

Public Types

typedef TClosure< QSharedPointer< ScriptInterpreter >, const QString & > FindInterpreterClosure
 Type definition for the callback closure.
 

Public Member Functions

 ScriptEditor (QSettings *settings, QWidget *parent=nullptr)
 
 ~ScriptEditor () override
 
EditorgetEditor () const
 
ScriptInterpretergetScriptInterpreter () const
 
void setInterpreter (const QSharedPointer< ScriptInterpreter > &interpreter)
 
void updateStatus ()
 
void moveCursorToInstruction (int row)
 
bool loadFile (const QString &fileName) override
 Pure virtual needs to be implemented.
 
QString newFileName () const override
 
void onActionCompile ()
 
void onActionInitialize ()
 
void onActionStep ()
 
void onActionRun ()
 
void onActionStop ()
 
void onClickInstruction (const QModelIndex &index)
 
void stateSaveRestore (bool save) override
 Saves or restores the state of the MDI instance.
 
void adjustColumns ()
 
void develop () override
 Virtual function which is called during development only fro an action.
 
- Public Member Functions inherited from sf::PlainTextEditMdi
 PlainTextEditMdi ()
 Default constructor.
 
 PlainTextEditMdi (QPlainTextEdit *editor)
 Initializing constructor.
 
void setEditor (QPlainTextEdit *edit, QWidget *container=nullptr)
 Sets the editor for the interface to work on to set the title.
 
void newFile () override
 Pure virtual needs to be implemented.
 
bool save () override
 Pure virtual needs to be implemented.
 
bool saveAs () override
 Pure virtual needs to be implemented.
 
bool saveFile (const QString &fileName)
 
bool isModified () const override
 Pure virtual needs to be implemented.
 
QString userFriendlyCurrentFile () const override
 Pure virtual needs to be implemented.
 
QString currentFile () const override
 Pure virtual needs to be implemented.
 
bool hasSelection () const override
 Pure virtual needs to be implemented.
 
bool isUndoRedoEnabled () const override
 Pure virtual needs to be implemented.
 
bool isUndoAvailable () const override
 Pure virtual needs to be implemented.
 
bool isRedoAvailable () const override
 Pure virtual needs to be implemented.
 
void cut () override
 Pure virtual needs to be implemented.
 
void copy () override
 Pure virtual needs to be implemented.
 
void paste () override
 Pure virtual needs to be implemented.
 
void undo () override
 Pure virtual needs to be implemented.
 
void redo () override
 Pure virtual needs to be implemented.
 
- Public Member Functions inherited from sf::MultiDocInterface
 MultiDocInterface ()
 Default constructor.
 
virtual void setConnections (QWidget *editor)
 Sets the editor to operate on.
 
virtual bool canClose () const
 When the document is modified this function shows a message box with 3 options to save or not or to cancel closing the document.
 
QString getFileTypeFilters () const
 
void activate (bool)
 Called by application when this document is activated deactivated.
 

Static Public Attributes

static FindInterpreterClosure callbackFindInterpreter
 Holds a callback to find interpreter from the passed file.
 

Protected Member Functions

void closeEvent (QCloseEvent *event) override
 

Additional Inherited Members

- Public Attributes inherited from sf::MultiDocInterface
MultiDocInterfaceSignals mdiSignals
 Instance to connect signal handlers onto.
 

Member Typedef Documentation

◆ FindInterpreterClosure

typedef TClosure<QSharedPointer<ScriptInterpreter>, const QString&> sf::ScriptEditor::FindInterpreterClosure

Type definition for the callback closure.

Constructor & Destructor Documentation

◆ ScriptEditor()

sf::ScriptEditor::ScriptEditor ( QSettings *  settings,
QWidget *  parent = nullptr 
)
explicit

◆ ~ScriptEditor()

sf::ScriptEditor::~ScriptEditor ( )
override

Member Function Documentation

◆ adjustColumns()

void sf::ScriptEditor::adjustColumns ( )

◆ closeEvent()

void sf::ScriptEditor::closeEvent ( QCloseEvent *  event)
overrideprotected

◆ develop()

void sf::ScriptEditor::develop ( )
overridevirtual

Virtual function which is called during development only fro an action.

Allows to do stuff with reduced the repetitive clicking in the GUI.

Reimplemented from sf::MultiDocInterface.

◆ getEditor()

Editor * sf::ScriptEditor::getEditor ( ) const

◆ getScriptInterpreter()

ScriptInterpreter * sf::ScriptEditor::getScriptInterpreter ( ) const

◆ loadFile()

bool sf::ScriptEditor::loadFile ( const QString &  fileName)
overridevirtual

Pure virtual needs to be implemented.

Reimplemented from sf::PlainTextEditMdi.

◆ moveCursorToInstruction()

void sf::ScriptEditor::moveCursorToInstruction ( int  row)

◆ newFileName()

QString sf::ScriptEditor::newFileName ( ) const
overridevirtual

Reimplemented from sf::PlainTextEditMdi.

◆ onActionCompile()

void sf::ScriptEditor::onActionCompile ( )

◆ onActionInitialize()

void sf::ScriptEditor::onActionInitialize ( )

◆ onActionRun()

void sf::ScriptEditor::onActionRun ( )

◆ onActionStep()

void sf::ScriptEditor::onActionStep ( )

◆ onActionStop()

void sf::ScriptEditor::onActionStop ( )

◆ onClickInstruction()

void sf::ScriptEditor::onClickInstruction ( const QModelIndex &  index)

◆ setInterpreter()

void sf::ScriptEditor::setInterpreter ( const QSharedPointer< ScriptInterpreter > &  interpreter)

◆ stateSaveRestore()

void sf::ScriptEditor::stateSaveRestore ( bool  save)
overridevirtual

Saves or restores the state of the MDI instance.

Reimplemented from sf::MultiDocInterface.

◆ updateStatus()

void sf::ScriptEditor::updateStatus ( )

Member Data Documentation

◆ callbackFindInterpreter

FindInterpreterClosure sf::ScriptEditor::callbackFindInterpreter
static

Holds a callback to find interpreter from the passed file.


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