Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::MultiDocInterface Class Referenceabstract

Interface for MDI document widgets handling files. More...

#include <MultiDocInterface.h>

Inheritance diagram for sf::MultiDocInterface:
Collaboration diagram for sf::MultiDocInterface:

Public Member Functions

 MultiDocInterface ()
 Default constructor.
 
virtual void setConnections (QWidget *editor)
 Sets the editor to operate on.
 
virtual void newFile ()=0
 Pure virtual needs to be implemented.
 
virtual bool loadFile (const QString &fileName)=0
 Pure virtual needs to be implemented.
 
virtual bool save ()=0
 Pure virtual needs to be implemented.
 
virtual bool saveAs ()=0
 Pure virtual needs to be implemented.
 
virtual QString userFriendlyCurrentFile () const =0
 Pure virtual needs to be implemented.
 
virtual QString currentFile () const =0
 Pure virtual needs to be implemented.
 
virtual bool isModified () const =0
 Pure virtual needs to be implemented.
 
virtual bool hasSelection () const =0
 Pure virtual needs to be implemented.
 
virtual bool isUndoRedoEnabled () const =0
 Pure virtual needs to be implemented.
 
virtual bool isUndoAvailable () const =0
 Pure virtual needs to be implemented.
 
virtual bool isRedoAvailable () const =0
 Pure virtual needs to be implemented.
 
virtual void cut ()=0
 Pure virtual needs to be implemented.
 
virtual void copy ()=0
 Pure virtual needs to be implemented.
 
virtual void paste ()=0
 Pure virtual needs to be implemented.
 
virtual void undo ()=0
 Pure virtual needs to be implemented.
 
virtual void redo ()=0
 Pure virtual needs to be implemented.
 
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
 
virtual void stateSaveRestore (bool save)
 Saves or restores the state of the MDI instance.
 
void activate (bool)
 Called by application when this document is activated deactivated.
 
virtual void develop ()
 Virtual function which is called during development only fro an action.
 

Public Attributes

MultiDocInterfaceSignals mdiSignals
 Instance to connect signal handlers onto.
 

Detailed Description

Interface for MDI document widgets handling files.

Constructor & Destructor Documentation

◆ MultiDocInterface()

sf::MultiDocInterface::MultiDocInterface ( )
explicit

Default constructor.

Member Function Documentation

◆ activate()

void sf::MultiDocInterface::activate ( bool  )

Called by application when this document is activated deactivated.

◆ canClose()

virtual bool sf::MultiDocInterface::canClose ( ) const
virtual

When the document is modified this function shows a message box with 3 options to save or not or to cancel closing the document.

It returns true when saved or not saved and false when cancelled. Can be overridden for other purposes.

Returns
True when it can be closed.

◆ copy()

virtual void sf::MultiDocInterface::copy ( )
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, and sf::LayoutEditor.

◆ currentFile()

virtual QString sf::MultiDocInterface::currentFile ( ) const
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, and sf::LayoutEditor.

◆ cut()

virtual void sf::MultiDocInterface::cut ( )
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, and sf::LayoutEditor.

◆ develop()

virtual void sf::MultiDocInterface::develop ( )
virtual

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

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

Reimplemented in sf::LayoutEditor, and sf::ScriptEditor.

◆ getFileTypeFilters()

QString sf::MultiDocInterface::getFileTypeFilters ( ) const

Gets the file type filters from module.

◆ hasSelection()

virtual bool sf::MultiDocInterface::hasSelection ( ) const
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, and sf::LayoutEditor.

◆ isModified()

virtual bool sf::MultiDocInterface::isModified ( ) const
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, and sf::LayoutEditor.

◆ isRedoAvailable()

virtual bool sf::MultiDocInterface::isRedoAvailable ( ) const
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, and sf::LayoutEditor.

◆ isUndoAvailable()

virtual bool sf::MultiDocInterface::isUndoAvailable ( ) const
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, and sf::LayoutEditor.

◆ isUndoRedoEnabled()

virtual bool sf::MultiDocInterface::isUndoRedoEnabled ( ) const
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, and sf::LayoutEditor.

◆ loadFile()

virtual bool sf::MultiDocInterface::loadFile ( const QString &  fileName)
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, sf::LayoutEditor, and sf::ScriptEditor.

◆ newFile()

virtual void sf::MultiDocInterface::newFile ( )
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, and sf::LayoutEditor.

◆ paste()

virtual void sf::MultiDocInterface::paste ( )
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, and sf::LayoutEditor.

◆ redo()

virtual void sf::MultiDocInterface::redo ( )
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, and sf::LayoutEditor.

◆ save()

virtual bool sf::MultiDocInterface::save ( )
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, and sf::LayoutEditor.

◆ saveAs()

virtual bool sf::MultiDocInterface::saveAs ( )
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, and sf::LayoutEditor.

◆ setConnections()

virtual void sf::MultiDocInterface::setConnections ( QWidget *  editor)
virtual

Sets the editor to operate on.

When the passed document inherits QPlainTextEdit or QTextEdit the MDI signals are automatically connected. For other implementations you need to connect them manually.

Parameters
editorWidget being a QPlainTextEdit or QTextEdit instance.

◆ stateSaveRestore()

virtual void sf::MultiDocInterface::stateSaveRestore ( bool  save)
virtual

Saves or restores the state of the MDI instance.

Reimplemented in sf::ScriptEditor.

◆ undo()

virtual void sf::MultiDocInterface::undo ( )
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, and sf::LayoutEditor.

◆ userFriendlyCurrentFile()

virtual QString sf::MultiDocInterface::userFriendlyCurrentFile ( ) const
pure virtual

Pure virtual needs to be implemented.

Implemented in sf::TextEditor, sf::PlainTextEditMdi, and sf::LayoutEditor.

Member Data Documentation

◆ mdiSignals

MultiDocInterfaceSignals sf::MultiDocInterface::mdiSignals

Instance to connect signal handlers onto.


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