VisuGUI::
OnCreatePlot3D()
{
- CreatePrs3d<VISU::Plot3D_i,VisuGUI_Plot3DDlg,1>(this);
+ CreatePrs3d<VISU::Plot3D_i,VisuGUI_Plot3DDlg,0>(this);
}
void
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::ScalarMap_i, VisuGUI_ScalarBarDlg,0>(this, aPrs3d);
+ EditPrs3d<VISU::ScalarMap_i, VisuGUI_ScalarBarDlg,1>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::DeformedShape_i, VisuGUI_DeformedShapeDlg,0>(this, aPrs3d);
+ EditPrs3d<VISU::DeformedShape_i, VisuGUI_DeformedShapeDlg,1>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::CutPlanes_i, VisuGUI_CutPlanesDlg,1>(this, aPrs3d);
+ EditPrs3d<VISU::CutPlanes_i, VisuGUI_CutPlanesDlg,0>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::CutLines_i, VisuGUI_CutLinesDlg,1>(this, aPrs3d);
+ EditPrs3d<VISU::CutLines_i, VisuGUI_CutLinesDlg,0>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::IsoSurfaces_i, VisuGUI_IsoSurfacesDlg,0>(this, aPrs3d);
+ EditPrs3d<VISU::IsoSurfaces_i, VisuGUI_IsoSurfacesDlg,1>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::Vectors_i, VisuGUI_VectorsDlg,0>(this, aPrs3d);
+ EditPrs3d<VISU::Vectors_i, VisuGUI_VectorsDlg,1>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::StreamLines_i, VisuGUI_StreamLinesDlg,0>(this, aPrs3d);
+ EditPrs3d<VISU::StreamLines_i, VisuGUI_StreamLinesDlg,1>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
{
Handle(SALOME_InteractiveObject) anIO;
if(VISU::Prs3d_i* aPrs3d = GetPrsToModify(this,&anIO)){
- EditPrs3d<VISU::Plot3D_i, VisuGUI_Plot3DDlg,1>(this, aPrs3d);
+ EditPrs3d<VISU::Plot3D_i, VisuGUI_Plot3DDlg,0>(this, aPrs3d);
if(SVTK_ViewWindow* aViewWindow = GetViewWindow()){
aViewWindow->highlight(anIO, 1);
}
--- /dev/null
+// File: VisuGUI_DialogRunner.cxx
+// Created: Thu Oct 6 10:17:39 2005
+// Author: Alexander SOLOVYOV
+// <asl@multiplex.nnov.opencascade.com>
+
+#include "VisuGUI_DialogRunner.h"
+
+#include <qdialog.h>
+#include <qapplication.h>
+
+VisuGUI_DialogRunner::VisuGUI_DialogRunner( QDialog* dlg )
+: QObject(),
+ myDlg( dlg ),
+ myInLoop( false )
+{
+ if( myDlg )
+ {
+ connect( myDlg, SIGNAL( destroyed() ), this, SLOT( onDialogDelete() ) );
+ myDlg->installEventFilter( this );
+ }
+}
+
+VisuGUI_DialogRunner::~VisuGUI_DialogRunner()
+{
+}
+
+int VisuGUI_DialogRunner::run( const bool modal )
+{
+ if( myInLoop || !myDlg )
+ return -1;
+
+ qDebug( "start" );
+ if( modal )
+ return myDlg->exec();
+
+ myInLoop = true;
+ myDlg->show();
+ qDebug( "enter loop" );
+ qApp->enter_loop();
+ qDebug( "after loop" );
+ return myDlg->result();
+}
+
+void VisuGUI_DialogRunner::onDialogDelete()
+{
+ if( myInLoop )
+ qApp->exit_loop();
+
+ myDlg = 0;
+ myInLoop = false;
+}
+
+bool VisuGUI_DialogRunner::eventFilter( QObject* o, QEvent* e )
+{
+ if( o==myDlg && e && ( e->type()==QEvent::Close || e->type()==QEvent::Hide ) )
+ {
+ if( myInLoop && !myDlg->isMinimized() )
+ {
+ myInLoop = false;
+ qApp->exit_loop();
+ }
+ return false;
+ }
+ else
+ return QObject::eventFilter( o, e );
+}