basic properties measurement widget. More...
#include <SMESHGUI_Measurements.h>
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 |
QGroupBox * | myResultGrp |
QLineEdit * | myResult |
SMESH::SMESH_IDSource_var | mySrc |
SUIT_SelectionFilter * | myFilter |
basic properties measurement widget.
Widget to calculate length, area or volume for the selected object(s).
SMESHGUI_BasicProperties::SMESHGUI_BasicProperties | ( | QWidget * | parent = 0 | ) |
Constructor.
parent | parent widget |
References Area, compute(), SMESH::GROUP, Length, SMESH_LogicalFilter::LO_OR, SMESH::MESHorSUBMESH, modeChanged(), myFilter, myMode, myResult, myResultGrp, mySource, setMode(), and Volume.
SMESHGUI_BasicProperties::~SMESHGUI_BasicProperties | ( | ) |
Destructor.
|
privateslot |
Reset the widget to the initial state (nullify the result field)
References myResult.
Referenced by compute(), modeChanged(), and selectionChanged().
|
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().
|
privateslot |
Called when the measurement mode selection is changed.
theMode | the selected mode |
References Area, clear(), Length, myResultGrp, and Volume.
Referenced by setMode(), and SMESHGUI_BasicProperties().
|
privateslot |
Called when selection is changed.
References clear(), SMESH::GetNameOfSelectedIObjects(), Handle(), mySource, mySrc, SMESHGUI_SelectionOp::selected(), and SMESHGUI::selectionMgr().
Referenced by updateSelection().
void SMESHGUI_BasicProperties::setMode | ( | const Mode | theMode | ) |
Sets the measurement mode.
theMode | the 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 | ( | ) |
Setup the selection mode.
References SMESH::GetViewWindow(), myFilter, mySource, selectionChanged(), SMESHGUI::selectionMgr(), and SMESH::SetPointRepresentation().
Referenced by SMESHGUI_MeasureDlg::updateSelection().
|
private |
Referenced by SMESHGUI_BasicProperties(), and updateSelection().
|
private |
Referenced by compute(), setMode(), and SMESHGUI_BasicProperties().
|
private |
Referenced by clear(), compute(), and SMESHGUI_BasicProperties().
|
private |
Referenced by modeChanged(), and SMESHGUI_BasicProperties().
|
private |
Referenced by selectionChanged(), SMESHGUI_BasicProperties(), and updateSelection().
|
private |
Referenced by compute(), and selectionChanged().