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

#include <ProjectData.h>

Inheritance diagram for sf::ProjectData:
Collaboration diagram for sf::ProjectData:

Public Types

enum  EState {
  psNONE , psABORTED , psERROR , psDISABLED ,
  psUNINITIALIZED , psINITIALIZING , psINITIALIZED , psINITFAILED ,
  psREADY , psPREPARING , psPREPARED , psTOOLCHANGING ,
  psTOOLCHANGED , psAPPROACHING , psAPPROACHED , psCHECKING ,
  psCHECKED , psSCANNING , psSCANNED , psDATASAVING ,
  psDATASAVED , psEVALUATING , psEVALUATED , psREPORTING ,
  psREPORTED , psRETREATING , psRETREATED , psFINISHING ,
  psFINISHED , psSUSPENDING , psSUSPENDED , psSTOPPING ,
  psSTOPPED , psMOVING , psMOVED , psRESETTING ,
  psRESUMING , psACCOMMODATING , psACCOMMODATED , psLASTENTRY
}
 Project states in the machine. More...
 
- Public Types inherited from sf::ScriptObject
enum  EIdentifier {
  idUnknown = 0 , idConstant , idVariable , idFunction ,
  idTypedef , idKeyword
}
 Keyword identifiers. More...
 
typedef std::string::size_type pos_type
 Source position type.
 
typedef ssize_t ip_type
 Instruction pointer type.
 

Public Member Functions

 ProjectData ()
 Default constructor.
 
 ~ProjectData () override
 Virtual overridden destructor.
 
void debug ()
 Just for development and debugging.
 
void addPropertyPages (PropertySheetDialog *sheet)
 Adds the project property pages to the given property sheet.
 
void addModulePropertyPages (PropertySheetDialog *sheet)
 Add the module property pages from this project to the given property sheet.
 
bool read (std::istream &is)
 Reads the project from the stream.
 
bool write (std::ostream &os)
 Writes the project information to the output stream.
 
bool isValidPart ()
 Check if the part this project data is referring to is valid.
 
void createFrame (QWidget *parent)
 Creates the frame and sets the parent. When the frame exists this function is ignored.
 
void destroyFrame ()
 Destroys the frame.
 
void setFrameSaveState (bool rd)
 Stores the frames state.
 
QString getStateName ()
 Gets the name of the current state the project is in.
 
ScanEntryaddScan ()
 Gets pointer to a new created scan entry instance.
 
bool initialize ()
 Initializes or reinitializes the project binder and all its scans.
 
bool start (unsigned index)
 Start scanning at specified index in the list of scans.
 
bool evaluate (unsigned index, int file_index=-1)
 Starts evaluating.
 
bool moveToSysPos (ESystemPosition sp)
 Makes the manipulator move to a predefined system position.
 
bool moveToQuery (int scan)
 
bool moveTo (int scan, int index, double frac=0.0, bool rect=false)
 
bool activate (unsigned index)
 Activates the scan method. This makes the mode exports its variables. Only one scan method is activated at a time.
 
bool suspend ()
 Tries to signal the current scan to hold.
 
bool stop ()
 Signals a stops to the current active scan method.
 
bool abort ()
 Aborts the current active scan method immediately.
 
bool rotate (int scan_entry)
 Starts rotating the scan axis if possible.
 
bool isRotating ()
 Checks iof the rotating axis is rotating currently.
 
bool finalize (int lock=0)
 Finalizes the project so it is locked for changes. When lock is non-zero regardless force is used. When lock is -1 the inspection is unlocked and 1 to lock.
 
bool isFinalized () const
 Checks if the project is finalized.
 
bool canInitialize ()
 Checks if it is possible to 'Initialize' at the current time.
 
bool canStart (int scan_entry)
 Checks if it is possible to 'Start' at the current time.
 
bool canStop ()
 Checks if it is possible to 'Stop' at the current time.
 
bool canAbort ()
 Checks if it is possible to 'Abort' at the current time.
 
bool canSuspend ()
 Checks if it is possible to 'Suspend' at the current time.
 
bool canRotate (int scan_entry)
 Checks if it is possible to 'Rotate' at the current time.
 
bool canEvaluate (int scan_entry)
 Checks if it is possible to 'Evaluate' at the current time.
 
bool canFinalize (int lock=0)
 Checks if it is possible to 'finalize' at the current time. When lock is non-zero regardless force is used.
 
bool canMoveTo ()
 Checks if the MoveTo function can be executed successfully.
 
void clear ()
 Clears the all scan entries of the current project.
 
IniEnvelope GetScanIni (QString scan_area)
 Gets an ini file descendant with information about the scan area configuration.
 
ConfigStore GetPartStateIni ()
 Gets an ini file descendant with screen position information.
 
bool isScanArea (const QString &name)
 Gets if the given scan area name exists.
 
void removeScan (unsigned index)
 Removes the scan at the given index.
 
void moveScan (unsigned src, unsigned dest)
 Moves the scan area in the list from the given source to a destination index.
 
void swapScan (unsigned idx1, unsigned idx2)
 Swaps to scan entries in the list between the 3 given indices.
 
int indexOf (ScanEntry *) const
 Gets the index in the scan entry in the list.
 
int getScanListIndex (const ScanMethod *sm) const
 Gets scan method entry index in the scan list.
 
bool disableProject (bool disable)
 Disables or enables project when other is running.
 
bool storeFilterList (bool rd)
 Read or writes the filter list file.
 
const TCalibrationSetsgetCalibrationSets ()
 Gets the calibration sets.
 
bool shouldWaitForEvent ()
 Allows state machines to wait for a user event .
 
ScanEntrygetActiveScan ()
 Gets the active scan.
 
int getActiveScanIndex ()
 Gets the active scan entry index.
 
int getSelectedScanIndex ()
 Gets the selected scan entry index.
 
ScanEntrygetSelectedScan ()
 Gets the selected scan entry pointer.
 
double getScanProgress ()
 Gets the progress of the current active scan.
 
QString getScanBinderName ()
 Gets current scan-binder name.
 
void setScanBinderName (const QString &name)
 Sets scan-binder name and so change the implementation.
 
ScanBinderGetScanBinder ()
 Gets the Scan binder derived instance pointer of the implementation.
 
InformationTypes::id_type getScanMethodIdOffset ()
 Gets the scan method id-offset for derived scan methods. Scan methods use the id-offset to determine the actual ids.
 
InformationTypes::id_type getScanBinderIdOffset ()
 Gets the scan method ID offset for the derived scan binder. The scan binder uses the id-offset to determine the actual ids.
 
std::string getNamePrefix ()
 Gets the name prefix of the exported parameters.
 
QString getErrorText ()
 Gets the last error text set.
 
QWidget * getScanFrameParent ()
 Gets the parent for each scan area frame.
 
void setScanFrameParent (QWidget *parent)
 Sets the parent for the scan methods frame.
 
DataFilterList * getFilterList ()
 Gets the selected or used filter list. (same as global for now)
 
QString getMediumName ()
 Gets the medium name of the project like 'water'.
 
void SetReportOptions (ReportOptions options)
 Sets the report options of the project.
 
ReportOptions getReportOptions ()
 Gets the report options of the project.
 
QString getReportTemplate ()
 Gets the report template file.
 
void setReportTemplate (const QString &templ)
 Sets thew report template file.
 
void setPartProject (const PartProject *part_project)
 Assigment clears the scan list and sets the part name. This must be done before this instance can be used. Otherwise, the class cannot locate its resources.
 
PartProjectgetPartProject () const
 Gets the part-project pointer of the current project.
 
void setPartInspection (const TPartInspection *part_inspection)
 Sets the part-inspection of this project.
 
TPartInspectiongetPartInspection () const
 Gets the part-inspection of this project.
 
QWidget * getFrame ()
 Gets the projects frame.
 
ScanEntrygetScan (ssize_t index)
 Gets the scan entry pointer of the given index.
 
ssize_t getScanCount ()
 Gets the amount of scans in the current scan plan list.
 
EState GetState ()
 Gets the current state of the project data state machine.
 
QString GetStateName (int state)
 Gets the state-machines's name of the given state.
 
QString getPart () const
 Gets the part name of the loaded project.
 
void setDirty (bool tf=true)
 Set or resets the dirty flag. Calls attached method of the onDirty closure. When dirty the project can be saved.
 
bool isDirty () const
 Get the dirty flag.
 
ssize_t getScanMethodCount ()
 Gets the amount of available scan methods.
 
std::string getScanMethodName (ssize_t index)
 Gets the name of scan method at the given index.
 
TProjectFrame * GetProjectFrame ()
 Casts the FFrame pointer to a TProjectFrame.
 
const ConfigStoregetConfigStore () const
 Gets a fresh copy of the config store.
 
- Public Member Functions inherited from sf::ProjectScriptObject
 ProjectScriptObject (const char *type_name)
 Constructor.
 
 ~ProjectScriptObject () override
 Virtual overridden destructor.
 
void AddScriptParam (const std::string &name, Variable *variable)
 Adds the passed variable as a parameter in the script.
 
- Public Member Functions inherited from sf::ScriptObject
 ScriptObject (const char *type_name, ScriptObject *parent=nullptr)
 
virtual ~ScriptObject ()=default
 Virtual destructor which can be overloaded to clean up objects.
 
virtual std::string getStatusText ()
 Gets the status text of this object for debugging purposes.
 
int getRefCount () const
 Gets the reference count.
 
 operator Value () const
 Cast operator to be able to return this instance as a Value.
 
std::string getTypeName () const
 Returns the type name Set at the constructor.
 
ScriptObjectgetParent ()
 Gets the script object owner.
 
const ScriptObjectgetParent () const
 Gets the script object owner.
 
ScriptObjectcastToObject (const Value &value)
 Casts a sf::Value::vitCustom typed sf::Value to a ScriptObject typed pointer.
 

Public Attributes

TClosure< void, void * > onDirty
 Closure method to notify changes on the dirty flag. The attached handler is called when a scan of the project has been modified.
 

Protected Member Functions

bool sustain (const timespec &t)
 Handler set using the _sustainEntry.
 
bool process (const timespec &ts)
 Called from sustain.
 
bool setError (const QString &error_text)
 Sets the error state and the SetState function to set the psERROR state. Called from process() to allow immediate returns.
 
bool setState (EState state)
 Sets the new state.
 
void attach (ScanEntry *entry)
 Called from ScanEntry instance to attach itself to this project.
 
void detach (ScanEntry *entry)
 Called from ScanEntry instance to detach itself to this project.
 
bool storeProfile (IniProfile &ini_profile, bool rd)
 Reads or writes all project data to or from the given ini-profile instance.
 
void storeConfig (bool rd)
 Reads or writes the module configuration information.
 
bool initializeScans ()
 Initializes all scan methods.
 
const IdInfogetInfo (const std::string &name) const override
 Overridden from base class ProjectScriptObject.
 
bool getSetValue (const IdInfo *info, Value *value, Value::vector_type *params, bool flag_set) override
 Overridden from base class ProjectScriptObject.
 
bool startDataSaving ()
 Initiates the start of storing data.
 
bool isDataSavingReady () const
 Checks is saving data is completed.
 
- Protected Member Functions inherited from sf::ProjectScriptObject
const IdInfogetInfo (const std::string &name) const override
 Overridden from base class.
 
bool getSetValue (const IdInfo *info, Value *value, Value::vector_type *params, bool flag_set) override
 Overridden from base class.
 
void destroyObject (bool &should_delete) override
 Overridden from base class.
 
- Protected Member Functions inherited from sf::ScriptObject
void makeParent (ScriptObject *so)
 Makes this object the owner of the other object.
 
void setParent (ScriptObject *parent)
 Sets the owner to the pass script object.
 

Protected Attributes

TSustain< ProjectData_sustainEntry
 Hooks the sustain function into the sustain interface.
 

Friends

class ScanEntry
 
class ProjectDataPropertyPage
 
class InformationVariables::DataCursor
 

Additional Inherited Members

- Static Public Member Functions inherited from sf::ScriptObject
static const IdInfogetInfoUnknown ()
 Returns the static Info structure for unknowns.
 

Member Enumeration Documentation

◆ EState

Project states in the machine.

Enumerator
psNONE 

Used to indicate it was not set.

Project is aborted project.

psABORTED 

Error occurred somewhere down the line.

psERROR 

When another project is running.

psDISABLED 

Start of the state at project creation.

psUNINITIALIZED 

Initializing scan methods.

psINITIALIZING 

Initializing scan methods succeeded.

psINITIALIZED 

Project failed to initialize.

psINITFAILED 

Project is ready for action.

psREADY 

Prepare project for next scan area.

psPREPARING 

Project is prepared for next scan area.

psPREPARED 

Project is moving to the tool change tool position.

psTOOLCHANGING 
psTOOLCHANGED 

Binder is approaching to scan start position.

psAPPROACHING 
psAPPROACHED 

Scan method is in check positions mode.

psCHECKING 
psCHECKED 

Scan method is scanning.

psSCANNING 
psSCANNED 

Scan data is being saved.

psDATASAVING 

Scan data has been saved.

psDATASAVED 

Scan method is evaluating.

psEVALUATING 
psEVALUATED 

Scan method is reporting.

psREPORTING 

finished reporting.

psREPORTED 

Binder is retreating from stop position.

psRETREATING 
psRETREATED 

Project is finishing on the scan area.

psFINISHING 
psFINISHED 

Project is waiting for scan to go into suspend state.

psSUSPENDING 

Project is suspend.

psSUSPENDED 

Project is stopping prematurely.

psSTOPPING 
psSTOPPED 

Project is doing a system move.

psMOVING 
psMOVED 

Resetting the manipulator and scan binder.

psRESETTING 

Project is trying to resume from a stop.

psRESUMING 

Project is moving to the to a programmed system position.

psACCOMMODATING 

Project arrived at the programmed system position.

psACCOMMODATED 
psLASTENTRY 

Constructor & Destructor Documentation

◆ ProjectData()

sf::ProjectData::ProjectData ( )

Default constructor.

◆ ~ProjectData()

sf::ProjectData::~ProjectData ( )
override

Virtual overridden destructor.

Member Function Documentation

◆ abort()

bool sf::ProjectData::abort ( )

Aborts the current active scan method immediately.

◆ activate()

bool sf::ProjectData::activate ( unsigned  index)

Activates the scan method. This makes the mode exports its variables. Only one scan method is activated at a time.

Parameters
index
Returns

◆ addModulePropertyPages()

void sf::ProjectData::addModulePropertyPages ( PropertySheetDialog sheet)

Add the module property pages from this project to the given property sheet.

◆ addPropertyPages()

void sf::ProjectData::addPropertyPages ( PropertySheetDialog sheet)

Adds the project property pages to the given property sheet.

◆ addScan()

ScanEntry * sf::ProjectData::addScan ( )

Gets pointer to a new created scan entry instance.

Returns

◆ attach()

void sf::ProjectData::attach ( ScanEntry entry)
protected

Called from ScanEntry instance to attach itself to this project.

Parameters
entryScan entry.

◆ canAbort()

bool sf::ProjectData::canAbort ( )

Checks if it is possible to 'Abort' at the current time.

Returns
True when it can.

◆ canEvaluate()

bool sf::ProjectData::canEvaluate ( int  scan_entry)

Checks if it is possible to 'Evaluate' at the current time.

Returns
True when it can.

◆ canFinalize()

bool sf::ProjectData::canFinalize ( int  lock = 0)

Checks if it is possible to 'finalize' at the current time. When lock is non-zero regardless force is used.

Returns
True when it can.

◆ canInitialize()

bool sf::ProjectData::canInitialize ( )

Checks if it is possible to 'Initialize' at the current time.

Returns
True when it can.

◆ canMoveTo()

bool sf::ProjectData::canMoveTo ( )

Checks if the MoveTo function can be executed successfully.

Returns
True when allowed.

◆ canRotate()

bool sf::ProjectData::canRotate ( int  scan_entry)

Checks if it is possible to 'Rotate' at the current time.

Returns
True when it can.

◆ canStart()

bool sf::ProjectData::canStart ( int  scan_entry)

Checks if it is possible to 'Start' at the current time.

Returns
True when it can.

◆ canStop()

bool sf::ProjectData::canStop ( )

Checks if it is possible to 'Stop' at the current time.

Returns
True when it can.

◆ canSuspend()

bool sf::ProjectData::canSuspend ( )

Checks if it is possible to 'Suspend' at the current time.

Returns
True when it can.

◆ clear()

void sf::ProjectData::clear ( )

Clears the all scan entries of the current project.

◆ createFrame()

void sf::ProjectData::createFrame ( QWidget *  parent)

Creates the frame and sets the parent. When the frame exists this function is ignored.

Parameters
parent

◆ debug()

void sf::ProjectData::debug ( )

Just for development and debugging.

◆ destroyFrame()

void sf::ProjectData::destroyFrame ( )

Destroys the frame.

◆ detach()

void sf::ProjectData::detach ( ScanEntry entry)
protected

Called from ScanEntry instance to detach itself to this project.

Parameters
entryScan entry.

◆ disableProject()

bool sf::ProjectData::disableProject ( bool  disable)

Disables or enables project when other is running.

Parameters
disableSet true to disable.
Returns
True when successful.

◆ evaluate()

bool sf::ProjectData::evaluate ( unsigned  index,
int  file_index = -1 
)

Starts evaluating.

Parameters
index
file_index
Returns

◆ finalize()

bool sf::ProjectData::finalize ( int  lock = 0)

Finalizes the project so it is locked for changes. When lock is non-zero regardless force is used. When lock is -1 the inspection is unlocked and 1 to lock.

Parameters
lock
Returns
True on success.

◆ getActiveScan()

ScanEntry * sf::ProjectData::getActiveScan ( )
inline

Gets the active scan.

Returns
nullptr when not active.

◆ getActiveScanIndex()

int sf::ProjectData::getActiveScanIndex ( )
inline

Gets the active scan entry index.

Returns
-1 when not active.

◆ getCalibrationSets()

const TCalibrationSets & sf::ProjectData::getCalibrationSets ( )
inline

Gets the calibration sets.

◆ getConfigStore()

const ConfigStore & sf::ProjectData::getConfigStore ( ) const

Gets a fresh copy of the config store.

◆ getErrorText()

QString sf::ProjectData::getErrorText ( )

Gets the last error text set.

◆ getFilterList()

DataFilterList * sf::ProjectData::getFilterList ( )

Gets the selected or used filter list. (same as global for now)

◆ getFrame()

QWidget * sf::ProjectData::getFrame ( )

Gets the projects frame.

Returns
When it does not it returns nullptr.

◆ getInfo()

const IdInfo * sf::ProjectData::getInfo ( const std::string &  name) const
overrideprotectedvirtual

Overridden from base class ProjectScriptObject.

Implements sf::ScriptObject.

◆ getMediumName()

QString sf::ProjectData::getMediumName ( )

Gets the medium name of the project like 'water'.

◆ getNamePrefix()

std::string sf::ProjectData::getNamePrefix ( )

Gets the name prefix of the exported parameters.

◆ getPart()

QString sf::ProjectData::getPart ( ) const
inline

Gets the part name of the loaded project.

◆ getPartInspection()

TPartInspection * sf::ProjectData::getPartInspection ( ) const

Gets the part-inspection of this project.

◆ getPartProject()

PartProject * sf::ProjectData::getPartProject ( ) const

Gets the part-project pointer of the current project.

◆ GetPartStateIni()

ConfigStore sf::ProjectData::GetPartStateIni ( )

Gets an ini file descendant with screen position information.

Returns

◆ GetProjectFrame()

TProjectFrame * sf::ProjectData::GetProjectFrame ( )

Casts the FFrame pointer to a TProjectFrame.

◆ getReportOptions()

ReportOptions sf::ProjectData::getReportOptions ( )

Gets the report options of the project.

◆ getReportTemplate()

QString sf::ProjectData::getReportTemplate ( )

Gets the report template file.

◆ getScan()

ScanEntry * sf::ProjectData::getScan ( ssize_t  index)
inline

Gets the scan entry pointer of the given index.

Parameters
indexIndex to retrieve.
Returns
Scan entry pointer.

◆ GetScanBinder()

ScanBinder * sf::ProjectData::GetScanBinder ( )

Gets the Scan binder derived instance pointer of the implementation.

◆ getScanBinderIdOffset()

InformationTypes::id_type sf::ProjectData::getScanBinderIdOffset ( )

Gets the scan method ID offset for the derived scan binder. The scan binder uses the id-offset to determine the actual ids.

◆ getScanBinderName()

QString sf::ProjectData::getScanBinderName ( )

Gets current scan-binder name.

◆ getScanCount()

ssize_t sf::ProjectData::getScanCount ( )

Gets the amount of scans in the current scan plan list.

◆ getScanFrameParent()

QWidget * sf::ProjectData::getScanFrameParent ( )

Gets the parent for each scan area frame.

◆ GetScanIni()

IniEnvelope sf::ProjectData::GetScanIni ( QString  scan_area)

Gets an ini file descendant with information about the scan area configuration.

Parameters
scan_area
Returns
Wrapper.

◆ getScanListIndex()

int sf::ProjectData::getScanListIndex ( const ScanMethod sm) const

Gets scan method entry index in the scan list.

Parameters
smScan method pointer to find.
Returns
-1 when not found.

◆ getScanMethodCount()

ssize_t sf::ProjectData::getScanMethodCount ( )

Gets the amount of available scan methods.

◆ getScanMethodIdOffset()

InformationTypes::id_type sf::ProjectData::getScanMethodIdOffset ( )

Gets the scan method id-offset for derived scan methods. Scan methods use the id-offset to determine the actual ids.

◆ getScanMethodName()

std::string sf::ProjectData::getScanMethodName ( ssize_t  index)

Gets the name of scan method at the given index.

Parameters
indexScan method list index.
Returns
Name of the scan method.

◆ getScanProgress()

double sf::ProjectData::getScanProgress ( )

Gets the progress of the current active scan.

Returns
Number between 0-1000 and when not active -1.

◆ getSelectedScan()

ScanEntry * sf::ProjectData::getSelectedScan ( )
inline

Gets the selected scan entry pointer.

Returns
nullptr when not active.

◆ getSelectedScanIndex()

int sf::ProjectData::getSelectedScanIndex ( )

Gets the selected scan entry index.

Returns
-1 if none is selected.

◆ getSetValue()

bool sf::ProjectData::getSetValue ( const IdInfo info,
Value value,
Value::vector_type params,
bool  flag_set 
)
overrideprotectedvirtual

Overridden from base class ProjectScriptObject.

Implements sf::ScriptObject.

◆ GetState()

ProjectData::EState sf::ProjectData::GetState ( )
inline

Gets the current state of the project data state machine.

◆ getStateName()

QString sf::ProjectData::getStateName ( )
inline

Gets the name of the current state the project is in.

◆ GetStateName()

QString sf::ProjectData::GetStateName ( int  state)

Gets the state-machines's name of the given state.

◆ indexOf()

int sf::ProjectData::indexOf ( ScanEntry ) const

Gets the index in the scan entry in the list.

Returns
-1 when not found.

◆ initialize()

bool sf::ProjectData::initialize ( )

Initializes or reinitializes the project binder and all its scans.

◆ initializeScans()

bool sf::ProjectData::initializeScans ( )
protected

Initializes all scan methods.

Returns
True when it succeeded to initialize all entries.

◆ isDataSavingReady()

bool sf::ProjectData::isDataSavingReady ( ) const
protected

Checks is saving data is completed.

Returns
True when done.

◆ isDirty()

bool sf::ProjectData::isDirty ( ) const

Get the dirty flag.

Returns
True when dirty.

◆ isFinalized()

bool sf::ProjectData::isFinalized ( ) const

Checks if the project is finalized.

Returns
True when finalized.

◆ isRotating()

bool sf::ProjectData::isRotating ( )

Checks iof the rotating axis is rotating currently.

Returns
True when rotating.

◆ isScanArea()

bool sf::ProjectData::isScanArea ( const QString &  name)

Gets if the given scan area name exists.

Parameters
nameName of the scan area.
Returns
True when it exists.

◆ isValidPart()

bool sf::ProjectData::isValidPart ( )

Check if the part this project data is referring to is valid.

◆ moveScan()

void sf::ProjectData::moveScan ( unsigned  src,
unsigned  dest 
)

Moves the scan area in the list from the given source to a destination index.

Parameters
srcSource index.
destDestination index.

◆ moveTo()

bool sf::ProjectData::moveTo ( int  scan,
int  index,
double  frac = 0.0,
bool  rect = false 
)

◆ moveToQuery()

bool sf::ProjectData::moveToQuery ( int  scan)

◆ moveToSysPos()

bool sf::ProjectData::moveToSysPos ( ESystemPosition  sp)

Makes the manipulator move to a predefined system position.

Parameters
spDesignated system position.
Returns
true on success to execute.

◆ process()

bool sf::ProjectData::process ( const timespec &  ts)
protected

Called from sustain.

Parameters
tsCurrent time.
Returns
False when an error occurred.

◆ read()

bool sf::ProjectData::read ( std::istream &  is)

Reads the project from the stream.

Parameters
is
Returns
True on success.

◆ removeScan()

void sf::ProjectData::removeScan ( unsigned  index)

Removes the scan at the given index.

Parameters
indexScan index in the list.

◆ rotate()

bool sf::ProjectData::rotate ( int  scan_entry)

Starts rotating the scan axis if possible.

Parameters
scan_entry

◆ setDirty()

void sf::ProjectData::setDirty ( bool  tf = true)

Set or resets the dirty flag. Calls attached method of the onDirty closure. When dirty the project can be saved.

Parameters
tfDefault is true.

◆ setError()

bool sf::ProjectData::setError ( const QString &  error_text)
protected

Sets the error state and the SetState function to set the psERROR state. Called from process() to allow immediate returns.

Parameters
error_textError text.
Returns
Always false.

◆ setFrameSaveState()

void sf::ProjectData::setFrameSaveState ( bool  rd)

Stores the frames state.

Parameters
rd

◆ setPartInspection()

void sf::ProjectData::setPartInspection ( const TPartInspection part_inspection)

Sets the part-inspection of this project.

◆ setPartProject()

void sf::ProjectData::setPartProject ( const PartProject part_project)

Assigment clears the scan list and sets the part name. This must be done before this instance can be used. Otherwise, the class cannot locate its resources.

Parameters
part_project

◆ SetReportOptions()

void sf::ProjectData::SetReportOptions ( ReportOptions  options)

Sets the report options of the project.

Parameters
options

◆ setReportTemplate()

void sf::ProjectData::setReportTemplate ( const QString &  templ)

Sets thew report template file.

Parameters
templ

◆ setScanBinderName()

void sf::ProjectData::setScanBinderName ( const QString &  name)

Sets scan-binder name and so change the implementation.

Parameters
name

◆ setScanFrameParent()

void sf::ProjectData::setScanFrameParent ( QWidget *  parent)
inline

Sets the parent for the scan methods frame.

Parameters
parent

◆ setState()

bool sf::ProjectData::setState ( EState  state)
protected

Sets the new state.

Parameters
stateNew state.
Returns
True if the state was set successfully.

◆ shouldWaitForEvent()

bool sf::ProjectData::shouldWaitForEvent ( )

Allows state machines to wait for a user event .

Returns
True when to wait for it.

◆ start()

bool sf::ProjectData::start ( unsigned  index)

Start scanning at specified index in the list of scans.

Parameters
index
Returns
true if the state allows it.

◆ startDataSaving()

bool sf::ProjectData::startDataSaving ( )
protected

Initiates the start of storing data.

Returns
True when successful.

◆ stop()

bool sf::ProjectData::stop ( )

Signals a stops to the current active scan method.

◆ storeConfig()

void sf::ProjectData::storeConfig ( bool  rd)
protected

Reads or writes the module configuration information.

Parameters
rdTrue to read and false to write.

◆ storeFilterList()

bool sf::ProjectData::storeFilterList ( bool  rd)

Read or writes the filter list file.

Parameters
rdTrue to read, false to write.
Returns
True on successful.

◆ storeProfile()

bool sf::ProjectData::storeProfile ( IniProfile ini_profile,
bool  rd 
)
protected

Reads or writes all project data to or from the given ini-profile instance.

Parameters
ini_profile
rdTrue to read and false to write.
Returns
True on success.

◆ suspend()

bool sf::ProjectData::suspend ( )

Tries to signal the current scan to hold.

Returns
true if the current active scan method supported the function and if it successfully signaled the scan method process.

◆ sustain()

bool sf::ProjectData::sustain ( const timespec &  t)
protected

Handler set using the _sustainEntry.

Parameters
tCurrent time.
Returns
True when it needs to be called again.

◆ swapScan()

void sf::ProjectData::swapScan ( unsigned  idx1,
unsigned  idx2 
)

Swaps to scan entries in the list between the 3 given indices.

Parameters
idx1Index 1
idx2Index 2

◆ write()

bool sf::ProjectData::write ( std::ostream &  os)

Writes the project information to the output stream.

Parameters
os
Returns

Friends And Related Symbol Documentation

◆ InformationVariables::DataCursor

friend class InformationVariables::DataCursor
friend

◆ ProjectDataPropertyPage

friend class ProjectDataPropertyPage
friend

◆ ScanEntry

friend class ScanEntry
friend

Member Data Documentation

◆ _sustainEntry

TSustain<ProjectData> sf::ProjectData::_sustainEntry
protected

Hooks the sustain function into the sustain interface.

◆ onDirty

TClosure<void, void*> sf::ProjectData::onDirty

Closure method to notify changes on the dirty flag. The attached handler is called when a scan of the project has been modified.


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