Scanframe Modular Application 0.1.0
|
#include <ScriptEditor.h>
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 | |
Editor * | getEditor () const |
ScriptInterpreter * | getScriptInterpreter () 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. | |
typedef TClosure<QSharedPointer<ScriptInterpreter>, const QString&> sf::ScriptEditor::FindInterpreterClosure |
Type definition for the callback closure.
|
explicit |
|
override |
void sf::ScriptEditor::adjustColumns | ( | ) |
|
overrideprotected |
|
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.
Editor * sf::ScriptEditor::getEditor | ( | ) | const |
ScriptInterpreter * sf::ScriptEditor::getScriptInterpreter | ( | ) | const |
|
overridevirtual |
Pure virtual needs to be implemented.
Reimplemented from sf::PlainTextEditMdi.
void sf::ScriptEditor::moveCursorToInstruction | ( | int | row | ) |
|
overridevirtual |
Reimplemented from sf::PlainTextEditMdi.
void sf::ScriptEditor::onActionCompile | ( | ) |
void sf::ScriptEditor::onActionInitialize | ( | ) |
void sf::ScriptEditor::onActionRun | ( | ) |
void sf::ScriptEditor::onActionStep | ( | ) |
void sf::ScriptEditor::onActionStop | ( | ) |
void sf::ScriptEditor::onClickInstruction | ( | const QModelIndex & | index | ) |
void sf::ScriptEditor::setInterpreter | ( | const QSharedPointer< ScriptInterpreter > & | interpreter | ) |
|
overridevirtual |
Saves or restores the state of the MDI instance.
Reimplemented from sf::MultiDocInterface.
void sf::ScriptEditor::updateStatus | ( | ) |
|
static |
Holds a callback to find interpreter from the passed file.