Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
ProjectModule.h
Go to the documentation of this file.
1#pragma once
4#include <ipj/iface/global.h>
6#include <misc/gen/Security.h>
8
9namespace sf
10{
11
12// Forward declarations of local classes.
13class ScanMethod;
14class ScanBinder;
15class ProjectModule;
16class PartProject;
17class TPartInspection;
18class ProjectData;
19class TProjectScript;
20
25 : public ProjectConfig
27{
28 protected:
33
37 ~ProjectModule() override;
38
39 public:
43 bool Initialize();
44 //
49
50 // Module security locks.
54
55 // Returns the scan system designation.
56 std::string GetSystemDesignation() const;
57 // Sets the scan system designation. Returns value after filtering.
58 const std::string& SetSystemDesignation(std::string name);
59 // Function for testing and setting the global settings flag which
60 // determines the settings file location.
61 void SetSettingsGlobal(bool global);
62 bool GetSettingsGlobal() const;
63 // Function for testing and setting the static filter list flag which
64 // determines if the filter list is part of a project.
65 void SetFilterListGlobal(bool global);
66 bool GetFilterListGlobal() const;
67
68 // Returns the system position in a passed coordinate and true on succes.
71 // Sets the system position from a passed coordinate and returns true on succes.
73 // Stores and retrieves the system positions from profile.
75
76 // Returns the strings list of all inspected parts.
77 void GetInspectionParts(QStringList& parts);
78 // Returns the strings list of all inspected part serials.
79 void GetInspectionSerials(const QString& part, QStringList& serials);
80 // Returns the strings list of all inspected part serial date times.
81 void GetInspectionDates(const QString& part, const QString& serial, QStringList& date_times);
82 // Returns the directory where the data is located for the passed part inspection.
83 QString GetInspectionFileDir(const TPartInspection* part_inspection);
84 // Returns the subdirectory where the data is located for the passed part inspection.
86 // Returns true if the passed part inspection exists.
87 bool InspectionExists(const TPartInspection* pi) const;
88 // Returns true if the passed part inspection exists.
89 bool InspectionExists(const QString& part, const QString& serial, const QString& dts) const;
90 // Returns the inspection information profile containing
91 // inspected area information on found defects and status.
93 // Returns the calibration set section name.
94 std::string GetCalibrationSetSection(ECalibrationType cal_type, const std::string& set_name);
95 // Returns the section name in the configuration file.
96 std::string GetConfigCalibrationSetSection() const;
97 // Returns the available configured calibration set names.
98 void GetConfigCalibrationSetNames(QStringList& names) const;
99 // Returns the calibration values of the inspection in a strings derived type.
101 const TPartInspection* pi,
102 // Inspection data entry.
103 ECalibrationType cal_type,
104 // Type of the calibration.
105 const std::string& set_name,
106 // Name of the calibration set.
107 KeyValues& values
108 );
109 // Sets the calibration values of the inspection using a strings derived type.
111 const TPartInspection* pi,
112 // Inspection data entry.
113 ECalibrationType cal_type,
114 // Type of the calibration.
115 const std::string& set_name,
116 // Name of the calibration set.
117 const KeyValues& values
118 );
119 // Returns the calibration set names.
121 const TPartInspection* part_inspection,// Inspection data entry.
122 ECalibrationType cal_type,// Type of the calibration.
123 QStringList& set_names
124 );
125 // Returns the section name in the ini file for storing or retrieving
126 // scan related inspection data.
127 std::string GetInspectionAreaIniSection(const std::string& scan_area) const;
128 // Returns the section name in the ini file for storing or retrieving
129 // scan related inspection data.
130 std::string GetInspectionAnalysisIniSection(const std::string& scan_area, const std::string& name) const;
131 // Returns the strings list of the general information.
133 // Returns the strings list of the custom information.
135 // Sets the strings list of the custom information.
137 // Returns the strings list of the scan area information.
138 bool GetInspectionScanAreaInfo(const TPartInspection* pi, const std::string& scan_area, KeyValues& info);
139 // Returns the inspection state of the specified part and scan area.
140 EInspectionState GetInspectionState(const TPartInspection* pi, const std::string& scan_area) const;
141 // Sets the inspection state of the specified part and scan area.
142 bool SetInspectionState(const TPartInspection* pi, const std::string& scan_area, EInspectionState is);
143 // Gets the name of the user that is responsible for this area.
144 QString GetInspectionUser(const TPartInspection* pi, const std::string& scan_area) const;
145 // Sets the name of the user that is responsible for this area.
146 bool SetInspectionUser(const TPartInspection* pi, const std::string& scan_area, const std::string& username, const QDateTime& datetime);
147 // Returns the data time of the scan area.
148 QString GetInspectionDateTimeStr(const TPartInspection* pi, const std::string& scan_area) const;
149 // Gets the inspection calibration type.
150 ECalibrationType GetInspectionCalType(const TPartInspection* pi, const std::string& scan_area) const;
151 // Sets the inspection calibration type.
152 bool SetInspectionCalType(const TPartInspection* pi, const std::string& scan_area, ECalibrationType ct);
153 // Returns the inspection comment for a scan area.
154 QString GetInspectionComment(const TPartInspection* pi, const std::string& scan_area) const;
155 // Sets the inspection comment for a scan area.
156 bool SetInspectionComment(const TPartInspection* pi, const std::string& scan_area, const std::string& comment);
157 // Returns true when the inspection finalized.
158 bool IsInspectionFinalized(const TPartInspection* part_inspection) const;
159 // Finalizes the inspection.
160 bool FinalizeInspection(const TPartInspection* pi, bool reset = false);
161 // Returns the inspection data filename for a scan area.
163 const TPartInspection* pi,
164 // Inspection part to point out the inspection.
165 const std::string& scan_area,
166 // scanned area.
167 int file_index = -1// Index of one the previous data files.When -1 it returns always the current one.
168 ) const;
169 // Returns the history of inspected data files on this scan area.
171 const TPartInspection* pi,
172 // Inspection part to point out the inspection.
173 const std::string& scan_area,
174 // scanned area.
175 QStringList& names// Returned values.
176 ) const;
177 // Sets the inspection data filename for a scan area.
178 bool SetInspectionDataFileName(const TPartInspection* pi, const std::string& scan_area, const QString& filename);
179 // Return the scan area names.
181 const TPartInspection* pi,// Inspection part to point out the analysis information.
182 QStringList& scan_areas// Returned values.
183 ) const;
184 // Return the analysis names.
186 const TPartInspection* pi,
187 // Inspection part to point out the analysis information.
188 const std::string& scan_area,
189 // Analysed scan area.
190 strings& names// Returned values.
191 ) const;
192 // Returns the inspection analysis information.
193 // Returns false if the inspection or the analysis name does not exist.
195 const TPartInspection* pi,
196 // Inspection part to point out the analysis information.
197 const std::string& scan_area,
198 // Analysed scan area.
199 const std::string& name,
200 // Name of the analysis. Is the assigned filter name.
201 KeyValues& info// Returned information strings.
202 ) const;
203 // Sets the inspection analysis information or removes it.
204 // Returns false if the inspection does not exist.
206 const TPartInspection* pi,
207 // Inspection part to point out the analysis information.
208 const std::string& scan_area,
209 // Analysed scan area.
210 const std::string& name,
211 // Name of the analysis. Is the assigned filter name.
212 const KeyValues& info// Information strings to set or NULL when the name should be deleted.
213 );
214 // Removes all the analysis information entries.
216 const TPartInspection* pi,
217 // Inspection part to point out the analysis information.
218 const std::string& scan_area// Analysed scan area.
219 );
220 // Creates a part inspection entry and returns true on succes to do so.
221 // The part and serial are used to create an entry the current datetime
222 // is used to fill in the datetime field.
224 // Returns the part project used to create the inspection.
225 void GetPartProject(PartProject* pp, const TPartInspection* pi) const;
226 // Selects a part from the database.
227 // Using a part project object or a string.
228 // Returns true if a valid selection was made.
230 bool SelectInspectedPart(QString& part);
231 // When create is true it selects an inspection from the inspection database.
232 // When create is false the part list is filled parts from the project list
233 // and the selected part cannot be changed.
234 // When true is returned the returned part inspection can be checked
235 // for existence. If not it must be created.
236 bool SelectInspection(TPartInspection* pi, bool create = false);
237
238 // Returns the project profile containing
240 // Returns the calibration values of the project in a strings derived type.
242 const PartProject* part_proj,
243 // Project data entry.
244 ECalibrationType cal_type,
245 // Type of the calibration.
246 const std::string& set_name,
247 // Name of the calibration set.
248 const KeyValues& values
249 );
250 // Sets the calibration values of the project using a strings derived type.
252 const PartProject* part_proj,
253 // Project data entry.
254 ECalibrationType cal_type,
255 // Type of the calibration.
256 const std::string& set_name,
257 // Name of the calibration set.
258 KeyValues& values
259 );
260 // Sets the database directory and sets the flag FlagDBDirExists.
261 // Returns true if the directory exists.
262 bool setProjectDataDir(const QString& dir);
264
265 // Returns true if the project directory is valid.
267 // Assigns all part names to the passed string list.
268 void GetProjectParts(QStringList& parts);
269 // Gets all part names in a list.
270 QStringList GetProjectParts();
271 // Assigns all part name s to the passed string list.
272 void GetProjects(const QString& part, QStringList& projects);
273 // Gets all projects from a given part in a list.
274 QStringList GetProjects(const QString& part);
275 // Assigns all part name s to the passed string list.
276 void GetScans(const QString& part, QStringList& scans);
277 // Tests if the given part exists
278 bool PartExists(const QString& part) const;
279 // Checks if of the given part project the part exists.
280 bool PartExists(const PartProject* part_project) const;
281 // Assigns all tool names to the passed string list.
282 void GetTools(QStringList& tools) const;
283 // Assigns all element names to the passed string list.
284 void GetElements(QStringList& elements) const;
285 // Assigns all element names to the passed string list.
286 void GetMaterials(QStringList& materials, EMaterialType mt) const;
287 // Returns the settings directory for the passed part.
288 // When the part is empty the global directory is returned.
289 // The location is depending on the settings globale flag.
290 QString GetSettingsDir(const QString& part) const;
291 // Assigns all settings names to the passed string list.
292 // When the part is empty the global settings are returned.
293 void GetSettings(QStringList& names, const QString& part) const;
294 // Returns the template directory.
295 QString GetTemplateDir() const;
296 // Returns the scan area template names.
297 void GetScanTemplates(QStringList& names) const;
298 // Returns the ini file of a scan area template.
299 IniEnvelope GetScanTemplateIni(const QString& name);
300 // Creates a new project part name.
301 bool NewProjectPart(const QString& part);
302 // Checks if the given part project combination exists,
303 bool ProjectExists(const QString& part, const QString& project) const;
304 bool ProjectExists(const PartProject* pp) const;
305 // Checks if the area scan exists.
306 bool ScanExists(const QString& part, const QString& scan);
307 // Checks if the tool exists.
308 bool ToolExists(const QString& tool);
309 // Checks if the element exists.
310 bool ElementExists(const QString& element);
311 // Checks if the element exists.
312 bool MaterialExists(const QString& material);
313 // Checks if the config settings exists.
314 bool SettingsExists(const QString& part, const QString& settings);
315 // Returns true when the passed area exists on the part.
316 bool GetScanAreaExists(const QString& part, const QString& scan);
317 // Returns an inifile containing scan configuration information.
318 IniEnvelope GetScanIni(const QString& part, const QString& scan);
319 // Returns an inifile containing interface state information.
320 QString GetScanStateIniPath(const QString& part, const QString& scan);
321 // Returns the inifile containing state information on user interface.
322 QString GetPartStateIniPath(const QString& part);
323 // Returns an inifile containing settings information.
324 // When the part is empty the global ini file is returned.
325 IniEnvelope GetSettingsIni(const QString& part, const QString& settings_name);
326 // Returns an inifile containing the tool info.
327 IniEnvelope GetToolIni(const QString& tool);
328 // Returns an inifile containing the element info.
329 IniEnvelope GetElementIni(const QString& element);
330 // Returns an inifile containing the element info.
331 IniEnvelope GetMaterialIni(const QString& material);
332 // Returns the inifile containing configuration information.
334 // Returns the project filename of the specified part and project.
335 QString GetProjectFilePath(const PartProject* part_project) const;
336 // Returns the filter filepath of the specified part_project.
337 QString GetFilterPath(const PartProject* part_project) const;
338 // Returns the directory and drive of the passed part_project instance.
339 QString GetPartDirectory(const QString& part) const;
340 // Returns true if the picture of the passed part was returned in picture.
341 QImage getPartPicture(const QString& part);
342 // Returns true if the picture of the passed tool was returned in picture.
343 bool GetToolPicture(const QString& tool, QImage& picture);
344 // Returns true if the picture of the passed tool was returned in picture.
345 bool GetElementPicture(const QString& element, QImage& picture);
346 // Selects a part from the database.
347 // Using a part project object or a string.
348 // Returns true if a valid selection was made.
349 bool SelectProjectPart(PartProject* part_project);
350 bool SelectProjectPart(QString& part);
351 // Selects an existing part project.
352 bool SelectPartProject(PartProject* part_project);
353 // Selects an existing project using the non-visible part.
354 bool SelectProject(PartProject* part_project);
355
356 // Locally used class.
358
359 // Returns the list of open project classes.
361 {
362 return FProjects;
363 };
364
365 // Sets the data-storage root directory and sets the flag FlagDataDirExists.
366 // Returns true if the directory exists.
367 bool setInspectionDataDir(const QString& dir);
369 // Returns true if data ase directory is valid.
371
372 // Returns the motion server instance.
374
375 // Deletes controller implementation.
377 // Adds server property pages to passed property sheet.
379 // Adds project property pages to passed property sheet.
381
382 // Returns the maximum amount of servers available.
384 {
385 return 2;
386 }
387
388 // Returns the acquisition server at the passed index.
390 const RsaServer* GetAcquisitionServer(int index) const;
391
393 {
394 return FStorageServer->getImplementation();
395 }
396
397 // Returns false if manual control dialog failed because it could not allocate the controller.
399 // Returns the instance pointer to the motion control implementation.
401 // Returns true if control of the controller can be obtained
402 bool ControllerAllocate(const QString& allocator);
403 // Frees the controller.
404 bool ControllerFree(const QString& allocator);
405
406 // Returns true if the controller is allocated.
408 {
409 return FControllerAllocator.length() ? true : false;
410 }
411
412 // Reports the amount the module is referenced.
414 {
415 return FProjects.count();
416 }
417
418 // Returns true if the projects could be (re)initialized.
420 // Returns true if the projects can be (re)initialized.
422 // Attach and detach functions for automatic referencing
423 // of TProjectData instances.
426
427 // Gets the active project.
429 // Tries to set the passed project to be the active one.
431
432 // Puts this property page create function in a list.
433 void RegisterToolEditor(TAddProjectPropertyPage editor);
434 // Puts this property page create function in a list.
435 void RegisterElementEditor(TAddProjectPropertyPage editor);
436 // Puts this property page create function in a list.
437 void RegisterMaterialEditor(TAddProjectPropertyPage editor);
438 // Edits a tool using the registered editor property pages.
439 // Returns true when changed.
440 bool EditTool(const QString& tool);
441 // Edits an element using the registered editor property pages.
442 // Returns true when changed.
443 bool EditElement(const QString& element);
444 // Edits a material using the registered editor property pages.
445 // Returns true when changed.
446 bool EditMaterial(const QString& material);
447 // Returns the sound velocity of the passed material.
448 bool GetMaterialVelocity(const QString& material, bool shear, double& value);
449 // Sets the sound velocities of the passed material.
450 bool SetMaterialVelocity(const QString& material, double longitudinal_vel, double shear_vel);
451
452 // Hooks a report generator to this interface.
453 void RegisterReportGenerator(TGenerateReportEvent handler);
454 // Returns true is a report generator has been installed.
456 // Generates a report using the project data and report options.
458 // Returns the possible templates.
459 bool GetReportTemplates(QStringList& strings);
460
461 // Makes a backup of the inspection data.
462 bool BackupInspection(const TPartInspection* part_inspection);
463 // Makes a backup of the project data.
465 // Returns true when a backup the backup function is valid.
466 bool IsBackupAvailable() const;
467
468 protected:
469 // Returns the redirected file path to the module config inifile.
470 QString GetConfigProfilePath() const;
471 // Handles the apply of property pages.
472 void HandlePropertyPage(QObject* sender);
473
474 private:
475 // Holds the system designation name.
476 std::string FSystemDesignation;
477 // Holds the pointer to the motion controller implementation.
478 gmi::Controller* FController;
479 // Holds the motion server.
480 GmiServer* FMotionServer;
481 // Holds the pointer to the storage device.
482 StorageServer* FStorageServer;
483 // Holds the instance of the acquisition device server.
484 RsaServer* FAcquisitionUtServer;
485 // Holds the instance of the acquisition device server.
486 RsaServer* FAcquisitionEcServer;
487 // Holds the last name successfully assigned storage implementation.
488 std::string FStorageName;
489 // Holds the last name successfully assigned acquisition implementation.
490 std::string FAcquisitionUtName;
491 // Holds the last name successfully assigned acquisition implementation.
492 std::string FAcquisitionEcName;
493 // Holds the last name successfully assigned controller implementation.
494 std::string FControllerName;
495 // Holds the flag signaling the valid database directory location.
496 bool FProjectDataDirExists;
497 // Holds the flag signaling the valid data directory location.
498 bool FInspectionDataDirExists;
499 // Holds the current database directory.
500 QString FProjectDataDir;
501 // Holds the current data storage directory.
502 QString FInspectionDataDir;
503 // Holds the redirected module configuration profile path.
504 QString FConfigProfilePath;
505 // Hold the name of the allocator.
506 QString FControllerAllocator;
507 // Holds the list of current TProjectData instances.
508 TProjects FProjects;
509 // Holds pointer to the current active project.
510 ProjectData* FActiveProject;
511 // Determines the location of the settings file.
512 // When 1 the settings files reside in the part directory otherwise
513 // in a global settings directory. When -1 the actual value must
514 // be read from the configuration file.
515 int FSettingsGlobal;
516 // Determines if filter list is project or system (global) dependent.
517 // When -1 the actual value must still be read from the configuration file.
518 int FFilterListGlobal;
519 // Array of the system positions.
520 gmi::AxesCoord FSystemPositions[spSYSPOS_LASTENTRY];
521 // Holds a list of registered editors.
522 QList<TAddProjectPropertyPage> FToolEditors, FElementEditors, FMaterialEditors;
523 // Hook to the installed report generator handler.
524 TGenerateReportEvent FReportGeneratorHook;
525 //
526 QSettings _settings{ApplicationSettings::global().getSettings()};
531 bool, const std::string& /*jobname*/, const std::string& /*source*/, const std::string& /*destination*/, const std::string& /*flags*/>
532 _backupFunction{"Backup"};
533
534 friend void destroyProjectModule();
536};
537
538}// namespace sf
Registration handle templated on function signature.
Definition FunctionRegistry.h:93
Definition GmiServer.h:13
Base class for all generic information objects to be able to put them in a typed list together.
Definition InformationBase.h:25
Definition PartProject.h:10
Definition ProjectConfig.h:14
Definition ProjectData.h:23
Singleton.
Definition ProjectModule.h:27
void GetScans(const QString &part, QStringList &scans)
void AddProjectPropertyPages(PropertySheetDialog *sheet)
bool Initialize()
Initializes anything in need for initialization.
bool EditTool(const QString &tool)
bool SetProjectCalibSetValues(const PartProject *part_proj, ECalibrationType cal_type, const std::string &set_name, const KeyValues &values)
bool SelectInspectedPart(TPartInspection *pi)
std::string GetSystemDesignation() const
QImage getPartPicture(const QString &part)
Security SecurityProject
Definition ProjectModule.h:52
void RegisterReportGenerator(TGenerateReportEvent handler)
friend ProjectModule * getProjectModule()
Creates the project module when called for.
bool SetActiveProject(ProjectData *project)
const std::string & SetSystemDesignation(std::string name)
bool IsControllerAllocated()
Definition ProjectModule.h:407
QString GetProjectFilePath(const PartProject *part_project) const
friend void destroyProjectModule()
Deletes the project module if it was created.
bool PartExists(const PartProject *part_project) const
QString GetInspectionDateTimeStr(const TPartInspection *pi, const std::string &scan_area) const
gmi::Controller * GetController()
void SetFilterListGlobal(bool global)
bool GetSettingsGlobal() const
bool ReadWriteSystemPositions(bool rd)
bool SelectInspectedPart(QString &part)
void GetConfigCalibrationSetNames(QStringList &names) const
bool GetInspectionCalibSetValues(const TPartInspection *pi, ECalibrationType cal_type, const std::string &set_name, KeyValues &values)
bool SetInspectionCalType(const TPartInspection *pi, const std::string &scan_area, ECalibrationType ct)
bool GetInspectionScanAreas(const TPartInspection *pi, QStringList &scan_areas) const
bool IsInspectionDataDirValid()
void GetInspectionSerials(const QString &part, QStringList &serials)
void RegisterElementEditor(TAddProjectPropertyPage editor)
void GetInspectionDates(const QString &part, const QString &serial, QStringList &date_times)
bool SelectInspection(TPartInspection *pi, bool create=false)
bool SelectPartProject(PartProject *part_project)
bool RemoveAllAnalysisInfo(const TPartInspection *pi, const std::string &scan_area)
bool GetCalibrationSetNames(const TPartInspection *part_inspection, ECalibrationType cal_type, QStringList &set_names)
IniEnvelope GetConfigIni()
TVector< ProjectData * > TProjects
Definition ProjectModule.h:357
void SetSettingsGlobal(bool global)
void GetSettings(QStringList &names, const QString &part) const
void AddServerPropertyPages(PropertySheetDialog *sheet)
IniEnvelope GetElementIni(const QString &element)
QString GetPartStateIniPath(const QString &part)
void GetMaterials(QStringList &materials, EMaterialType mt) const
bool NewPartInspection(const PartProject *pp, TPartInspection *pi)
Security SecurityInspection
Definition ProjectModule.h:53
const gmi::AxesCoord & GetSystemPosition(ESystemPosition sp) const
bool InitializeProjects()
void GetProjects(const QString &part, QStringList &projects)
const TProjects & GetOpenProjects() const
Definition ProjectModule.h:360
bool ProjectExists(const PartProject *pp) const
bool setInspectionDataDir(const QString &dir)
void GetInspectionParts(QStringList &parts)
QString GetInspectionDataFileName(const TPartInspection *pi, const std::string &scan_area, int file_index=-1) const
bool SetInspectionState(const TPartInspection *pi, const std::string &scan_area, EInspectionState is)
bool ScanExists(const QString &part, const QString &scan)
void Detach(ProjectData *)
QString GetSettingsDir(const QString &part) const
QString GetPartDirectory(const QString &part) const
bool ElementExists(const QString &element)
ECalibrationType GetInspectionCalType(const TPartInspection *pi, const std::string &scan_area) const
QString getInspectionDataDir()
std::string GetCalibrationSetSection(ECalibrationType cal_type, const std::string &set_name)
bool CanInitializeProjects()
bool IsBackupAvailable() const
QString GetFilterPath(const PartProject *part_project) const
bool GetMaterialVelocity(const QString &material, bool shear, double &value)
QString GetInspectionFileDir(const TPartInspection *part_inspection)
IniEnvelope GetInspectionIni(const TPartInspection *pi)
bool PartExists(const QString &part) const
bool ControllerAllocate(const QString &allocator)
void DestroyServers()
Destroys the all servers. Is normally called by the destructor.
bool GetReportTemplates(QStringList &strings)
bool SelectProjectPart(PartProject *part_project)
bool GetInspectionScanAreaInfo(const TPartInspection *pi, const std::string &scan_area, KeyValues &info)
EInspectionState GetInspectionState(const TPartInspection *pi, const std::string &scan_area) const
IniEnvelope GetMaterialIni(const QString &material)
bool GetElementPicture(const QString &element, QImage &picture)
std::string GetInspectionAnalysisIniSection(const std::string &scan_area, const std::string &name) const
IniEnvelope GetProjectCalibIni(const PartProject *part_proj)
bool SetInspectionDataFileName(const TPartInspection *pi, const std::string &scan_area, const QString &filename)
RsaServer * GetAcquisitionServer(int index)
bool SelectProjectPart(QString &part)
bool GetInspectionAnalysisEntries(const TPartInspection *pi, const std::string &scan_area, strings &names) const
bool GetInspectionGeneralInfo(const TPartInspection *pi, KeyValues &info)
int GetUsageCount()
Definition ProjectModule.h:413
bool GetSystemPosition(ESystemPosition sp, gmi::AxesCoord &ac) const
bool EditMaterial(const QString &material)
std::string GetConfigCalibrationSetSection() const
bool GetProjectCalibSetValues(const PartProject *part_proj, ECalibrationType cal_type, const std::string &set_name, KeyValues &values)
bool SetAnalysisInfo(const TPartInspection *pi, const std::string &scan_area, const std::string &name, const KeyValues &info)
bool SetInspectionComment(const TPartInspection *pi, const std::string &scan_area, const std::string &comment)
bool setProjectDataDir(const QString &dir)
QString getProjectDataDir()
bool GetInspectionCustomInfo(const TPartInspection *pi, KeyValues &info)
QString GetInspectionComment(const TPartInspection *pi, const std::string &scan_area) const
QString GetTemplateDir() const
void RegisterToolEditor(TAddProjectPropertyPage editor)
~ProjectModule() override
Virtual Destructor.
QStringList GetProjectParts()
bool InspectionExists(const QString &part, const QString &serial, const QString &dts) const
void Attach(ProjectData *)
bool GenerateReport(ProjectData *data)
bool SetInspectionCalibSetValues(const TPartInspection *pi, ECalibrationType cal_type, const std::string &set_name, const KeyValues &values)
bool SetInspectionUser(const TPartInspection *pi, const std::string &scan_area, const std::string &username, const QDateTime &datetime)
bool IsInspectionFinalized(const TPartInspection *part_inspection) const
bool IsProjectDirValid()
bool GetFilterListGlobal() const
StorageInterface * GetStorage()
Definition ProjectModule.h:392
void GetScanTemplates(QStringList &names) const
bool InspectionExists(const TPartInspection *pi) const
IniEnvelope GetScanIni(const QString &part, const QString &scan)
bool MaterialExists(const QString &material)
IniEnvelope GetSettingsIni(const QString &part, const QString &settings_name)
bool SetSystemPosition(ESystemPosition sp, const gmi::AxesCoord &ac)
bool ControllerFree(const QString &allocator)
GmiServer * GetMotionServer()
QString GetInspectionFileSubDir(const TPartInspection *pi)
bool GetScanAreaExists(const QString &part, const QString &scan)
bool SetMaterialVelocity(const QString &material, double longitudinal_vel, double shear_vel)
bool FinalizeInspection(const TPartInspection *pi, bool reset=false)
bool SelectProject(PartProject *part_project)
QString GetConfigProfilePath() const
bool BackupInspection(const TPartInspection *part_inspection)
void GetElements(QStringList &elements) const
bool SetInspectionCustomInfo(const TPartInspection *pi, const KeyValues &info)
bool GetInspectionDataFileNames(const TPartInspection *pi, const std::string &scan_area, QStringList &names) const
bool ProjectExists(const QString &part, const QString &project) const
bool NewProjectPart(const QString &part)
bool SettingsExists(const QString &part, const QString &settings)
const RsaServer * GetAcquisitionServer(int index) const
QString GetInspectionUser(const TPartInspection *pi, const std::string &scan_area) const
QStringList GetProjects(const QString &part)
void GetProjectParts(QStringList &parts)
void HandlePropertyPage(QObject *sender)
IniEnvelope GetScanTemplateIni(const QString &name)
bool GetToolPicture(const QString &tool, QImage &picture)
QString GetScanStateIniPath(const QString &part, const QString &scan)
void GetPartProject(PartProject *pp, const TPartInspection *pi) const
int GetAcquisitionServerCount() const
Definition ProjectModule.h:383
void GetTools(QStringList &tools) const
IniEnvelope GetToolIni(const QString &tool)
void RegisterMaterialEditor(TAddProjectPropertyPage editor)
std::string GetInspectionAreaIniSection(const std::string &scan_area) const
bool HasReportGenerator()
bool EditElement(const QString &element)
bool ToolExists(const QString &tool)
ProjectData * GetActiveProject()
Security SecurityConfig
Definition ProjectModule.h:51
ProjectModule()
Default constructor.
bool GetAnalysisInfo(const TPartInspection *pi, const std::string &scan_area, const std::string &name, KeyValues &info) const
Dialog containing multiple property pages.
Definition qt/PropertySheetDialog.h:14
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
Definition PartInspection.h:11
Counted vector having additional methods and operators for ease of usage. This template class extends...
Definition TVector.h:20
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
bool(* TGenerateReportEvent)(ProjectData *data, QStringList *templates)
Type for registering the report generation event handler.
Definition ipj/iface/Namespace.h:215
EMaterialType
Enumerate type to identify a material.
Definition ipj/iface/Namespace.h:221
IniProfile::KeyValueMap KeyValues
Definition ipj/iface/Namespace.h:188
ESystemPosition
Fixed system dependent axis positions.
Definition ipj/iface/Namespace.h:297
@ spSYSPOS_LASTENTRY
Definition ipj/iface/Namespace.h:307
EInspectionState
States for results of an inspection.
Definition ipj/iface/Namespace.h:272
TStrings< std::string > strings
Vector of std::strings with additional functionality.
Definition TStrings.h:193
ECalibrationType
Type to identify a scan area type.
Definition ipj/iface/Namespace.h:247