Bounding box measurement widget. More...
#include <SMESHGUI_Measurements.h>
Public Member Functions | |
SMESHGUI_BoundingBox (QWidget *=0) | |
Constructor. More... | |
~SMESHGUI_BoundingBox () | |
Destructor. More... | |
void | updateSelection () |
Setup selection mode depending on the current widget state. More... | |
void | deactivate () |
Deactivate widget. More... | |
void | erasePreview () |
Erase preview actor. More... | |
Private Types | |
enum | { ObjectsSrc, NodesSrc, ElementsSrc } |
typedef QList < SMESH::SMESH_IDSource_var > | SourceList |
Private Slots | |
void | selectionChanged () |
Called when selection is changed. More... | |
void | sourceChanged () |
Called when source mode is changed by the user. More... | |
void | sourceEdited () |
Called when source mode is edited by the user. More... | |
void | compute () |
Calculate bounding box of the selected object(s) More... | |
void | clear () |
Reset the widget to the initial state (nullify result fields) More... | |
Private Member Functions | |
void | displayPreview () |
Display preview actor. More... | |
void | createPreview (double, double, double, double, double, double) |
Create preview actor. More... | |
Private Attributes | |
QButtonGroup * | mySourceMode |
QLineEdit * | mySource |
QLineEdit * | myXmin |
QLineEdit * | myXmax |
QLineEdit * | myDX |
QLineEdit * | myYmin |
QLineEdit * | myYmax |
QLineEdit * | myDY |
QLineEdit * | myZmin |
QLineEdit * | myZmax |
QLineEdit * | myDZ |
SourceList | mySrc |
SMESH_Actor * | myActor |
SMESHGUI_IdValidator * | myValidator |
QString | myIDs |
SUIT_SelectionFilter * | myFilter |
SALOME_Actor * | myPreview |
Bounding box measurement widget.
Widget to calculate bounding box of the selected object(s).
|
private |
SMESHGUI_BoundingBox::SMESHGUI_BoundingBox | ( | QWidget * | parent = 0 | ) |
Constructor.
parent | parent widget |
References clear(), compute(), ElementsSrc, SMESH::GROUP, SMESH_LogicalFilter::LO_OR, SMESH::MESHorSUBMESH, myDX, myDY, myDZ, myFilter, mySource, mySourceMode, myValidator, myXmax, myXmin, myYmax, myYmin, myZmax, myZmin, NodesSrc, ObjectsSrc, sourceChanged(), and sourceEdited().
SMESHGUI_BoundingBox::~SMESHGUI_BoundingBox | ( | ) |
Destructor.
References erasePreview(), and myPreview.
|
privateslot |
Reset the widget to the initial state (nullify result fields)
References erasePreview(), myDX, myDY, myDZ, myXmax, myXmin, myYmax, myYmin, myZmax, and myZmin.
Referenced by compute(), selectionChanged(), SMESHGUI_BoundingBox(), sourceChanged(), and sourceEdited().
|
privateslot |
Calculate bounding box of the selected object(s)
References clear(), createPreview(), displayPreview(), ElementsSrc, erasePreview(), SMESH::FACE, SMESHGUI::GetSMESHGen(), SMESH::Measure::maxX, SMESH::Measure::maxY, SMESH::Measure::maxZ, me, SMESH::Measure::minX, SMESH::Measure::minY, SMESH::Measure::minZ, myDX, myDY, myDZ, myIDs, mySourceMode, mySrc, myXmax, myXmin, myYmax, myYmin, myZmax, myZmin, SMESH::NODE, NodesSrc, and SMESHGUI::resourceMgr().
Referenced by SMESHGUI_BoundingBox().
|
private |
Create preview actor.
minX | min X coordinate of bounding box |
maxX | max X coordinate of bounding box |
minY | min Y coordinate of bounding box |
maxY | max Y coordinate of bounding box |
minZ | min Z coordinate of bounding box |
maxZ | max Z coordinate of bounding box |
References myPreview.
Referenced by compute().
void SMESHGUI_BoundingBox::deactivate | ( | ) |
Deactivate widget.
References SMESHGUI::selectionMgr().
Referenced by SMESHGUI_MeasureDlg::deactivate().
|
private |
void SMESHGUI_BoundingBox::erasePreview | ( | ) |
Erase preview actor.
References SMESH::GetViewWindow(), and myPreview.
Referenced by clear(), compute(), SMESHGUI_MeasureDlg::updateSelection(), and ~SMESHGUI_BoundingBox().
|
privateslot |
Called when selection is changed.
References clear(), SMESH::FindActorByEntry(), SMESH::GetNameOfSelectedElements(), SMESH::GetNameOfSelectedIObjects(), SMESH::GetNameOfSelectedNodes(), SMESH::GetViewWindow(), Handle(), myActor, myIDs, mySource, mySourceMode, mySrc, myValidator, NodesSrc, ObjectsSrc, SMESHGUI_SelectionOp::selected(), SMESHGUI::selectionMgr(), and SMESHGUI_SelectionOp::selector().
Referenced by updateSelection().
|
privateslot |
Called when source mode is changed by the user.
References clear(), myIDs, mySource, mySourceMode, myValidator, ObjectsSrc, and updateSelection().
Referenced by SMESHGUI_BoundingBox().
|
privateslot |
Called when source mode is edited by the user.
References clear(), ElementsSrc, SMESH::GetViewWindow(), Handle(), myActor, myIDs, mySource, mySourceMode, NodesSrc, and SMESHGUI_SelectionOp::selector().
Referenced by SMESHGUI_BoundingBox(), and updateSelection().
void SMESHGUI_BoundingBox::updateSelection | ( | ) |
Setup selection mode depending on the current widget state.
References ElementsSrc, SMESH::GetViewWindow(), myFilter, mySource, mySourceMode, NodesSrc, ObjectsSrc, selectionChanged(), SMESHGUI::selectionMgr(), SMESH::SetPointRepresentation(), and sourceEdited().
Referenced by sourceChanged(), and SMESHGUI_MeasureDlg::updateSelection().
|
private |
Referenced by selectionChanged(), and sourceEdited().
|
private |
Referenced by clear(), compute(), and SMESHGUI_BoundingBox().
|
private |
Referenced by clear(), compute(), and SMESHGUI_BoundingBox().
|
private |
Referenced by clear(), compute(), and SMESHGUI_BoundingBox().
|
private |
Referenced by SMESHGUI_BoundingBox(), and updateSelection().
|
private |
Referenced by compute(), selectionChanged(), sourceChanged(), and sourceEdited().
|
private |
Referenced by createPreview(), displayPreview(), erasePreview(), and ~SMESHGUI_BoundingBox().
|
private |
Referenced by selectionChanged(), SMESHGUI_BoundingBox(), sourceChanged(), sourceEdited(), and updateSelection().
|
private |
Referenced by compute(), selectionChanged(), SMESHGUI_BoundingBox(), sourceChanged(), sourceEdited(), and updateSelection().
|
private |
Referenced by compute(), and selectionChanged().
|
private |
Referenced by selectionChanged(), SMESHGUI_BoundingBox(), and sourceChanged().
|
private |
Referenced by clear(), compute(), and SMESHGUI_BoundingBox().
|
private |
Referenced by clear(), compute(), and SMESHGUI_BoundingBox().
|
private |
Referenced by clear(), compute(), and SMESHGUI_BoundingBox().
|
private |
Referenced by clear(), compute(), and SMESHGUI_BoundingBox().
|
private |
Referenced by clear(), compute(), and SMESHGUI_BoundingBox().
|
private |
Referenced by clear(), compute(), and SMESHGUI_BoundingBox().