emit SignalVisibilityChanged();
}
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+void SMESHGUI::EmitSignalCloseView()
+{
+ emit SignalCloseView();
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+void SMESHGUI::EmitSignalActivatedViewManager()
+{
+ emit SignalActivatedViewManager();
+}
+
//=============================================================================
/*!
*
SUIT_ViewWindow *sf = aViews[i];
connectView( sf );
}
+ EmitSignalActivatedViewManager();
}
}
//Crear all Plot2d Viewers if need.
SMESH::ClearPlot2Viewers(pview);
#endif
+ EmitSignalCloseView();
}
void SMESHGUI::message( const QString& msg )
void EmitSignalStudyFrameChanged();
void EmitSignalCloseAllDialogs();
void EmitSignalVisibilityChanged();
+ void EmitSignalCloseView();
+ void EmitSignalActivatedViewManager();
virtual void contextMenuPopup( const QString&, QMenu*, QString& );
virtual void createPreferences();
void SignalStudyFrameChanged();
void SignalCloseAllDialogs();
void SignalVisibilityChanged();
+ void SignalCloseView();
+ void SignalActivatedViewManager();
protected:
void createSMESHAction( const int,
connect(SelectButtonC1A1,SIGNAL(clicked()), SLOT(SetEditCurrentArgument()));
connect(LineEditC1A1, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()),SLOT(DeactivateActiveDialog()));
+
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(SelectionIntoArgument()));
/* to close dialog if study frame change */
connect(mySMESHGUI, SIGNAL(SignalStudyFrameChanged()), SLOT(reject()));
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), SLOT(onCloseView()));
if (Reverse)
connect(Reverse, SIGNAL(stateChanged(int)), SLOT(CheckBox(int)));
//=================================================================================
void SMESHGUI_AddMeshElementDlg::enterEvent (QEvent*)
{
- if (GroupConstructors->isEnabled())
- return;
- ActivateThisDialog();
+ if ( !GroupConstructors->isEnabled() ) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector && !mySimulation) {
+ mySelector = aViewWindow->GetSelector();
+ mySimulation = new SMESH::TElementSimulation(
+ dynamic_cast<SalomeApp_Application*>( mySMESHGUI->application() ) );
+ }
+ ActivateThisDialog();
+ }
}
//=================================================================================
}
//=================================================================================
-// function : isValid
+// function : onDiameterChanged()
// purpose :
//=================================================================================
void SMESHGUI_AddMeshElementDlg::onDiameterChanged(){
}
//=================================================================================
-// function : isValid
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_AddMeshElementDlg::onOpenView()
+{
+ if ( mySelector && mySimulation ) {
+ mySimulation->SetVisibility(false);
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ mySimulation = new SMESH::TElementSimulation(
+ dynamic_cast<SalomeApp_Application*>( mySMESHGUI->application() ) );
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_AddMeshElementDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+ delete mySimulation;
+ mySimulation = 0;
+}
+
+//=================================================================================
+// function : isValid()
// purpose :
//=================================================================================
bool SMESHGUI_AddMeshElementDlg::isValid()
void ActivateThisDialog();
void CheckBox( int );
void onTextChange( const QString& );
+ void onOpenView();
+ void onCloseView();
};
#endif // SMESHGUI_ADDMESHELEMENTDLG_H
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), SLOT(DeactivateActiveDialog()));
connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), SLOT(reject()));
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL (SignalActivatedViewManager()), SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseView()), SLOT(onCloseView()));
myCurrentLineEdit = myCornerNodes;
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_AddQuadraticElementDlg::onOpenView()
+{
+ if ( mySelector && mySimulation ) {
+ mySimulation->SetVisibility(false);
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ mySimulation = new SMESH::TElementSimulationQuad(
+ dynamic_cast<SalomeApp_Application*>( mySMESHGUI->application() ) );
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_AddQuadraticElementDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+ delete mySimulation;
+ mySimulation = 0;
+}
//=================================================================================
// function : ClickOnHelp()
// purpose :
// function : enterEvent()
// purpose :
//=================================================================================
-
void SMESHGUI_AddQuadraticElementDlg::enterEvent (QEvent*)
{
- if (GroupConstructors->isEnabled())
- return;
- ActivateThisDialog();
+ if ( !GroupConstructors->isEnabled() ) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector && !mySimulation) {
+ mySelector = aViewWindow->GetSelector();
+ mySimulation = new SMESH::TElementSimulationQuad(
+ dynamic_cast<SalomeApp_Application*>( mySMESHGUI->application() ) );
+ }
+ ActivateThisDialog();
+ }
}
//=================================================================================
void SelectionIntoArgument();
void DeactivateActiveDialog();
void ActivateThisDialog();
+ void onOpenView();
+ void onCloseView();
};
#endif // SMESHGUI_ADDQUADRATICELEMENTDLG_H
this, SLOT (SelectionIntoArgument()));
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()),/* to close dialog if study change */
this, SLOT (reject()));
+ connect(mySMESHGUI, SIGNAL (SignalActivatedViewManager()),
+ this, SLOT (onOpenView()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseView()),
+ this, SLOT (onCloseView()));
connect(myLineEditElements, SIGNAL(textChanged(const QString&)),
this, SLOT (onTextChange(const QString&)));
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_CopyMeshDlg::onOpenView()
+{
+ if ( mySelector ) {
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_CopyMeshDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+}
+
//=================================================================================
// function : ClickOnHelp()
// purpose :
SelectionIntoArgument();
}
+
//=================================================================================
// function : enterEvent()
// purpose :
//=================================================================================
void SMESHGUI_CopyMeshDlg::enterEvent (QEvent*)
{
- if (!ConstructorsBox->isEnabled())
+ if ( !ConstructorsBox->isEnabled() ) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector ) {
+ mySelector = aViewWindow->GetSelector();
+ }
ActivateThisDialog();
+ }
}
-
//=================================================================================
// function : keyPressEvent()
// purpose :
void onTextChange( const QString& );
void onSelectIdSource( bool );
void setFilters();
+ void onOpenView();
+ void onCloseView();
};
#endif // SMESHGUI_CopyMeshDLG_H
aDlgLay->setStretchFactor( aMainFrame, 1 );
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ) )
- mySelector = aViewWindow->GetSelector();
-
myHelpFileName = "pattern_mapping_page.html";
Init( theType );
QCheckBox* myProjectChk;
SMESHGUI* mySMESHGUI;
- SVTK_Selector* mySelector;
LightApp_SelectionMgr* mySelectionMgr;
int myType;
connect( mySelectionMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
connect( Preview, SIGNAL(toggled(bool)), this, SLOT(ClickOnPreview(bool)));
/* to close dialog if study change */
- connect( mySMESHGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( reject() ) );
-
+ connect( mySMESHGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( reject() ) );
+ connect( mySMESHGUI, SIGNAL ( SignalActivatedViewManager() ), this, SLOT( onOpenView() ) );
+ connect( mySMESHGUI, SIGNAL ( SignalCloseView() ), this, SLOT( onCloseView() ) );
ConstructorsClicked(0);
SelectionIntoArgument();
}
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_CreatePolyhedralVolumeDlg::onOpenView()
+{
+ if ( mySelector && mySimulation ) {
+ mySimulation->SetVisibility(false);
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ mySimulation = new SMESH::TPolySimulation(
+ dynamic_cast<SalomeApp_Application*>( mySMESHGUI->application() ) );
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_CreatePolyhedralVolumeDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+ delete mySimulation;
+ mySimulation = 0;
+}
+
//=================================================================================
// function : ClickOnHelp()
// purpose :
SelectionIntoArgument();
}
-
//=================================================================================
// function : enterEvent()
// purpose :
//=================================================================================
-void SMESHGUI_CreatePolyhedralVolumeDlg::enterEvent(QEvent* e)
+void SMESHGUI_CreatePolyhedralVolumeDlg::enterEvent (QEvent*)
{
- if ( ConstructorsBox->isEnabled() )
- return;
- ActivateThisDialog();
+ if ( !ConstructorsBox->isEnabled() ) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector && !mySimulation) {
+ mySelector = aViewWindow->GetSelector();
+ mySimulation = new SMESH::TPolySimulation(
+ dynamic_cast<SalomeApp_Application*>( mySMESHGUI->application() ) );
+ }
+ ActivateThisDialog();
+ }
}
//=================================================================================
void ActivateThisDialog();
void onTextChange( const QString& );
void onListSelectionChanged();
+ void onOpenView();
+ void onCloseView();
};
#endif // SMESHGUI_CREATEPOLYHEDRALVOLUMEDLG_H
connect(BasePointGrp, SIGNAL(toggled(bool)), this, SLOT(SetEditCurrentArgument()));
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), SLOT(onCloseView()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(SelectionIntoArgument()));
connect(SelectorWdg, SIGNAL(selectionChanged()), this, SLOT(toDisplaySimulation()));
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_ExtrusionAlongPathDlg::onOpenView()
+{
+ if ( mySelector ) {
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_ExtrusionAlongPathDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+}
+
//=======================================================================
// function : onTextChange()
// purpose :
//=================================================================================
// function : enterEvent()
-// purpose : Mouse enter event
+// purpose :
//=================================================================================
void SMESHGUI_ExtrusionAlongPathDlg::enterEvent (QEvent*)
{
- if (!GroupButtons->isEnabled())
+ if ( !GroupButtons->isEnabled() ) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
ActivateThisDialog();
+ }
}
//=======================================================================
void onTextChange( const QString& );
void OnAngleAdded();
void OnAngleRemoved();
+ void onOpenView();
+ void onCloseView();
};
#endif // SMESHGUI_EXTRUSIONALONGPATHDLG_H
connect(SelectorWdg, SIGNAL(selectionChanged()), this, SLOT(toDisplaySimulation()));
connect(SelectorWdg, SIGNAL(selectionChanged()), this, SLOT(CheckIsEnable()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), this, SLOT(onCloseView()));
connect(SpinBox_Dx, SIGNAL(valueChanged(double)), this, SLOT(toDisplaySimulation()));
connect(SpinBox_Dy, SIGNAL(valueChanged(double)), this, SLOT(toDisplaySimulation()));
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_ExtrusionDlg::onOpenView()
+{
+ if ( mySelector ) {
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_ExtrusionDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+}
+
//=================================================================================
// function : ClickOnHelp()
// purpose :
//=================================================================================
// function : enterEvent()
-// purpose : Mouse enter event
+// purpose :
//=================================================================================
void SMESHGUI_ExtrusionDlg::enterEvent (QEvent*)
{
- if (!GroupButtons->isEnabled())
+ if ( !GroupButtons->isEnabled() ) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
ActivateThisDialog();
+ }
}
//=================================================================================
void SelectionIntoArgument();
void DeactivateActiveDialog();
void ActivateThisDialog();
+ void onOpenView();
+ void onCloseView();
+
};
#endif // SMESHGUI_EXTRUSIONDLG_H
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), SLOT(onCloseView()));
updateMainButtons();
updateSelection();
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_FilterDlg::onOpenView()
+{
+ if ( mySelector ) {
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_FilterDlg::onCloseView()
+{
+ mySelector = 0;
+}
+
//=================================================================================
// function : onHelp()
// purpose :
void onCriterionChanged( const int, const int );
void onThresholdChanged( const int, const int );
void onCurrentChanged( int, int );
+ void onOpenView();
+ void onCloseView();
private:
:SMESHGUI_SelectionOp()
{
mySimulation = 0;
+ mySMESHGUI = 0;
myDlg = new SMESHGUI_FindElemByPointDlg;
myHelpFileName = "find_element_by_point_page.html";
{
// init simulation with a current View
if ( mySimulation ) delete mySimulation;
- mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( getSMESHGUI() ));
+ mySMESHGUI = getSMESHGUI();
+ mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ) );
+ connect(mySMESHGUI, SIGNAL (SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseView()), this, SLOT(onCloseView()));
vtkProperty* aProp = vtkProperty::New();
aProp->SetRepresentationToWireframe();
aProp->SetColor(250, 0, 250);
delete mySimulation;
mySimulation = 0;
}
+ disconnect(mySMESHGUI, SIGNAL (SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ disconnect(mySMESHGUI, SIGNAL (SignalCloseView()), this, SLOT(onCloseView()));
selectionMgr()->removeFilter( myFilter );
SMESHGUI_SelectionOp::stopOperation();
}
+//=================================================================================
+/*!
+ * \brief SLOT called when the viewer opened
+ */
+//=================================================================================
+void SMESHGUI_FindElemByPointOp::onOpenView()
+{
+ if ( mySimulation ) {
+ mySimulation->SetVisibility(false);
+ }
+ else {
+ mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ));
+ }
+}
+
+//=================================================================================
+/*!
+ * \brief SLOT called when the viewer closed
+ */
+//=================================================================================
+void SMESHGUI_FindElemByPointOp::onCloseView()
+{
+ delete mySimulation;
+ mySimulation = 0;
+}
//================================================================================
/*!
* \brief hilight found selected elements
myPreview->nodesXYZ[0].x = myDlg->myX->GetValue();
myPreview->nodesXYZ[0].y = myDlg->myY->GetValue();
myPreview->nodesXYZ[0].z = myDlg->myZ->GetValue();
-
+ if (!mySimulation)
+ mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ));
mySimulation->SetData(&myPreview.in());
}
void onElemSelected();
void onElemTypeChange(int);
void redisplayPreview();
+ void onOpenView();
+ void onCloseView();
private:
SMESHGUI_FindElemByPointDlg* myDlg;
SUIT_SelectionFilter* myFilter;
+ SMESHGUI* mySMESHGUI;
SMESHGUI_MeshEditPreview* mySimulation; // to show point coordinates
SMESH::SMESH_IDSource_var myMeshOrPart;
SMESH::MeshPreviewStruct_var myPreview;
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onObjectSelectionChanged()));
connect(mySMESHGUI, SIGNAL(SignalVisibilityChanged()), this, SLOT(onVisibilityChanged()));
-
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), this, SLOT(onCloseView()));
rb1->setChecked(true); // VSR !!!
onGrpTypeChanged(0); // VSR!!!
if ( myFilterDlg ) myFilterDlg->UnRegisterFilters();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_GroupDlg::onOpenView()
+{
+ if ( mySelector ) {
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ mySMESHGUI->EmitSignalDeactivateDialog();
+ setEnabled(true);
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_GroupDlg::onCloseView()
+{
+ onDeactivate();
+ mySelector = 0;
+}
+
//=================================================================================
// function : onHelp()
// purpose :
void SMESHGUI_GroupDlg::enterEvent (QEvent*)
{
if (!isEnabled()) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
mySMESHGUI->EmitSignalDeactivateDialog();
setEnabled(true);
mySelectionMode = grpNoSelection;
void onPublishShapeByMeshDlg( SUIT_Operation* );
void onCloseShapeByMeshDlg( SUIT_Operation* );
+ void onOpenView();
+ void onCloseView();
+
private:
void initDialog( bool );
void init( SMESH::SMESH_Mesh_ptr );
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), SLOT(onCloseView()));
// set selection mode
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_GroupOpDlg::onOpenView()
+{
+ if ( mySelector ) {
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ mySMESHGUI->EmitSignalDeactivateDialog();
+ setEnabled(true);
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_GroupOpDlg::onCloseView()
+{
+ onDeactivate();
+ mySelector = 0;
+}
+
/*!
\brief SLOT called when "Help" button pressed shows "Help" page
*/
{
mySMESHGUI->EmitSignalDeactivateDialog();
setEnabled(true);
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow ) {
aViewWindow->SetSelectionMode(ActorSelection);
+ if (!mySelector)
+ mySelector = aViewWindow->GetSelector();
+ }
mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
}
}
/*!
- \brief Provides reaction on \93F1\94 button pressing
+ \brief Provides reaction on �F1� button pressing
\param e key press event
*/
void SMESHGUI_GroupOpDlg::keyPressEvent( QKeyEvent* e )
void onDeactivate();
+ void onOpenView();
+ void onCloseView();
+
private:
QWidget* createButtonFrame( QWidget* );
QWidget* createMainFrame ( QWidget* );
SMESHGUI_MakeNodeAtPointOp::SMESHGUI_MakeNodeAtPointOp()
{
mySimulation = 0;
+ mySMESHGUI = 0;
myDlg = new SMESHGUI_MakeNodeAtPointDlg;
myFilter = 0;
myHelpFileName = "mesh_through_point_page.html";
// init simulation with a current View
if ( mySimulation ) delete mySimulation;
- mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( getSMESHGUI() ));
+ mySMESHGUI = getSMESHGUI();
+ mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ) );
+ connect(mySMESHGUI, SIGNAL (SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseView()), this, SLOT(onCloseView()));
vtkProperty* aProp = vtkProperty::New();
aProp->SetRepresentationToWireframe();
aProp->SetColor(250, 0, 250);
void SMESHGUI_MakeNodeAtPointOp::stopOperation()
{
myNoPreview = true;
- mySimulation->SetVisibility(false);
+ if ( mySimulation )
+ {
+ mySimulation->SetVisibility(false);
+ delete mySimulation;
+ mySimulation = 0;
+ }
if ( myMeshActor ) {
myMeshActor->SetPointRepresentation(false);
SMESH::RepaintCurrentView();
myMeshActor = 0;
}
+ disconnect(mySMESHGUI, SIGNAL (SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ disconnect(mySMESHGUI, SIGNAL (SignalCloseView()), this, SLOT(onCloseView()));
selectionMgr()->removeFilter( myFilter );
SMESHGUI_SelectionOp::stopOperation();
}
aMeshPreviewStruct->elementConnectivities.length(1);
aMeshPreviewStruct->elementConnectivities[0] = 0;
}
-
+ if (!mySimulation)
+ mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ));
// display data
if ( aMeshPreviewStruct.operator->() )
{
myNoPreview = false;
}
+//=================================================================================
+/*!
+ * \brief SLOT called when the viewer opened
+ */
+//=================================================================================
+void SMESHGUI_MakeNodeAtPointOp::onOpenView()
+{
+ if ( mySimulation ) {
+ mySimulation->SetVisibility(false);
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ));
+ }
+}
+
+//=================================================================================
+/*!
+ * \brief SLOT called when the viewer closed
+ */
+//=================================================================================
+void SMESHGUI_MakeNodeAtPointOp::onCloseView()
+{
+ delete mySimulation;
+ mySimulation = 0;
+}
+
//================================================================================
/*!
* \brief SLOT called when the node id is manually changed
void onTextChange( const QString& );
void onUpdateDestination();
void onDestCoordChanged();
+ void onOpenView();
+ void onCloseView();
private:
int GetConstructorId();
SUIT_SelectionFilter* myFilter;
int myMeshOldDisplayMode;
+ SMESHGUI* mySMESHGUI;
SMESHGUI_MeshEditPreview* mySimulation;
SMESH_Actor* myMeshActor;
bool myNoPreview;
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
-
+ connect(mySMESHGUI, SIGNAL (SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseView()), this, SLOT(onCloseView()));
// Init Mesh field from selection
SelectionIntoArgument();
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_MergeDlg::onOpenView()
+{
+ if ( mySelector ) {
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_MergeDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+}
+
//=================================================================================
// function : ClickOnHelp()
// purpose :
// function : enterEvent()
// purpose :
//=================================================================================
-void SMESHGUI_MergeDlg::enterEvent(QEvent*)
+void SMESHGUI_MergeDlg::enterEvent (QEvent*)
{
- if (!GroupConstructors->isEnabled())
+ if ( !GroupConstructors->isEnabled() ) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
ActivateThisDialog();
+ }
}
//=================================================================================
void DeactivateActiveDialog();
void ActivateThisDialog();
void onTypeChanged(int);
+ void onOpenView();
+ void onCloseView();
};
#endif // SMESHGUI_MergeDlg_H
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), SLOT( onOpenView()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), SLOT( onCloseView()));
myTypeGrp->button(Type_2d)->setChecked(true);
onTypeChanged(Type_2d);
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_MeshPatternDlg::onOpenView()
+{
+ if(!mySelector) {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ mySMESHGUI->EmitSignalDeactivateDialog();
+ setEnabled(true);
+ activateSelection();
+ connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_MeshPatternDlg::onCloseView()
+{
+ onDeactivate();
+ mySelector = 0;
+}
+
+
//=================================================================================
// function : onHelp()
// purpose :
if (myIsCreateDlgOpen)
return;
- if (myReverseChk->isChecked())
+ if (myReverseChk->isChecked()) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
displayPreview();
+ }
mySMESHGUI->EmitSignalDeactivateDialog();
setEnabled(true);
activateSelection();
void onCloseCreationDlg();
void onTextChanged( const QString& );
void onNodeChanged( int );
+ void onOpenView();
+ void onCloseView();
private:
QWidget* createButtonFrame( QWidget* );
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), SLOT( onOpenView()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), SLOT( onCloseView()));
// dialog controls
connect(myFilterBtn, SIGNAL(clicked()), SLOT(onFilterBtn() ));
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_MultiEditDlg::onOpenView()
+{
+ if(!mySelector) {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ mySMESHGUI->EmitSignalDeactivateDialog();
+ setEnabled(true);
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_MultiEditDlg::onCloseView()
+{
+ onDeactivate();
+ mySelector = 0;
+}
+
+
//=================================================================================
// function : onHelp()
// purpose :
void SMESHGUI_MultiEditDlg::enterEvent (QEvent*)
{
if (!isEnabled()) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
mySMESHGUI->EmitSignalDeactivateDialog();
setEnabled(true);
setSelectionMode();
virtual void onToAllChk();
void onFilterAccepted();
virtual void on3d2dChanged(int);
+ void onOpenView();
+ void onCloseView();
SMESH::NumericalFunctor_ptr getNumericalFunctor();
connect( mySMESHGUI, SIGNAL( SignalDeactivateActiveDialog() ), SLOT( DeactivateActiveDialog() ) );
/* to close dialog if study frame change */
connect( mySMESHGUI, SIGNAL( SignalStudyFrameChanged() ), SLOT( reject() ) );
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
-
+ connect( mySMESHGUI, SIGNAL( SignalCloseAllDialogs() ), SLOT( reject() ) );
+ connect( mySMESHGUI, SIGNAL( SignalActivatedViewManager() ), SLOT( onOpenView() ) );
+ connect( mySMESHGUI, SIGNAL( SignalCloseView() ), SLOT( onCloseView() ) );
// set selection mode
SMESH::SetPointRepresentation( true );
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ) )
double vx = SpinBox_X->GetValue();
double vy = SpinBox_Y->GetValue();
double vz = SpinBox_Z->GetValue();
-
mySimulation->SetPosition( vx, vy, vz );
}
}
disconnect( mySelectionMgr, 0, this, 0 );
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ) )
aViewWindow->SetSelectionMode( ActorSelection );
-
mySimulation->SetVisibility( false );
SMESH::SetPointRepresentation( false );
mySMESHGUI->ResetState();
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_NodesDlg::onOpenView()
+{
+ if ( mySelector && mySimulation ) {
+ mySimulation->SetVisibility(false);
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ mySelector = aViewWindow->GetSelector();
+ mySimulation = new SMESH::TNodeSimulation(aViewWindow);
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_NodesDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+ delete mySimulation;
+ mySimulation = 0;
+}
+
//=================================================================================
// function : ClickOnHelp()
// purpose :
//=================================================================================
void SMESHGUI_NodesDlg::enterEvent( QEvent* )
{
- if ( !GroupConstructors->isEnabled() )
+ if ( !GroupConstructors->isEnabled() ) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector && !mySimulation) {
+ mySelector = aViewWindow->GetSelector();
+ mySimulation = new SMESH::TNodeSimulation(aViewWindow);
+ }
ActivateThisDialog();
+ }
}
//=================================================================================
SMESH::SetPointRepresentation( true );
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ) )
aViewWindow->SetSelectionMode( NodeSelection );
-
SelectionIntoArgument();
}
void ActivateThisDialog();
void SelectionIntoArgument();
void ValueChangedInSpinBox( double );
+ void onOpenView();
+ void onCloseView();
};
#endif // SMESHGUI_NODESDLG_H
myIsApplyAndClose( false )
{
mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), this, SLOT(onCloseView()));
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), this, SLOT(onOpenView()));
}
//=================================================================================
// purpose : Show preview in the viewer
//=================================================================================
void SMESHGUI_PreviewDlg::showPreview(){
- if(mySimulation)
+ if(mySimulation && mySimulation->GetActor())
mySimulation->SetVisibility(true);
}
// purpose : Hide preview in the viewer
//=================================================================================
void SMESHGUI_PreviewDlg::hidePreview(){
- if(mySimulation)
+ if(mySimulation && mySimulation->GetActor())
mySimulation->SetVisibility(false);
}
connect(myPreviewCheckBox, SIGNAL(toggled(bool)), this, SLOT(onDisplaySimulation(bool)));
}
-
//=================================================================================
// function : toDisplaySimulation
// purpose :
return myIsApplyAndClose;
}
+//=================================================================================
+// function : onCloseView()
+// purpose : SLOT called when close view
+//=================================================================================
+void SMESHGUI_PreviewDlg::onCloseView()
+{
+ if ( mySimulation && mySimulation->GetActor())
+ mySimulation->SetVisibility(false);
+ delete mySimulation;
+ mySimulation=0;
+}
+//=================================================================================
+// function : onOpenView()
+// purpose : SLOT called when open view
+//=================================================================================
+void SMESHGUI_PreviewDlg::onOpenView()
+{
+ if ( !mySimulation)
+ mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ));
+}
//=================================================================================
// class : SMESHGUI_SMESHGUI_MultiPreviewDlg()
// purpose :
QDialog( SMESH::GetDesktop( theModule ) ),
myIsApplyAndClose( false )
{
+ mySimulationList.clear();
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), this, SLOT(onCloseView()));
}
//=================================================================================
void SMESHGUI_MultiPreviewDlg::showPreview()
{
for ( int i = 0; i < mySimulationList.count(); i++ )
- mySimulationList[i]->SetVisibility( true );
+ if(mySimulationList[i] && mySimulationList[i]->GetActor())
+ mySimulationList[i]->SetVisibility( true );
}
//=================================================================================
void SMESHGUI_MultiPreviewDlg::hidePreview()
{
for ( int i = 0; i < mySimulationList.count(); i++ )
- mySimulationList[i]->SetVisibility( false );
+ if(mySimulationList[i] && mySimulationList[i]->GetActor())
+ mySimulationList[i]->SetVisibility( false );
}
//=================================================================================
connect( myPreviewCheckBox, SIGNAL( toggled( bool ) ), this, SLOT( onDisplaySimulation( bool ) ) );
}
-
//=================================================================================
// function : toDisplaySimulation
// purpose :
mySimulationList[i]->SetData( theMeshPreviewStruct[i].operator->() );
}
}
+
+//=================================================================================
+// function : onCloseView()
+// purpose : SLOT called when close view
+//=================================================================================
+void SMESHGUI_MultiPreviewDlg::onCloseView()
+{
+ qDeleteAll( mySimulationList );
+ mySimulationList.clear();
+}
protected slots:
void toDisplaySimulation();
+ void onCloseView();
+ void onOpenView();
virtual void onDisplaySimulation( bool );
-
protected:
SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
protected slots:
void toDisplaySimulation();
+ void onCloseView();
virtual void onDisplaySimulation( bool );
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL (SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseView()), this, SLOT(onCloseView()));
connect(myEditCurrentArgument, SIGNAL(textChanged(const QString&)),
SLOT(onTextChange(const QString&)));
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_RemoveElementsDlg::onOpenView()
+{
+ if(!mySelector) {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_RemoveElementsDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+}
+
//=================================================================================
// function : ClickOnHelp()
// purpose :
//=================================================================================
void SMESHGUI_RemoveElementsDlg::enterEvent(QEvent*)
{
- if (!GroupConstructors->isEnabled())
+ if (!GroupConstructors->isEnabled()) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
ActivateThisDialog();
+ }
}
//=================================================================================
void DeactivateActiveDialog();
void ActivateThisDialog();
void onTextChange( const QString& );
+ void onOpenView();
+ void onCloseView();
void setFilters();
void updateButtons();
};
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL (SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseView()), this, SLOT(onCloseView()));
connect(myEditCurrentArgument, SIGNAL(textChanged(const QString&)),
SLOT(onTextChange(const QString&)));
QDialog::reject();
}
+
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_RemoveNodesDlg::onOpenView()
+{
+ if ( mySelector) {
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_RemoveNodesDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+}
+
//=================================================================================
// function : ClickOnHelp()
// purpose :
//=================================================================================
void SMESHGUI_RemoveNodesDlg::enterEvent(QEvent*)
{
- if (!GroupConstructors->isEnabled())
+ if (!GroupConstructors->isEnabled()) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
ActivateThisDialog();
+ }
}
//=================================================================================
void DeactivateActiveDialog();
void ActivateThisDialog();
void onTextChange( const QString& );
+ void onOpenView();
+ void onCloseView();
void setFilters();
void updateButtons();
};
connect(SelectorWdg, SIGNAL(selectionChanged()), this, SLOT(toDisplaySimulation()));
connect(SelectorWdg, SIGNAL(selectionChanged()), this, SLOT(CheckIsEnable()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), this, SLOT(onCloseView()));
connect(GroupAngle, SIGNAL(buttonClicked(int)), this, SLOT(toDisplaySimulation()));
connect(SpinBox_Angle, SIGNAL(valueChanged(double)), this, SLOT(toDisplaySimulation()));
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_RevolutionDlg::onOpenView()
+{
+ if ( mySelector ) {
+ mySimulation->SetVisibility(false);
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_RevolutionDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+}
+
//=================================================================================
// function : ClickOnHelp()
// purpose :
//=================================================================================
void SMESHGUI_RevolutionDlg::enterEvent (QEvent*)
{
- if (!GroupButtons->isEnabled())
+ if (!GroupButtons->isEnabled()) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
ActivateThisDialog();
+ }
}
//=================================================================================
void onAngleTextChange( const QString& );
void onSelectVectorMenu( QAction* );
void onSelectVectorButton();
+ void onOpenView();
+ void onCloseView();
};
#endif // SMESHGUI_REVOLUTIONDLG_H
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL (SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL (SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseView()), this, SLOT(onCloseView()));
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int)));
QDialog::reject();
}
+
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_RotationDlg::onOpenView()
+{
+ if ( mySelector ) {
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_RotationDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+}
+
//=================================================================================
// function : ClickOnHelp()
// purpose :
//=================================================================================
void SMESHGUI_RotationDlg::enterEvent (QEvent*)
{
- if (!GroupConstructors->isEnabled())
+ if (!GroupConstructors->isEnabled()) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
ActivateThisDialog();
+ }
}
//=================================================================================
void onSelectMesh( bool );
void onVectorChanged();
void onActionClicked( int );
+ void onOpenView();
+ void onCloseView();
void setFilters();
};
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), this, SLOT(onCloseView()));
+
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int)));
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_ScaleDlg::onOpenView()
+{
+ if ( mySelector ) {
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_ScaleDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+}
+
//=================================================================================
// function : ClickOnHelp()
// purpose :
//=================================================================================
void SMESHGUI_ScaleDlg::enterEvent (QEvent*)
{
- if (!ConstructorsBox->isEnabled())
+ if (!ConstructorsBox->isEnabled()) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
ActivateThisDialog();
+ }
}
//=======================================================================
void onTextChange( const QString& );
void onSelectMesh( bool );
void onActionClicked( int );
+ void onOpenView();
+ void onCloseView();
void setFilters();
};
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), this, SLOT(onCloseView()));
connect(LineEdit1, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(LineEdit2, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_SewingDlg::onOpenView()
+{
+ if ( mySelector ) {
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_SewingDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+}
+
//=================================================================================
// function : reject()
// purpose :
isEvenOneExists = true;
}
-
mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->highlight( myActor->getIO(), true, true );
// get selected elements/nodes
int aNbUnits = 0;
-
if (GetConstructorId() != 3 ||
(myEditCurrentArgument != LineEdit1 && myEditCurrentArgument != LineEdit4)) {
aNbUnits = SMESH::GetNameOfSelectedNodes(mySelector, IO, aString);
//=================================================================================
void SMESHGUI_SewingDlg::enterEvent (QEvent* e)
{
- if (!ConstructorsBox->isEnabled())
+ if (!ConstructorsBox->isEnabled()) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
ActivateThisDialog();
+ }
}
//=================================================================================
void DeactivateActiveDialog();
void ActivateThisDialog();
void onTextChange( const QString& );
+ void onOpenView();
+ void onCloseView();
};
#endif // SMESHGUI_SEWINGDLG_H
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), SLOT(onCloseView()));
connect(myEdge, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
myOkBtn->setEnabled(false);
setEnabled(false);
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_SingleEditDlg::onOpenView()
+{
+ if ( !mySelector ) {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ mySMESHGUI->EmitSignalDeactivateDialog();
+ setEnabled(true);
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_SingleEditDlg::onCloseView()
+{
+ onDeactivate();
+ mySelector = 0;
+}
+
//=======================================================================
// name : enterEvent()
// Purpose : Event filter
{
if (!isEnabled()) {
mySMESHGUI->EmitSignalDeactivateDialog();
- if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow) {
aViewWindow->SetSelectionMode(EdgeOfCellSelection);
+ if (!mySelector)
+ mySelector = aViewWindow->GetSelector();
+ }
setEnabled(true);
}
}
void onSelectionDone();
void onTextChange( const QString& );
+private slots:
+ void onOpenView();
+ void onCloseView();
+
+
protected:
void enterEvent( QEvent* );
void keyPressEvent( QKeyEvent* );
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL (SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseView()), this, SLOT(onCloseView()));
connect(LineEditElements, SIGNAL(textChanged(const QString&)),
SLOT(onTextChange(const QString&)));
connect(LineEditNodes, SIGNAL(textChanged(const QString&)),
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_SmoothingDlg::onOpenView()
+{
+ if ( mySelector ) {
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_SmoothingDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+}
+
//=================================================================================
// function : ClickOnHelp()
// purpose :
//=================================================================================
void SMESHGUI_SmoothingDlg::enterEvent (QEvent*)
{
- if (!GroupConstructors->isEnabled())
+ if (!GroupConstructors->isEnabled()) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
ActivateThisDialog();
+ }
}
//=======================================================================
protected slots:
virtual void reject();
+
private slots:
void ClickOnOk();
bool ClickOnApply();
void ActivateThisDialog();
void onTextChange( const QString& );
void onSelectMesh( bool );
+ void onOpenView();
+ void onCloseView();
void setElemFilters();
void setNodeFilters();
};
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL(SignalCloseView()), this, SLOT(onCloseView()));
+
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int)));
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_SymmetryDlg::onOpenView()
+{
+ if ( mySelector ) {
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_SymmetryDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+}
+
//=================================================================================
// function : ClickOnHelp()
// purpose :
//=================================================================================
void SMESHGUI_SymmetryDlg::enterEvent (QEvent*)
{
- if (!ConstructorsBox->isEnabled())
+ if (!ConstructorsBox->isEnabled()) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
ActivateThisDialog();
+ }
}
//=======================================================================
protected slots:
virtual void onDisplaySimulation( bool );
virtual void reject();
-
+
private slots:
void ConstructorsClicked( int );
void ClickOnOk();
void onSelectMesh( bool );
void onVectorChanged();
void onActionClicked( int );
+ void onOpenView();
+ void onCloseView();
void setFilters();
};
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
- connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
- connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
- connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int)));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
+ connect(mySMESHGUI, SIGNAL (SignalActivatedViewManager()), this, SLOT(onOpenView()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseView()), this, SLOT(onCloseView()));
+
+ connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
+ connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
+ connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int)));
connect(SpinBox1_1, SIGNAL(valueChanged(double)), this, SLOT(toDisplaySimulation()));
connect(SpinBox1_2, SIGNAL(valueChanged(double)), this, SLOT(toDisplaySimulation()));
QDialog::reject();
}
+//=================================================================================
+// function : onOpenView()
+// purpose :
+//=================================================================================
+void SMESHGUI_TranslationDlg::onOpenView()
+{
+ if ( mySelector ) {
+ SMESH::SetPointRepresentation(false);
+ }
+ else {
+ mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector();
+ ActivateThisDialog();
+ }
+}
+
+//=================================================================================
+// function : onCloseView()
+// purpose :
+//=================================================================================
+void SMESHGUI_TranslationDlg::onCloseView()
+{
+ DeactivateActiveDialog();
+ mySelector = 0;
+}
+
//=================================================================================
// function : ClickOnHelp()
// purpose :
myNbOkElements++;
}
}
-
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->highlight( anIO, true, true );
anActor = SMESH::FindActorByEntry(IO->getEntry());
if (!anActor && !CheckBoxMesh->isChecked())
return;
-
aNbUnits = SMESH::GetNameOfSelectedNodes(mySelector, IO, aString);
if (aNbUnits != 1)
return;
//=================================================================================
void SMESHGUI_TranslationDlg::enterEvent (QEvent*)
{
- if (!ConstructorsBox->isEnabled())
+ if (!ConstructorsBox->isEnabled()) {
+ SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
+ if ( aViewWindow && !mySelector) {
+ mySelector = aViewWindow->GetSelector();
+ }
ActivateThisDialog();
+ }
}
//=======================================================================
void onTextChange( const QString& );
void onSelectMesh( bool );
void onActionClicked( int );
+ void onOpenView();
+ void onCloseView();
void setFilters();
+
};
#endif // SMESHGUI_TRANSLATIONDLG_H