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

Application module implementation for inspection projects. More...

#include <ProjectAppModule.h>

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

Public Member Functions

 ProjectAppModule (const Parameters &params)
 Interface constructor.
 
 ~ProjectAppModule () override
 Overridden from base class.
 
void initialize (InitializeStage stage) override
 Overridden from base class.
 
void addPropertyPages (PropertySheetDialog *) override
 Overridden from base class.
 
void addMenuItems (MenuType menuType, QMenu *menu) override
 Overridden from base class.
 
void addToolBars (QMainWindow *mainWindow) override
 Overridden from base class.
 
QString getName () const override
 Overridden from base class.
 
QString getDescription () const override
 Overridden from base class.
 
QString getLibraryFilename () const override
 Overridden from base class.
 
QString getSvgIconResource () const override
 Overridden from base class.
 
QStringList getSettingsFilenames () const
 Overridden from base class.
 
DockWidgetList createDockingWidgets (QWidget *parent) override
 Overridden from base class.
 
void storeSettings (bool save)
 Loads or saves the settings from the settings file.
 
void createDevices ()
 Creates the devices determined by the names.
 
- 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.
 
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

ProjectModule_module {nullptr}
 Holds the project module pointer.
 
ProjectWidget_projectWidget {nullptr}
 
QSettings * _settings {nullptr}
 Holds to the dockable project widget.
 
QString _serverUtName
 
QString _serverEtName
 Name of the Ultrasonic testing device instance.
 
QString _serverMotionName
 Name of the Eddy-current device instance.
 
QString _serverStorageName
 Name of the motion control instance.
 
QString _settingsFilename
 Name of the storage instance.
 
QString _currentSettingsFile
 
QAction * _actionMonitorVariable {nullptr}
 
QAction * _actionMonitorResultData {nullptr}
 Action to create a variable monitor.
 
QAction * _actionSettingsSave {nullptr}
 Action to create a result-data monitor.
 
QAction * _actionSettingsLoad {nullptr}
 Action to save settings file.
 
QAction * _actionProjectOpenLast {nullptr}
 Action to load a settings file.
 
QAction * _actionProjectNew {nullptr}
 
QAction * _actionProjectOpen {nullptr}
 
QAction * _actionProjectSave {nullptr}
 
QAction * _actionProjectSaveAs {nullptr}
 
QAction * _actionProjectClose {nullptr}
 

Additional Inherited Members

- Public Types inherited from sf::AppModuleInterface
enum  InitializeStage { Uninitialize = 0 , Initialize , Finalize }
 Stages for a module. More...
 
enum  MenuType { Project , Settings , View , Tools }
 Type of menu items to collect. More...
 
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).
 

Detailed Description

Application module implementation for inspection projects.

Constructor & Destructor Documentation

◆ ProjectAppModule()

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

Interface constructor.

◆ ~ProjectAppModule()

sf::ProjectAppModule::~ProjectAppModule ( )
override

Overridden from base class.

Member Function Documentation

◆ addMenuItems()

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

Overridden from base class.

Reimplemented from sf::AppModuleInterface.

◆ addPropertyPages()

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

Overridden from base class.

Implements sf::AppModuleInterface.

◆ addToolBars()

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

Overridden from base class.

Reimplemented from sf::AppModuleInterface.

◆ createDevices()

void sf::ProjectAppModule::createDevices ( )

Creates the devices determined by the names.

◆ createDockingWidgets()

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

Overridden from base class.

Reimplemented from sf::AppModuleInterface.

◆ getDescription()

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

Overridden from base class.

Implements sf::AppModuleInterface.

◆ getLibraryFilename()

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

Overridden from base class.

Implements sf::AppModuleInterface.

◆ getName()

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

Overridden from base class.

Implements sf::AppModuleInterface.

◆ getSettingsFilenames()

QStringList sf::ProjectAppModule::getSettingsFilenames ( ) const

Overridden from base class.

◆ getSvgIconResource()

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

Overridden from base class.

Reimplemented from sf::AppModuleInterface.

◆ initialize()

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

Overridden from base class.

Implements sf::AppModuleInterface.

◆ storeSettings()

void sf::ProjectAppModule::storeSettings ( bool  save)

Loads or saves the settings from the settings file.

Member Data Documentation

◆ _actionMonitorResultData

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

Action to create a variable monitor.

◆ _actionMonitorVariable

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

◆ _actionProjectClose

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

◆ _actionProjectNew

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

◆ _actionProjectOpen

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

◆ _actionProjectOpenLast

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

Action to load a settings file.

◆ _actionProjectSave

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

◆ _actionProjectSaveAs

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

◆ _actionSettingsLoad

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

Action to save settings file.

◆ _actionSettingsSave

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

Action to create a result-data monitor.

◆ _currentSettingsFile

QString sf::ProjectAppModule::_currentSettingsFile

◆ _module

ProjectModule* sf::ProjectAppModule::_module {nullptr}

Holds the project module pointer.

◆ _projectWidget

ProjectWidget* sf::ProjectAppModule::_projectWidget {nullptr}

◆ _serverEtName

QString sf::ProjectAppModule::_serverEtName

Name of the Ultrasonic testing device instance.

◆ _serverMotionName

QString sf::ProjectAppModule::_serverMotionName

Name of the Eddy-current device instance.

◆ _serverStorageName

QString sf::ProjectAppModule::_serverStorageName

Name of the motion control instance.

◆ _serverUtName

QString sf::ProjectAppModule::_serverUtName

◆ _settings

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

Holds to the dockable project widget.

◆ _settingsFilename

QString sf::ProjectAppModule::_settingsFilename

Name of the storage instance.

Holds the settings filename to be loaded at startup.


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