Version: 8.3.0
SMESHGUI_BoundingBox Class Reference

Bounding box measurement widget. More...

#include <SMESHGUI_Measurements.h>

Inheritance diagram for SMESHGUI_BoundingBox:

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_ActormyActor
 
SMESHGUI_IdValidatormyValidator
 
QString myIDs
 
SUIT_SelectionFiltermyFilter
 
SALOME_ActormyPreview
 

Detailed Description

Bounding box measurement widget.

Widget to calculate bounding box of the selected object(s).

Member Typedef Documentation

typedef QList<SMESH::SMESH_IDSource_var> SMESHGUI_BoundingBox::SourceList
private

Member Enumeration Documentation

anonymous enum
private
Enumerator
ObjectsSrc 
NodesSrc 
ElementsSrc 

Constructor & Destructor Documentation

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

Destructor.

References erasePreview(), and myPreview.

Member Function Documentation

void SMESHGUI_BoundingBox::clear ( )
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().

void SMESHGUI_BoundingBox::createPreview ( double  minX,
double  maxX,
double  minY,
double  maxY,
double  minZ,
double  maxZ 
)
private

Create preview actor.

Parameters
minXmin X coordinate of bounding box
maxXmax X coordinate of bounding box
minYmin Y coordinate of bounding box
maxYmax Y coordinate of bounding box
minZmin Z coordinate of bounding box
maxZmax Z coordinate of bounding box

References myPreview.

Referenced by compute().

void SMESHGUI_BoundingBox::deactivate ( )

Deactivate widget.

References SMESHGUI::selectionMgr().

Referenced by SMESHGUI_MeasureDlg::deactivate().

void SMESHGUI_BoundingBox::displayPreview ( )
private

Display preview actor.

References SMESH::GetViewWindow(), and myPreview.

Referenced by compute().

void SMESHGUI_BoundingBox::erasePreview ( )
void SMESHGUI_BoundingBox::sourceChanged ( )
privateslot

Called when source mode is changed by the user.

References clear(), myIDs, mySource, mySourceMode, myValidator, ObjectsSrc, and updateSelection().

Referenced by SMESHGUI_BoundingBox().

void SMESHGUI_BoundingBox::sourceEdited ( )
privateslot
void SMESHGUI_BoundingBox::updateSelection ( )

Field Documentation

SMESH_Actor* SMESHGUI_BoundingBox::myActor
private

Referenced by selectionChanged(), and sourceEdited().

QLineEdit* SMESHGUI_BoundingBox::myDX
private
QLineEdit* SMESHGUI_BoundingBox::myDY
private
QLineEdit* SMESHGUI_BoundingBox::myDZ
private
SUIT_SelectionFilter* SMESHGUI_BoundingBox::myFilter
private
QString SMESHGUI_BoundingBox::myIDs
private
SALOME_Actor* SMESHGUI_BoundingBox::myPreview
private
QLineEdit* SMESHGUI_BoundingBox::mySource
private
QButtonGroup* SMESHGUI_BoundingBox::mySourceMode
private
SourceList SMESHGUI_BoundingBox::mySrc
private

Referenced by compute(), and selectionChanged().

SMESHGUI_IdValidator* SMESHGUI_BoundingBox::myValidator
private
QLineEdit* SMESHGUI_BoundingBox::myXmax
private
QLineEdit* SMESHGUI_BoundingBox::myXmin
private
QLineEdit* SMESHGUI_BoundingBox::myYmax
private
QLineEdit* SMESHGUI_BoundingBox::myYmin
private
QLineEdit* SMESHGUI_BoundingBox::myZmax
private
QLineEdit* SMESHGUI_BoundingBox::myZmin
private