Version: 9.12.0
SMESHGUI_BasicProperties Class Reference

basic properties measurement widget. More...

#include <SMESHGUI_Measurements.h>

Inheritance diagram for SMESHGUI_BasicProperties:

Public Types

enum  Mode { Length , Area , Volume }
 Property type. More...
 

Public Member Functions

 SMESHGUI_BasicProperties (QWidget *=0)
 Constructor. More...
 
 ~SMESHGUI_BasicProperties ()
 Destructor. More...
 
void setMode (const Mode)
 Sets the measurement mode. More...
 
void updateSelection ()
 Setup the selection mode. More...
 
void deactivate ()
 Deactivate widget. More...
 

Private Slots

void selectionChanged ()
 Called when selection is changed. More...
 
void modeChanged (int)
 Called when the measurement mode selection is changed. More...
 
void compute ()
 Calculate length, area or volume for the selected object(s) More...
 
void clear ()
 Reset the widget to the initial state (nullify the result field) More...
 

Private Attributes

QButtonGroup * myMode
 
QLineEdit * mySource
 
QGroupBoxmyResultGrp
 
QLineEdit * myResult
 
SMESH::SMESH_IDSource_var mySrc
 
SUIT_SelectionFiltermyFilter
 

Detailed Description

basic properties measurement widget.

Widget to calculate length, area or volume for the selected object(s).

Member Enumeration Documentation

◆ Mode

Property type.

Enumerator
Length 
Area 
Volume 

Constructor & Destructor Documentation

◆ SMESHGUI_BasicProperties()

SMESHGUI_BasicProperties::SMESHGUI_BasicProperties ( QWidget parent = 0)

◆ ~SMESHGUI_BasicProperties()

SMESHGUI_BasicProperties::~SMESHGUI_BasicProperties ( )

Destructor.

Member Function Documentation

◆ clear

void SMESHGUI_BasicProperties::clear ( )
privateslot

Reset the widget to the initial state (nullify the result field)

References myResult.

Referenced by compute(), modeChanged(), and selectionChanged().

◆ compute

void SMESHGUI_BasicProperties::compute ( )
privateslot

Calculate length, area or volume for the selected object(s)

References Area, clear(), SMESHGUI::GetSMESHGen(), Length, myMode, myResult, mySrc, SMESHGUI::resourceMgr(), and Volume.

Referenced by SMESHGUI_BasicProperties().

◆ deactivate()

void SMESHGUI_BasicProperties::deactivate ( )

Deactivate widget.

References SMESHGUI::selectionMgr().

Referenced by SMESHGUI_MeasureDlg::deactivate().

◆ modeChanged

void SMESHGUI_BasicProperties::modeChanged ( int  theMode)
privateslot

Called when the measurement mode selection is changed.

Parameters
theModethe selected mode

References Area, clear(), Length, myResultGrp, and Volume.

Referenced by setMode(), and SMESHGUI_BasicProperties().

◆ selectionChanged

void SMESHGUI_BasicProperties::selectionChanged ( )
privateslot

Called when selection is changed.

References clear(), SMESH::GetNameOfSelectedIObjects(), Handle(), mySource, mySrc, and SMESHGUI::selectionMgr().

Referenced by updateSelection().

◆ setMode()

void SMESHGUI_BasicProperties::setMode ( const Mode  theMode)

Sets the measurement mode.

Parameters
theModethe mode to set (length, area or volume meausurement)

References modeChanged(), and myMode.

Referenced by SMESHGUI_BasicProperties(), and SMESHGUI_MeasureDlg::SMESHGUI_MeasureDlg().

◆ updateSelection()

void SMESHGUI_BasicProperties::updateSelection ( )

Field Documentation

◆ myFilter

SUIT_SelectionFilter* SMESHGUI_BasicProperties::myFilter
private

◆ myMode

QButtonGroup* SMESHGUI_BasicProperties::myMode
private

◆ myResult

QLineEdit* SMESHGUI_BasicProperties::myResult
private

◆ myResultGrp

QGroupBox* SMESHGUI_BasicProperties::myResultGrp
private

◆ mySource

QLineEdit* SMESHGUI_BasicProperties::mySource
private

◆ mySrc

SMESH::SMESH_IDSource_var SMESHGUI_BasicProperties::mySrc
private

Referenced by compute(), and selectionChanged().