Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
ScanEntry.h
Go to the documentation of this file.
1#pragma once
5
6namespace sf
7{
8
9class ProjectData;
10
11class ScanEntry : public QObject
12{
13 protected:
17 explicit ScanEntry(ProjectData* prj_data);
18
19 public:
23 ~ScanEntry() override;
24
28 QString getDataFileName();
29
34
38 QString getScanArea();
39
43 void setScanMethodName(const QString& name);
44
48 QString setScanMethodName() const;
49
53 QString setScanMethodCommand() const;
54
59
64
68 QString getScanStateName() const;
69
74
78 QString getInspectionStateName() const;
79
83 void setInspectionComment(QString cmt);
84
88 QString getInspectionComment() const;
89
93 QString getInspectionUserName() const;
94
98 QString getInspectionDateTimeStr() const;
99
103 void setInspectionDataFileName(QString filename);
104
109
114
118 void setScanArea(const QString& name);
119
124
130
134 bool calibSettings(bool assign);
135
140
146
152 bool openDataFile(int file_index = -1) const;
153
158
163
169 bool assignSelected(bool use_tpl);
170
171 protected:
177
183
189
196
203
209 void storeInspectionInfo(bool rd, bool force = false);
210
216
217 private:
219 QString _scanMethodName;
221 ProjectData* _projectData;
223 ScanMethod* _scanMethod;
225 QString _scanArea;
227 ScanMethod::EState _scanState;
229 EInspectionState _inspectionState;
231 void* _binderData;
233 QString _dataFileName;
235 QString _inspectionComment;
237 QString _inspectionUserName;
239 QString _inspectionDateTimeStr;
240
241 friend ProjectData;
242 friend ScanBinder;
243};
244
246{
247 return _dataFileName;
248}
249
251{
252 return _scanMethod;
253}
254
256{
257 return _scanArea;
258}
259
261{
262 return sf::GetInspectionStateName(_inspectionState);
263}
264
266{
267 return _inspectionState;
268}
269
270}// namespace sf
Class for reading and writing ini-profiles.
Definition IniProfile.h:17
Keeps the project and all scan areas to inspect.
Definition ProjectData.h:25
Abstract base class for implementing scan binders.
Definition ScanBinder.h:30
Definition ScanEntry.h:12
void loadMethodSettings(const IniEnvelope &ini)
Loads the settings from the scan area file in to the scan method.
QString getInspectionDataFileName() const
Gets the inspection data filename in the inspection profile.
bool readProfile(IniProfile &ini)
Reads all scan entry data from the profile passed.
bool createScanFrame()
Creates the scan frame in the project frame if possible and available.
void saveMethodSettings(IniEnvelope ini)
Saves the settings in the scan area file from the scan method.
QString getInspectionComment() const
Gets the current scan inspection comment from the inspection profile.
void setInspectionState(EInspectionState is)
Sets the current scan inspection state and writes it to the inspection profile.
QString getInspectionStateName() const
Gets the current scan inspection state name.
Definition ScanEntry.h:260
QString getScanStateName() const
Gets the current scan states name.
QString getInspectionUserName() const
Gets the user who made this scan.
bool calibSettings(bool assign)
Copy only the calibration parameters specified by this entry when it is a pre- or post-calibration sc...
void setScanArea(const QString &name)
Loads a new area scan file with a scan method.
void setInspectionDataFileName(QString filename)
Sets the current inspection data filename from the inspection profile.
QString getScanArea()
Gets the name of the area.
Definition ScanEntry.h:255
bool showViewer()
Shows this single scan method frame and hides all others.
void showCalibSettings()
Shows the calibrated settings of this entry.
ScanMethod::EState getScanState() const
Gets the current scan state.
~ScanEntry() override
Virtual overridden destructor.
bool assignSelected(bool use_tpl)
Assigns the settings from a existing scan-area or from a selected.
QString getInspectionDateTimeStr() const
Gets the time and date the user made this scan.
void storeInspectionInfo(bool rd, bool force=false)
Updates the inspection information fields or updates the inspection file.
bool updateInspectionInfo()
Updates the cached version of the inspection information.
QString getScanMethodCalibrationSet() const
Gets the calibration set name of the scan method.
ScanEntry(ProjectData *prj_data)
Protected constructor to prevent creation by others then ProjectData.
bool writeProfile(IniProfile &ini)
Writes all scan entry data to the profile and returns true on succes.
void assignIni(IniEnvelope &ini)
Makes a copy of the settings passed scan ini file.
bool writeAnalysisInfo()
Writes the filter analysis information to the inspection database.
QString getDataFileName()
Gets the filename of the inspection data file.
Definition ScanEntry.h:245
void setScanMethodName(const QString &name)
Sets the scan method.
ScanMethod * getScanMethod()
Gets the selected scan method pointer.
Definition ScanEntry.h:250
void assignEntry(ScanEntry *se)
Makes a copy of the other entry. Does not rename only settings are copied.
int editInspectionState()
Executes a dialog for modifying the inspection comment and state.
QString setScanMethodName() const
Gets the scan method name.
QString setScanMethodCommand() const
Gets the last scan method command.
EInspectionState getInspectionState() const
Gets the current scan inspection state.
Definition ScanEntry.h:265
void setInspectionComment(QString cmt)
Sets the current scan inspection comment and writes it to the inspection profile.
bool openDataFile(int file_index=-1) const
Opens the data file for this instance.
Definition ScanMethod.h:22
EState
States of operation.
Definition ScanMethod.h:408
Definition Application.h:10
_IPJ_FUNC QString GetInspectionStateName(EInspectionState)
Gets the passed inspection state as a name.
EInspectionState
States for results of an inspection.
Definition ipj/iface/Namespace.h:213