Version: 9.12.0
StdMeshersGUI_SubShapeSelectorWdg Class Reference

#include <StdMeshersGUI_SubShapeSelectorWdg.h>

Inheritance diagram for StdMeshersGUI_SubShapeSelectorWdg:

Public Slots

void ActivateSelection (bool)
 Connect/disconnect to change of selection. More...
 
void deactivateSelection ()
 

Signals

void selectionChanged ()
 
void shapeSelected ()
 
void selectionActivated ()
 Emitted when selection is activated. More...
 

Public Member Functions

 StdMeshersGUI_SubShapeSelectorWdg (QWidget *parent=0, TopAbs_ShapeEnum subShType=TopAbs_EDGE, const bool toShowList=true, const bool toShowSelectBtn=false, const int minListWidth=300)
 Constructor. More...
 
 ~StdMeshersGUI_SubShapeSelectorWdg ()
 Destructor. More...
 
SMESH::long_array_var GetListOfIDs ()
 
bool SetListOfIDs (SMESH::long_array_var)
 
const QList< int > & GetSelectedIDs () const
 
void SetGeomShapeEntry (const QString &theEntry, const QString &theMainShapeEntry)
 
const char * GetMainShapeEntry ()
 
TopoDS_Shape GetGeomShape ()
 
TopoDS_Shape GetMainShape ()
 
QString GetValue () const
 
void ShowPreview (bool)
 Create a layout, initialize fields. More...
 
int GetListSize ()
 
void SetMaxSize (int aMaxSize)
 
vtkRenderer * GetRenderer ()
 
SMESH_PreviewActorsCollectionGetActorCollection ()
 
void ClearSelected ()
 Clears selected IDs. More...
 
void AvoidSimultaneousSelection (StdMeshersGUI_SubShapeSelectorWdg *other)
 Connect selection slots. More...
 

Static Public Member Functions

static GEOM::GEOM_Object_var GetGeomObjectByEntry (const QString &)
 
static TopoDS_Shape GetTopoDSByEntry (const QString &)
 

Private Slots

void onAdd ()
 
void onRemove ()
 
void onPrevious ()
 
void onNext ()
 
void selectionIntoArgument ()
 
void onListSelectionChanged ()
 

Private Member Functions

void updateState ()
 
void setFilter ()
 Install filters to select sub-shapes of mySubShType or their groups. More...
 
void updateButtons ()
 
void init ()
 Create a layout, initialize fields. More...
 

Private Attributes

SMESHGUImySMESHGUI
 
LightApp_SelectionMgr * mySelectionMgr
 
SVTK_Selector * mySelector
 
SMESH::SMESH_Mesh_var myMesh
 
TopoDS_Shape myGeomShape
 
TopoDS_Shape myMainShape
 
std::string myEntry
 
std::string myMainEntry
 
vtkRenderer * myRenderer
 
QListWidget * myListWidget
 
QPushButton * myActivateButton
 
QPushButton * myAddButton
 
QPushButton * myRemoveButton
 
QLabelmyInfoLabel
 
QPushButton * myPrevButton
 
QPushButton * myNextButton
 
QList< int > mySelectedIDs
 
QList< int > myListOfIDs
 
QString myParamValue
 
bool myIsShown
 
int myMaxSize
 
TopAbs_ShapeEnum mySubShType
 
SMESH_PreviewActorsCollectionmyPreviewActor
 
QList< SUIT_SelectionFilter * > myGeomFilters
 
SUIT_SelectionFiltermyFilter
 

Constructor & Destructor Documentation

◆ StdMeshersGUI_SubShapeSelectorWdg()

StdMeshersGUI_SubShapeSelectorWdg::StdMeshersGUI_SubShapeSelectorWdg ( QWidget parent = 0,
TopAbs_ShapeEnum  subShType = TopAbs_EDGE,
const bool  toShowList = true,
const bool  toShowSelectBtn = false,
const int  minListWidth = 300 
)

Constructor.

References SMESH::GetResourceMgr(), MARGIN, and SPACING.

◆ ~StdMeshersGUI_SubShapeSelectorWdg()

StdMeshersGUI_SubShapeSelectorWdg::~StdMeshersGUI_SubShapeSelectorWdg ( )

Member Function Documentation

◆ ActivateSelection

void StdMeshersGUI_SubShapeSelectorWdg::ActivateSelection ( bool  toActivate)
slot

Connect/disconnect to change of selection.

References myActivateButton, mySelectionMgr, selectionActivated(), selectionIntoArgument(), and ShowPreview().

Referenced by init().

◆ AvoidSimultaneousSelection()

void StdMeshersGUI_SubShapeSelectorWdg::AvoidSimultaneousSelection ( StdMeshersGUI_SubShapeSelectorWdg other)

Connect selection slots.

Parameters
other- another StdMeshersGUI_ObjectReferenceParamWdg

References deactivateSelection(), and selectionActivated().

◆ ClearSelected()

void StdMeshersGUI_SubShapeSelectorWdg::ClearSelected ( )

Clears selected IDs.

This is a workaround of a bug that SUIT_SelectionMgr::clearSelected() does not emit currentSelectionChanged

References mySelectedIDs, and selectionIntoArgument().

Referenced by StdMeshersGUI_PropagationHelperWdg::onAdd(), and StdMeshersGUI_PropagationHelperWdg::onListSelectionChanged().

◆ deactivateSelection

void StdMeshersGUI_SubShapeSelectorWdg::deactivateSelection ( )
slot

◆ GetActorCollection()

◆ GetGeomObjectByEntry()

GEOM::GEOM_Object_var StdMeshersGUI_SubShapeSelectorWdg::GetGeomObjectByEntry ( const QString &  theEntry)
static

◆ GetGeomShape()

TopoDS_Shape StdMeshersGUI_SubShapeSelectorWdg::GetGeomShape ( )

◆ GetListOfIDs()

◆ GetListSize()

int StdMeshersGUI_SubShapeSelectorWdg::GetListSize ( )

◆ GetMainShape()

TopoDS_Shape StdMeshersGUI_SubShapeSelectorWdg::GetMainShape ( )

◆ GetMainShapeEntry()

◆ GetRenderer()

vtkRenderer* StdMeshersGUI_SubShapeSelectorWdg::GetRenderer ( )

◆ GetSelectedIDs()

const QList<int>& StdMeshersGUI_SubShapeSelectorWdg::GetSelectedIDs ( ) const

◆ GetTopoDSByEntry()

TopoDS_Shape StdMeshersGUI_SubShapeSelectorWdg::GetTopoDSByEntry ( const QString &  theEntry)
static

References GetGeomObjectByEntry().

Referenced by SetGeomShapeEntry().

◆ GetValue()

QString StdMeshersGUI_SubShapeSelectorWdg::GetValue ( ) const

◆ init()

◆ onAdd

void StdMeshersGUI_SubShapeSelectorWdg::onAdd ( )
privateslot

◆ onListSelectionChanged

void StdMeshersGUI_SubShapeSelectorWdg::onListSelectionChanged ( )
privateslot

◆ onNext

void StdMeshersGUI_SubShapeSelectorWdg::onNext ( )
privateslot

◆ onPrevious

void StdMeshersGUI_SubShapeSelectorWdg::onPrevious ( )
privateslot

◆ onRemove

void StdMeshersGUI_SubShapeSelectorWdg::onRemove ( )
privateslot

◆ selectionActivated

void StdMeshersGUI_SubShapeSelectorWdg::selectionActivated ( )
signal

Emitted when selection is activated.

Useful to deactivate one Object Reference param widget when an other one is activated

Referenced by ActivateSelection(), and AvoidSimultaneousSelection().

◆ selectionChanged

void StdMeshersGUI_SubShapeSelectorWdg::selectionChanged ( )
signal

Referenced by onListSelectionChanged().

◆ selectionIntoArgument

◆ setFilter()

void StdMeshersGUI_SubShapeSelectorWdg::setFilter ( )
private

Install filters to select sub-shapes of mySubShType or their groups.

◆ SetGeomShapeEntry()

◆ SetListOfIDs()

◆ SetMaxSize()

void StdMeshersGUI_SubShapeSelectorWdg::SetMaxSize ( int  aMaxSize)

◆ shapeSelected

void StdMeshersGUI_SubShapeSelectorWdg::shapeSelected ( )
signal

Referenced by selectionIntoArgument().

◆ ShowPreview()

◆ updateButtons()

◆ updateState()

Field Documentation

◆ myActivateButton

QPushButton* StdMeshersGUI_SubShapeSelectorWdg::myActivateButton
private

Referenced by ActivateSelection(), and init().

◆ myAddButton

QPushButton* StdMeshersGUI_SubShapeSelectorWdg::myAddButton
private

◆ myEntry

std::string StdMeshersGUI_SubShapeSelectorWdg::myEntry
private

◆ myFilter

SUIT_SelectionFilter* StdMeshersGUI_SubShapeSelectorWdg::myFilter
private

◆ myGeomFilters

QList<SUIT_SelectionFilter*> StdMeshersGUI_SubShapeSelectorWdg::myGeomFilters
private

◆ myGeomShape

TopoDS_Shape StdMeshersGUI_SubShapeSelectorWdg::myGeomShape
private

Referenced by SetGeomShapeEntry(), and updateState().

◆ myInfoLabel

QLabel* StdMeshersGUI_SubShapeSelectorWdg::myInfoLabel
private

Referenced by updateButtons(), and updateState().

◆ myIsShown

bool StdMeshersGUI_SubShapeSelectorWdg::myIsShown
private

Referenced by ShowPreview(), and updateState().

◆ myListOfIDs

QList<int> StdMeshersGUI_SubShapeSelectorWdg::myListOfIDs
private

◆ myListWidget

QListWidget* StdMeshersGUI_SubShapeSelectorWdg::myListWidget
private

◆ myMainEntry

std::string StdMeshersGUI_SubShapeSelectorWdg::myMainEntry
private

◆ myMainShape

TopoDS_Shape StdMeshersGUI_SubShapeSelectorWdg::myMainShape
private

◆ myMaxSize

int StdMeshersGUI_SubShapeSelectorWdg::myMaxSize
private

Referenced by onAdd(), and selectionIntoArgument().

◆ myMesh

SMESH::SMESH_Mesh_var StdMeshersGUI_SubShapeSelectorWdg::myMesh
private

◆ myNextButton

QPushButton* StdMeshersGUI_SubShapeSelectorWdg::myNextButton
private

Referenced by init(), updateButtons(), and updateState().

◆ myParamValue

QString StdMeshersGUI_SubShapeSelectorWdg::myParamValue
private

◆ myPrevButton

QPushButton* StdMeshersGUI_SubShapeSelectorWdg::myPrevButton
private

Referenced by init(), updateButtons(), and updateState().

◆ myPreviewActor

◆ myRemoveButton

QPushButton* StdMeshersGUI_SubShapeSelectorWdg::myRemoveButton
private

◆ myRenderer

vtkRenderer* StdMeshersGUI_SubShapeSelectorWdg::myRenderer
private

◆ mySelectedIDs

QList<int> StdMeshersGUI_SubShapeSelectorWdg::mySelectedIDs
private

◆ mySelectionMgr

LightApp_SelectionMgr* StdMeshersGUI_SubShapeSelectorWdg::mySelectionMgr
private

◆ mySelector

SVTK_Selector* StdMeshersGUI_SubShapeSelectorWdg::mySelector
private

Referenced by init(), and updateState().

◆ mySMESHGUI

SMESHGUI* StdMeshersGUI_SubShapeSelectorWdg::mySMESHGUI
private

◆ mySubShType

TopAbs_ShapeEnum StdMeshersGUI_SubShapeSelectorWdg::mySubShType
private