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

#include <ProjectAppModule.h>

Inheritance diagram for sf::ProjectAppModule:
Collaboration diagram for sf::ProjectAppModule:

Public Member Functions

 ProjectAppModule (const Parameters &params)
 
 ~ProjectAppModule () override
 
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.
 
void addMenuItems (MenuType menuType, QMenu *menu) override
 Adds menu items for the passed type of menu.
 
void addToolBars (QMainWindow *mainWindow) override
 Adds toolbars to the passed main window.
 
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)
 
void createDevices ()
 
QStringList getSettingsFilenames () const
 
- 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 DockWidgetList createDockingWidgets (QWidget *parent)
 Creates docking widgets having the passed parent.
 
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.
 

Public Attributes

ProjectConfig_projectConfig {nullptr}
 
QSettings * _settings {nullptr}
 
QString _serverUtName
 
QString _serverEtName
 
QString _serverMotionName
 
QString _serverStorageName
 
QAction * _actionMonitorVariable {nullptr}
 
QAction * _actionMonitorResultData {nullptr}
 
QAction * _actionSaveSettings {nullptr}
 
QAction * _actionLoadSettings {nullptr}
 
QString _settingsFilename
 
QString _currentSettingsFile
 

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.
 
- Protected Member Functions inherited from sf::AppModuleInterface
virtual MultiDocInterfacecreateWidget (QWidget *parent) const
 Creates child of the passed parent (i.e. QMdiArea).
 

Constructor & Destructor Documentation

◆ ProjectAppModule()

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

◆ ~ProjectAppModule()

sf::ProjectAppModule::~ProjectAppModule ( )
override

Member Function Documentation

◆ addMenuItems()

void sf::ProjectAppModule::addMenuItems ( MenuType  menuType,
QMenu *  menu 
)
overridevirtual

Adds menu items for the passed type of menu.

Reimplemented from sf::AppModuleInterface.

◆ addPropertyPages()

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

Adds module property pages to the passed sheet.

Implements sf::AppModuleInterface.

◆ addToolBars()

void sf::ProjectAppModule::addToolBars ( QMainWindow *  mainWindow)
overridevirtual

Adds toolbars to the passed main window.

Reimplemented from sf::AppModuleInterface.

◆ createDevices()

void sf::ProjectAppModule::createDevices ( )

◆ getDescription()

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

Gets the description of this instance.

Implements sf::AppModuleInterface.

◆ getLibraryFilename()

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

Gets the library filename.

Implements sf::AppModuleInterface.

◆ getName()

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

Gets the description of this instance.

Implements sf::AppModuleInterface.

◆ getSettingsFilenames()

QStringList sf::ProjectAppModule::getSettingsFilenames ( ) const

◆ getSvgIconResource()

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

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

Reimplemented from sf::AppModuleInterface.

◆ initialize()

void sf::ProjectAppModule::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::ProjectAppModule::settingsReadWrite ( bool  save)

Member Data Documentation

◆ _actionLoadSettings

QAction* sf::ProjectAppModule::_actionLoadSettings {nullptr}

◆ _actionMonitorResultData

QAction* sf::ProjectAppModule::_actionMonitorResultData {nullptr}

◆ _actionMonitorVariable

QAction* sf::ProjectAppModule::_actionMonitorVariable {nullptr}

◆ _actionSaveSettings

QAction* sf::ProjectAppModule::_actionSaveSettings {nullptr}

◆ _currentSettingsFile

QString sf::ProjectAppModule::_currentSettingsFile

◆ _projectConfig

ProjectConfig* sf::ProjectAppModule::_projectConfig {nullptr}

◆ _serverEtName

QString sf::ProjectAppModule::_serverEtName

◆ _serverMotionName

QString sf::ProjectAppModule::_serverMotionName

◆ _serverStorageName

QString sf::ProjectAppModule::_serverStorageName

◆ _serverUtName

QString sf::ProjectAppModule::_serverUtName

◆ _settings

QSettings* sf::ProjectAppModule::_settings {nullptr}

◆ _settingsFilename

QString sf::ProjectAppModule::_settingsFilename

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