: QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>
(SUIT_Session::session()->activeApplication());
myIsPoly = false;
mySimulation = new SMESH::TElementSimulation (anApp);
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
// verify nb nodes and type
myNbNodes = nbNodes;
// set selection mode
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode( NodeSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( NodeSelection );
myBusy = false;
mySelectionMgr->clearSelected();
mySimulation->SetVisibility(false);
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode( ActorSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( ActorSelection );
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
reject();
}
mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
- myViewWindow->highlight( myActor->getIO(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( myActor->getIO(), true, true );
bool aNodesOK = false;
if (myIsPoly && myElementType == SMDSAbs_Face && aListId.count() >=3 ){
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode( NodeSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( NodeSelection );
SelectionIntoArgument();
}
SalomeApp_SelectionMgr* mySelectionMgr; /* User shape selection */
int myNbOkNodes; /* to check when arguments is defined */
bool myBusy;
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
: QDialog( SMESH::GetDesktop( theModule ), theName, false,\r
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),\r
mySMESHGUI( theModule ),\r
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),\r
- myViewWindow( SMESH::GetViewWindow( theModule ) ),\r
- mySelector( myViewWindow->GetSelector() )\r
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )\r
{\r
setCaption(tr("CAPTION"));\r
\r
\r
aDlgLay->setStretchFactor(aMainFrame, 1);\r
\r
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))\r
+ mySelector = aViewWindow->GetSelector();\r
+\r
Init(theType);\r
}\r
\r
tr("ERROR_OF_SAVING"), QMessageBox::Ok);\r
} else {\r
//SUIT_Application::getDesktop()->setSelectionModes(ActorSelection);\r
- myViewWindow->SetSelectionMode(ActorSelection);\r
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))\r
+ aViewWindow->SetSelectionMode(ActorSelection);\r
disconnect(mySelectionMgr, 0, this, 0);\r
disconnect(mySMESHGUI, 0, this, 0);\r
mySMESHGUI->ResetState();\r
return;\r
} else {\r
//SUIT_Application::getDesktop()->setSelectionModes(ActorSelection);\r
- myViewWindow->SetSelectionMode(ActorSelection);\r
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))\r
+ aViewWindow->SetSelectionMode(ActorSelection);\r
disconnect(mySelectionMgr, 0, this, 0);\r
disconnect(mySMESHGUI, 0, this, 0);\r
mySMESHGUI->ResetState();\r
//=======================================================================\r
void SMESHGUI_CreatePatternDlg::onClose()\r
{\r
- myViewWindow->SetSelectionMode(ActorSelection);\r
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))\r
+ aViewWindow->SetSelectionMode(ActorSelection);\r
disconnect(mySelectionMgr, 0, this, 0);\r
disconnect(mySMESHGUI, 0, this, 0);\r
mySMESHGUI->ResetState();\r
{\r
mySelectionMgr->clearFilters();\r
//SUIT_Application::getDesktop()->setSelectionModes(ActorSelection);\r
- myViewWindow->SetSelectionMode(ActorSelection);\r
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))\r
+ aViewWindow->SetSelectionMode(ActorSelection);\r
\r
if (myType == Type_2d) {\r
mySelectionMgr->installFilter(new SMESH_NumberFilter\r
QCheckBox* myProjectChk;
SMESHGUI* mySMESHGUI;
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
SalomeApp_SelectionMgr* mySelectionMgr;
int myNbPoints;
bool modal, WFlags fl )
: QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
QPixmap image0( SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap( "SMESH",tr("ICON_SELECT")));
Preview = new QCheckBox( GroupContent, "Preview" );
Preview->setText( tr( "SMESH_POLYEDRE_PREVIEW" ) );
GroupContentLayout->addWidget( Preview , 5, 0 );
+
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
SMESHGUI_CreatePolyhedralVolumeDlgLayout->addWidget( GroupContent, 1, 0 );
}
else
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
AddButton->setEnabled(false);
RemoveButton->setEnabled(false);
} else {
SMESH::SetPointRepresentation(false);
}
- myViewWindow->SetSelectionMode(FaceSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(FaceSelection);
TextLabelIds->setText( tr( "SMESH_ID_FACES" ) );
myFacesByNodesLabel->hide();
mySelectionMgr->setSelectedObjects( aList );
SMESH::SetPointRepresentation(false);
mySimulation->SetVisibility(false);
- myViewWindow->SetSelectionMode( ActorSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( ActorSelection );
disconnect( mySelectionMgr, 0, this, 0 );
mySMESHGUI->ResetState() ;
reject() ;
}
mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
- myViewWindow->highlight( myActor->getIO(), true, true );
+
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( myActor->getIO(), true, true );
if ( myNbOkElements>0 && aListId.count()>=3)
AddButton->setEnabled(true);
}
mySelector->AddOrRemoveIndex( myActor->getIO(), newIndices, false );
- myViewWindow->highlight( myActor->getIO(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( myActor->getIO(), true, true );
if ( myNbOkElements ) {
if (aListId.count()>1){
mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ;
- myViewWindow->SetSelectionMode( FaceSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( FaceSelection );
SelectionIntoArgument();
}
if(isSelected) RemoveButton->setEnabled(true);
else RemoveButton->setEnabled(false);
mySelector->AddOrRemoveIndex(myActor->getIO(), aIndexes, true );
- myViewWindow->highlight( myActor->getIO(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( myActor->getIO(), true, true );
mySelectionMgr->clearFilters();
aList.Append( myActor->getIO() );
mySelectionMgr->setSelectedObjects( aList );
SMESHGUI* mySMESHGUI ; /* Current SMESHGUI object */
SalomeApp_SelectionMgr* mySelectionMgr ; /* User shape selection */
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
QString myIDs;
int myNbOkElements ; /* to check when elements are defined */
false,
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
- myViewWindow(SMESH::GetViewWindow(mySMESHGUI)),
mySMESHGUI(theModule)
{
setCaption(tr("CAPTION"));
// set selection mode
mySelectionMgr->installFilter(new SMESH_TypeFilter(GROUP));
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
onSelectionDone();
return;
//=================================================================================
void SMESHGUI_DeleteGroupDlg::onClose()
{
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
disconnect(mySelectionMgr, 0, this, 0);
disconnect(mySMESHGUI, 0, this, 0);
mySMESHGUI->ResetState();
{
mySMESHGUI->EmitSignalDeactivateDialog();
setEnabled(true);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
}
QListBox* myListBox;
SMESHGUI* mySMESHGUI;
- SVTK_ViewWindow* myViewWindow;
SalomeApp_SelectionMgr* mySelectionMgr;
QValueList<SMESH::SMESH_GroupBase_var> myListGrp;
: QDialog( SMESH::GetDesktop( theModule ), "SMESHGUI_ExtrusionAlongPathDlg", modal,
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
QPixmap edgeImage ( mgr->loadPixmap("SMESH", tr("ICON_DLG_EDGE")));
ZSpin->RangeStepAndValidator(-999999.999, +999999.999, 10.0, 3);
AngleSpin->RangeStepAndValidator(-999999.999, +999999.999, 5.0, 3);
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
mySMESHGUI->SetActiveDialogBox(this);
// Costruction of the logical filter for the elements: mesh/sub-mesh/group
SMESH::SetPointRepresentation(false);
if (MeshCheck->isChecked()) {
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myElementsFilter);
} else {
if (type == 0)
- myViewWindow->SetSelectionMode(EdgeSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(EdgeSelection);
+ }
if (type == 1)
- myViewWindow->SetSelectionMode(FaceSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(FaceSelection);
+ }
}
}
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
mySelectionMgr->clearSelected();
SMESH::SetPickable(); // ???
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySMESHGUI->ResetState();
QDialog::reject();
}
}
}
mySelector->AddOrRemoveIndex(anIO, newIndices, false);
- myViewWindow->highlight( anIO, true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( anIO, true, true );
}
} else if (send == StartPointLineEdit &&
myEditCurrentArgument == StartPointLineEdit) {
TColStd_MapOfInteger newIndices;
newIndices.Add(n->GetID());
mySelector->AddOrRemoveIndex( aPathActor->getIO(), newIndices, false );
- myViewWindow->highlight( aPathActor->getIO(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( aPathActor->getIO(), true, true );
}
}
}
myEditCurrentArgument = ElementsLineEdit;
SMESH::SetPointRepresentation(false);
if (MeshCheck->isChecked()) {
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myElementsFilter);
} else {
if (Elements1dRB->isChecked())
- myViewWindow->SetSelectionMode(EdgeSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(EdgeSelection);
+ }
else if (Elements2dRB->isChecked())
- myViewWindow->SetSelectionMode(FaceSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(FaceSelection);
+ }
}
} else if (button == SelectPathMeshButton) {
myEditCurrentArgument = PathMeshLineEdit;
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myPathMeshFilter);
}
else if (button == SelectPathShapeButton) {
myEditCurrentArgument = PathShapeLineEdit;
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
if (!myPathMesh->_is_nil()) {
GEOM::GEOM_Object_var aMainShape = myPathMesh->GetShapeToMesh();
SMESH_Actor* aPathActor = SMESH::FindActorByObject(myPathMesh);
if (aPathActor) {
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
SMESH::SetPickable(aPathActor);
}
}
else if (button == SelectBasePointButton) {
myEditCurrentArgument = XSpin;
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter(MESHorSUBMESH);
SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter(GROUP);
SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
SalomeApp_SelectionMgr* mySelectionMgr; /* User shape selection */
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
QWidget* myEditCurrentArgument; /* Current argument */
: QDialog( SMESH::GetDesktop( theModule ), "SMESHGUI_ExtrusionDlg", modal, WStyle_Customize |
WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_EDGE")));
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_TRIANGLE")));
{
GroupArguments->setTitle(tr("EXTRUSION_1D"));
if (!CheckBoxMesh->isChecked())
- myViewWindow->SetSelectionMode(EdgeSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(EdgeSelection);
+ }
break;
}
case 1:
{
GroupArguments->setTitle(tr("EXTRUSION_2D"));
if (!CheckBoxMesh->isChecked())
- myViewWindow->SetSelectionMode(FaceSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(FaceSelection);
+ }
break;
}
}
mySelectionMgr->clearSelected();
SMESH::SetPickable(); // ???
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySMESHGUI->ResetState();
reject();
}
myNbOkElements++;
}
mySelector->AddOrRemoveIndex(anIO, newIndices, false);
- myViewWindow->highlight( anIO, true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( anIO, true, true );
myElementsId = theNewText;
}
}
if (send == SelectElementsButton) {
myEditCurrentArgument = LineEditElements;
if (CheckBoxMesh->isChecked()) {
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
} else {
int aConstructorId = GetConstructorId();
if (aConstructorId == 0)
- myViewWindow->SetSelectionMode(EdgeSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(EdgeSelection);
+ }
else if (aConstructorId == 1)
- myViewWindow->SetSelectionMode(FaceSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(FaceSelection);
+ }
}
}
mySelectionMgr->clearFilters();
if (toSelectMesh) {
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
LineEditElements->setReadOnly(true);
} else {
int aConstructorId = GetConstructorId();
if (aConstructorId == 0)
- myViewWindow->SetSelectionMode(EdgeSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(EdgeSelection);
+ }
else if (aConstructorId == 0)
- myViewWindow->SetSelectionMode(FaceSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(FaceSelection);
+ }
LineEditElements->setReadOnly(false);
onTextChange(LineEditElements->text());
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
QString myElementsId;
int myNbOkElements; /* to check when elements are defined */
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
bool myBusy;
: QDialog( SMESH::GetDesktop( theModule ), theName, false,
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ mySelector = aViewWindow->GetSelector();
+
construct(theTypes);
}
mySMESHGUI( theModule ),
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
- myViewWindow = SMESH::GetViewWindow( theModule );
- mySelector = myViewWindow->GetSelector();
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ mySelector = aViewWindow->GetSelector();
QValueList<int> aTypes;
aTypes.append(theType);
construct(aTypes);
aResMap.Add(anIndMap(i));
mySelector->AddOrRemoveIndex( anIter.Key(), aResMap, false);
- myViewWindow->highlight( anIter.Key(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( anIter.Key(), true, true );
}
mySelectionMgr->setSelectedObjects(aList, false);
}
// Set new selection mode if necessary
Selection_Mode aSelMode = getSelMode(theType);
- if (myViewWindow->SelectionMode()!=aSelMode) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && aViewWindow->SelectionMode()!=aSelMode) {
mySelectionMgr->clearSelected();
mySelectionMgr->clearFilters();
if (aSelMode == NodeSelection)
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(aSelMode);
+ aViewWindow->SetSelectionMode(aSelMode);
}
// Clear selection
// Set new selection
mySelector->AddOrRemoveIndex(anIO, aMap, false);
- myViewWindow->highlight( anIO, true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( anIO, true, true );
// insert previously stored filter in viewer if necessary
if (!aFilter.IsNull())
SMESHGUI* mySMESHGUI;
SalomeApp_SelectionMgr* mySelectionMgr;
SVTK_Selector* mySelector;
- SVTK_ViewWindow* myViewWindow;
SMESH::SMESH_Mesh_ptr myMesh;
QWidget* mySourceWg;
WStyle_Title | WStyle_SysMenu | WDestructiveClose),
mySMESHGUI( theModule ),
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() ),
myIsBusy( false ),
myActor( 0 )
{
myGeomGroupLine->setEnabled(false);
}
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
/* Move widget on the botton right corner of main widget */
int x, y ;
mySMESHGUI->DefineDlgPosition(this, x, y);
WStyle_Title | WStyle_SysMenu | WDestructiveClose),
mySMESHGUI( theModule ),
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() ),
myIsBusy( false )
{
if (!name) setName("SMESHGUI_GroupDlg");
mySelectGroup->setEnabled(false);
}
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
/* Move widget on the botton right corner of main widget */
int x, y ;
mySMESHGUI->DefineDlgPosition(this, x, y);
myActor->SetPointRepresentation(true);
else
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
break;
case 1:
- myViewWindow->SetSelectionMode(EdgeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(EdgeSelection);
break;
case 2:
- myViewWindow->SetSelectionMode(FaceSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(FaceSelection);
break;
default:
- myViewWindow->SetSelectionMode(VolumeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(VolumeSelection);
}
} else {
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
if (theMode == 4)
mySelectionMgr->installFilter(mySubMeshFilter);
else if (theMode == 5)
SALOME_ListIO aList;
aList.Append(myActor->getIO());
mySelectionMgr->setSelectedObjects(aList,false);
- myViewWindow->highlight( myActor->getIO(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( myActor->getIO(), true, true );
}
myIsBusy = false;
}
}
mySelectionMgr->clearSelected();
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->clearFilters();
mySMESHGUI->ResetState();
int myGrpTypeId; /* Current group type id : standalone or group on geometry */
int myTypeId; /* Current type id = radio button id */
QLineEdit* myCurrentLineEdit; /* Current LineEdit */
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
QPushButton* myMeshGroupBtn;
: QDialog( SMESH::GetDesktop( theModule ), "SMESHGUI_GroupOpDlg", false,
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
myMode = theMode;
else if (myMode == INTERSECT) setCaption(tr("INTERSECTION_OF_TWO_GROUPS"));
else setCaption(tr("CUT_OF_TWO_GROUPS"));
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
QVBoxLayout* aDlgLay = new QVBoxLayout (this, MARGIN, SPACING);
QFrame* aMainFrame = createMainFrame (this);
this->show();
// set selection mode
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
return;
//=======================================================================
void SMESHGUI_GroupOpDlg::onClose()
{
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
disconnect(mySelectionMgr, 0, this, 0);
disconnect(mySMESHGUI, 0, this, 0);
mySMESHGUI->ResetState();
{
mySMESHGUI->EmitSignalDeactivateDialog();
setEnabled(true);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
}
SMESHGUI* mySMESHGUI;
SalomeApp_SelectionMgr* mySelectionMgr;
int myMode;
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
QLineEdit* myFocusWg;
: QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SMESH_MERGE_NODES")));
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
myActor = 0;
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
myMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
mySelectionMgr->clearFilters();
mySelectionMgr->clearSelected();
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
reject();
{
if (ListCoincident->childCount() < 1) {
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
return;
}
mySelectionMgr->setSelectedObjects(aList, false);
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
ListEdit->selectAll(true);
}
if (send == SelectMeshButton) {
myEditCurrentArgument = (QWidget*)LineEditMesh;
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myMeshOrSubMeshFilter);
}
SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
SalomeApp_SelectionMgr* mySelectionMgr; /* User shape selection */
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
QWidget* myEditCurrentArgument;
WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
myBusy(false),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
setCaption(tr("CAPTION"));
aDlgLay->setStretchFactor(aMainFrame, 1);
myCreationDlg = 0;
+
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
Init();
}
{
mySelectionMgr->clearFilters();
SMESH::SetPickable();
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
disconnect(mySelectionMgr, 0, this, 0);
disconnect(mySMESHGUI, 0, this, 0);
mySMESHGUI->ResetState();
SMESH::SetPickable(anActor);
if (myType == Type_2d)
- myViewWindow->SetSelectionMode(FaceSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(FaceSelection);
+ }
else
- myViewWindow->SetSelectionMode(CellSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(CellSelection);
+ }
}
else {
SMESH::SetPickable();
//mySelectionMgr->setSelectionModes(ActorSelection);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
}
if (mySelInput == Object && !myMeshShape->_is_nil()) {
newIndices.Add(e->GetID());
}
mySelector->AddOrRemoveIndex( anActor->getIO(), newIndices, false);
- myViewWindow->highlight( anActor->getIO(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( anActor->getIO(), true, true );
}
myBusy = false;
QCheckBox* myPreviewChk;
SMESHGUI* mySMESHGUI;
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
SalomeApp_SelectionMgr* mySelectionMgr;
int mySelInput;
theName,
false,
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
- mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
- myViewWindow(SMESH::GetViewWindow(theModule)),
mySMESHGUI(theModule)
{
myPreviewActor = 0;
aDlgLay->setStretchFactor(aMainFrame, 1);
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
Init();
}
// set selection mode
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
onSelectionDone();
}
{
mySelectionMgr->clearSelected();
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
disconnect(mySelectionMgr, 0, this, 0);
disconnect(mySMESHGUI, 0, this, 0);
mySMESHGUI->ResetState();
TColStd_MapOfInteger aListInd;
aListInd.Add(anElem->GetID());
mySelector->AddOrRemoveIndex(anIO,aListInd, false);
- myViewWindow->highlight(anIO,true,true);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight(anIO,true,true);
onSelectionDone();
}
// set selection mode
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
redisplayPreview();
void SMESHGUI_MoveNodesDlg::closeEvent (QCloseEvent*)
{
onClose();
- myViewWindow->Repaint();
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->Repaint();
}
//=======================================================================
if (myPreviewActor == 0)
return;
- myViewWindow->RemoveActor(myPreviewActor);
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if (aViewWindow)
+ aViewWindow->RemoveActor(myPreviewActor);
myPreviewActor->Delete();
myPreviewActor = 0;
- myViewWindow->Repaint();
+ if (aViewWindow)
+ aViewWindow->Repaint();
}
//=======================================================================
myPreviewActor->SetProperty(aProp);
aProp->Delete();
- myViewWindow->AddActor(myPreviewActor);
- myViewWindow->Repaint();
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ {
+ aViewWindow->AddActor(myPreviewActor);
+ aViewWindow->Repaint();
+ }
}
SMESHGUI_SpinBox* myZ;
SalomeApp_SelectionMgr* mySelectionMgr;
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
SMESHGUI* mySMESHGUI;
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
- myViewWindow(SMESH::GetViewWindow(theModule)),
mySMESHGUI(theModule)
{
myFilterDlg = 0;
//=======================================================================
void SMESHGUI_MultiEditDlg::onClose()
{
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
disconnect(mySelectionMgr, 0, this, 0);
disconnect(mySMESHGUI, 0, this, 0);
mySMESHGUI->ResetState();
}
mySelector->AddOrRemoveIndex(anActor->getIO(),anIndexes,false);
- myViewWindow->highlight(anActor->getIO(),true,true);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight(anActor->getIO(),true,true);
}
//=======================================================================
mySelectionMgr->clearFilters();
if (mySubmeshChk->isChecked()) {
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(new SMESH_TypeFilter(SUBMESH));
}
else if (myGroupChk->isChecked()) {
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(new SMESH_TypeFilter(GROUP));
}
if (entityType()) {
- myViewWindow->SetSelectionMode(VolumeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(VolumeSelection);
SMESH::SetFilter(new SMESHGUI_VolumesFilter());
} else {
- myViewWindow->SetSelectionMode(FaceSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(FaceSelection);
if (myFilterType == SMESHGUI_TriaFilter)
SMESH::SetFilter(new SMESHGUI_TriangleFilter());
else if (myFilterType == SMESHGUI_QuadFilter)
SMESH::SMESH_Mesh_var myMesh;
SalomeApp_SelectionMgr* mySelectionMgr;
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
SMESHGUI* mySMESHGUI;
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
- myViewWindow(SMESH::GetViewWindow(theModule)),
mySMESHGUI(theModule)
{
- mySimulation = new SMESH::TNodeSimulation(myViewWindow);
+ mySimulation = new SMESH::TNodeSimulation(SMESH::GetViewWindow( mySMESHGUI ));
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_NODE")));
if (!name)
// set selection mode
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
SelectionIntoArgument();
}
void SMESHGUI_NodesDlg::ClickOnCancel()
{
disconnect(mySelectionMgr, 0, this, 0);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySimulation->SetVisibility(false);
SMESH::SetPointRepresentation(false);
GroupButtons->setEnabled(true);
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
SelectionIntoArgument();
}
private:
SalomeApp_SelectionMgr* mySelectionMgr;
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
SMESHGUI* mySMESHGUI;
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
- myViewWindow(SMESH::GetViewWindow(theModule)),
mySMESHGUI(theModule),
myBusy(false)
{
this->move(x, y);
this->show(); /* displays Dialog */
- myViewWindow->SetSelectionMode(CellSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(CellSelection);
SelectionIntoArgument();
}
void SMESHGUI_RemoveElementsDlg::ClickOnCancel()
{
mySelectionMgr->clearSelected();
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
reject();
}
mySelector->AddOrRemoveIndex(anIO,newIndices,false);
- myViewWindow->highlight(anIO,true,true);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight(anIO,true,true);
}
}
mySMESHGUI->SetActiveDialogBox((QDialog*)this); // ??
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
SelectionIntoArgument(); // ??
}
void hideEvent ( QHideEvent * ); /* ESC key */
SalomeApp_SelectionMgr* mySelectionMgr;
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
SMESHGUI* mySMESHGUI;
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
- myViewWindow(SMESH::GetViewWindow(theModule)),
mySMESHGUI(theModule),
myBusy(false)
{
this->show(); /* displays Dialog */
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
SelectionIntoArgument();
}
{
mySelectionMgr->clearSelected();
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
reject();
}
mySelector->AddOrRemoveIndex(anIO,newIndices,false);
- myViewWindow->highlight(anIO,true,true);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight(anIO,true,true);
}
}
mySMESHGUI->SetActiveDialogBox((QDialog*)this); // ??
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
SelectionIntoArgument(); // ??
}
void hideEvent ( QHideEvent * ); /* ESC key */
SalomeApp_SelectionMgr* mySelectionMgr;
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
SMESHGUI* mySMESHGUI;
: QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
QPixmap image0 ( mgr->loadPixmap("SMESH", tr("ICON_DLG_EDGE")));
GroupArguments->show();
RadioButton1->setChecked(TRUE);
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Costruction of the logical filter
}
if (!CheckBoxMesh->isChecked())
- myViewWindow->SetSelectionMode(aSelMode);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(aSelMode);
+ }
myEditCurrentArgument = (QWidget*)LineEditElements;
LineEditElements->setFocus();
mySelectionMgr->clearFilters();
mySelectionMgr->clearSelected();
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySMESHGUI->ResetState();
reject();
}
}
mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);
- myViewWindow->highlight( myActor->getIO(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( myActor->getIO(), true, true );
myElementsId = theNewText;
}
myEditCurrentArgument = (QWidget*)LineEditElements;
SMESH::SetPointRepresentation(false);
if (CheckBoxMesh->isChecked()) {
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
} else {
int aConstructorId = GetConstructorId();
if (aConstructorId == 0)
- myViewWindow->SetSelectionMode(EdgeSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(EdgeSelection);
+ }
else if (aConstructorId == 1)
- myViewWindow->SetSelectionMode(FaceSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(FaceSelection);
+ }
}
} else if (send == SelectPointButton) {
myEditCurrentArgument = (QWidget*)SpinBox_X;
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
} else if (send == SelectVectorButton) {
myEditCurrentArgument = (QWidget*)SpinBox_DX;
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
} else {
}
SMESH::SetPointRepresentation(false);
if (toSelectMesh) {
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
LineEditElements->setReadOnly(true);
} else {
int aConstructorId = GetConstructorId();
if (aConstructorId == 0)
- myViewWindow->SetSelectionMode(EdgeSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(EdgeSelection);
+ }
else if (aConstructorId == 0)
- myViewWindow->SetSelectionMode(FaceSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(FaceSelection);
+ }
LineEditElements->setReadOnly(false);
onTextChange(LineEditElements->text());
int myNbOkElements; /* to check when elements are defined */
QString myElementsId;
QWidget* myEditCurrentArgument; /* Current argument */
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
bool myBusy;
: QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_ROTATION")));
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
myConstructorId = 0;
RadioButton1->setChecked(TRUE);
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Costruction of the logical filter
mySelectionMgr->clearFilters();
mySelectionMgr->clearSelected();
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySMESHGUI->ResetState();
reject();
}
}
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
- myViewWindow->highlight( anIO, true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( anIO, true, true );
myElementsId = theNewText;
}
switch (myConstructorId) {
case 0: /* default constructor */
{
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
if (send == SelectElementsButton) {
myEditCurrentArgument = (QWidget*)LineEditElements;
SMESH::SetPointRepresentation(false);
if (CheckBoxMesh->isChecked()) {
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( aViewWindow )
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
} else {
-
- myViewWindow->SetSelectionMode( CellSelection );
- }
+ if ( aViewWindow )
+ aViewWindow->SetSelectionMode( CellSelection );
+ }
} else if (send == SelectPointButton) {
myEditCurrentArgument = (QWidget*)SpinBox_X;
SMESH::SetPointRepresentation(true);
-
- myViewWindow->SetSelectionMode( NodeSelection );
+ if ( aViewWindow )
+ aViewWindow->SetSelectionMode( NodeSelection );
} else if (send == SelectVectorButton) {
myEditCurrentArgument = (QWidget*)SpinBox_DX;
SMESH::SetPointRepresentation(true);
-
- myViewWindow->SetSelectionMode( NodeSelection );
+ if ( aViewWindow )
+ aViewWindow->SetSelectionMode( NodeSelection );
}
break;
}
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
- myViewWindow->SetSelectionMode( CellSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( CellSelection );
SelectionIntoArgument();
}
SMESH::SetPointRepresentation(false);
if (toSelectMesh) {
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
LineEditElements->setReadOnly(true);
} else {
- myViewWindow->SetSelectionMode( CellSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( CellSelection );
LineEditElements->setReadOnly(false);
onTextChange(LineEditElements->text());
}
SalomeApp_SelectionMgr* mySelectionMgr; /* User shape selection */
int myNbOkElements; /* to check when elements are defined */
QString myElementsId;
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
QWidget* myEditCurrentArgument; /* Current LineEdit */
: QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
QPixmap image0 (mgr->loadPixmap("SMESH", tr("ICON_SMESH_SEWING_FREEBORDERS")));
LineEdit5->setValidator(new SMESHGUI_IdValidator(this, "validator", 1));
LineEdit6->setValidator(new SMESHGUI_IdValidator(this, "validator", 1));
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
Init();
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(CellSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(CellSelection);
break;
}
}
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
}
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
{
mySelectionMgr->clearSelected();
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
reject();
if (GetConstructorId() != 3 || (send != LineEdit1 && send != LineEdit4)) {
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
const SMDS_MeshNode * n = aMesh->FindNode(theNewText.toInt());
if (n) {
newIndices.Add(n->GetID());
mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);
- myViewWindow->highlight( myActor->getIO(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( myActor->getIO(), true, true );
if (send == LineEdit1)
myOk1 = true;
} else {
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(CellSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(CellSelection);
QStringList aListId = QStringList::split(" ", theNewText, false);
mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);
- myViewWindow->highlight( myActor->getIO(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( myActor->getIO(), true, true );
if (isEvenOneExists) {
if (send == LineEdit1)
if (GetConstructorId() != 3 || (send != SelectButton1 && send != SelectButton4)) {
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
} else {
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(CellSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(CellSelection);
}
myEditCurrentArgument->setFocus();
SalomeApp_SelectionMgr* mySelectionMgr; /* User shape selection */
int myOk1, myOk2, myOk3, myOk4, myOk5, myOk6;
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
bool myBusy;
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
- myViewWindow(SMESH::GetViewWindow(theModule)),
mySMESHGUI(theModule)
{
QVBoxLayout* aDlgLay = new QVBoxLayout(this, MARGIN, SPACING);
this->show();
// set selection mode
- myViewWindow->SetSelectionMode(EdgeOfCellSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(EdgeOfCellSelection);
onSelectionDone();
}
//=======================================================================
void SMESHGUI_SingleEditDlg::onClose()
{
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->clearSelected();
disconnect(mySelectionMgr, 0, this, 0);
disconnect(mySMESHGUI, 0, this, 0);
{
if (!isEnabled()) {
mySMESHGUI->EmitSignalDeactivateDialog();
- myViewWindow->SetSelectionMode(EdgeOfCellSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(EdgeOfCellSelection);
setEnabled(true);
}
}
SMESH_Actor* myActor;
SalomeApp_SelectionMgr* mySelectionMgr;
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
SMESHGUI* mySMESHGUI;
};
: QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_SMOOTHING")));
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
GroupArguments->show();
myConstructorId = 0;
Constructor1->setChecked(TRUE);
+
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
mySMESHGUI->SetActiveDialogBox(this);
mySelectionMgr->clearSelected();
SMESH::SetPickable(); // ???
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySMESHGUI->ResetState();
reject();
}
myNbOkElements++;
}
mySelector->AddOrRemoveIndex(anIO, newIndices, false);
- myViewWindow->highlight( anIO, true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( anIO, true, true );
myElementsId = theNewText;
} else if (send == LineEditNodes) {
myNbOkNodes++;
}
mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);
- myViewWindow->highlight( myActor->getIO(), true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( myActor->getIO(), true, true );
}
}
mySelectionMgr->setSelectionModes(ActorSelection);
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
} else {
- myViewWindow->SetSelectionMode(CellSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(CellSelection);
}
} else if (send == SelectNodesButton) {
myEditCurrentArgument = LineEditNodes;
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
}
myEditCurrentArgument->setFocus();
GroupButtons->setEnabled(true);
mySMESHGUI->SetActiveDialogBox(this);
- myViewWindow->SetSelectionMode(CellSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(CellSelection);
SelectionIntoArgument();
}
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
LineEditElements->setReadOnly(true);
} else {
- myViewWindow->SetSelectionMode(CellSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(CellSelection);
LineEditElements->setReadOnly(false);
onTextChange(LineEditElements->text());
}
int myNbOkNodes; /* to check when fixed nodes are defined */
int myConstructorId; /* Current constructor id = radio button id */
QLineEdit* myEditCurrentArgument; /* Current LineEdit */
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
bool myBusy;
: QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SMESH_SYMMETRY_POINT")));
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SMESH_SYMMETRY_AXIS")));
GroupArguments->show();
RadioButton1->setChecked(TRUE);
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Costruction of the logical filter
if (myEditCurrentArgument != (QWidget*)LineEditElements) {
SMESH::SetPointRepresentation(false);
if (!CheckBoxMesh->isChecked())
- myViewWindow->SetSelectionMode(CellSelection);
+ {
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(CellSelection);
+ }
}
myEditCurrentArgument = (QWidget*)LineEditElements;
mySelectionMgr->clearFilters();
mySelectionMgr->clearSelected();
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySMESHGUI->ResetState();
reject();
}
}
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
- myViewWindow->highlight( anIO, true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( anIO, true, true );
myElementsId = theNewText;
}
myEditCurrentArgument = (QWidget*)LineEditElements;
SMESH::SetPointRepresentation(false);
if (CheckBoxMesh->isChecked()) {
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
} else {
- myViewWindow->SetSelectionMode(CellSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(CellSelection);
}
} else if (send == SelectPointButton) {
myEditCurrentArgument = (QWidget*)SpinBox_X;
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
} else if (send == SelectVectorButton) {
myEditCurrentArgument = (QWidget*)SpinBox_DX;
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode(NodeSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(NodeSelection);
} else {
}
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
- myViewWindow->SetSelectionMode(CellSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(CellSelection);
SelectionIntoArgument();
}
SMESH::SetPointRepresentation(false);
if (toSelectMesh) {
- myViewWindow->SetSelectionMode(ActorSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(ActorSelection);
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
LineEditElements->setReadOnly(true);
} else {
- myViewWindow->SetSelectionMode(CellSelection);
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode(CellSelection);
LineEditElements->setReadOnly(false);
onTextChange(LineEditElements->text());
}
SalomeApp_SelectionMgr* mySelectionMgr; /* User shape selection */
int myNbOkElements; /* to check when elements are defined */
QString myElementsId;
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
QWidget* myEditCurrentArgument; /* Current LineEdit */
: QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
- myViewWindow( SMESH::GetViewWindow( theModule ) ),
- mySelector( myViewWindow->GetSelector() )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
{
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SMESH_TRANSLATION_POINTS")));
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SMESH_TRANSLATION_VECTOR")));
GroupArguments->show();
RadioButton1->setChecked(TRUE);
+ mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Costruction of the logical filter
if (myEditCurrentArgument != (QWidget*)LineEditElements) {
SMESH::SetPointRepresentation(false);
if (!CheckBoxMesh->isChecked())
-
- myViewWindow->SetSelectionMode( CellSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( CellSelection );
}
myEditCurrentArgument = (QWidget*)LineEditElements;
mySelectionMgr->clearFilters();
mySelectionMgr->clearSelected();
SMESH::SetPointRepresentation(false);
- myViewWindow->SetSelectionMode( ActorSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( ActorSelection );
mySMESHGUI->ResetState();
reject();
}
}
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
- myViewWindow->highlight( anIO, true, true );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->highlight( anIO, true, true );
myElementsId = theNewText;
}
myEditCurrentArgument = (QWidget*)LineEditElements;
SMESH::SetPointRepresentation(false);
if (CheckBoxMesh->isChecked()) {
- myViewWindow->SetSelectionMode( ActorSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( ActorSelection );
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
} else {
- myViewWindow->SetSelectionMode( CellSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( CellSelection );
}
} else if (send == SelectButton1) {
myEditCurrentArgument = (QWidget*)SpinBox1_1;
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode( NodeSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( NodeSelection );
} else if (send == SelectButton2) {
myEditCurrentArgument = (QWidget*)SpinBox2_1;
SMESH::SetPointRepresentation(true);
- myViewWindow->SetSelectionMode( NodeSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( NodeSelection );
}
myEditCurrentArgument->setFocus();
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
- myViewWindow->SetSelectionMode( CellSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( CellSelection );
SelectionIntoArgument();
}
SMESH::SetPointRepresentation(false);
if (toSelectMesh) {
- myViewWindow->SetSelectionMode( ActorSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( ActorSelection );
mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
LineEditElements->setReadOnly(true);
} else {
- myViewWindow->SetSelectionMode( CellSelection );
+ if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ aViewWindow->SetSelectionMode( CellSelection );
LineEditElements->setReadOnly(false);
onTextChange(LineEditElements->text());
}
QString myElementsId;
int myNbOkElements; /* to check when elements are defined */
- SVTK_ViewWindow* myViewWindow;
SVTK_Selector* mySelector;
QWidget* myEditCurrentArgument;
void SetFilter(const Handle(VTKViewer_Filter)& theFilter,
SVTK_InteractorStyle* theStyle)
{
- theStyle->SetFilter(theFilter);
+ if (theStyle)
+ theStyle->SetFilter(theFilter);
}
Handle(VTKViewer_Filter) GetFilter(int theId, SVTK_InteractorStyle* theStyle)