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

#include <TextEditorAppModule.h>

Inheritance diagram for sf::TextEditorAppModule:
Collaboration diagram for sf::TextEditorAppModule:

Public Member Functions

 TextEditorAppModule (const Parameters &params)
 
void initialize (InitializeStage stage) override
 Called when al modules are loaded or when a module added.
 
void addPropertyPages (PropertySheetDialog *) override
 Adds module property pages to the passed sheet.
 
MultiDocInterfacecreateWidget (QWidget *parent) const override
 Creates child of the passed parent (i.e. QMdiArea).
 
QString getName () const override
 Gets the description of this instance.
 
QString getDescription () const override
 Gets the description of this instance.
 
QString getLibraryFilename () const override
 Gets the library filename.
 
QString getSvgIconResource () const override
 Gets svg icon resource name and can be overridden to change the default.
 
- Public Member Functions inherited from sf::AppModuleInterface
 AppModuleInterface (const Parameters &)
 Constructor for passing general structure for derived classes.
 
 ~AppModuleInterface () override
 Virtual destructor for derived classes.
 
virtual void addMenuItems (MenuType menuType, QMenu *menu)
 Adds menu items for the passed type of menu.
 
virtual DockWidgetList createDockingWidgets (QWidget *parent)
 Creates docking widgets having the passed parent.
 
virtual void addToolBars (QMainWindow *mainWindow)
 Adds toolbars to the passed main window.
 
bool hasFileTypes () const
 
void addFileType (const QString &name, const QString &suffix)
 Adds a file type handled by this instance.
 
void addFileType (const QString &mime)
 Adds a file type handled by this instance.
 
void addFileType (const QMimeType &mime)
 Adds a file type using the passed QMimeType instance.
 
QString getFileTypeFilters () const
 Gets the filter string for a file dialog.
 
MultiDocInterfacecreateChild (QWidget *parent) const
 Calls createChild() and assigns this creating instance for reference.
 
QSettings * getSettings () const
 Gets the settings class passed on creation.
 
MultiDocInterfaceopenFile (const QString &filename, AppModuleInterface *ami=nullptr) const
 Makes the application open a file.
 
virtual void documentActivated (MultiDocInterface *iface, bool yn) const
 Called from main window when a document is activated or deactivated.
 

Additional Inherited Members

- Public Types inherited from sf::AppModuleInterface
enum  InitializeStage { Uninitialize = 0 , Initialize , Finalize }
 
enum  MenuType { Settings , View , Tools }
 
typedef QMap< QString, AppModuleInterface * > Map
 
typedef QList< QDockWidget * > DockWidgetList
 Type definition for containing dock widgets.
 
typedef TClosure< MultiDocInterface *, const QString &, AppModuleInterface * > OpenFileClosure
 Type definition for the callback closure.
 
- Static Public Member Functions inherited from sf::AppModuleInterface
static void instantiate (QSettings *settings, QObject *parent)
 Creates instances of all available/loaded interface implementations.
 
static size_t initializeInstances (InitializeStage stage)
 Initializes all uninitialized instances or visa versa.
 
static void addAllPropertyPages (PropertySheetDialog *sheet)
 Adds property pages from all modules to the passed sheet.
 
static void addAllMenuItems (MenuType menuType, QMenu *menu)
 Adds items from all modules to this menu.
 
static const MapgetMap ()
 Gets the named module map.
 
static DockWidgetList createAllDockingWidgets (QWidget *parent)
 Creates all docking widgets of the loaded modules by calling createDockingWidgets().
 
static void addAllToolBars (QMainWindow *mainWindow)
 Creates all toolbars of the loaded modules by calling addToolBars().
 
static AppModuleInterfacefindByFile (const QString &filename)
 Find the instance handling the file using the file suffix.
 
static QString getFileTypeFilters (bool all_files)
 Gets the filter string for the open file dialog.
 
static AppModuleInterfaceselectDialog (const QString &title, QSettings *settings, QWidget *parent=nullptr)
 Determined if this module handles this mime type.
 
static QAbstractItemModel * getListModel (bool file_only, QObject *parent)
 Gets a list model from the available instances.
 
- Static Public Attributes inherited from sf::AppModuleInterface
static OpenFileClosure callbackOpenFile
 Holds a callback to open a file in the application.
 

Constructor & Destructor Documentation

◆ TextEditorAppModule()

sf::TextEditorAppModule::TextEditorAppModule ( const Parameters params)
explicit

Member Function Documentation

◆ addPropertyPages()

void sf::TextEditorAppModule::addPropertyPages ( PropertySheetDialog sheet)
overridevirtual

Adds module property pages to the passed sheet.

Implements sf::AppModuleInterface.

◆ createWidget()

MultiDocInterface * sf::TextEditorAppModule::createWidget ( QWidget *  parent) const
overridevirtual

Creates child of the passed parent (i.e. QMdiArea).

Parameters
parentParent widget of the returned object.
Returns
MDI child.

Reimplemented from sf::AppModuleInterface.

◆ getDescription()

QString sf::TextEditorAppModule::getDescription ( ) const
overridevirtual

Gets the description of this instance.

Implements sf::AppModuleInterface.

◆ getLibraryFilename()

QString sf::TextEditorAppModule::getLibraryFilename ( ) const
overridevirtual

Gets the library filename.

Implements sf::AppModuleInterface.

◆ getName()

QString sf::TextEditorAppModule::getName ( ) const
overridevirtual

Gets the description of this instance.

Implements sf::AppModuleInterface.

◆ getSvgIconResource()

QString sf::TextEditorAppModule::getSvgIconResource ( ) const
overridevirtual

Gets svg icon resource name and can be overridden to change the default.

Reimplemented from sf::AppModuleInterface.

◆ initialize()

void sf::TextEditorAppModule::initialize ( InitializeStage  stage)
overridevirtual

Called when al modules are loaded or when a module added.

Parameters
stageDetermines initialization or uninitialization.

Implements sf::AppModuleInterface.


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