154 bool inspectionExists(
const QString& part,
const QString& serial,
const QString& dts)
const;
471 void getScans(
const QString& part, QStringList& scans);
554 bool isProject(
const QString& part,
const QString& project)
const;
569 bool isScanArea(
const QString& part,
const QString& area_scan);
598 bool isSettings(
const QString& part,
const QString& settings);
993 std::string _systemDesignation;
1005 std::string _storageName;
1007 std::string _acquisitionUtName;
1009 std::string _acquisitionEcName;
1011 std::string _controllerName;
1013 bool _projectDataDirExists;
1015 bool __inspectionDataDirExists;
1017 QString _projectDataDir;
1019 QString _inspectionDataDir;
1021 QString _configProfilePath;
1023 QString _controllerAllocator;
1032 int _settingsGlobal;
1035 int _filterListGlobal;
1039 QList<TAddProjectPropertyPage> _toolEditors;
1041 QList<TAddProjectPropertyPage> _elementEditors;
1043 QList<TAddProjectPropertyPage> _materialEditors;
1052 bool,
const std::string& ,
const std::string& ,
const std::string& ,
const std::string& >
1053 _backupFunction{
"Backup"};
Registration handle templated on function signature.
Definition FunctionRegistry.h:93
Definition GmiServer.h:13
Definition PartInspection.h:11
Definition PartProject.h:10
Definition ProjectConfig.h:14
Keeps the project and all scan areas to inspect.
Definition ProjectData.h:25
Singleton.
Definition ProjectModule.h:27
RsaServer * getAcquisitionServer(int index)
Gets the acquisition server at the passed index.
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 g...
bool getMaterialVelocity(const QString &material, bool shear, double &value)
Gets the sound velocity of the passed material.
QString getProjectDataDir() const
Gets the project data directory.
bool Initialize()
Initializes anything in need for initialization.
int getAcquisitionServerCount() const
Gets the maximum amount of servers available.
QStringList getProjects(const QString &part)
Gets all projects from a given part in a list.
bool getInspectionGeneralInfo(const PartInspection *pi, KeyValues &info)
Gets the strings list of the general information.
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 selectInspectedPart(PartInspection *pi)
Selects a part from the database using a part project.
QImage getPartPicture(const QString &part)
Gets the picture of the passed part.
Security SecurityProject
Definition ProjectModule.h:52
int getUsageCount()
Reports the amount the module is referenced.
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 ...
friend ProjectModule * getProjectModule()
Creates the project module when called for.
bool setInspectionState(const PartInspection *pi, const std::string &scan_area, EInspectionState is)
Sets the inspection state of the specified part and scan area.
void getScans(const QString &part, QStringList &scans)
Gets all scan area names of the given part.
friend void destroyProjectModule()
Deletes the project module if it was created.
bool hasReportGenerator()
Checks if report generator has been hooked.
void attachProjectData(ProjectData *)
Attach for automatic referencing of sf::ProjectData instances.
void getProjectParts(QStringList &parts)
Gets all part names into the passed string list.
IniEnvelope getConfigIni()
Gets the inifile containing configuration information.
QString getFilterPath(const PartProject *part_project) const
Gets the filter filepath of the specified part project.
GmiServer * getMotionServer()
Gets the motion server instance.
bool isInspectionFinalized(const PartInspection *part_inspection) const
Gets true when the inspection finalized.
QString getInspectionFileSubDir(const PartInspection *part_inspection)
Gets the subdirectory where the data is located for the passed part inspection.
QString getConfigProfilePath() const
Gets the filepath to the module configuration ini-file.
void getPartProject(PartProject *pp, const PartInspection *pi) const
Gets the part project used to create the inspection.
bool inspectionExists(const QString &part, const QString &serial, const QString &dts) const
Gets true if the passed part inspection exists.
bool allocateController(const QString &allocator)
Allocates the controller by allocator name.
const RsaServer * getAcquisitionServer(int index) const
Gets the acquisition server at the passed index.
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.
bool getCalibrationSetNames(const PartInspection *part_inspection, ECalibrationType cal_type, QStringList &set_names)
Gets the calibration set names.
bool isBackupAvailable() const
Checks if a backup service is available.
IniEnvelope getScanIni(const QString &part, const QString &scan_area)
Gets an inifile containing scan configuration information.
bool isMaterial(const QString &material)
Checks if the material exists.
std::string getCalibrationSetSection(ECalibrationType cal_type, const std::string &set_name)
Gets the calibration set section name.
void addProjectPropertyPages(PropertySheetDialog *sheet)
Adds project property pages to passed property sheet.
bool getAnalysisInfo(const PartInspection *pi, const std::string &scan_area, const std::string &name, KeyValues &info) const
Gets the inspection analysis information.
bool initializeProjects()
Initializes or reinitializes projects.
bool selectInspection(PartInspection *pi, bool create=false)
Selects a part inspection.
void setSettingsGlobal(bool global)
Sets the flag for keeping settings globally for all projects part of a project.
bool openManualControlDialog()
Opens a manual control dialog.
QString getProjectFilePath(const PartProject *part_project) const
Gets the project filename of the specified part and project.
Security SecurityInspection
Definition ProjectModule.h:53
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.
bool getInspectionScanAreas(const PartInspection *pi, QStringList &scan_areas) const
Gets the scan area names.
bool setInspectionDataDir(const QString &dir)
Sets the data-storage root directory and sets the flag FlagDataDirExists.
IniEnvelope getElementIni(const QString &element)
Gets an inifile containing the element info.
void addServerPropertyPages(PropertySheetDialog *sheet)
Adds server property pages to passed property sheet.
IniEnvelope getMaterialIni(const QString &material)
Gets an inifile containing the material info.
bool getInspectionScanAreaInfo(const PartInspection *pi, const std::string &scan_area, KeyValues &info)
Gets the strings list of the scan area information.
const ProjectList & getOpenProjects() const
Gets the list of open project instances.
bool setSystemPosition(ESystemPosition sp, const gmi::AxesCoord &ac)
Sets the system position from a passed coordinate and returns true on succes.
gmi::Controller * getController()
Get the instance pointer motion controller interface implementation.
QString getInspectionDataDir()
Gets the inspection data directory.
bool isPart(const QString &part) const
Checks if the given part exists.
ECalibrationType getInspectionCalType(const PartInspection *pi, const std::string &scan_area) const
Gets the inspection calibration type.
IniEnvelope getScanTemplateIni(const QString &name)
Gets the ini-file of a scan area template.
std::string getSystemDesignation() const
Gets the scan system designation name.
bool isInspectionDataDirValid()
Gets true if data ase directory is valid.
IniEnvelope getProjectCalibIni(const PartProject *part_proj)
Gets the project profile containing.
bool getToolPicture(const QString &tool, QImage &image)
Gets true if the picture of the passed tool was returned in picture.
const std::string & setSystemDesignation(const std::string &name)
Sets the scan system designation. Returns value after filtering.
EInspectionState getInspectionState(const PartInspection *pi, const std::string &scan_area) const
Gets the inspection state of the specified part and scan area.
bool getReportTemplates(QStringList &strings)
Gets the available report templates.
bool isProject(const QString &part, const QString &project) const
Checks if the given part project combination exists.
void DestroyServers()
Destroys the all servers. Is normally called by the destructor.
bool backupInspection(const PartInspection *part_inspection)
Initiates a backup of the inspection data for a given part inspection.
void getInspectionParts(QStringList &parts)
Gets the strings list of all inspected part serials.
bool freeController(const QString &allocator)
Frees the controller by allocator name.
bool generateReport(ProjectData *project_data)
Generates a report using the project data and report options.
bool backupProjects()
Initiates a backup of the project data.
bool selectPartProject(PartProject *part_project)
Selects an existing part project.
bool getSystemPosition(ESystemPosition sys_pos, gmi::AxesCoord &coord) const
Gets a certain system position.
std::string getConfigCalibrationSetSection() const
Gets the section name in the configuration file.
void getProjects(const QString &part, QStringList &projects)
Gets all project names of the given part.
void getTools(QStringList &tools) const
Gets all tool names to the passed string list.
QString getInspectionFileDir(const PartInspection *part_inspection)
Gets the directory where the data is located for the passed part inspection.
QStringList getProjectParts()
Gets all part names into the passed string list.
bool isProject(const PartProject *part_project) const
Checks if the given part project exists.
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 selectInspectedPart(QString &part)
Selects a part from the database.
bool setInspectionCustomInfo(const PartInspection *pi, const KeyValues &info)
Sets the strings list of the custom information.
void detachProjectData(ProjectData *)
Detach for automatic referencing of sf::ProjectData instances.
void setFiltersGlobal(bool global)
Sets the flag which determines if filters are global for any project or part of a project.
void getInspectionSerials(const QString &part, QStringList &serials)
Gets the strings list of all inspected part serials.
bool storeSystemPositions(bool rd)
Stores the system positions.
QString getScanStateIniPath(const QString &part, const QString &scan_area)
Gets an ini-file containing interface state information.
bool editTool(const QString &tool)
Edits a tool using the registered editor property pages.
bool setProjectDataDir(const QString &dir)
Sets the database directory and sets the flag FlagDBDirExists.
bool selectProject(PartProject *part_project)
Selects an existing project using the non-visible part.
void getElements(QStringList &elements) const
Gets all element names into the passed string list.
void registerMaterialEditor(TAddProjectPropertyPage editor)
Adds a property page add function to the list for editing materials.
QString getInspectionDateTimeStr(const PartInspection *pi, const std::string &scan_area) const
Gets the data time of the scan area.
bool editElement(const QString &element)
Edits an element using the registered editor property pages.
bool isPart(const PartProject *part_project) const
Checks if of the given part project the part exists.
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.
void getScanTemplates(QStringList &names) const
Gets the scan area template names.
bool getInspectionCustomInfo(const PartInspection *pi, KeyValues &info)
Gets the strings list of the custom information.
IniEnvelope getSettingsIni(const QString &part, const QString &settings_name)
Gets an inifile containing settings information. The settings global flag is true the global settings...
void registerReportGenerator(GenerateReportEvent handler)
Hooks a report generator to this interface.
~ProjectModule() override
Virtual Destructor.
QString getInspectionUser(const PartInspection *pi, const std::string &scan_area) const
Gets the name of the user that is responsible for this area.
TVector< ProjectData * > ProjectList
Type for sf::ProjectData data instances.
Definition ProjectModule.h:735
QString getPartStateIniPath(const QString &part)
Gets the inifile containing state information on user interface.
IniEnvelope getInspectionIni(const PartInspection *pi)
Gets the inspection information profile containing inspected area information on found defects and st...
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 editMaterial(const QString &material)
Edits a material using the registered editor property pages.
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 canInitializeProjects()
Checks if the projects can be (re)initialized.
QString getTemplateDir() const
Gets the template directory.
bool isProjectDirValid()
Gets true if the project directory is valid.
bool getInspectionAnalysisEntries(const PartInspection *pi, const std::string &scan_area, string_list &names) const
Gets the analysis names.
void handlePropertyPage(QObject *sender)
Handles the apply of property pages.
bool isSettings(const QString &part, const QString &settings)
Checks if the config settings exists.
bool isElement(const QString &element)
Checks if the element exists.
void registerElementEditor(TAddProjectPropertyPage editor)
Adds a property page add function to the list for editing elements.
bool selectProjectPart(PartProject *part_project)
Selects a part from the database.
IniEnvelope getToolIni(const QString &tool)
Gets an inifile containing the tool info.
void registerToolEditor(TAddProjectPropertyPage editor)
Adds a property page add function to the list for editing tools.
bool getFiltersGlobal() const
Gets the flag which determines if filters are global for any project or part of a project.
StorageInterface * getStorage()
Get the instance pointer storage interface implementation.
const gmi::AxesCoord & getSystemPosition(ESystemPosition sys_pos) const
Gets a certain system position.
QString getPartDirectory(const QString &part) const
Gets the directory and drive of the passed part.
QString getSettingsDir(const QString &part) const
Gets the settings directory for the passed part. The location is depending on the settings global fla...
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.
void destroyDevices()
Destroys all device/controller instances.
bool createProjectPart(const QString &part)
Creates a new project part name.
bool isTool(const QString &tool)
Checks if the tool exists.
bool finalizeInspection(const PartInspection *pi, bool reset=false)
Finalizes the inspection.
bool selectProjectPart(QString &part)
Selects a part from the database.
bool setActiveProject(ProjectData *project)
Sets the passed project to be the active one.
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 isControllerAllocated()
Gets the allocation status of the controller.
void getInspectionDates(const QString &part, const QString &serial, QStringList &date_times)
Gets the directory where the data is located for the passed part inspection.
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 inspectionExists(const PartInspection *pi) const
Gets true if the passed part inspection exists.
bool setInspectionDataFileName(const PartInspection *pi, const std::string &scan_area, const QString &filename)
Sets the inspection data filename for a scan area.
bool setMaterialVelocity(const QString &material, double longitudinal_vel, double shear_vel)
Sets the sound velocity of the passed material.
void getMaterials(QStringList &materials, EMaterialType mt) const
Gets all material names of the given type into the passed string list.
ProjectData * getActiveProject()
Gets the active project.
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 removeAllAnalysisInfo(const PartInspection *pi, const std::string &scan_area)
Removes all the analysis information entries.
void getConfigCalibrationSetNames(QStringList &names) const
Gets the available configured calibration set names.
Security SecurityConfig
Definition ProjectModule.h:51
ProjectModule()
Default constructor.
bool isScanArea(const QString &part, const QString &area_scan)
Checks if the area scan exists on the part.
bool setInspectionCalType(const PartInspection *pi, const std::string &scan_area, ECalibrationType ct)
Sets the inspection calibration type.
bool getElementPicture(const QString &element, QImage &image)
Gets true if the picture of the passed tool was returned in picture.
bool getSettingsGlobal() const
Gets the flag for keeping settings globally for all projects or part of a project.
Dialog containing multiple property pages.
Definition qt/PropertySheetDialog.h:15
RSA implementation of an information server.
Definition RsaServer.h:18
Interface for regulating user access to parts of the code. This class is commonly declared as static....
Definition Security.h:25
Base class for the interface.
Definition StorageInterface.h:18
Storage server.
Definition StorageServer.h:15
Counted vector having additional methods and operators for ease of usage. This template class extends...
Definition TVector.h:19
All axis values in one structure accompanied by some handy manipulation methods.
Definition AxesCoord.h:13
Pure virtual class for implementation of motion controllers.
Definition Controller.h:13
#define _IPJ_CLASS
Definition ipj/iface/global.h:35
Definition Application.h:10
constexpr int spSYSPOS_LASTENTRY(spSYSPOS_TOOL+1)
Used as size and as last value to iterate towards.
EMaterialType
Enumerate type to identify a material.
Definition ipj/iface/Namespace.h:156
IniProfile::KeyValueMap KeyValues
Definition ipj/iface/Namespace.h:123
ESystemPosition
Fixed system dependent axis positions.
Definition ipj/iface/Namespace.h:239
_MISC_FUNC QSettings * getGlobalSettings()
Gets global settings class for settings.
bool(* GenerateReportEvent)(ProjectData *data, QStringList *templates)
Type for registering the report generation event handler.
Definition ipj/iface/Namespace.h:150
EInspectionState
States for results of an inspection.
Definition ipj/iface/Namespace.h:213
TStrings< std::string > string_list
Vector of std::strings with additional functionality.
Definition TStrings.h:97
ECalibrationType
Type to identify a scan area type.
Definition ipj/iface/Namespace.h:187