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

◆ SourceList

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

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
ObjectsSrc 
NodesSrc 
ElementsSrc 

Constructor & Destructor Documentation

◆ SMESHGUI_BoundingBox()

SMESHGUI_BoundingBox::SMESHGUI_BoundingBox ( QWidget parent = 0)

◆ ~SMESHGUI_BoundingBox()

SMESHGUI_BoundingBox::~SMESHGUI_BoundingBox ( )

Destructor.

References erasePreview(), and myPreview.

Member Function Documentation

◆ clear

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

◆ compute

◆ createPreview()

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

◆ deactivate()

void SMESHGUI_BoundingBox::deactivate ( )

Deactivate widget.

References SMESHGUI::selectionMgr().

Referenced by SMESHGUI_MeasureDlg::deactivate().

◆ displayPreview()

void SMESHGUI_BoundingBox::displayPreview ( )
private

Display preview actor.

References SMESH::GetViewWindow(), and myPreview.

Referenced by compute().

◆ erasePreview()

void SMESHGUI_BoundingBox::erasePreview ( )

◆ selectionChanged

◆ sourceChanged

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

◆ sourceEdited

void SMESHGUI_BoundingBox::sourceEdited ( )
privateslot

Called when source mode is edited by the user.

References clear(), ElementsSrc, SMESH::GetViewWindow(), Handle(), myActor, myIDs, mySource, mySourceMode, and NodesSrc.

Referenced by SMESHGUI_BoundingBox(), and updateSelection().

◆ updateSelection()

void SMESHGUI_BoundingBox::updateSelection ( )

Field Documentation

◆ myActor

SMESH_Actor* SMESHGUI_BoundingBox::myActor
private

Referenced by selectionChanged(), and sourceEdited().

◆ myDX

QLineEdit* SMESHGUI_BoundingBox::myDX
private

◆ myDY

QLineEdit* SMESHGUI_BoundingBox::myDY
private

◆ myDZ

QLineEdit* SMESHGUI_BoundingBox::myDZ
private

◆ myFilter

SUIT_SelectionFilter* SMESHGUI_BoundingBox::myFilter
private

◆ myIDs

QString SMESHGUI_BoundingBox::myIDs
private

◆ myPreview

SALOME_Actor* SMESHGUI_BoundingBox::myPreview
private

◆ mySource

QLineEdit* SMESHGUI_BoundingBox::mySource
private

◆ mySourceMode

QButtonGroup* SMESHGUI_BoundingBox::mySourceMode
private

◆ mySrc

SourceList SMESHGUI_BoundingBox::mySrc
private

Referenced by compute(), and selectionChanged().

◆ myValidator

SMESHGUI_IdValidator* SMESHGUI_BoundingBox::myValidator
private

◆ myXmax

QLineEdit* SMESHGUI_BoundingBox::myXmax
private

◆ myXmin

QLineEdit* SMESHGUI_BoundingBox::myXmin
private

◆ myYmax

QLineEdit* SMESHGUI_BoundingBox::myYmax
private

◆ myYmin

QLineEdit* SMESHGUI_BoundingBox::myYmin
private

◆ myZmax

QLineEdit* SMESHGUI_BoundingBox::myZmax
private

◆ myZmin

QLineEdit* SMESHGUI_BoundingBox::myZmin
private