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 setViewerParent (QWidget *widget)
 Sets the parent for scan method viewer instances.
 
void updateViewerTitle ()
 Sets the title on the viewer parent reflecting the current selected area.
 
QWidget * getViewerParent ()
 Gets the parent for scan method viewer instances.
 
ProjectDatagetProjectData ()
 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

◆ getProjectData()

ProjectData * sf::ProjectWidget::getProjectData ( )

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.

◆ getViewerParent()

QWidget * sf::ProjectWidget::getViewerParent ( )

Gets the parent for scan method viewer instances.

◆ 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

◆ setSelectedIndex()

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

Sets the selected row index.

◆ setViewerParent()

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

Sets the parent for scan method viewer instances.

◆ 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.

◆ 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.

◆ updateTitle()

void sf::ProjectWidget::updateTitle ( )

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

◆ updateViewerTitle()

void sf::ProjectWidget::updateViewerTitle ( )

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


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