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

Signals

void selectionChanged ()
 
void shapeSelected ()
 

Public Member Functions

 StdMeshersGUI_SubShapeSelectorWdg (QWidget *parent=0, TopAbs_ShapeEnum subShType=TopAbs_EDGE, const bool toShowList=true, const bool toShowActivateBtn=false)
 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...
 

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
 
QLabel * myInfoLabel
 
QPushButton * myPrevButton
 
QPushButton * myNextButton
 
QList< intmySelectedIDs
 
QList< intmyListOfIDs
 
QString myParamValue
 
bool myIsShown
 
int myMaxSize
 
TopAbs_ShapeEnum mySubShType
 
SMESH_PreviewActorsCollectionmyPreviewActor
 
QList< SUIT_SelectionFilter * > myGeomFilters
 
SUIT_SelectionFiltermyFilter
 

Constructor & Destructor Documentation

StdMeshersGUI_SubShapeSelectorWdg::StdMeshersGUI_SubShapeSelectorWdg ( QWidget parent = 0,
TopAbs_ShapeEnum  subShType = TopAbs_EDGE,
const bool  toShowList = true,
const bool  toShowActivateBtn = false 
)

Constructor.

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

StdMeshersGUI_SubShapeSelectorWdg::~StdMeshersGUI_SubShapeSelectorWdg ( )

Member Function Documentation

void StdMeshersGUI_SubShapeSelectorWdg::ActivateSelection ( bool  toActivate)
slot

Connect/disconnect to change of selection.

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

Referenced by init().

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

GEOM::GEOM_Object_var StdMeshersGUI_SubShapeSelectorWdg::GetGeomObjectByEntry ( const QString &  theEntry)
static
TopoDS_Shape StdMeshersGUI_SubShapeSelectorWdg::GetGeomShape ( )
int StdMeshersGUI_SubShapeSelectorWdg::GetListSize ( )
TopoDS_Shape StdMeshersGUI_SubShapeSelectorWdg::GetMainShape ( )
vtkRenderer* StdMeshersGUI_SubShapeSelectorWdg::GetRenderer ( )
const QList<int>& StdMeshersGUI_SubShapeSelectorWdg::GetSelectedIDs ( ) const
TopoDS_Shape StdMeshersGUI_SubShapeSelectorWdg::GetTopoDSByEntry ( const QString &  theEntry)
static

References GetGeomObjectByEntry().

Referenced by SetGeomShapeEntry().

QString StdMeshersGUI_SubShapeSelectorWdg::GetValue ( ) const
void StdMeshersGUI_SubShapeSelectorWdg::onAdd ( )
privateslot
void StdMeshersGUI_SubShapeSelectorWdg::onListSelectionChanged ( )
privateslot
void StdMeshersGUI_SubShapeSelectorWdg::onNext ( )
privateslot
void StdMeshersGUI_SubShapeSelectorWdg::onPrevious ( )
privateslot
void StdMeshersGUI_SubShapeSelectorWdg::onRemove ( )
privateslot
void StdMeshersGUI_SubShapeSelectorWdg::selectionChanged ( )
signal

Referenced by onListSelectionChanged().

void StdMeshersGUI_SubShapeSelectorWdg::setFilter ( )
private

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

void StdMeshersGUI_SubShapeSelectorWdg::SetMaxSize ( int  aMaxSize)
void StdMeshersGUI_SubShapeSelectorWdg::shapeSelected ( )
signal

Referenced by selectionIntoArgument().

Field Documentation

QPushButton* StdMeshersGUI_SubShapeSelectorWdg::myActivateButton
private

Referenced by ActivateSelection(), and init().

QPushButton* StdMeshersGUI_SubShapeSelectorWdg::myAddButton
private
std::string StdMeshersGUI_SubShapeSelectorWdg::myEntry
private
SUIT_SelectionFilter* StdMeshersGUI_SubShapeSelectorWdg::myFilter
private
QList<SUIT_SelectionFilter*> StdMeshersGUI_SubShapeSelectorWdg::myGeomFilters
private
TopoDS_Shape StdMeshersGUI_SubShapeSelectorWdg::myGeomShape
private

Referenced by SetGeomShapeEntry(), and updateState().

QLabel* StdMeshersGUI_SubShapeSelectorWdg::myInfoLabel
private

Referenced by updateButtons(), and updateState().

bool StdMeshersGUI_SubShapeSelectorWdg::myIsShown
private

Referenced by ShowPreview(), and updateState().

QList<int> StdMeshersGUI_SubShapeSelectorWdg::myListOfIDs
private
QListWidget* StdMeshersGUI_SubShapeSelectorWdg::myListWidget
private
std::string StdMeshersGUI_SubShapeSelectorWdg::myMainEntry
private
TopoDS_Shape StdMeshersGUI_SubShapeSelectorWdg::myMainShape
private
int StdMeshersGUI_SubShapeSelectorWdg::myMaxSize
private

Referenced by onAdd(), and selectionIntoArgument().

SMESH::SMESH_Mesh_var StdMeshersGUI_SubShapeSelectorWdg::myMesh
private
QPushButton* StdMeshersGUI_SubShapeSelectorWdg::myNextButton
private

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

QString StdMeshersGUI_SubShapeSelectorWdg::myParamValue
private
QPushButton* StdMeshersGUI_SubShapeSelectorWdg::myPrevButton
private

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

QPushButton* StdMeshersGUI_SubShapeSelectorWdg::myRemoveButton
private
vtkRenderer* StdMeshersGUI_SubShapeSelectorWdg::myRenderer
private
QList<int> StdMeshersGUI_SubShapeSelectorWdg::mySelectedIDs
private
LightApp_SelectionMgr* StdMeshersGUI_SubShapeSelectorWdg::mySelectionMgr
private
SVTK_Selector* StdMeshersGUI_SubShapeSelectorWdg::mySelector
private

Referenced by init(), and updateState().

SMESHGUI* StdMeshersGUI_SubShapeSelectorWdg::mySMESHGUI
private
TopAbs_ShapeEnum StdMeshersGUI_SubShapeSelectorWdg::mySubShType
private