Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
ipj/iface/Namespace.h
Go to the documentation of this file.
1#pragma once
2#include <ipj/iface/global.h>
8
9namespace sf
10{
11class ProjectModule;
12
14
15// Tool and element default sections.
16// #define SEC_TE_SELECTED "Selected"
17constexpr std::string_view SEC_TE_SELECTED("Selected");
18// #define SEC_TE_SERIALS "Serial Numbers"
19constexpr std::string_view SEC_TE_SERIALS("Serial Numbers");
20// #define SEC_TE_INFO "Information"
21constexpr std::string_view SEC_TE_INFO("Information");
22
23// Material default sections and keys.
24// #define SEC_MAT_SOUNDVEL "Sound Velocity"
25constexpr std::string_view SEC_MAT_SOUNDVEL("Sound Velocity");
26// #define SEC_MAT_INFO "Information"
27constexpr std::string_view SEC_MAT_INFO("Information");
28// #define KEY_MAT_LONGITUDINAL "Longitudinal"
29constexpr std::string_view KEY_MAT_LONGITUDINAL("Longitudinal");
30// #define KEY_MAT_SHEAR "Shear"
31constexpr std::string_view KEY_MAT_SHEAR("Shear");
32// #define KEY_MAT_FORM "Form"
33constexpr std::string_view KEY_MAT_FORM("Form");
34// #define SUBDIR_PART "Part"
35constexpr std::string_view SUBDIR_PART("Part");
36// #define SUBDIR_TOOL "Tool"
37constexpr std::string_view SUBDIR_TOOL("Tool");
38// #define SUBDIR_ELEMENT "Element"
39constexpr std::string_view SUBDIR_ELEMENT("Element");
40// #define SUBDIR_MATERIAL "Material"
41constexpr std::string_view SUBDIR_MATERIAL("Material");
42// #define SUBDIR_SETTINGS "Settings"
43constexpr std::string_view SUBDIR_SETTINGS("Settings");
44// #define SUBDIR_TEMPLATE "Template"
45constexpr std::string_view SUBDIR_TEMPLATE("Template");
46
47// Extension used for project profiles.
48// #define EXT_PROJECT ".iprj"
49constexpr std::string_view EXT_PROJECT(".iprj");
50// Extension used for area scan files.
51// #define EXT_AREASCAN ".ascn"
52constexpr std::string_view EXT_AREASCAN(".ascn");
53// Extension used for area state files.
54// #define EXT_AREASTATE ".ascns"
55constexpr std::string_view EXT_AREASTATE(".ascns");
56// Extension used for element files.
57// #define EXT_ELEMENT ".elem"
58constexpr std::string_view EXT_ELEMENT(".elem");
59// Extension used for material files.
60// #define EXT_MATERIAL ".mater"
61constexpr std::string_view EXT_MATERIAL(".mater");
62// Extension used for settings files.
63// #define EXT_SETTINGS ".gisf"
64constexpr std::string_view EXT_SETTINGS(".gisf");
65// Extension used for filter files.
66// #define EXT_FILTERS ".fltr"
67constexpr std::string_view EXT_FILTERS(".fltr");
68// Extension used for tool files.
69// #define EXT_TOOL ".tool"
70constexpr std::string_view EXT_TOOL(".tool");
71// File name used for pictures of parts.
72// #define FILE_PICTURE "Picture.jpg"
73constexpr std::string_view FILE_PICTURE("picture.jpg");
74// Extension used for inspection profiles.
75// #define EXT_INSPECTION ".insp"
76constexpr std::string_view EXT_INSPECTION(".insp");
77// File name used for storing the inspection information.
78// #define FILE_INSPECTION "Inspection"
79constexpr std::string_view FILE_INSPECTION("Inspection");
80// File name and extension used in the part directory to store changing screen positions.
81// #define FILE_PARTSTATE "PartState"
82constexpr std::string_view FILE_PARTSTATE("PartState");
83// Extension used for part project calibration values.
84// #define EXT_CALIB ".calib"
85constexpr std::string_view EXT_CALIB(".calib");
86// Context string used in the set message boxes.
87// #define HLPCTX_SETUPFAIL "fail_setup_change"
88constexpr std::string_view HLPCTX_SETUPFAIL("fail_setup_change");
89// Special separator delimiters for project and inspection names.
90// #define PROJECT_NAME_DELIM "@"
91constexpr std::string_view PROJECT_NAME_DELIM("@");
92// #define PROJECT_FULL_DELIM "|"
93constexpr std::string_view PROJECT_FULL_DELIM("|");
94// #define INSPECT_SERIAL_DELIM ">"
95constexpr std::string_view INSPECT_SERIAL_DELIM(">");
96// #define INSPECT_DATETIME_DELIM "<"
97constexpr std::string_view INSPECT_DATETIME_DELIM("<");
98// Inspection ini file sections and keys.
99// #define SEC_INSP_GENERAL "General"
100constexpr std::string_view SEC_INSP_GENERAL("General");
101// #define SEC_INSP_CUSTOM "Custom"
102constexpr std::string_view SEC_INSP_CUSTOM("Custom");
103// #define SEC_INSP_ANALYSIS "Analysis"
104constexpr std::string_view SEC_INSP_ANALYSIS("Analysis");
105// #define SEC_INSP_AREA_PREFIX "ScanArea,"
106constexpr std::string_view SEC_INSP_AREA_PREFIX("ScanArea,");
107// #define SEC_INSP_CALIB "Calibration,"
108constexpr std::string_view SEC_INSP_CALIB("Calibration,");
109// #define KEY_INSP_SYSNAME "System Name"
110constexpr std::string_view KEY_INSP_SYSNAME("System Name");
111// #define KEY_INSP_SYSUSER "System User"
112constexpr std::string_view KEY_INSP_SYSUSER("System User");
113// #define KEY_INSP_APPUSER "Application User"
114constexpr std::string_view KEY_INSP_APPUSER("Application User");
115// #define KEY_INSP_SCANUSER "User Name"
116constexpr std::string_view KEY_INSP_SCANUSER("User Name");
117// #define KEY_INSP_DATETIME "Date Time"
118constexpr std::string_view KEY_INSP_DATETIME("Date Time");
119// #define KEY_INSP_PART "Part"
120constexpr std::string_view KEY_INSP_PART("Part");
121// #define KEY_INSP_PROJECT "Project"
122constexpr std::string_view KEY_INSP_PROJECT("Project");
123// #define KEY_INSP_SERIAL "Serial"
124constexpr std::string_view KEY_INSP_SERIAL("Serial");
125// #define KEY_INSP_STATE "State"
126constexpr std::string_view KEY_INSP_STATE("State");
127// #define KEY_INSP_CALTYPE "CalType"
128constexpr std::string_view KEY_INSP_CALTYPE("CalType");
129// #define KEY_INSP_COMMENT "Comment"
130constexpr std::string_view KEY_INSP_COMMENT("Comment");
131// #define KEY_INSP_DATAFILE "DataFile"
132constexpr std::string_view KEY_INSP_DATAFILE("DataFile");
133// #define KEY_INSP_FINALIZED "Finalized"
134constexpr std::string_view KEY_INSP_FINALIZED("Finalized");
135// #define KEY_INSP_FINALIZEDATE "Finalize Date"
136constexpr std::string_view KEY_INSP_FINALIZEDATE("Finalize Date");
137// #define KEY_INSP_FINALIZEUSER "Finalize User"
138constexpr std::string_view KEY_INSP_FINALIZEUSER("Finalize User");
139
140// Section and key for the system designation.
141// #define SEC_CFG_GENERAL "General"
142constexpr std::string_view SEC_CFG_GENERAL("General");
143// Designation key prefix
144// #define KEY_CFG_DESIG_PREFIX "Designation_"
145constexpr std::string_view KEY_CFG_DESIG_PREFIX("Designation_");
146// Global settings key.
147// #define KEY_CFG_SETTINGSGLOBAL "Settings Global"
148constexpr std::string_view KEY_CFG_SETTINGSGLOBAL("Settings Global");
149// Global filter key.
150// #define KEY_CFG_FILTERLISTGLOBAL "Filter List Global"
151constexpr std::string_view KEY_CFG_FILTERLISTGLOBAL("Filter List Global");
152// System positions profile section.
153// #define SEC_MOD_SYSPOS "System Positions"
154constexpr std::string_view SEC_MOD_SYSPOS("System Positions");
155
156// #define STR_VERSION "0.0"
157constexpr std::string_view STR_VERSION("0.0");
158// #define SEC_GENERAL "General"
159constexpr std::string_view SEC_GENERAL("General");
160// #define KEY_VERSION "Version"
161constexpr std::string_view KEY_VERSION("Version");
162// #define KEY_CREATED "Created At"
163constexpr std::string_view KEY_CREATED("Created At");
164// #define KEY_CREATOR "Created By"
165constexpr std::string_view KEY_CREATOR("Created By");
166// #define KEY_MODIFIED "Modify Date"
167constexpr std::string_view KEY_MODIFIED("Modify Date");
168// #define KEY_MODIFIER "Modify By"
169constexpr std::string_view KEY_MODIFIER("Modify By");
170// #define SEC_SCANS "Scans"
171constexpr std::string_view SEC_SCANS("Scans");
172// #define KEY_SCANCOUNT "Scan Count"
173constexpr std::string_view KEY_SCANCOUNT("Scan Count");
174// #define KEY_SCANAREA "Scan Area"
175constexpr std::string_view KEY_SCANAREA("Scan Area");
176// #define KEY_SCANMETHOD "Scan Method"
177constexpr std::string_view KEY_SCANMETHOD("Scan Method");
178// #define KEY_SCANBINDER "Scan Binder"
179constexpr std::string_view KEY_SCANBINDER("Scan Binder");
180// #define SEC_REPORT "Report"
181constexpr std::string_view SEC_REPORT("Report");
182// #define KEY_OPTIONS "Options"
183constexpr std::string_view KEY_OPTIONS("Options");
184// #define KEY_TEMPLATE "Template"
185constexpr std::string_view KEY_TEMPLATE("Template");
186
189
196QString GetFilteredString(const QString& str, const QString& filter);
197
204typedef bool (*TAddProjectPropertyPage)(PropertySheetDialog* sheet, const QString& ref_name);
205
206// Forward declaration.
207class ProjectData;
208
215typedef bool (*TGenerateReportEvent)(ProjectData* data, QStringList* templates);
216
231
237
241EMaterialType _IPJ_FUNC GetMaterialType(const QString& mat_type);
242
257
262
267
282
287
292
309
314
319
324
341
345typedef QFlags<EReportOption> ReportOptions;
346
351
356
361
366
370_IPJ_FUNC QString DateTimeToInspectStr(const QDateTime& dt);
371
375_IPJ_FUNC QDateTime InspectStrToDateTime(const QString& str);
376
381
385_IPJ_FUNC std::string compatCommaSepString(const std::string& str);
386
387}// namespace sf
388
389#include "mockup.h"
std::unordered_map< std::string, std::string > KeyValueMap
Type for retrieving key and values.
Definition IniProfile.h:275
Definition ProjectData.h:23
Singleton.
Definition ProjectModule.h:27
Dialog containing multiple property pages.
Definition qt/PropertySheetDialog.h:14
Envelope-letter type of smart pointers.
Definition TEnvelope.h:27
String list with optional object association and sorting.
Definition TStringList.h:12
#define _IPJ_FUNC
Definition ipj/iface/global.h:34
Definition Application.h:10
constexpr std::string_view KEY_MAT_SHEAR("Shear")
constexpr std::string_view KEY_INSP_DATETIME("Date Time")
constexpr std::string_view KEY_MODIFIER("Modify By")
constexpr std::string_view KEY_SCANBINDER("Scan Binder")
constexpr std::string_view SEC_TE_SERIALS("Serial Numbers")
constexpr std::string_view KEY_INSP_DATAFILE("DataFile")
constexpr std::string_view KEY_INSP_SYSUSER("System User")
constexpr std::string_view KEY_CFG_DESIG_PREFIX("Designation_")
_IPJ_FUNC QString GetInspectionStateName(EInspectionState)
Gets the passed inspection state as a name.
constexpr std::string_view KEY_MAT_FORM("Form")
QString _IPJ_FUNC GetMaterialTypeName(EMaterialType)
Gets the passed material type as a name.
constexpr std::string_view SEC_MAT_SOUNDVEL("Sound Velocity")
constexpr std::string_view KEY_INSP_SYSNAME("System Name")
constexpr std::string_view PROJECT_FULL_DELIM("|")
constexpr std::string_view SEC_MOD_SYSPOS("System Positions")
_IPJ_FUNC QString GetSystemPositionName(ESystemPosition sp)
Gets the passed system position name.
bool(* TGenerateReportEvent)(ProjectData *data, QStringList *templates)
Type for registering the report generation event handler.
Definition ipj/iface/Namespace.h:215
_IPJ_FUNC const char * GetProjectNameFilter()
Returns characters that are not allowed to appear in the names.
constexpr std::string_view KEY_INSP_FINALIZEUSER("Finalize User")
constexpr std::string_view SEC_INSP_CUSTOM("Custom")
TStringList< std::string > StringList
Definition ipj/iface/Namespace.h:13
constexpr std::string_view SEC_TE_INFO("Information")
_IPJ_FUNC ECalibrationType GetCalibrationType(const QString &cal_type)
Returns the passed calibration type name as enumerate value.
constexpr std::string_view SEC_INSP_GENERAL("General")
constexpr std::string_view SEC_INSP_CALIB("Calibration,")
constexpr std::string_view KEY_INSP_CALTYPE("CalType")
constexpr std::string_view KEY_OPTIONS("Options")
constexpr std::string_view INSPECT_SERIAL_DELIM(">")
constexpr std::string_view KEY_INSP_COMMENT("Comment")
constexpr std::string_view FILE_PICTURE("picture.jpg")
constexpr std::string_view KEY_INSP_SERIAL("Serial")
QString GetFilteredString(const QString &str, const QString &filter)
Filters a string removing all characters from the given filter string.
_IPJ_FUNC void GetReportOptionDescriptions(QStringList &strings)
Gets the description in a string list of the passed options.
constexpr std::string_view SEC_REPORT("Report")
constexpr std::string_view KEY_CFG_SETTINGSGLOBAL("Settings Global")
EReportOption
Final reporting options.
Definition ipj/iface/Namespace.h:329
@ roFILE
Definition ipj/iface/Namespace.h:331
@ roPRINT
Definition ipj/iface/Namespace.h:335
@ roVIEW
Definition ipj/iface/Namespace.h:333
@ roSHORTCUT
Definition ipj/iface/Namespace.h:337
@ roSEND
Definition ipj/iface/Namespace.h:339
constexpr std::string_view FILE_PARTSTATE("PartState")
constexpr std::string_view EXT_AREASTATE(".ascns")
constexpr std::string_view KEY_MAT_LONGITUDINAL("Longitudinal")
constexpr std::string_view KEY_CREATED("Created At")
EMaterialType
Enumerate type to identify a material.
Definition ipj/iface/Namespace.h:221
@ mtMAT_SOLID
Definition ipj/iface/Namespace.h:227
@ mtMAT_LIQUID
Definition ipj/iface/Namespace.h:225
@ mtMAT_GAS
Definition ipj/iface/Namespace.h:229
@ mtMAT_ALL
Definition ipj/iface/Namespace.h:223
_IPJ_FUNC QDateTime InspectStrToDateTime(const QString &str)
Converts an inspection date time string into a QDateTime value.
constexpr std::string_view SEC_SCANS("Scans")
constexpr std::string_view SUBDIR_PART("Part")
constexpr std::string_view KEY_TEMPLATE("Template")
constexpr std::string_view SEC_INSP_ANALYSIS("Analysis")
constexpr std::string_view SUBDIR_ELEMENT("Element")
constexpr std::string_view SEC_CFG_GENERAL("General")
IniProfile::KeyValueMap KeyValues
Definition ipj/iface/Namespace.h:188
constexpr std::string_view EXT_AREASCAN(".ascn")
constexpr std::string_view EXT_MATERIAL(".mater")
_IPJ_FUNC void destroyProjectModule()
Deletes the project module if it was created.
constexpr std::string_view KEY_SCANAREA("Scan Area")
constexpr std::string_view KEY_INSP_PART("Part")
ESystemPosition
Fixed system dependent axis positions.
Definition ipj/iface/Namespace.h:297
@ spSYSPOS_LASTENTRY
Definition ipj/iface/Namespace.h:307
@ spSYSPOS_LOAD
Definition ipj/iface/Namespace.h:303
@ spSYSPOS_NONE
Definition ipj/iface/Namespace.h:299
@ spSYSPOS_PARK
Definition ipj/iface/Namespace.h:301
@ spSYSPOS_TOOL
Definition ipj/iface/Namespace.h:305
_IPJ_FUNC std::string compatCommaSepString(const std::string &str)
Gets a '(' and ')' wrapped string when the given string is not.
constexpr std::string_view KEY_MODIFIED("Modify Date")
constexpr std::string_view STR_VERSION("0.0")
constexpr std::string_view FILE_INSPECTION("Inspection")
_IPJ_FUNC QString GetCalibrationTypeName(ECalibrationType)
Returns the passed calibration type as a name.
_IPJ_FUNC ProjectModule * getProjectModule()
Creates the project module when called for.
constexpr std::string_view EXT_SETTINGS(".gisf")
_IPJ_FUNC EInspectionState GetInspectionState(const QString &state_name)
Gets the passed inspection state name as enumerate value.
constexpr std::string_view SUBDIR_TOOL("Tool")
constexpr std::string_view EXT_ELEMENT(".elem")
constexpr std::string_view KEY_INSP_STATE("State")
constexpr std::string_view EXT_FILTERS(".fltr")
constexpr std::string_view KEY_INSP_FINALIZED("Finalized")
constexpr std::string_view KEY_SCANMETHOD("Scan Method")
constexpr std::string_view KEY_INSP_PROJECT("Project")
constexpr std::string_view KEY_INSP_APPUSER("Application User")
constexpr std::string_view KEY_SCANCOUNT("Scan Count")
constexpr std::string_view EXT_CALIB(".calib")
constexpr std::string_view HLPCTX_SETUPFAIL("fail_setup_change")
TEnvelope< IniProfile > IniEnvelope
Definition ipj/iface/Namespace.h:187
constexpr std::string_view EXT_INSPECTION(".insp")
EInspectionState
States for results of an inspection.
Definition ipj/iface/Namespace.h:272
@ isACCEPTED
Definition ipj/iface/Namespace.h:276
@ isUNKNOWN
Definition ipj/iface/Namespace.h:274
@ isLASTENTRY
Definition ipj/iface/Namespace.h:280
@ isREJECTED
Definition ipj/iface/Namespace.h:278
constexpr std::string_view KEY_CFG_FILTERLISTGLOBAL("Filter List Global")
constexpr std::string_view PROJECT_NAME_DELIM("@")
constexpr std::string_view SEC_INSP_AREA_PREFIX("ScanArea,")
constexpr std::string_view EXT_PROJECT(".iprj")
constexpr std::string_view SEC_GENERAL("General")
constexpr std::string_view KEY_INSP_SCANUSER("User Name")
TStrings< std::string > strings
Vector of std::strings with additional functionality.
Definition TStrings.h:193
_IPJ_FUNC QString DateTimeToInspectStr(const QDateTime &dt)
Converts a TDateTime to an inspection date time string.
constexpr std::string_view INSPECT_DATETIME_DELIM("<")
EMaterialType _IPJ_FUNC GetMaterialType(const QString &mat_type)
Gets the passed calibration type name as enumerate value.
bool(* TAddProjectPropertyPage)(PropertySheetDialog *sheet, const QString &ref_name)
Type for registering tool and element editor property pages.
Definition ipj/iface/Namespace.h:204
constexpr std::string_view SUBDIR_MATERIAL("Material")
QFlags< EReportOption > ReportOptions
Reporting option flags.
Definition ipj/iface/Namespace.h:345
_IPJ_FUNC QString GetSystemPositionInfo(ESystemPosition sp)
Gets the current scan inspection state converted from the passed name.
_MISC_FUNC std::string filter(std::string str, const std::string &filter)
Filters all characters from the passed string and returns the resulting string.
constexpr std::string_view KEY_CREATOR("Created By")
constexpr std::string_view KEY_VERSION("Version")
_IPJ_FUNC QString GetReportOptionDescription(EReportOption ro)
Gets the option description of the passed style.
constexpr std::string_view SUBDIR_TEMPLATE("Template")
ECalibrationType
Type to identify a scan area type.
Definition ipj/iface/Namespace.h:247
@ ctCAL_NONE
Definition ipj/iface/Namespace.h:249
@ ctCAL_PRE
Definition ipj/iface/Namespace.h:251
@ ctCAL_LASTENTRY
Definition ipj/iface/Namespace.h:255
@ ctCAL_POST
Definition ipj/iface/Namespace.h:253
constexpr std::string_view KEY_INSP_FINALIZEDATE("Finalize Date")
constexpr std::string_view SUBDIR_SETTINGS("Settings")
constexpr std::string_view SEC_MAT_INFO("Information")
constexpr std::string_view SEC_TE_SELECTED("Selected")
_IPJ_FUNC ESystemPosition GetSystemPositionFromName(const QString &sp)
Gets the system position from the name.
constexpr std::string_view EXT_TOOL(".tool")