From bd2ac3dfbc13468258672d5a125bb6a1182d010a Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 20 Apr 2009 11:24:05 +0000 Subject: [PATCH] Replace QxGraph (obsolete) by QxScene --- configure.ac | 13 ++-- src/LightApp/LightApp_Application.cxx | 59 +++++++++--------- src/LightApp/LightApp_Application.h | 2 +- src/LightApp/Makefile.am | 11 ++-- src/Makefile.am | 89 +++++++++++++++++++++------ src/QxGraph/Makefile.am | 5 ++ 6 files changed, 115 insertions(+), 64 deletions(-) diff --git a/configure.ac b/configure.ac index 77cd2e02a..75137d9a9 100644 --- a/configure.ac +++ b/configure.ac @@ -100,9 +100,6 @@ if test "x${enable_qxGraphViewer}" != "xno" ; then else DISABLE_QXGRAPHVIEWER="yes" fi -dnl THIS IS A TEMPORARY SOLUTION BECAUSE QXGRAPH NOT YET PORTING TO QT4 -dnl AFTER PORTING QXGARPH TO QT4 THE STRING BELOW HAVE TO BE REMOVED -DISABLE_QXGRAPHVIEWER="yes" dnl dnl Initialize source and build root directories @@ -474,12 +471,10 @@ if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then echo "failed : for full configuration of GUI module necessary enable SalomeObject !" exit fi - dnl THIS IS A TEMPORARY SOLUTION BECAUSE QXGRAPH NOT YET PORTING TO QT4 - dnl AFTER PORTING QXGARPH TO QT4 THE FOLLOWING CHECK HAVE TO BE UNCOMMENTED - dnl if test "x${DISABLE_QXGRAPHVIEWER}" == "xyes" ; then - dnl echo "failed : for full configuration of GUI module necessary enable QxGraphViewer !" - dnl exit - dnl fi + if test "x${DISABLE_QXGRAPHVIEWER}" == "xyes" ; then + echo "failed : for full configuration of GUI module necessary enable QxGraphViewer !" + exit + fi fi echo diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index bbcdd88f3..f1abe33f1 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -93,10 +93,6 @@ #endif #endif -#include -#include -#include - #ifndef DISABLE_OCCVIEWER #include #ifndef DISABLE_SALOMEOBJECT @@ -126,9 +122,13 @@ //#endif #ifndef DISABLE_QXGRAPHVIEWER - #include - #include - #include +//VSR: QxGraph has been replaced by QxScene +// #include +// #include +// #include + #include + #include + #include #endif #include @@ -572,11 +572,11 @@ void LightApp_Application::createActions() createActionForViewer( NewVTKViewId, newWinMenu, QString::number( 3 ), Qt::ALT+Qt::Key_K ); #endif #ifndef DISABLE_QXGRAPHVIEWER - createActionForViewer( NewQxGraphViewId, newWinMenu, QString::number( 4 ), Qt::ALT+Qt::Key_C ); +//VSR: QxGraph has been replaced by QxScene +// createActionForViewer( NewQxGraphViewId, newWinMenu, QString::number( 4 ), Qt::ALT+Qt::Key_C ); + createActionForViewer( NewQxSceneViewId, newWinMenu, QString::number( 4 ), Qt::ALT+Qt::Key_S ); #endif - createActionForViewer( NewQxSceneViewId, newWinMenu, QString::number( 5 ), Qt::ALT+Qt::Key_S ); - createAction( RenameId, tr( "TOT_RENAME" ), QIcon(), tr( "MEN_DESK_RENAME" ), tr( "PRP_RENAME" ), Qt::SHIFT+Qt::Key_R, desk, false, this, SLOT( onRenameWindow() ) ); createMenu( RenameId, windowMenu, -1 ); @@ -681,13 +681,14 @@ void LightApp_Application::onNewWindow() break; #endif #ifndef DISABLE_QXGRAPHVIEWER - case NewQxGraphViewId: - type = QxGraph_Viewer::Type(); - break; -#endif +//VSR: QxGraph has been replaced by QxScene +// case NewQxGraphViewId: +// type = QxGraph_Viewer::Type(); +// break; case NewQxSceneViewId: type = QxScene_Viewer::Type(); break; +#endif } if ( !type.isEmpty() ) @@ -805,13 +806,12 @@ void LightApp_Application::updateCommandsStatus() #endif #ifndef DISABLE_QXGRAPHVIEWER - a = action( NewQxGraphViewId ); - if( a ) - a->setEnabled( activeStudy() ); -#endif +//VSR: QxGraph has been replaced by QxScene +// a = action( NewQxGraphViewId ); a = action( NewQxSceneViewId ); if( a ) a->setEnabled( activeStudy() ); +#endif } /*! @@ -1249,13 +1249,6 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType } } #endif - if( vmType == QxScene_Viewer::Type() ) - { - viewMgr = new QxScene_ViewManager( activeStudy(), desktop() ); - QxScene_Viewer* vm = new QxScene_Viewer(); - viewMgr->setViewModel( vm ); - //QxScene_ViewWindow* wnd = dynamic_cast( viewMgr->getActiveView() ); - } //#ifndef DISABLE_SUPERVGRAPHVIEWER // if( vmType == SUPERVGraph_Viewer::Type() ) // { @@ -1263,10 +1256,18 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType // } //#endif #ifndef DISABLE_QXGRAPHVIEWER - if( vmType == QxGraph_Viewer::Type() ) - { - viewMgr = new QxGraph_ViewManager( activeStudy(), desktop(), new QxGraph_Viewer() ); - } +//VSR: QxGraph has been replaced by QxScene +// if( vmType == QxGraph_Viewer::Type() ) +// { +// viewMgr = new QxGraph_ViewManager( activeStudy(), desktop(), new QxGraph_Viewer() ); +// } + if( vmType == QxScene_Viewer::Type() ) + { + viewMgr = new QxScene_ViewManager( activeStudy(), desktop() ); + QxScene_Viewer* vm = new QxScene_Viewer(); + viewMgr->setViewModel( vm ); + //QxScene_ViewWindow* wnd = dynamic_cast( viewMgr->getActiveView() ); + } #endif #ifndef DISABLE_OCCVIEWER if( vmType == OCCViewer_Viewer::Type() ) diff --git a/src/LightApp/LightApp_Application.h b/src/LightApp/LightApp_Application.h index 7f1787909..953947f13 100644 --- a/src/LightApp/LightApp_Application.h +++ b/src/LightApp/LightApp_Application.h @@ -80,7 +80,7 @@ public: CloseId, CloseAllId, GroupAllId, PreferencesId, MRUId, ModulesListId, NewGLViewId, NewPlot2dId, NewOCCViewId, NewVTKViewId, NewQxGraphViewId, - NewQxSceneViewId, StyleId, + NewQxSceneViewId = NewQxGraphViewId, StyleId, UserID }; protected: diff --git a/src/LightApp/Makefile.am b/src/LightApp/Makefile.am index f6d8edd1f..66d8cc884 100755 --- a/src/LightApp/Makefile.am +++ b/src/LightApp/Makefile.am @@ -188,8 +188,6 @@ if ENABLE_PLOT2DVIEWER else libLightApp_la_CPPFLAGS += -DDISABLE_PLOT2DVIEWER endif -libLightApp_la_CPPFLAGS+= -I$(srcdir)/../QxScene - if ENABLE_OCCVIEWER libLightApp_la_CPPFLAGS += -I$(srcdir)/../OCCViewer else !ENABLE_OCCVIEWER @@ -212,8 +210,10 @@ if ENABLE_SUPERVGRAPHVIEWER else !ENABLE_SUPERVGRAPHVIEWER libLightApp_la_CPPFLAGS += -DDISABLE_SUPERVGRAPHVIEWER endif +###VSR: QxGraph has been replaced by QxScene +###libLightApp_la_CPPFLAGS += -I$(srcdir)/../QxGraph if ENABLE_QXGRAPHVIEWER - libLightApp_la_CPPFLAGS += -I$(srcdir)/../QxGraph + libLightApp_la_CPPFLAGS += -I$(srcdir)/../QxScene else !ENABLE_QXGRAPHVIEWER libLightApp_la_CPPFLAGS += -DDISABLE_QXGRAPHVIEWER endif @@ -274,7 +274,8 @@ endif if ENABLE_SUPERVGRAPHVIEWER libLightApp_la_LIBADD += ../SUPERVGraph/libSUPERVGraph.la endif +###VSR: QxGraph has been replaced by QxScene +###libLightApp_la_LIBADD += ../QxGraph/libQxGraph.la if ENABLE_QXGRAPHVIEWER - libLightApp_la_LIBADD += ../QxGraph/libQxGraph.la -endif libLightApp_la_LIBADD+= ../QxScene/libQxScene.la +endif diff --git a/src/Makefile.am b/src/Makefile.am index a1801ad6d..372d18f5c 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,53 +24,102 @@ # Module : SALOME # $Header$ # -SUBDIRS = CASCatch Qtx Style DDS QDS ObjBrowser SUIT SUITApp STD CAF CAM LogWindow Prs Event +## +# Common packages +## +SUBDIRS_COMMON = CASCatch Qtx Style DDS QDS ObjBrowser SUIT SUITApp STD CAF CAM LogWindow Prs Event + +## +# SALOME object +## if ENABLE_SALOMEOBJECT - SUBDIRS += OBJECT + SUBDIRS_OBJECT = OBJECT endif +## +# GL viewer +## if ENABLE_GLVIEWER - SUBDIRS += GLViewer + SUBDIRS_GLVIEWER = GLViewer endif +## +# VTK viewer +## if ENABLE_VTKVIEWER - SUBDIRS += VTKViewer + SUBDIRS_VTKVIEWER = VTKViewer if ENABLE_SALOMEOBJECT - SUBDIRS += SVTK + SUBDIRS_VTKVIEWER += SVTK endif endif + +## +# OCC viewer +## if ENABLE_OCCVIEWER - SUBDIRS += OCCViewer + SUBDIRS_OCCVIEWER = OCCViewer if ENABLE_SALOMEOBJECT - SUBDIRS += SOCC + SUBDIRS_OCCVIEWER += SOCC endif endif -if ENABLE_PYCONSOLE - SUBDIRS += PyInterp PyConsole -endif + +## +# Plot2d viewer +## if ENABLE_PLOT2DVIEWER - SUBDIRS += Plot2d + SUBDIRS_PLOT2DVIEWER = Plot2d if ENABLE_SALOMEOBJECT - SUBDIRS += SPlot2d + SUBDIRS_PLOT2DVIEWER += SPlot2d endif endif + +## +# SUPERV graph viewer +## if ENABLE_SUPERVGRAPHVIEWER - SUBDIRS += SUPERVGraph + SUBDIRS_SUPERVGRAPHVIEWER = SUPERVGraph endif + +## +# Qx scene viewer +## +###VSR: QxGraph has been replaced by QxScene +###SUBDIRS_QXGRAPHVIEWER = QxGraph if ENABLE_QXGRAPHVIEWER - SUBDIRS += QxGraph + SUBDIRS_QXGRAPHVIEWER = QxScene endif -SUBDIRS += QxScene LightApp ResExporter -if GUI_ENABLE_CORBA - SUBDIRS += TOOLSGUI Session SalomeApp +## +# Python console (base) +## +if ENABLE_PYCONSOLE + SUBDIRS_PYCONSOLE = PyInterp PyConsole endif +## +# Light SALOME packages +## +SUBDIRS_LIGHT = LightApp ResExporter + +## +# Extra Python packages +## if ENABLE_PYCONSOLE - SUBDIRS += SALOME_SWIG SALOME_PY SALOME_PYQT + SUBDIRS_PY_LIGHT = SALOME_SWIG SALOME_PY SALOME_PYQT endif +## +# Full (CORBA) SALOME packages +## +if GUI_ENABLE_CORBA + SUBDIRS_CORBA = TOOLSGUI Session SalomeApp +endif + +SUBDIRS = $(SUBDIRS_COMMON) $(SUBDIRS_OBJECT) $(SUBDIRS_GLVIEWER) $(SUBDIRS_VTKVIEWER) $(SUBDIRS_OCCVIEWER) \ + $(SUBDIRS_PLOT2DVIEWER) $(SUBDIRS_SUPERVGRAPHVIEWER) $(SUBDIRS_QXGRAPHVIEWER) $(SUBDIRS_PYCONSOLE) \ + $(SUBDIRS_LIGHT) $(SUBDIRS_PY_LIGHT) $(SUBDIRS_CORBA) + DIST_SUBDIRS = CASCatch Qtx Style DDS QDS ObjBrowser SUIT SUITApp STD CAF CAM LogWindow Prs Event \ - OBJECT GLViewer VTKViewer SVTK OCCViewer SOCC PyInterp PyConsole Plot2d SPlot2d SUPERVGraph \ - QxGraph QxScene LightApp ResExporter TOOLSGUI Session SalomeApp SALOME_SWIG SALOME_PY SALOME_PYQT + OBJECT GLViewer VTKViewer SVTK OCCViewer SOCC Plot2d SPlot2d SUPERVGraph QxGraph QxScene \ + PyInterp PyConsole LightApp ResExporter SALOME_SWIG SALOME_PY SALOME_PYQT TOOLSGUI Session SalomeApp diff --git a/src/QxGraph/Makefile.am b/src/QxGraph/Makefile.am index b684b26a7..9e9874a0f 100755 --- a/src/QxGraph/Makefile.am +++ b/src/QxGraph/Makefile.am @@ -19,6 +19,11 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + +############################################################## +# VSR: WARNING! THIS PACKAGE IS OBSOLETE +############################################################## + include $(top_srcdir)/adm_local/unix/make_common_starter.am lib_LTLIBRARIES = libQxGraph.la -- 2.39.2