#include <StdMeshersGUI_SubShapeSelectorWdg.h>

Public Member Functions | |
| StdMeshersGUI_SubShapeSelectorWdg (QWidget *parent=0, TopAbs_ShapeEnum aSubShType=TopAbs_EDGE) | |
| Constructor. | |
| ~StdMeshersGUI_SubShapeSelectorWdg () | |
| Destructor. | |
| SMESH::long_array_var | GetListOfIDs () |
| void | SetListOfIDs (SMESH::long_array_var) |
| void | SetGeomShapeEntry (const QString &theEntry) |
| const char * | GetGeomShapeEntry () |
| void | SetMainShapeEntry (const QString &theEntry) |
| const char * | GetMainShapeEntry () |
| TopoDS_Shape | GetGeomShape () |
| TopoDS_Shape | GetMainShape () |
| QList< int > | GetCorrectedListOfIDs (bool fromSubshapeToMainshape=true) |
| QString | GetValue () const |
| void | showPreview (bool) |
| Create a layout, initialize fields. | |
| int | GetListSize () |
| void | SetMaxSize (int aMaxSize) |
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 | SelectionIntoArgument () |
| void | onListSelectionChanged () |
Private Member Functions | |
| void | updateState () |
| void | setFilter () |
| Install filters to select sub-shapes of mySubShType or their groups. | |
| void | init () |
| Create a layout, initialize fields. | |
Private Attributes | |
| SMESHGUI * | mySMESHGUI |
| LightApp_SelectionMgr * | mySelectionMgr |
| SVTK_Selector * | mySelector |
| SMESH::SMESH_Mesh_var | myMesh |
| TopoDS_Shape | myGeomShape |
| TopoDS_Shape | myMainShape |
| QString | myEntry |
| QString | myMainEntry |
| vtkRenderer * | myRenderer |
| QListWidget * | myListWidget |
| QPushButton * | myAddButton |
| QPushButton * | myRemoveButton |
| QList< int > | mySelectedIDs |
| QList< int > | myListOfIDs |
| QString | myParamValue |
| bool | myIsShown |
| bool | myIsNotCorrected |
| int | myMaxSize |
| TopAbs_ShapeEnum | mySubShType |
| SMESH_PreviewActorsCollection * | myPreviewActor |
| QList< SUIT_SelectionFilter * > | myGeomFilters |
| SUIT_SelectionFilter * | myFilter |
Definition at line 50 of file StdMeshersGUI_SubShapeSelectorWdg.h.
| StdMeshersGUI_SubShapeSelectorWdg::StdMeshersGUI_SubShapeSelectorWdg | ( | QWidget * | parent = 0, |
| TopAbs_ShapeEnum | aSubShType = TopAbs_EDGE |
||
| ) |
Constructor.
Definition at line 85 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References SMESH.GetResourceMgr(), MARGIN, and SPACING.
: QWidget( parent ), myPreviewActor( 0 ), myMaxSize( -1 ) { QPixmap image0( SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap( "SMESH", tr( "ICON_SELECT" ) ) ); QGridLayout* edgesLayout = new QGridLayout( this ); edgesLayout->setMargin( MARGIN ); edgesLayout->setSpacing( SPACING ); myListWidget = new QListWidget( this ); myAddButton = new QPushButton( tr( "SMESH_BUT_ADD" ), this ); myRemoveButton = new QPushButton( tr( "SMESH_BUT_REMOVE" ), this ); myListWidget->setSelectionMode( QListWidget::ExtendedSelection ); edgesLayout->addWidget(myListWidget, 0, 0, 3, 3); edgesLayout->addWidget(myAddButton, 0, 4); edgesLayout->addWidget(myRemoveButton, 1, 4); //edgesLayout->setRowStretch(2, 5); edgesLayout->setColumnStretch(2, 5); setLayout( edgesLayout ); setMinimumWidth( 300 ); mySubShType = aSubShType; init(); }
| StdMeshersGUI_SubShapeSelectorWdg::~StdMeshersGUI_SubShapeSelectorWdg | ( | ) |
Destructor.
Definition at line 122 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References SMESH.GetViewWindow(), myEntry, myFilter, myGeomFilters, myMainShape, myParamValue, myPreviewActor, myRenderer, mySelectionMgr, mySMESHGUI, and SMESH_PreviewActorsCollection.RemoveFromRender().
{
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) {
if ( myPreviewActor ) {
myPreviewActor->RemoveFromRender( myRenderer );
aViewWindow->Repaint();
delete myPreviewActor;
myPreviewActor = 0;
}
}
myEntry = "";
myParamValue = "";
myMainShape.Nullify();
if ( mySelectionMgr && myFilter )
mySelectionMgr->removeFilter( myFilter );
delete myFilter; myFilter=0;
SUIT_SelectionFilter* filter;
foreach( filter, myGeomFilters )
delete filter;
}
| QList< int > StdMeshersGUI_SubShapeSelectorWdg::GetCorrectedListOfIDs | ( | bool | fromSubshapeToMainshape = true | ) |
Definition at line 523 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References myGeomShape, myIsNotCorrected, myListOfIDs, myMainShape, mySelectedIDs, and ex21_lamp.size.
Referenced by GetListOfIDs(), and SetListOfIDs().
{
if ( ( myMainShape.IsNull() || myGeomShape.IsNull() ) && fromSubshapeToMainshape )
return myListOfIDs;
else if ( ( myMainShape.IsNull() || myGeomShape.IsNull() ) && !fromSubshapeToMainshape )
return mySelectedIDs;
QList<int> aList;
TopTools_IndexedMapOfShape aGeomMap;
TopTools_IndexedMapOfShape aMainMap;
TopExp::MapShapes(myGeomShape, aGeomMap);
TopExp::MapShapes(myMainShape, aMainMap);
if ( fromSubshapeToMainshape ) { // convert indexes from subshape to mainshape
int size = myListOfIDs.size();
for (int i = 0; i < size; i++) {
TopoDS_Shape aSubShape = aGeomMap.FindKey( myListOfIDs.at(i) );
int index = aMainMap.FindIndex( aSubShape );
aList.append( index );
}
myIsNotCorrected = false;
} else { // convert indexes from main shape to subshape
int size = mySelectedIDs.size();
for (int i = 0; i < size; i++) {
TopoDS_Shape aSubShape = aMainMap.FindKey( mySelectedIDs.at(i) );
int index = aGeomMap.FindIndex( aSubShape );
aList.append( index );
}
}
return aList;
}
| GEOM::GEOM_Object_var StdMeshersGUI_SubShapeSelectorWdg::GetGeomObjectByEntry | ( | const QString & | theEntry | ) | [static] |
Definition at line 429 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References SMESHGUI.GetSMESHGen().
Referenced by GetTopoDSByEntry(), and SelectionIntoArgument().
{
GEOM::GEOM_Object_var aGeomObj;
SALOMEDS::Study_var aStudy = SMESHGUI::GetSMESHGen()->GetCurrentStudy();
if (aStudy != 0) {
SALOMEDS::SObject_var aSObj = aStudy->FindObjectID( theEntry.toLatin1().data() );
SALOMEDS::GenericAttribute_var anAttr;
if (!aSObj->_is_nil() && aSObj->FindAttribute(anAttr, "AttributeIOR")) {
SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
CORBA::String_var aVal = anIOR->Value();
CORBA::Object_var obj = aStudy->ConvertIORToObject(aVal);
aGeomObj = GEOM::GEOM_Object::_narrow(obj);
}
}
return aGeomObj;
}
| TopoDS_Shape StdMeshersGUI_SubShapeSelectorWdg.GetGeomShape | ( | ) |
Definition at line 68 of file StdMeshersGUI_SubShapeSelectorWdg.h.
{ return myGeomShape; }
| const char* StdMeshersGUI_SubShapeSelectorWdg.GetGeomShapeEntry | ( | ) |
Definition at line 63 of file StdMeshersGUI_SubShapeSelectorWdg.h.
{ return myEntry.toLatin1().data();}
| SMESH::long_array_var StdMeshersGUI_SubShapeSelectorWdg::GetListOfIDs | ( | ) |
Definition at line 463 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References GetCorrectedListOfIDs(), myIsNotCorrected, myListOfIDs, myMainEntry, and ex21_lamp.size.
Referenced by StdMeshersGUI_StdHypothesisCreator.storeParams(), and StdMeshersGUI_NbSegmentsCreator.storeParamsToHypo().
{
SMESH::long_array_var anArray = new SMESH::long_array;
if ( myMainEntry != "" && myIsNotCorrected )
myListOfIDs = GetCorrectedListOfIDs( true );
int size = myListOfIDs.size();
anArray->length( size );
if ( size ) {
for (int i = 0; i < size; i++) {
anArray[i] = myListOfIDs.at(i);
}
}
return anArray;
}
| int StdMeshersGUI_SubShapeSelectorWdg.GetListSize | ( | ) |
Definition at line 80 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by StdMeshersGUI_StdHypothesisCreator.storeParams().
{ return myListOfIDs.size(); }
| TopoDS_Shape StdMeshersGUI_SubShapeSelectorWdg.GetMainShape | ( | ) |
Definition at line 69 of file StdMeshersGUI_SubShapeSelectorWdg.h.
{ return myMainShape; }
| const char * StdMeshersGUI_SubShapeSelectorWdg::GetMainShapeEntry | ( | ) |
Definition at line 511 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References myEntry, and myMainEntry.
Referenced by StdMeshersGUI_StdHypothesisCreator.storeParams(), and StdMeshersGUI_NbSegmentsCreator.storeParamsToHypo().
{
if ( myMainEntry == "")
return myEntry.toLatin1().data();
return myMainEntry.toLatin1().data();
}
| TopoDS_Shape StdMeshersGUI_SubShapeSelectorWdg::GetTopoDSByEntry | ( | const QString & | theEntry | ) | [static] |
Definition at line 451 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References GetGeomObjectByEntry(), and SMESH_fixation.shape.
Referenced by SetGeomShapeEntry(), and SetMainShapeEntry().
{
TopoDS_Shape shape;
GEOM::GEOM_Object_var aGeomObj = GetGeomObjectByEntry( theEntry );
GEOMBase::GetShape(aGeomObj, shape);
return shape;
}
| QString StdMeshersGUI_SubShapeSelectorWdg.GetValue | ( | ) | const |
Definition at line 76 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by StdMeshersGUI_StdHypothesisCreator.getParamFromCustomWidget().
{ return myParamValue; }
| void StdMeshersGUI_SubShapeSelectorWdg::init | ( | ) | [private] |
Create a layout, initialize fields.
Definition at line 152 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References SMESH.GetSelectionMgr(), SMESH.GetSelector(), SMESHGUI.GetSMESHGUI(), SMESH.GetViewWindow(), myAddButton, myFilter, myIsNotCorrected, myListOfIDs, myListWidget, myParamValue, myRemoveButton, mySelectedIDs, mySelectionMgr, mySelector, mySMESHGUI, onAdd(), onListSelectionChanged(), onRemove(), SelectionIntoArgument(), and updateState().
{
myParamValue = "";
myIsNotCorrected = true; // to dont call the GetCorrectedValue method twice
myListOfIDs.clear();
mySelectedIDs.clear();
myAddButton->setEnabled( false );
myRemoveButton->setEnabled( false );
mySMESHGUI = SMESHGUI::GetSMESHGUI();
mySelectionMgr = SMESH::GetSelectionMgr( mySMESHGUI );
mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode( ActorSelection );
myFilter=0;
//setFilter();
connect( myAddButton, SIGNAL(clicked()), SLOT(onAdd()));
connect( myRemoveButton, SIGNAL(clicked()), SLOT(onRemove()));
connect( mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
connect( myListWidget, SIGNAL(itemSelectionChanged()), this, SLOT(onListSelectionChanged()));
updateState();
}
| void StdMeshersGUI_SubShapeSelectorWdg::onAdd | ( | ) | [private, slot] |
Definition at line 315 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References myAddButton, myListOfIDs, myListWidget, myMaxSize, mySelectedIDs, and onListSelectionChanged().
Referenced by init(), and SetListOfIDs().
{
if ( mySelectedIDs.size() < 1 )
return;
myListWidget->blockSignals( true );
for (int i = 0; i < mySelectedIDs.size() && (myMaxSize == -1 || myListOfIDs.size() < myMaxSize); i++) {
if ( myListOfIDs.indexOf( mySelectedIDs.at(i) ) == -1 ) {
QString anID = QString(" %1").arg( mySelectedIDs.at(i) );
QListWidgetItem* anItem = new QListWidgetItem( anID, myListWidget );
anItem->setSelected(true);
myListOfIDs.append( mySelectedIDs.at(i) );
}
}
onListSelectionChanged();
myListWidget->blockSignals( false );
myAddButton->setEnabled( myMaxSize == -1 || myListOfIDs.size() < myMaxSize );
}
| void StdMeshersGUI_SubShapeSelectorWdg::onListSelectionChanged | ( | ) | [private, slot] |
Definition at line 367 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References SMESH_PreviewActorsCollection.HighlightID(), myListWidget, myPreviewActor, myRemoveButton, and mySelectionMgr.
Referenced by init(), onAdd(), and onRemove().
{
if ( !myPreviewActor )
return;
mySelectionMgr->clearSelected();
TColStd_MapOfInteger aIndexes;
QList<QListWidgetItem*> selItems = myListWidget->selectedItems();
QListWidgetItem* anItem;
foreach(anItem, selItems)
myPreviewActor->HighlightID( anItem->text().toInt() );
// update remove button
myRemoveButton->setEnabled( selItems.size() > 0 );
}
| void StdMeshersGUI_SubShapeSelectorWdg::onRemove | ( | ) | [private, slot] |
Definition at line 340 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References myAddButton, myListOfIDs, myListWidget, and onListSelectionChanged().
Referenced by init().
{
if ( myListWidget->count() < 1 )
return;
myListWidget->blockSignals( true );
QList<QListWidgetItem*> selItems = myListWidget->selectedItems();
QListWidgetItem* item;
foreach(item, selItems) {
QString idStr = item->text();
int id = idStr.toInt();
int index = myListOfIDs.indexOf( id );
myListOfIDs.removeAt( index );
delete item;
}
onListSelectionChanged();
myListWidget->blockSignals( false );
myAddButton->setEnabled( true );
}
| void StdMeshersGUI_SubShapeSelectorWdg::SelectionIntoArgument | ( | ) | [private, slot] |
Definition at line 224 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References GetGeomObjectByEntry(), SMESH_PreviewActorsCollection.GetIndexByShape(), Handle(), SMESH_PreviewActorsCollection.HighlightID(), SMESH_test.ind, myAddButton, myEntry, myListWidget, myMaxSize, myPreviewActor, mySelectedIDs, mySelectionMgr, mySubShType, and SMESH_fixation.shape.
Referenced by init().
{
if ( !myPreviewActor )
return;
mySelectedIDs.clear();
// get selected mesh
SALOME_ListIO aList;
mySelectionMgr->selectedObjects( aList );
int nbSel = aList.Extent();
if (nbSel > 0) {
SALOME_ListIteratorOfListIO anIt (aList);
for ( ; anIt.More(); anIt.Next()) { // Loop on selected objects
Handle(SALOME_InteractiveObject) IO = anIt.Value();
GEOM::GEOM_Object_var aGeomObj = GetGeomObjectByEntry( IO->getEntry() );
if ( !CORBA::is_nil( aGeomObj ) ) { // Selected Object From Study
GEOM::GEOM_Object_ptr aGeomFatherObj = aGeomObj->GetMainShape();
QString aFatherEntry = "";
QString aMainFatherEntry = "";
TopoDS_Shape shape;
if ( !CORBA::is_nil( aGeomFatherObj ) ) {
// Get Main Shape
GEOM::GEOM_Object_var aGeomMain = GetGeomObjectByEntry( myEntry );
if ( !CORBA::is_nil( aGeomMain ) && aGeomMain->GetType() == 37 ) { // Main Shape is a Group
GEOM::GEOM_Object_ptr aMainFatherObj = aGeomMain->GetMainShape();
if ( !CORBA::is_nil( aMainFatherObj ) )
aMainFatherEntry = aMainFatherObj->GetStudyEntry();
}
aFatherEntry = aGeomFatherObj->GetStudyEntry();
}
if ( aFatherEntry != "" && ( aFatherEntry == myEntry || aFatherEntry == aMainFatherEntry ) )
{
if ( aGeomObj->GetType() == 37 /*GEOM_GROUP*/ ) { // Selected Group that belongs the main object
GEOMBase::GetShape(aGeomObj, shape);
if ( !shape.IsNull() ) {
TopExp_Explorer exp( shape, mySubShType );
for ( ; exp.More(); exp.Next() ) {
int index = myPreviewActor->GetIndexByShape( exp.Current() );
if ( index ) {
mySelectedIDs.append( index );
myPreviewActor->HighlightID( index );
}
}
}
} else if ( aGeomObj->GetType() == 28 /*GEOM_SUBSHAPE*/ ) {
GEOMBase::GetShape(aGeomObj, shape);
if ( !shape.IsNull() && shape.ShapeType() == mySubShType ) {
int index = myPreviewActor->GetIndexByShape( shape );
if ( index ) {
mySelectedIDs.append( index );
myPreviewActor->HighlightID( index );
}
}
}
}
} else { // Selected Actor from Actor Collection
QString anEntry = IO->getEntry();
QString str = "_";
int index = anEntry.lastIndexOf( str );
anEntry.remove(0, index+1);
int ind = anEntry.toInt();
if ( ind )
mySelectedIDs.append( ind );
}
}
}
// update add button
myAddButton->setEnabled( ( myListWidget->count() < myMaxSize || myMaxSize == -1 ) && mySelectedIDs.size() > 0 && ( mySelectedIDs.size() <= myMaxSize || myMaxSize == -1 ) );
//Connect Selected Ids in viewer and dialog's Ids list
myListWidget->clearSelection();
if ( mySelectedIDs.size() > 0 ) {
for (int i = 0; i < mySelectedIDs.size(); i++) {
QString anID = QString(" %1").arg( mySelectedIDs.at(i) );
QList<QListWidgetItem*> anItems = myListWidget->findItems ( anID, Qt::MatchExactly );
QListWidgetItem* item;
foreach(item, anItems)
item->setSelected(true);
}
}
}
| void StdMeshersGUI_SubShapeSelectorWdg::setFilter | ( | ) | [private] |
Install filters to select sub-shapes of mySubShType or their groups.
Definition at line 187 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References SMESHGUI.activeStudy(), SMESH_LogicalFilter.LO_OR, myFilter, myGeomFilters, mySelectionMgr, mySMESHGUI, and mySubShType.
{
SalomeApp_Study* study = mySMESHGUI->activeStudy();
GEOM_TypeFilter* typeFilter = new GEOM_TypeFilter(study, mySubShType, /*isShapeType=*/true );
GEOM_CompoundFilter* gpoupFilter = new GEOM_CompoundFilter(study);
gpoupFilter->addSubType( mySubShType );
myGeomFilters.append( typeFilter );
myGeomFilters.append( gpoupFilter );
myFilter = new SMESH_LogicalFilter( myGeomFilters, SMESH_LogicalFilter::LO_OR );
mySelectionMgr->installFilter( myFilter );
}
| void StdMeshersGUI_SubShapeSelectorWdg::SetGeomShapeEntry | ( | const QString & | theEntry | ) |
Definition at line 387 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References GetTopoDSByEntry(), myEntry, myGeomShape, myIsNotCorrected, myParamValue, and updateState().
Referenced by StdMeshersGUI_NbSegmentsCreator.buildFrame(), and StdMeshersGUI_StdHypothesisCreator.stdParams().
{
if ( theEntry != "") {
myParamValue = theEntry;
myEntry = theEntry;
myGeomShape = GetTopoDSByEntry( theEntry );
updateState();
myIsNotCorrected = true;
}
}
| void StdMeshersGUI_SubShapeSelectorWdg::SetListOfIDs | ( | SMESH::long_array_var | theIds | ) |
Definition at line 484 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References GetCorrectedListOfIDs(), myListOfIDs, mySelectedIDs, onAdd(), and ex21_lamp.size.
Referenced by StdMeshersGUI_NbSegmentsCreator.buildFrame(), and StdMeshersGUI_StdHypothesisCreator.stdParams().
{
mySelectedIDs.clear();
myListOfIDs.clear();
int size = theIds->length();
for ( int i = 0; i < size; i++ )
mySelectedIDs.append( theIds[ i ] );
mySelectedIDs = GetCorrectedListOfIDs( false );
onAdd();
}
| void StdMeshersGUI_SubShapeSelectorWdg::SetMainShapeEntry | ( | const QString & | theEntry | ) |
Definition at line 500 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References GetTopoDSByEntry(), myIsNotCorrected, myMainEntry, and myMainShape.
Referenced by StdMeshersGUI_NbSegmentsCreator.buildFrame(), and StdMeshersGUI_StdHypothesisCreator.stdParams().
{
myMainEntry = theEntry;
myMainShape = GetTopoDSByEntry( theEntry );
myIsNotCorrected = true;
}
| void StdMeshersGUI_SubShapeSelectorWdg.SetMaxSize | ( | int | aMaxSize | ) |
Definition at line 82 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by StdMeshersGUI_StdHypothesisCreator.stdParams().
{ myMaxSize = aMaxSize; }
| void StdMeshersGUI_SubShapeSelectorWdg::showPreview | ( | bool | visible | ) |
Create a layout, initialize fields.
Definition at line 205 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References SMESH.GetViewWindow(), myIsShown, myPreviewActor, mySMESHGUI, and SMESH_PreviewActorsCollection.SetShown().
Referenced by StdMeshersGUI_NbSegmentsCreator.onValueChanged(), and StdMeshersGUI_StdHypothesisCreator.stdParams().
{
if ( !myPreviewActor )
return;
if ( myIsShown != visible ) {
myPreviewActor->SetShown( visible );
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->Repaint();
myIsShown = visible;
}
}
| void StdMeshersGUI_SubShapeSelectorWdg::updateState | ( | ) | [private] |
Definition at line 402 of file StdMeshersGUI_SubShapeSelectorWdg.cxx.
References SMESH_PreviewActorsCollection.AddToRender(), SMESH.GetViewWindow(), SMESH_PreviewActorsCollection.Init(), myAddButton, myEntry, myGeomShape, myIsShown, myListWidget, myPreviewActor, myRenderer, mySelectedIDs, mySelector, mySMESHGUI, mySubShType, SMESH_PreviewActorsCollection.SetSelector(), and SMESH_PreviewActorsCollection.SetShown().
Referenced by init(), and SetGeomShapeEntry().
{
bool state = false;
if ( !myGeomShape.IsNull() )
state = true;
myListWidget->setEnabled( state );
myAddButton->setEnabled( mySelectedIDs.size() > 0 );
if (state) {
myPreviewActor = new SMESH_PreviewActorsCollection();
myPreviewActor->SetSelector( mySelector );
myPreviewActor->Init( myGeomShape, mySubShType, myEntry );
myPreviewActor->SetShown( false );
myIsShown = false;
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) {
myRenderer = aViewWindow->getRenderer();
myPreviewActor->AddToRender( myRenderer );
aViewWindow->Repaint();
}
}
}
QPushButton* StdMeshersGUI_SubShapeSelectorWdg.myAddButton [private] |
Definition at line 110 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by init(), onAdd(), onRemove(), SelectionIntoArgument(), and updateState().
QString StdMeshersGUI_SubShapeSelectorWdg.myEntry [private] |
Definition at line 105 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by GetMainShapeEntry(), SelectionIntoArgument(), SetGeomShapeEntry(), updateState(), and ~StdMeshersGUI_SubShapeSelectorWdg().
Definition at line 126 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by init(), setFilter(), and ~StdMeshersGUI_SubShapeSelectorWdg().
QList<SUIT_SelectionFilter*> StdMeshersGUI_SubShapeSelectorWdg.myGeomFilters [private] |
Definition at line 125 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by setFilter(), and ~StdMeshersGUI_SubShapeSelectorWdg().
TopoDS_Shape StdMeshersGUI_SubShapeSelectorWdg.myGeomShape [private] |
Definition at line 103 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by GetCorrectedListOfIDs(), SetGeomShapeEntry(), and updateState().
Definition at line 117 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by GetCorrectedListOfIDs(), GetListOfIDs(), init(), SetGeomShapeEntry(), and SetMainShapeEntry().
Definition at line 116 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by showPreview(), and updateState().
QList<int> StdMeshersGUI_SubShapeSelectorWdg.myListOfIDs [private] |
Definition at line 113 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by GetCorrectedListOfIDs(), GetListOfIDs(), init(), onAdd(), onRemove(), and SetListOfIDs().
QListWidget* StdMeshersGUI_SubShapeSelectorWdg.myListWidget [private] |
Definition at line 109 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by init(), onAdd(), onListSelectionChanged(), onRemove(), SelectionIntoArgument(), and updateState().
QString StdMeshersGUI_SubShapeSelectorWdg.myMainEntry [private] |
Definition at line 106 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by GetListOfIDs(), GetMainShapeEntry(), and SetMainShapeEntry().
TopoDS_Shape StdMeshersGUI_SubShapeSelectorWdg.myMainShape [private] |
Definition at line 104 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by GetCorrectedListOfIDs(), SetMainShapeEntry(), and ~StdMeshersGUI_SubShapeSelectorWdg().
Definition at line 120 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by onAdd(), and SelectionIntoArgument().
SMESH::SMESH_Mesh_var StdMeshersGUI_SubShapeSelectorWdg.myMesh [private] |
Definition at line 102 of file StdMeshersGUI_SubShapeSelectorWdg.h.
QString StdMeshersGUI_SubShapeSelectorWdg.myParamValue [private] |
Definition at line 115 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by init(), SetGeomShapeEntry(), and ~StdMeshersGUI_SubShapeSelectorWdg().
Definition at line 124 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by onListSelectionChanged(), SelectionIntoArgument(), showPreview(), updateState(), and ~StdMeshersGUI_SubShapeSelectorWdg().
QPushButton* StdMeshersGUI_SubShapeSelectorWdg.myRemoveButton [private] |
Definition at line 111 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by init(), and onListSelectionChanged().
vtkRenderer* StdMeshersGUI_SubShapeSelectorWdg.myRenderer [private] |
Definition at line 107 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by updateState(), and ~StdMeshersGUI_SubShapeSelectorWdg().
QList<int> StdMeshersGUI_SubShapeSelectorWdg.mySelectedIDs [private] |
Definition at line 112 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by GetCorrectedListOfIDs(), init(), onAdd(), SelectionIntoArgument(), SetListOfIDs(), and updateState().
LightApp_SelectionMgr* StdMeshersGUI_SubShapeSelectorWdg.mySelectionMgr [private] |
Definition at line 100 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by init(), onListSelectionChanged(), SelectionIntoArgument(), setFilter(), and ~StdMeshersGUI_SubShapeSelectorWdg().
SVTK_Selector* StdMeshersGUI_SubShapeSelectorWdg.mySelector [private] |
Definition at line 101 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by init(), and updateState().
Definition at line 99 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by init(), setFilter(), showPreview(), updateState(), and ~StdMeshersGUI_SubShapeSelectorWdg().
TopAbs_ShapeEnum StdMeshersGUI_SubShapeSelectorWdg.mySubShType [private] |
Definition at line 122 of file StdMeshersGUI_SubShapeSelectorWdg.h.
Referenced by SelectionIntoArgument(), setFilter(), and updateState().