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

#include <LayoutEditorAppModule.h>

Inheritance diagram for sf::LayoutEditorAppModule:
Collaboration diagram for sf::LayoutEditorAppModule:

Public Member Functions

 LayoutEditorAppModule (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.
 
void settingsReadWrite (bool save)
 
DockWidgetList createDockingWidgets (QWidget *parent) override
 Creates docking widgets having the passed parent.
 
void documentActivated (MultiDocInterface *interface, bool yn) const override
 Called from main window when a document is activated or deactivated.
 
 ~LayoutEditorAppModule () override
 
- 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 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.
 

Public Attributes

QSettings * _settings
 
HierarchyViewer_hierarchyViewer {nullptr}
 
QTreeView * _tvProperties {nullptr}
 
bool _readOnly = true
 

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

◆ LayoutEditorAppModule()

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

◆ ~LayoutEditorAppModule()

sf::LayoutEditorAppModule::~LayoutEditorAppModule ( )
override

Member Function Documentation

◆ addPropertyPages()

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

Adds module property pages to the passed sheet.

Implements sf::AppModuleInterface.

◆ createDockingWidgets()

DockWidgetList sf::LayoutEditorAppModule::createDockingWidgets ( QWidget *  parent)
overridevirtual

Creates docking widgets having the passed parent.

Reimplemented from sf::AppModuleInterface.

◆ createWidget()

MultiDocInterface * sf::LayoutEditorAppModule::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.

◆ documentActivated()

void sf::LayoutEditorAppModule::documentActivated ( MultiDocInterface iface,
bool  yn 
) const
overridevirtual

Called from main window when a document is activated or deactivated.

Parameters
ifaceMDI interface which can be dynamically cast to the actual document.
yn

Reimplemented from sf::AppModuleInterface.

◆ getDescription()

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

Gets the description of this instance.

Implements sf::AppModuleInterface.

◆ getLibraryFilename()

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

Gets the library filename.

Implements sf::AppModuleInterface.

◆ getName()

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

Gets the description of this instance.

Implements sf::AppModuleInterface.

◆ getSvgIconResource()

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

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

Reimplemented from sf::AppModuleInterface.

◆ initialize()

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

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

Parameters
stageDetermines initialization or uninitialization.

Implements sf::AppModuleInterface.

◆ settingsReadWrite()

void sf::LayoutEditorAppModule::settingsReadWrite ( bool  save)

Member Data Documentation

◆ _hierarchyViewer

HierarchyViewer* sf::LayoutEditorAppModule::_hierarchyViewer {nullptr}

◆ _readOnly

bool sf::LayoutEditorAppModule::_readOnly = true

◆ _settings

QSettings* sf::LayoutEditorAppModule::_settings

◆ _tvProperties

QTreeView* sf::LayoutEditorAppModule::_tvProperties {nullptr}

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