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

Singleton. More...

#include <ProjectModule.h>

Inheritance diagram for sf::ProjectModule:
Collaboration diagram for sf::ProjectModule:

Public Types

typedef TVector< ProjectData * > ProjectList
 Type for sf::ProjectData data instances.
 

Public Member Functions

bool Initialize ()
 Initializes anything in need for initialization.
 
void DestroyServers ()
 Destroys the all servers. Is normally called by the destructor.
 
std::string getSystemDesignation () const
 Gets the scan system designation name.
 
const std::string & setSystemDesignation (const std::string &name)
 Sets the scan system designation. Returns value after filtering.
 
void setSettingsGlobal (bool global)
 Sets the flag for keeping settings globally for all projects part of a project.
 
bool getSettingsGlobal () const
 Gets the flag for keeping settings globally for all projects or part of a project.
 
void setFiltersGlobal (bool global)
 Sets the flag which determines if filters are global for any project or part of a project.
 
bool getFiltersGlobal () const
 Gets the flag which determines if filters are global for any project or part of a project.
 
bool getSystemPosition (ESystemPosition sys_pos, gmi::AxesCoord &coord) const
 Gets a certain system position.
 
const gmi::AxesCoordgetSystemPosition (ESystemPosition sys_pos) const
 Gets a certain system position.
 
bool setSystemPosition (ESystemPosition sp, const gmi::AxesCoord &ac)
 Sets the system position from a passed coordinate and returns true on succes.
 
bool storeSystemPositions (bool rd)
 Stores the system positions.
 
void getInspectionParts (QStringList &parts)
 Gets the strings list of all inspected part serials.
 
void getInspectionSerials (const QString &part, QStringList &serials)
 Gets the strings list of all inspected part serials.
 
void getInspectionDates (const QString &part, const QString &serial, QStringList &date_times)
 Gets the directory where the data is located for the passed part inspection.
 
QString getInspectionFileDir (const PartInspection *part_inspection)
 Gets the directory where the data is located for the passed part inspection.
 
QString getInspectionFileSubDir (const PartInspection *part_inspection)
 Gets the subdirectory where the data is located for the passed part inspection.
 
bool inspectionExists (const PartInspection *pi) const
 Gets true if the passed part inspection exists.
 
bool inspectionExists (const QString &part, const QString &serial, const QString &dts) const
 Gets true if the passed part inspection exists.
 
IniEnvelope getInspectionIni (const PartInspection *pi)
 Gets the inspection information profile containing inspected area information on found defects and status.
 
std::string getCalibrationSetSection (ECalibrationType cal_type, const std::string &set_name)
 Gets the calibration set section name.
 
std::string getConfigCalibrationSetSection () const
 Gets the section name in the configuration file.
 
void getConfigCalibrationSetNames (QStringList &names) const
 Gets the available configured calibration set names.
 
bool getInspectionCalibSetValues (const PartInspection *pi, ECalibrationType cal_type, const std::string &set_name, KeyValues &values)
 Gets the calibration values of the inspection in a strings derived type.
 
bool setInspectionCalibSetValues (const PartInspection *pi, ECalibrationType cal_type, const std::string &set_name, const KeyValues &values)
 Sets the calibration values of the inspection using a strings derived type.
 
bool getCalibrationSetNames (const PartInspection *part_inspection, ECalibrationType cal_type, QStringList &set_names)
 Gets the calibration set names.
 
std::string getInspectionAreaIniSection (const std::string &scan_area) const
 Gets the section name in the ini file for storing or retrieving scan related inspection data.
 
std::string getInspectionAnalysisIniSection (const std::string &scan_area, const std::string &name) const
 Gets the section name in the ini file for storing or retrieving scan related inspection data.
 
bool getInspectionGeneralInfo (const PartInspection *pi, KeyValues &info)
 Gets the strings list of the general information.
 
bool getInspectionCustomInfo (const PartInspection *pi, KeyValues &info)
 Gets the strings list of the custom information.
 
bool setInspectionCustomInfo (const PartInspection *pi, const KeyValues &info)
 Sets the strings list of the custom information.
 
bool getInspectionScanAreaInfo (const PartInspection *pi, const std::string &scan_area, KeyValues &info)
 Gets the strings list of the scan area information.
 
EInspectionState getInspectionState (const PartInspection *pi, const std::string &scan_area) const
 Gets the inspection state of the specified part and scan area.
 
bool setInspectionState (const PartInspection *pi, const std::string &scan_area, EInspectionState is)
 Sets the inspection state of the specified part and scan area.
 
QString getInspectionUser (const PartInspection *pi, const std::string &scan_area) const
 Gets the name of the user that is responsible for this area.
 
bool setInspectionUser (const PartInspection *pi, const std::string &scan_area, const std::string &username, const QDateTime &datetime)
 Sets the name of the user that is responsible for this area.
 
QString getInspectionDateTimeStr (const PartInspection *pi, const std::string &scan_area) const
 Gets the data time of the scan area.
 
ECalibrationType getInspectionCalType (const PartInspection *pi, const std::string &scan_area) const
 Gets the inspection calibration type.
 
bool setInspectionCalType (const PartInspection *pi, const std::string &scan_area, ECalibrationType ct)
 Sets the inspection calibration type.
 
QString getInspectionComment (const PartInspection *pi, const std::string &scan_area) const
 Gets the inspection comment for a scan area.
 
bool setInspectionComment (const PartInspection *pi, const std::string &scan_area, const std::string &comment)
 Sets the inspection comment for a scan area.
 
bool isInspectionFinalized (const PartInspection *part_inspection) const
 Gets true when the inspection finalized.
 
bool finalizeInspection (const PartInspection *pi, bool reset=false)
 Finalizes the inspection.
 
QString getInspectionDataFileName (const PartInspection *pi, const std::string &scan_area, int file_index=-1) const
 Gets the inspection data filename for a scan area.
 
bool getInspectionDataFileNames (const PartInspection *pi, const std::string &scan_area, QStringList &names) const
 Gets the history of inspected data files on this scan area.
 
bool setInspectionDataFileName (const PartInspection *pi, const std::string &scan_area, const QString &filename)
 Sets the inspection data filename for a scan area.
 
bool getInspectionScanAreas (const PartInspection *pi, QStringList &scan_areas) const
 Gets the scan area names.
 
bool getInspectionAnalysisEntries (const PartInspection *pi, const std::string &scan_area, string_list &names) const
 Gets the analysis names.
 
bool getAnalysisInfo (const PartInspection *pi, const std::string &scan_area, const std::string &name, KeyValues &info) const
 Gets the inspection analysis information.
 
bool setAnalysisInfo (const PartInspection *pi, const std::string &scan_area, const std::string &name, const KeyValues &info)
 Sets the inspection analysis information or removes it.
 
bool removeAllAnalysisInfo (const PartInspection *pi, const std::string &scan_area)
 Removes all the analysis information entries.
 
bool createPartInspection (const PartProject *pp, PartInspection *pi)
 Creates a part inspection entry and returns true on succes to do so. The part and serial are used to create an entry the current datetime is used to fill in the datetime field.
 
void getPartProject (PartProject *pp, const PartInspection *pi) const
 Gets the part project used to create the inspection.
 
bool selectInspectedPart (PartInspection *pi)
 Selects a part from the database using a part project.
 
bool selectInspectedPart (QString &part)
 Selects a part from the database.
 
bool selectInspection (PartInspection *pi, bool create=false)
 Selects a part inspection.
 
IniEnvelope getProjectCalibIni (const PartProject *part_proj)
 Gets the project profile containing.
 
bool setProjectCalibSetValues (const PartProject *part_proj, ECalibrationType cal_type, const std::string &set_name, const KeyValues &values)
 Gets the calibration values of the project in a strings derived type.
 
bool getProjectCalibSetValues (const PartProject *part_proj, ECalibrationType cal_type, const std::string &set_name, KeyValues &values)
 Sets the calibration values of the project using a strings derived type.
 
bool setProjectDataDir (const QString &dir)
 Sets the database directory and sets the flag FlagDBDirExists.
 
QString getProjectDataDir () const
 Gets the project data directory.
 
bool isProjectDirValid ()
 Gets true if the project directory is valid.
 
void getProjectParts (QStringList &parts)
 Gets all part names into the passed string list.
 
QStringList getProjectParts ()
 Gets all part names into the passed string list.
 
void getProjects (const QString &part, QStringList &projects)
 Gets all project names of the given part.
 
QStringList getProjects (const QString &part)
 Gets all projects from a given part in a list.
 
void getScans (const QString &part, QStringList &scans)
 Gets all scan area names of the given part.
 
bool isPart (const QString &part) const
 Checks if the given part exists.
 
bool isPart (const PartProject *part_project) const
 Checks if of the given part project the part exists.
 
void getTools (QStringList &tools) const
 Gets all tool names to the passed string list.
 
void getElements (QStringList &elements) const
 Gets all element names into the passed string list.
 
void getMaterials (QStringList &materials, EMaterialType mt) const
 Gets all material names of the given type into the passed string list.
 
QString getSettingsDir (const QString &part) const
 Gets the settings directory for the passed part. The location is depending on the settings global flag.
 
void getSettings (QStringList &names, const QString &part) const
 Gets all settings names to the passed string list. The returned named are depending on the settings global flag.
 
QString getTemplateDir () const
 Gets the template directory.
 
void getScanTemplates (QStringList &names) const
 Gets the scan area template names.
 
IniEnvelope getScanTemplateIni (const QString &name)
 Gets the ini-file of a scan area template.
 
bool createProjectPart (const QString &part)
 Creates a new project part name.
 
bool isProject (const QString &part, const QString &project) const
 Checks if the given part project combination exists.
 
bool isProject (const PartProject *part_project) const
 Checks if the given part project exists.
 
bool isScanArea (const QString &part, const QString &area_scan)
 Checks if the area scan exists on the part.
 
bool isTool (const QString &tool)
 Checks if the tool exists.
 
bool isElement (const QString &element)
 Checks if the element exists.
 
bool isMaterial (const QString &material)
 Checks if the material exists.
 
bool isSettings (const QString &part, const QString &settings)
 Checks if the config settings exists.
 
IniEnvelope getScanIni (const QString &part, const QString &scan_area)
 Gets an inifile containing scan configuration information.
 
QString getScanStateIniPath (const QString &part, const QString &scan_area)
 Gets an ini-file containing interface state information.
 
QString getPartStateIniPath (const QString &part)
 Gets the inifile containing state information on user interface.
 
IniEnvelope getSettingsIni (const QString &part, const QString &settings_name)
 Gets an inifile containing settings information. The settings global flag is true the global settings are used.
 
IniEnvelope getToolIni (const QString &tool)
 Gets an inifile containing the tool info.
 
IniEnvelope getElementIni (const QString &element)
 Gets an inifile containing the element info.
 
IniEnvelope getMaterialIni (const QString &material)
 Gets an inifile containing the material info.
 
IniEnvelope getConfigIni ()
 Gets the inifile containing configuration information.
 
QString getProjectFilePath (const PartProject *part_project) const
 Gets the project filename of the specified part and project.
 
QString getFilterPath (const PartProject *part_project) const
 Gets the filter filepath of the specified part project.
 
QString getPartDirectory (const QString &part) const
 Gets the directory and drive of the passed part.
 
QImage getPartPicture (const QString &part)
 Gets the picture of the passed part.
 
bool getToolPicture (const QString &tool, QImage &image)
 Gets true if the picture of the passed tool was returned in picture.
 
bool getElementPicture (const QString &element, QImage &image)
 Gets true if the picture of the passed tool was returned in picture.
 
bool selectProjectPart (PartProject *part_project)
 Selects a part from the database.
 
bool selectProjectPart (QString &part)
 Selects a part from the database.
 
bool selectPartProject (PartProject *part_project)
 Selects an existing part project.
 
bool selectProject (PartProject *part_project)
 Selects an existing project using the non-visible part.
 
const ProjectListgetOpenProjects () const
 Gets the list of open project instances.
 
bool setInspectionDataDir (const QString &dir)
 Sets the data-storage root directory and sets the flag FlagDataDirExists.
 
QString getInspectionDataDir ()
 Gets the inspection data directory.
 
bool isInspectionDataDirValid ()
 Gets true if data ase directory is valid.
 
GmiServergetMotionServer ()
 Gets the motion server instance.
 
void destroyDevices ()
 Destroys all device/controller instances.
 
void addServerPropertyPages (PropertySheetDialog *sheet)
 Adds server property pages to passed property sheet.
 
void addProjectPropertyPages (PropertySheetDialog *sheet)
 Adds project property pages to passed property sheet.
 
int getAcquisitionServerCount () const
 Gets the maximum amount of servers available.
 
RsaServergetAcquisitionServer (int index)
 Gets the acquisition server at the passed index.
 
const RsaServergetAcquisitionServer (int index) const
 Gets the acquisition server at the passed index.
 
StorageInterfacegetStorage ()
 Get the instance pointer storage interface implementation.
 
bool openManualControlDialog ()
 Opens a manual control dialog.
 
gmi::ControllergetController ()
 Get the instance pointer motion controller interface implementation.
 
bool allocateController (const QString &allocator)
 Allocates the controller by allocator name.
 
bool freeController (const QString &allocator)
 Frees the controller by allocator name.
 
bool isControllerAllocated ()
 Gets the allocation status of the controller.
 
int getUsageCount ()
 Reports the amount the module is referenced.
 
bool initializeProjects ()
 Initializes or reinitializes projects.
 
bool canInitializeProjects ()
 Checks if the projects can be (re)initialized.
 
void attachProjectData (ProjectData *)
 Attach for automatic referencing of sf::ProjectData instances.
 
void detachProjectData (ProjectData *)
 Detach for automatic referencing of sf::ProjectData instances.
 
ProjectDatagetActiveProject ()
 Gets the active project.
 
bool setActiveProject (ProjectData *project)
 Sets the passed project to be the active one.
 
void registerToolEditor (TAddProjectPropertyPage editor)
 Adds a property page add function to the list for editing tools.
 
void registerElementEditor (TAddProjectPropertyPage editor)
 Adds a property page add function to the list for editing elements.
 
void registerMaterialEditor (TAddProjectPropertyPage editor)
 Adds a property page add function to the list for editing materials.
 
bool editTool (const QString &tool)
 Edits a tool using the registered editor property pages.
 
bool editElement (const QString &element)
 Edits an element using the registered editor property pages.
 
bool editMaterial (const QString &material)
 Edits a material using the registered editor property pages.
 
bool getMaterialVelocity (const QString &material, bool shear, double &value)
 Gets the sound velocity of the passed material.
 
bool setMaterialVelocity (const QString &material, double longitudinal_vel, double shear_vel)
 Sets the sound velocity of the passed material.
 
void registerReportGenerator (GenerateReportEvent handler)
 Hooks a report generator to this interface.
 
bool hasReportGenerator ()
 Checks if report generator has been hooked.
 
bool generateReport (ProjectData *project_data)
 Generates a report using the project data and report options.
 
bool getReportTemplates (QStringList &strings)
 Gets the available report templates.
 
bool backupInspection (const PartInspection *part_inspection)
 Initiates a backup of the inspection data for a given part inspection.
 
bool backupProjects ()
 Initiates a backup of the project data.
 
bool isBackupAvailable () const
 Checks if a backup service is available.
 
- Public Member Functions inherited from sf::ProjectConfig
 ProjectConfig ()
 
virtual ~ProjectConfig ()
 
Settingssettings ()
 
RsaServergetServerAcquisitionUt ()
 
RsaServergetServerAcquisitionEt ()
 
StorageServergetServerStorage ()
 
GmiServergetServerMotion ()
 
virtual void addPropertyPages (PropertySheetDialog *sheet)
 

Public Attributes

Security SecurityConfig
 
Security SecurityProject
 
Security SecurityInspection
 

Protected Member Functions

 ProjectModule ()
 Default constructor.
 
 ~ProjectModule () override
 Virtual Destructor.
 
QString getConfigProfilePath () const
 Gets the filepath to the module configuration ini-file.
 
void handlePropertyPage (QObject *sender)
 Handles the apply of property pages.
 

Friends

void destroyProjectModule ()
 Deletes the project module if it was created.
 
ProjectModulegetProjectModule ()
 Creates the project module when called for.
 

Additional Inherited Members

- Protected Attributes inherited from sf::ProjectConfig
Settings_settings {nullptr}
 
RsaServer_serverAcquisitionUt
 
RsaServer_serverAcquisitionEt
 
GmiServer_serverMotion
 
StorageServer_serverStorage
 

Detailed Description

Singleton.

Member Typedef Documentation

◆ ProjectList

Constructor & Destructor Documentation

◆ ProjectModule()

sf::ProjectModule::ProjectModule ( )
protected

Default constructor.

◆ ~ProjectModule()

sf::ProjectModule::~ProjectModule ( )
overrideprotected

Virtual Destructor.

Member Function Documentation

◆ addProjectPropertyPages()

void sf::ProjectModule::addProjectPropertyPages ( PropertySheetDialog sheet)

Adds project property pages to passed property sheet.

◆ addServerPropertyPages()

void sf::ProjectModule::addServerPropertyPages ( PropertySheetDialog sheet)

Adds server property pages to passed property sheet.

◆ allocateController()

bool sf::ProjectModule::allocateController ( const QString &  allocator)

Allocates the controller by allocator name.

Parameters
allocatorName of the allocator.
Returns
True if control of the controller is obtained.

◆ attachProjectData()

void sf::ProjectModule::attachProjectData ( ProjectData )

Attach for automatic referencing of sf::ProjectData instances.

◆ backupInspection()

bool sf::ProjectModule::backupInspection ( const PartInspection part_inspection)

Initiates a backup of the inspection data for a given part inspection.

Parameters
part_inspectionPart inspection to back up.
Returns
True on success.

◆ backupProjects()

bool sf::ProjectModule::backupProjects ( )

Initiates a backup of the project data.

Returns
True on success.

◆ canInitializeProjects()

bool sf::ProjectModule::canInitializeProjects ( )

Checks if the projects can be (re)initialized.

Returns
True when it can.

◆ createPartInspection()

bool sf::ProjectModule::createPartInspection ( const PartProject pp,
PartInspection pi 
)

Creates a part inspection entry and returns true on succes to do so. The part and serial are used to create an entry the current datetime is used to fill in the datetime field.

Parameters

◆ createProjectPart()

bool sf::ProjectModule::createProjectPart ( const QString &  part)

Creates a new project part name.

Parameters
partName of the part.
Returns
True on success.

◆ destroyDevices()

void sf::ProjectModule::destroyDevices ( )

Destroys all device/controller instances.

◆ DestroyServers()

void sf::ProjectModule::DestroyServers ( )

Destroys the all servers. Is normally called by the destructor.

◆ detachProjectData()

void sf::ProjectModule::detachProjectData ( ProjectData )

Detach for automatic referencing of sf::ProjectData instances.

◆ editElement()

bool sf::ProjectModule::editElement ( const QString &  element)

Edits an element using the registered editor property pages.

Parameters
elementName of the element.
Returns
True when changed.

◆ editMaterial()

bool sf::ProjectModule::editMaterial ( const QString &  material)

Edits a material using the registered editor property pages.

Parameters
materialName of the material.
Returns
True when changed.

◆ editTool()

bool sf::ProjectModule::editTool ( const QString &  tool)

Edits a tool using the registered editor property pages.

Parameters
toolName of the tool.
Returns
True when changed.

◆ finalizeInspection()

bool sf::ProjectModule::finalizeInspection ( const PartInspection pi,
bool  reset = false 
)

Finalizes the inspection.

◆ freeController()

bool sf::ProjectModule::freeController ( const QString &  allocator)

Frees the controller by allocator name.

Parameters
allocatorName of the allocator to free control.
Returns
True when freed.

◆ generateReport()

bool sf::ProjectModule::generateReport ( ProjectData project_data)

Generates a report using the project data and report options.

Parameters
project_dataProject data to report on.
Returns
True when successful.

◆ getAcquisitionServer() [1/2]

RsaServer * sf::ProjectModule::getAcquisitionServer ( int  index)

Gets the acquisition server at the passed index.

Parameters
indexindex.
Returns
Server instance pointer and nullptr when it does not exist.

◆ getAcquisitionServer() [2/2]

const RsaServer * sf::ProjectModule::getAcquisitionServer ( int  index) const

Gets the acquisition server at the passed index.

Parameters
indexindex.
Returns
Server instance pointer and nullptr when it does not exist.

◆ getAcquisitionServerCount()

int sf::ProjectModule::getAcquisitionServerCount ( ) const

Gets the maximum amount of servers available.

◆ getActiveProject()

ProjectData * sf::ProjectModule::getActiveProject ( )

Gets the active project.

◆ getAnalysisInfo()

bool sf::ProjectModule::getAnalysisInfo ( const PartInspection pi,
const std::string &  scan_area,
const std::string &  name,
KeyValues info 
) const

Gets the inspection analysis information.

Parameters
piInspection part to point out the analysis information.
scan_areaAnalysed scan area name.
nameName of the analysis. Is the assigned filter name.
infoReturned information list.
Returns
False if the inspection or the analysis name does not exist.

◆ getCalibrationSetNames()

bool sf::ProjectModule::getCalibrationSetNames ( const PartInspection part_inspection,
ECalibrationType  cal_type,
QStringList &  set_names 
)

Gets the calibration set names.

Parameters
part_inspectionInspection data entry.
cal_typeType of the calibration.
set_namesNames returned.
Returns
True on success.

◆ getCalibrationSetSection()

std::string sf::ProjectModule::getCalibrationSetSection ( ECalibrationType  cal_type,
const std::string &  set_name 
)

Gets the calibration set section name.

◆ getConfigCalibrationSetNames()

void sf::ProjectModule::getConfigCalibrationSetNames ( QStringList &  names) const

Gets the available configured calibration set names.

◆ getConfigCalibrationSetSection()

std::string sf::ProjectModule::getConfigCalibrationSetSection ( ) const

Gets the section name in the configuration file.

◆ getConfigIni()

IniEnvelope sf::ProjectModule::getConfigIni ( )

Gets the inifile containing configuration information.

Returns
The envelope always contains a instance.

◆ getConfigProfilePath()

QString sf::ProjectModule::getConfigProfilePath ( ) const
protected

Gets the filepath to the module configuration ini-file.

◆ getController()

gmi::Controller * sf::ProjectModule::getController ( )

Get the instance pointer motion controller interface implementation.

Returns
The nullptr when not created.

◆ getElementIni()

IniEnvelope sf::ProjectModule::getElementIni ( const QString &  element)

Gets an inifile containing the element info.

Parameters
elementName of the element.
Returns
The envelope contains a nullptr when it doesn't exist.

◆ getElementPicture()

bool sf::ProjectModule::getElementPicture ( const QString &  element,
QImage &  image 
)

Gets true if the picture of the passed tool was returned in picture.

Parameters
elementName of the element
imageReturned picture of the element.
Returns
True when the picture exists.

◆ getElements()

void sf::ProjectModule::getElements ( QStringList &  elements) const

Gets all element names into the passed string list.

Parameters
elementsReturned list of element names.

◆ getFilterPath()

QString sf::ProjectModule::getFilterPath ( const PartProject part_project) const

Gets the filter filepath of the specified part project.

Parameters
part_projectPart project instance.
Returns
Filepath to the filter config of the project.

◆ getFiltersGlobal()

bool sf::ProjectModule::getFiltersGlobal ( ) const

Gets the flag which determines if filters are global for any project or part of a project.

◆ getInspectionAnalysisEntries()

bool sf::ProjectModule::getInspectionAnalysisEntries ( const PartInspection pi,
const std::string &  scan_area,
string_list names 
) const

Gets the analysis names.

Parameters
piInspection part to point out the analysis information.
scan_areaAnalysed scan area.
namesReturned analysis values.

◆ getInspectionAnalysisIniSection()

std::string sf::ProjectModule::getInspectionAnalysisIniSection ( const std::string &  scan_area,
const std::string &  name 
) const

Gets the section name in the ini file for storing or retrieving scan related inspection data.

◆ getInspectionAreaIniSection()

std::string sf::ProjectModule::getInspectionAreaIniSection ( const std::string &  scan_area) const

Gets the section name in the ini file for storing or retrieving scan related inspection data.

◆ getInspectionCalibSetValues()

bool sf::ProjectModule::getInspectionCalibSetValues ( const PartInspection pi,
ECalibrationType  cal_type,
const std::string &  set_name,
KeyValues values 
)

Gets the calibration values of the inspection in a strings derived type.

Parameters
piInspection data entry.
cal_typeType of the calibration.
set_nameName of the calibration set.
values

◆ getInspectionCalType()

ECalibrationType sf::ProjectModule::getInspectionCalType ( const PartInspection pi,
const std::string &  scan_area 
) const

Gets the inspection calibration type.

◆ getInspectionComment()

QString sf::ProjectModule::getInspectionComment ( const PartInspection pi,
const std::string &  scan_area 
) const

Gets the inspection comment for a scan area.

◆ getInspectionCustomInfo()

bool sf::ProjectModule::getInspectionCustomInfo ( const PartInspection pi,
KeyValues info 
)

Gets the strings list of the custom information.

◆ getInspectionDataDir()

QString sf::ProjectModule::getInspectionDataDir ( )

Gets the inspection data directory.

◆ getInspectionDataFileName()

QString sf::ProjectModule::getInspectionDataFileName ( const PartInspection pi,
const std::string &  scan_area,
int  file_index = -1 
) const

Gets the inspection data filename for a scan area.

Parameters
piInspection part to point out the inspection.
scan_areaScanned area name.
file_indexIndex of one the previous data files.When -1 it returns always the current one.

◆ getInspectionDataFileNames()

bool sf::ProjectModule::getInspectionDataFileNames ( const PartInspection pi,
const std::string &  scan_area,
QStringList &  names 
) const

Gets the history of inspected data files on this scan area.

Parameters
piInspection part to point out the inspection.
scan_areaScanned area name.
namesReturned data file names.
Returns
True on success.

◆ getInspectionDates()

void sf::ProjectModule::getInspectionDates ( const QString &  part,
const QString &  serial,
QStringList &  date_times 
)

Gets the directory where the data is located for the passed part inspection.

Parameters
partName of the part.
serialSerial of the part.
date_timesList of inspection date times.

◆ getInspectionDateTimeStr()

QString sf::ProjectModule::getInspectionDateTimeStr ( const PartInspection pi,
const std::string &  scan_area 
) const

Gets the data time of the scan area.

◆ getInspectionFileDir()

QString sf::ProjectModule::getInspectionFileDir ( const PartInspection part_inspection)

Gets the directory where the data is located for the passed part inspection.

◆ getInspectionFileSubDir()

QString sf::ProjectModule::getInspectionFileSubDir ( const PartInspection part_inspection)

Gets the subdirectory where the data is located for the passed part inspection.

Parameters
part_inspection
Returns

◆ getInspectionGeneralInfo()

bool sf::ProjectModule::getInspectionGeneralInfo ( const PartInspection pi,
KeyValues info 
)

Gets the strings list of the general information.

◆ getInspectionIni()

IniEnvelope sf::ProjectModule::getInspectionIni ( const PartInspection pi)

Gets the inspection information profile containing inspected area information on found defects and status.

◆ getInspectionParts()

void sf::ProjectModule::getInspectionParts ( QStringList &  parts)

Gets the strings list of all inspected part serials.

Parameters
parts

◆ getInspectionScanAreaInfo()

bool sf::ProjectModule::getInspectionScanAreaInfo ( const PartInspection pi,
const std::string &  scan_area,
KeyValues info 
)

Gets the strings list of the scan area information.

◆ getInspectionScanAreas()

bool sf::ProjectModule::getInspectionScanAreas ( const PartInspection pi,
QStringList &  scan_areas 
) const

Gets the scan area names.

Parameters
piInspection part to point out the analysis information.
scan_areasReturned scan area names.
Returns
True on success.

◆ getInspectionSerials()

void sf::ProjectModule::getInspectionSerials ( const QString &  part,
QStringList &  serials 
)

Gets the strings list of all inspected part serials.

◆ getInspectionState()

EInspectionState sf::ProjectModule::getInspectionState ( const PartInspection pi,
const std::string &  scan_area 
) const

Gets the inspection state of the specified part and scan area.

◆ getInspectionUser()

QString sf::ProjectModule::getInspectionUser ( const PartInspection pi,
const std::string &  scan_area 
) const

Gets the name of the user that is responsible for this area.

◆ getMaterialIni()

IniEnvelope sf::ProjectModule::getMaterialIni ( const QString &  material)

Gets an inifile containing the material info.

Parameters
materialName of the element.
Returns
The envelope contains a nullptr when it doesn't exist.

◆ getMaterials()

void sf::ProjectModule::getMaterials ( QStringList &  materials,
EMaterialType  mt 
) const

Gets all material names of the given type into the passed string list.

Parameters
materialsReturned list of materials.
mtType of material.

◆ getMaterialVelocity()

bool sf::ProjectModule::getMaterialVelocity ( const QString &  material,
bool  shear,
double &  value 
)

Gets the sound velocity of the passed material.

Parameters
materialName of the material.
shearTrue when the shear velocity is required.
valueReturned velocity value in m/s.
Returns
True on success.

◆ getMotionServer()

GmiServer * sf::ProjectModule::getMotionServer ( )

Gets the motion server instance.

Returns
Motion server pointer.

◆ getOpenProjects()

const ProjectList & sf::ProjectModule::getOpenProjects ( ) const

Gets the list of open project instances.

◆ getPartDirectory()

QString sf::ProjectModule::getPartDirectory ( const QString &  part) const

Gets the directory and drive of the passed part.

Parameters
partName of the part.
Returns
Part directory.

◆ getPartPicture()

QImage sf::ProjectModule::getPartPicture ( const QString &  part)

Gets the picture of the passed part.

Parameters
partName of the part.
Returns
Image of the part.

◆ getPartProject()

void sf::ProjectModule::getPartProject ( PartProject pp,
const PartInspection pi 
) const

Gets the part project used to create the inspection.

Parameters
ppProject data entry.
piInspection part to point out the analysis information.

◆ getPartStateIniPath()

QString sf::ProjectModule::getPartStateIniPath ( const QString &  part)

Gets the inifile containing state information on user interface.

Parameters
part
Returns
Path to the state

◆ getProjectCalibIni()

IniEnvelope sf::ProjectModule::getProjectCalibIni ( const PartProject part_proj)

Gets the project profile containing.

Parameters
part_proj
Returns

◆ getProjectCalibSetValues()

bool sf::ProjectModule::getProjectCalibSetValues ( const PartProject part_proj,
ECalibrationType  cal_type,
const std::string &  set_name,
KeyValues values 
)

Sets the calibration values of the project using a strings derived type.

Parameters
part_projProject data entry.
cal_typeType of the calibration.
set_nameName of the calibration set.
valuesReturned values.
Returns
True on success.

◆ getProjectDataDir()

QString sf::ProjectModule::getProjectDataDir ( ) const

Gets the project data directory.

◆ getProjectFilePath()

QString sf::ProjectModule::getProjectFilePath ( const PartProject part_project) const

Gets the project filename of the specified part and project.

Parameters
part_projectPart project instance.
Returns
Filepath to the project.

◆ getProjectParts() [1/2]

QStringList sf::ProjectModule::getProjectParts ( )

Gets all part names into the passed string list.

Returns
List of part names.

◆ getProjectParts() [2/2]

void sf::ProjectModule::getProjectParts ( QStringList &  parts)

Gets all part names into the passed string list.

Parameters
partsReturn values.

◆ getProjects() [1/2]

QStringList sf::ProjectModule::getProjects ( const QString &  part)

Gets all projects from a given part in a list.

Parameters
partName of the part.
Returns
Project names.

◆ getProjects() [2/2]

void sf::ProjectModule::getProjects ( const QString &  part,
QStringList &  projects 
)

Gets all project names of the given part.

Parameters
partName of the part.
projectsReturned project names.

◆ getReportTemplates()

bool sf::ProjectModule::getReportTemplates ( QStringList &  strings)

Gets the available report templates.

Parameters
stringsReturned list of template names.
Returns
True on success.

◆ getScanIni()

IniEnvelope sf::ProjectModule::getScanIni ( const QString &  part,
const QString &  scan_area 
)

Gets an inifile containing scan configuration information.

Parameters
partName of the part.
scan_areaNAme of the scan area,
Returns
The envelope contains a nullptr when the combination does not exist.

◆ getScans()

void sf::ProjectModule::getScans ( const QString &  part,
QStringList &  scans 
)

Gets all scan area names of the given part.

Parameters
partPart name.
scansReturned scan area names.

◆ getScanStateIniPath()

QString sf::ProjectModule::getScanStateIniPath ( const QString &  part,
const QString &  scan_area 
)

Gets an ini-file containing interface state information.

Parameters
partName of the part.
scan_areaNAme of the scan area,
Returns
Path to an ini-file.

◆ getScanTemplateIni()

IniEnvelope sf::ProjectModule::getScanTemplateIni ( const QString &  name)

Gets the ini-file of a scan area template.

Parameters
nameName of the template.
Returns
Ini file of the template.

◆ getScanTemplates()

void sf::ProjectModule::getScanTemplates ( QStringList &  names) const

Gets the scan area template names.

Parameters
namesReturned template names.

◆ getSettings()

void sf::ProjectModule::getSettings ( QStringList &  names,
const QString &  part 
) const

Gets all settings names to the passed string list. The returned named are depending on the settings global flag.

Parameters
namesReturned setting names.
partWhen the part is empty the global settings are returned.

◆ getSettingsDir()

QString sf::ProjectModule::getSettingsDir ( const QString &  part) const

Gets the settings directory for the passed part. The location is depending on the settings global flag.

Parameters
partWhen the part is empty the global directory is returned.
Returns
Settings directory.

◆ getSettingsGlobal()

bool sf::ProjectModule::getSettingsGlobal ( ) const

Gets the flag for keeping settings globally for all projects or part of a project.

Returns
True when settings are kept globally.

◆ getSettingsIni()

IniEnvelope sf::ProjectModule::getSettingsIni ( const QString &  part,
const QString &  settings_name 
)

Gets an inifile containing settings information. The settings global flag is true the global settings are used.

Parameters
partName of the part. Ignored when settings are global.
settings_nameNamed settings when empty the global ini-file is returned.
Returns
The envelope contains a nullptr when it doesn't exist.

◆ getStorage()

StorageInterface * sf::ProjectModule::getStorage ( )

Get the instance pointer storage interface implementation.

Returns
The nullptr when not created.

◆ getSystemDesignation()

std::string sf::ProjectModule::getSystemDesignation ( ) const

Gets the scan system designation name.

◆ getSystemPosition() [1/2]

const gmi::AxesCoord & sf::ProjectModule::getSystemPosition ( ESystemPosition  sys_pos) const

Gets a certain system position.

Parameters
sys_posto get.
Returns
The system position coordinate.

◆ getSystemPosition() [2/2]

bool sf::ProjectModule::getSystemPosition ( ESystemPosition  sys_pos,
gmi::AxesCoord coord 
) const

Gets a certain system position.

Parameters
sys_posSystem position to get.
coordCoordinate retrieved.
Returns
True on success.

◆ getTemplateDir()

QString sf::ProjectModule::getTemplateDir ( ) const

Gets the template directory.

Returns
Directory to scan area templates

◆ getToolIni()

IniEnvelope sf::ProjectModule::getToolIni ( const QString &  tool)

Gets an inifile containing the tool info.

Parameters
toolName of the tool.
Returns
The envelope contains a nullptr when it doesn't exist.

◆ getToolPicture()

bool sf::ProjectModule::getToolPicture ( const QString &  tool,
QImage &  image 
)

Gets true if the picture of the passed tool was returned in picture.

Parameters
toolName of the tool.
imageReturned picture of the tool.
Returns
True when the picture exists.

◆ getTools()

void sf::ProjectModule::getTools ( QStringList &  tools) const

Gets all tool names to the passed string list.

Parameters
toolsList of tool names returned.

◆ getUsageCount()

int sf::ProjectModule::getUsageCount ( )

Reports the amount the module is referenced.

◆ handlePropertyPage()

void sf::ProjectModule::handlePropertyPage ( QObject *  sender)
protected

Handles the apply of property pages.

Parameters
senderProperty page calling this method.

◆ hasReportGenerator()

bool sf::ProjectModule::hasReportGenerator ( )

Checks if report generator has been hooked.

Returns
True whe hooked.

◆ Initialize()

bool sf::ProjectModule::Initialize ( )

Initializes anything in need for initialization.

◆ initializeProjects()

bool sf::ProjectModule::initializeProjects ( )

Initializes or reinitializes projects.

Returns
True if successful.

◆ inspectionExists() [1/2]

bool sf::ProjectModule::inspectionExists ( const PartInspection pi) const

Gets true if the passed part inspection exists.

◆ inspectionExists() [2/2]

bool sf::ProjectModule::inspectionExists ( const QString &  part,
const QString &  serial,
const QString &  dts 
) const

Gets true if the passed part inspection exists.

◆ isBackupAvailable()

bool sf::ProjectModule::isBackupAvailable ( ) const

Checks if a backup service is available.

Returns
True when available.

◆ isControllerAllocated()

bool sf::ProjectModule::isControllerAllocated ( )

Gets the allocation status of the controller.

Returns
True if the controller is allocated.

◆ isElement()

bool sf::ProjectModule::isElement ( const QString &  element)

Checks if the element exists.

Parameters
elementName of the element.
Returns
True when it exists.

◆ isInspectionDataDirValid()

bool sf::ProjectModule::isInspectionDataDirValid ( )

Gets true if data ase directory is valid.

Returns
True when valid.

◆ isInspectionFinalized()

bool sf::ProjectModule::isInspectionFinalized ( const PartInspection part_inspection) const

Gets true when the inspection finalized.

◆ isMaterial()

bool sf::ProjectModule::isMaterial ( const QString &  material)

Checks if the material exists.

Parameters
materialName of the material.
Returns
True when it exists.

◆ isPart() [1/2]

bool sf::ProjectModule::isPart ( const PartProject part_project) const

Checks if of the given part project the part exists.

Parameters
part_projectPart project.
Returns
True when it exists.

◆ isPart() [2/2]

bool sf::ProjectModule::isPart ( const QString &  part) const

Checks if the given part exists.

Parameters
partName of the part.
Returns
True when it exists.

◆ isProject() [1/2]

bool sf::ProjectModule::isProject ( const PartProject part_project) const

Checks if the given part project exists.

Parameters
part_projectPart project instance pointer.
Returns
True when it exists.

◆ isProject() [2/2]

bool sf::ProjectModule::isProject ( const QString &  part,
const QString &  project 
) const

Checks if the given part project combination exists.

Parameters
partName of the part.
projectName of the project.
Returns
True when it exists.

◆ isProjectDirValid()

bool sf::ProjectModule::isProjectDirValid ( )

Gets true if the project directory is valid.

◆ isScanArea()

bool sf::ProjectModule::isScanArea ( const QString &  part,
const QString &  area_scan 
)

Checks if the area scan exists on the part.

Parameters
partName of the part.
area_scanName of the scan area.
Returns
TRue when it exists.

◆ isSettings()

bool sf::ProjectModule::isSettings ( const QString &  part,
const QString &  settings 
)

Checks if the config settings exists.

Parameters
partNAme of the part.
settingsName of the settings.
Returns
True when it exists.

◆ isTool()

bool sf::ProjectModule::isTool ( const QString &  tool)

Checks if the tool exists.

Parameters
toolName of the tool.
Returns
True when it exists.

◆ openManualControlDialog()

bool sf::ProjectModule::openManualControlDialog ( )

Opens a manual control dialog.

Returns
True on success and false when it could not allocate the motion controller.

◆ registerElementEditor()

void sf::ProjectModule::registerElementEditor ( TAddProjectPropertyPage  editor)

Adds a property page add function to the list for editing elements.

Parameters
editor

◆ registerMaterialEditor()

void sf::ProjectModule::registerMaterialEditor ( TAddProjectPropertyPage  editor)

Adds a property page add function to the list for editing materials.

Parameters
editor

◆ registerReportGenerator()

void sf::ProjectModule::registerReportGenerator ( GenerateReportEvent  handler)

Hooks a report generator to this interface.

Parameters
handler

◆ registerToolEditor()

void sf::ProjectModule::registerToolEditor ( TAddProjectPropertyPage  editor)

Adds a property page add function to the list for editing tools.

Parameters
editor

◆ removeAllAnalysisInfo()

bool sf::ProjectModule::removeAllAnalysisInfo ( const PartInspection pi,
const std::string &  scan_area 
)

Removes all the analysis information entries.

Parameters
piInspection part to point out the analysis information.
scan_areaAnalysed scan area.

◆ selectInspectedPart() [1/2]

bool sf::ProjectModule::selectInspectedPart ( PartInspection pi)

Selects a part from the database using a part project.

Parameters
pi
Returns
True if a valid selection was made.

◆ selectInspectedPart() [2/2]

bool sf::ProjectModule::selectInspectedPart ( QString &  part)

Selects a part from the database.

Parameters
partReturned part name.
Returns
True if a valid selection was made.

◆ selectInspection()

bool sf::ProjectModule::selectInspection ( PartInspection pi,
bool  create = false 
)

Selects a part inspection.

Parameters
piPart inspection.
createWhen true it selects an inspection from the inspection database. When false the part list is filled parts from the project list and the selected part cannot be changed.
Returns
When true inspection can be checked for existence. If not it must be created.

◆ selectPartProject()

bool sf::ProjectModule::selectPartProject ( PartProject part_project)

Selects an existing part project.

Parameters
part_projectPart project instance to be filled in.
Returns
True if a valid selection was made.

◆ selectProject()

bool sf::ProjectModule::selectProject ( PartProject part_project)

Selects an existing project using the non-visible part.

Parameters
part_projectPart project instance to be filled in.
Returns
True if a valid selection was made.

◆ selectProjectPart() [1/2]

bool sf::ProjectModule::selectProjectPart ( PartProject part_project)

Selects a part from the database.

Parameters
part_projectPart project instance to be filled in.
Returns
True if a valid selection was made.

◆ selectProjectPart() [2/2]

bool sf::ProjectModule::selectProjectPart ( QString &  part)

Selects a part from the database.

Todo:
Probably obsolete...
Parameters
partPart string to be filled in.
Returns
True if a valid selection was made.

◆ setActiveProject()

bool sf::ProjectModule::setActiveProject ( ProjectData project)

Sets the passed project to be the active one.

Parameters
projectProject to be activated.
Returns
TRue onsuccess to activate.

◆ setAnalysisInfo()

bool sf::ProjectModule::setAnalysisInfo ( const PartInspection pi,
const std::string &  scan_area,
const std::string &  name,
const KeyValues info 
)

Sets the inspection analysis information or removes it.

Parameters
piInspection part to point out the analysis information.
scan_areaAnalysed scan area.
nameName of the analysis. Is the assigned filter name.
infoInformation strings to set or NULL when the name should be deleted.
Returns
False if the inspection does not exist.

◆ setFiltersGlobal()

void sf::ProjectModule::setFiltersGlobal ( bool  global)

Sets the flag which determines if filters are global for any project or part of a project.

◆ setInspectionCalibSetValues()

bool sf::ProjectModule::setInspectionCalibSetValues ( const PartInspection pi,
ECalibrationType  cal_type,
const std::string &  set_name,
const KeyValues values 
)

Sets the calibration values of the inspection using a strings derived type.

Parameters
piInspection data entry.
cal_typeType of the calibration.
set_nameName of the calibration set.
valuesReturned values.
Returns
True on success.

◆ setInspectionCalType()

bool sf::ProjectModule::setInspectionCalType ( const PartInspection pi,
const std::string &  scan_area,
ECalibrationType  ct 
)

Sets the inspection calibration type.

◆ setInspectionComment()

bool sf::ProjectModule::setInspectionComment ( const PartInspection pi,
const std::string &  scan_area,
const std::string &  comment 
)

Sets the inspection comment for a scan area.

◆ setInspectionCustomInfo()

bool sf::ProjectModule::setInspectionCustomInfo ( const PartInspection pi,
const KeyValues info 
)

Sets the strings list of the custom information.

◆ setInspectionDataDir()

bool sf::ProjectModule::setInspectionDataDir ( const QString &  dir)

Sets the data-storage root directory and sets the flag FlagDataDirExists.

Parameters
dirInspection data directory.
Returns
True if the directory exists.

◆ setInspectionDataFileName()

bool sf::ProjectModule::setInspectionDataFileName ( const PartInspection pi,
const std::string &  scan_area,
const QString &  filename 
)

Sets the inspection data filename for a scan area.

Parameters
piInspection part to point out the inspection.
scan_areaScanned area name.
Returns
True on success.

◆ setInspectionState()

bool sf::ProjectModule::setInspectionState ( const PartInspection pi,
const std::string &  scan_area,
EInspectionState  is 
)

Sets the inspection state of the specified part and scan area.

◆ setInspectionUser()

bool sf::ProjectModule::setInspectionUser ( const PartInspection pi,
const std::string &  scan_area,
const std::string &  username,
const QDateTime &  datetime 
)

Sets the name of the user that is responsible for this area.

◆ setMaterialVelocity()

bool sf::ProjectModule::setMaterialVelocity ( const QString &  material,
double  longitudinal_vel,
double  shear_vel 
)

Sets the sound velocity of the passed material.

Parameters
materialName of the material.
longitudinal_velLongitudinal sound velocity value in m/s.
shear_velShear sound velocity value in m/s.
Returns
True on success.

◆ setProjectCalibSetValues()

bool sf::ProjectModule::setProjectCalibSetValues ( const PartProject part_proj,
ECalibrationType  cal_type,
const std::string &  set_name,
const KeyValues values 
)

Gets the calibration values of the project in a strings derived type.

Parameters
part_projProject data entry.
cal_typeType of the calibration.
set_nameName of the calibration set.
valuesReturned values.
Returns
True on success.

◆ setProjectDataDir()

bool sf::ProjectModule::setProjectDataDir ( const QString &  dir)

Sets the database directory and sets the flag FlagDBDirExists.

Parameters
dirPath of the directory.
Returns
True if the directory exists.

◆ setSettingsGlobal()

void sf::ProjectModule::setSettingsGlobal ( bool  global)

Sets the flag for keeping settings globally for all projects part of a project.

Parameters
globalTrue when settings are global.

◆ setSystemDesignation()

const std::string & sf::ProjectModule::setSystemDesignation ( const std::string &  name)

Sets the scan system designation. Returns value after filtering.

Parameters
nameName to assign.
Returns

◆ setSystemPosition()

bool sf::ProjectModule::setSystemPosition ( ESystemPosition  sp,
const gmi::AxesCoord ac 
)

Sets the system position from a passed coordinate and returns true on succes.

◆ storeSystemPositions()

bool sf::ProjectModule::storeSystemPositions ( bool  rd)

Stores the system positions.

Parameters
rdTrue for reading and false for writing.
Returns
True on success.

Friends And Related Symbol Documentation

◆ destroyProjectModule

void destroyProjectModule ( )
friend

Deletes the project module if it was created.

◆ getProjectModule

ProjectModule * getProjectModule ( )
friend

Creates the project module when called for.

Member Data Documentation

◆ SecurityConfig

Security sf::ProjectModule::SecurityConfig

◆ SecurityInspection

Security sf::ProjectModule::SecurityInspection

◆ SecurityProject

Security sf::ProjectModule::SecurityProject

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