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

Manages all inspection project data. More...

#include <ProjectWidget.h>

Inheritance diagram for sf::ProjectWidget:
Collaboration diagram for sf::ProjectWidget:

Public Types

enum  EColumnField : int {
  cfArea = 0 , cfTool , cfElement , cfMaterial ,
  cfInspectionState , cfCalibrationSet , cfSettings , cfFilterConfig ,
  cfMethod , cfCommand , cfScanState , cfUsername ,
  cfDateTime , cfComment
}
 Enumeration of displayable scan-area information in the table. More...
 

Public Member Functions

 ProjectWidget (QWidget *parent)
 Default Qt constructor.
 
 ~ProjectWidget () override
 Overridden destructor.
 
void storeState (bool rd)
 Stores and restores the state of the widget.
 
void updateAreaViewerTitle ()
 Sets the title on the area viewer parent reflecting the current selected area.
 
void updateModelViewerTitle ()
 Sets the title on the model viewer parent reflecting the current selected area.
 
void setAreaViewerParent (QWidget *widget)
 Sets the parent for scan area viewer instances.
 
QWidget * getAreaViewerParent () const
 Gets the parent for scan area viewer instances.
 
void setModelViewer (ModelViewerWidget *widget)
 Sets the model viewer instance.
 
ModelViewerWidgetgetModelViewer () const
 Gets the parent for the model viewer instance.
 
ProjectDatagetProjectData () const
 Gets the project data associated with this widget.
 
bool isProjectActive () const
 Gets the active status of the project.
 
void updateTitle ()
 Updates the title of the widget to represent the selected project and inspection.
 
bool store (StoreProject::EAction action)
 Action to take on the project file.
 
void manageProjectData (bool create)
 Creates or destroys the project data instance. When created it sets some required information.
 
QColor getStateColor (bool background, int state)
 Gets the color associated with the project state.
 
void updateIndex (int index=-2, bool make_visible=false)
 Updates information of an entry in the scan area tree view and the status bar.
 
void updateCount ()
 Updates the entry count in the list.
 
int getSelectedIndex ()
 Gets the current selected row index.
 
void setSelectedIndex (int index)
 Sets the selected row index.
 

Detailed Description

Manages all inspection project data.

Member Enumeration Documentation

◆ EColumnField

Enumeration of displayable scan-area information in the table.

Enumerator
cfArea 

Name of the area to scan.

cfTool 

Tool extension on the element.

cfElement 

Ultrasonic or eddy-current element.

cfMaterial 

Type of inspected material.

cfInspectionState 

State of the inspection.

cfCalibrationSet 

Calibration-set selection. For ultrasonic type it depends on the inspection angle. For eddy-current it is a single one.

cfSettings 

Settings selection.

cfFilterConfig 

Configuration of analysis filters.

cfMethod 

Selected scan method.

cfCommand 

Command currently executed.

cfScanState 

State of the scan.

cfUsername 

User performing the scan. This can change during a long inspection.

cfDateTime 

Date and time of the inspected area.

cfComment 

Comment made about the area.

Constructor & Destructor Documentation

◆ ProjectWidget()

sf::ProjectWidget::ProjectWidget ( QWidget *  parent)
explicit

Default Qt constructor.

◆ ~ProjectWidget()

sf::ProjectWidget::~ProjectWidget ( )
override

Overridden destructor.

Member Function Documentation

◆ getAreaViewerParent()

QWidget * sf::ProjectWidget::getAreaViewerParent ( ) const

Gets the parent for scan area viewer instances.

◆ getModelViewer()

ModelViewerWidget * sf::ProjectWidget::getModelViewer ( ) const

Gets the parent for the model viewer instance.

◆ getProjectData()

ProjectData * sf::ProjectWidget::getProjectData ( ) const

Gets the project data associated with this widget.

◆ getSelectedIndex()

int sf::ProjectWidget::getSelectedIndex ( )

Gets the current selected row index.

◆ getStateColor()

QColor sf::ProjectWidget::getStateColor ( bool  background,
int  state 
)

Gets the color associated with the project state.

Parameters
backgroundTrue for background and false for foreground color.
stateThe project state.
Returns
Color.

◆ isProjectActive()

bool sf::ProjectWidget::isProjectActive ( ) const

Gets the active status of the project.

Returns
True when active.

◆ manageProjectData()

void sf::ProjectWidget::manageProjectData ( bool  create)

Creates or destroys the project data instance. When created it sets some required information.

Parameters
create

◆ setAreaViewerParent()

void sf::ProjectWidget::setAreaViewerParent ( QWidget *  widget)

Sets the parent for scan area viewer instances.

◆ setModelViewer()

void sf::ProjectWidget::setModelViewer ( ModelViewerWidget widget)

Sets the model viewer instance.

◆ setSelectedIndex()

void sf::ProjectWidget::setSelectedIndex ( int  index)

Sets the selected row index.

◆ store()

bool sf::ProjectWidget::store ( StoreProject::EAction  action)

Action to take on the project file.

Parameters
actionWhat to do.
Returns
True when action resulted in a reaction.

◆ storeState()

void sf::ProjectWidget::storeState ( bool  rd)

Stores and restores the state of the widget.

◆ updateAreaViewerTitle()

void sf::ProjectWidget::updateAreaViewerTitle ( )

Sets the title on the area viewer parent reflecting the current selected area.

◆ updateCount()

void sf::ProjectWidget::updateCount ( )

Updates the entry count in the list.

◆ updateIndex()

void sf::ProjectWidget::updateIndex ( int  index = -2,
bool  make_visible = false 
)

Updates information of an entry in the scan area tree view and the status bar.

Parameters
indexRow to update. The default (-2) updates all.
make_visibleWhen a single row is updated it is made visible.

◆ updateModelViewerTitle()

void sf::ProjectWidget::updateModelViewerTitle ( )

Sets the title on the model viewer parent reflecting the current selected area.

◆ updateTitle()

void sf::ProjectWidget::updateTitle ( )

Updates the title of the widget to represent the selected project and inspection.


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