Version: 8.3.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

Property type.

Enumerator
Length 
Area 
Volume 

Constructor & Destructor Documentation

SMESHGUI_BasicProperties::SMESHGUI_BasicProperties ( QWidget parent = 0)
SMESHGUI_BasicProperties::~SMESHGUI_BasicProperties ( )

Destructor.

Member Function Documentation

void SMESHGUI_BasicProperties::clear ( )
privateslot

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

References myResult.

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

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().

void SMESHGUI_BasicProperties::deactivate ( )

Deactivate widget.

References SMESHGUI::selectionMgr().

Referenced by SMESHGUI_MeasureDlg::deactivate().

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().

void SMESHGUI_BasicProperties::selectionChanged ( )
privateslot
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().

void SMESHGUI_BasicProperties::updateSelection ( )

Field Documentation

SUIT_SelectionFilter* SMESHGUI_BasicProperties::myFilter
private
QButtonGroup* SMESHGUI_BasicProperties::myMode
private
QLineEdit* SMESHGUI_BasicProperties::myResult
private
QGroupBox* SMESHGUI_BasicProperties::myResultGrp
private
QLineEdit* SMESHGUI_BasicProperties::mySource
private
SMESH::SMESH_IDSource_var SMESHGUI_BasicProperties::mySrc
private

Referenced by compute(), and selectionChanged().