]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
code cleanup
authormbs <martin.bernhard@opencascade.com>
Fri, 24 Mar 2023 17:02:34 +0000 (17:02 +0000)
committermbs <martin.bernhard@opencascade.com>
Mon, 27 Mar 2023 10:47:10 +0000 (11:47 +0100)
src/CMakeLists.txt
src/LightApp/LightApp_Application.cxx
src/LightApp/LightApp_Displayer.cxx
src/LightApp/MBDebug.h
src/Prs/SALOME_Prs.h
src/SPV3D/CMakeLists.txt
src/SPV3D/SPV3D_ViewManager.cxx
src/SPV3D/SPV3D_ViewManager.h
src/SPV3D/SPV3D_ViewModel.cxx
src/SPV3D/SPV3D_ViewModel.h

index be9672a5127cbff6f67b604faff43ad2863323dc..44e4f4f34dea3151f64ef937aa219343d50f7d0a 100644 (file)
@@ -42,9 +42,6 @@ ADD_SUBDIRECTORY(ViewerTools)
 ADD_SUBDIRECTORY(ImageComposer)
 ADD_SUBDIRECTORY(GUI_PY)
 
-# The standalone CADViewer framework
-ADD_SUBDIRECTORY(CADViewer)
-
 ##
 # SALOME object
 ##
index 242d4cdbaf660cc345f3fe53d2175dafed1d1f71..8178e9a234a44052232615554f982c35ce260f99 100644 (file)
@@ -1926,29 +1926,6 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType
   }
 #endif
 
-// //MBS:
-// #ifndef DISABLE_PV3DVIEWER
-//   if( vmType == PV3DViewer_ViewModel::Type() )
-//   {
-//     // if (( viewMgr = dynamic_cast<PV3DViewer_ViewManager*>( getViewManager( vmType, false )))) {
-//     //   viewMgr->getActiveView()->setFocus();
-//     //   return 0;
-//     // } else {
-//     //   viewMgr = new PV3DViewer_ViewManager( activeStudy(), desktop() );
-//     // }
-//
-//     viewMgr = new SPV3D_ViewManager( activeStudy(), desktop() );
-//     SPV3D_ViewModel* vm = dynamic_cast<SPV3D_ViewModel*>( viewMgr->getViewModel() );
-//     if (vm)
-//     {
-//       // Initalize all view parameters
-//       //vm->setXXX(); // NYI
-//
-//       //new LightApp_PV3DSelector(vm, mySelMgr);
-//     }
-//   }
-// #endif
-
 //MBS:
 #ifndef DISABLE_PV3DVIEWER
 # ifndef DISABLE_SALOMEOBJECT
index e8a9a7d47aa579ec26d5751cdefdd60fbabcd1e5..2265297009308f2b3d2d55c3ca6b26e9efa4a5bf 100644 (file)
@@ -87,6 +87,7 @@ void LightApp_Displayer::Display( const QStringList& list, const bool updateView
                                   SALOME_View* theViewFrame )
 {
   DBG_FUN();
+  SHOW(list);
   SALOME_View* vf = theViewFrame ? theViewFrame : GetActiveView();
   QStringList::const_iterator it = list.constBegin();
   for ( ; it != list.constEnd(); ++it)
@@ -97,7 +98,7 @@ void LightApp_Displayer::Display( const QStringList& list, const bool updateView
 
       if ( vf )
       {
-       myLastEntry = *it;
+             myLastEntry = *it;
         vf->BeforeDisplay( this, prs );
         vf->Display( this, prs );
         vf->AfterDisplay( this, prs );
index bde273ff5da844d437becf5d8bcd48a5c8a14da8..d52b73d27f2b38c1c555ea66d437456cad9424f8 100644 (file)
@@ -39,7 +39,8 @@
 #include <set>\r
 #include <vector>\r
 #ifndef MB_IGNORE_QT\r
-# include <qstring.h>\r
+# include <QString>\r
+# include <QStringList>\r
 #endif\r
 \r
 //---------------------------------------------------------------\r
@@ -212,6 +213,19 @@ inline void DumpVar(const char *szName, const QString &value)
 {\r
        DLOG << "[QStr]: " << szName << "=\"" << value.toStdString() << "\"" << std::endl;\r
 }\r
+\r
+inline void DumpVar(const char *szName, const QStringList &value)\r
+{\r
+       DLOG << "[QStrLst]: " << szName << "=[len=" << value.length() << "] {";\r
+  bool first = true;\r
+  QStringList::const_iterator it = value.constBegin();\r
+  for ( ; it != value.constEnd(); ++it)\r
+  {\r
+    DLOG << (first ? "" : ",") << "\"" << (*it).toStdString() << "\"";\r
+    first = false;\r
+  }\r
+  DLOG << "}" << std::endl;\r
+}\r
 #endif\r
 \r
 inline void DumpVar(const char *szName, const void* value)\r
index d5c94fbdac2bed5250049eafed9b258872f5d1ca..1a0b32fc12f457ff307643239651112e5bd9937f 100644 (file)
@@ -383,7 +383,7 @@ public:
   virtual void Update( SALOME_Prs2d* );//!< Update SALOME_Prs2d presentation.
   // Add new Update() methods here...
 
-  // Axiluary methods called before and after displaying of objects
+  // Auxiliary methods called before and after displaying of objects
   virtual void BeforeDisplay( SALOME_View*, const SALOME_OCCPrs* ) {} //! Null body here
   virtual void AfterDisplay ( SALOME_View*, const SALOME_OCCPrs* ) {} //! Null body here
   virtual void BeforeDisplay( SALOME_View*, const SALOME_VTKPrs* ) {} //! Null body here
@@ -393,7 +393,7 @@ public:
   virtual void BeforeDisplay( SALOME_View*, const SALOME_Prs2d*  ) {} //! Null body here
   virtual void AfterDisplay ( SALOME_View*, const SALOME_Prs2d*  ) {} //! Null body here
 
-  // Axiluary methods called before and after erasing of objects
+  // Auxiliary methods called before and after erasing of objects
   virtual void BeforeErase( SALOME_View*, const SALOME_OCCPrs* ) {} //! Null body here
   virtual void AfterErase ( SALOME_View*, const SALOME_OCCPrs* ) {} //! Null body here
   virtual void BeforeErase( SALOME_View*, const SALOME_VTKPrs* ) {} //! Null body here
@@ -403,7 +403,7 @@ public:
   virtual void BeforeErase( SALOME_View*, const SALOME_Prs2d*  ) {} //! Null body here
   virtual void AfterErase ( SALOME_View*, const SALOME_Prs2d*  ) {} //! Null body here
 
-  // Axiluary method called to update visibility state of presentation
+  // Auxiliary method called to update visibility state of presentation
   virtual void UpdateVisibility( SALOME_View*, const SALOME_Prs*, bool );
 };
 
index b02004967e9a87080a47607db83609db20f1e30c..4dbbd264aa3ea3614d6f2a879c83192aecccb93d 100644 (file)
@@ -19,6 +19,8 @@
 
 INCLUDE(UseQtExt)
 
+#add_subdirectory(plugins)
+
 # --- options ---
 
 # additional include directories
@@ -29,14 +31,12 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   ${PROJECT_SOURCE_DIR}/src/Qtx
   ${PROJECT_SOURCE_DIR}/src/SUIT
-  # ${PROJECT_SOURCE_DIR}/src/ViewerTools
   ${PROJECT_SOURCE_DIR}/src/OBJECT
   ${PROJECT_SOURCE_DIR}/src/Prs
   ${PROJECT_SOURCE_DIR}/src/PV3DViewer
   ${PROJECT_SOURCE_DIR}/src/PVViewer
   ${PROJECT_SOURCE_DIR}/src/PVServerService
 )
-  # ${PROJECT_SOURCE_DIR}/src/OpenGLUtils
 
 # additional preprocessor / compiler flags
 ADD_DEFINITIONS(${QT_DEFINITIONS} ${OpenCASCADE_DEFINITIONS} ${BOOST_DEFINITIONS})
@@ -48,16 +48,10 @@ SET(_link_LIBRARIES
   ${OpenCASCADE_FoundationClasses_LIBRARIES} ${OpenCASCADE_Visualization_LIBRARIES}
   ${KERNEL_OpUtil}
   qtx suit 
-  #ViewerTools 
   SalomeObject SalomePrs PV3DViewer PVViewer PVServerService
   ParaView::pqApplicationComponents
   ParaView::pqPython
 )
-  #OpenGLUtils
-  # VTK::RenderingAnnotation
-  # VTK::ImagingCore
-  # VTK::CommonSystem
-  # VTK::IOExportGL2PS
 
 # --- headers ---
 
@@ -66,96 +60,17 @@ SET(_moc_HEADERS
    SPV3D_ViewManager.h
    SPV3D_ViewModel.h
    SPV3D_ViewWindow.h
-   #SPV3D_View.h
 )
-  #  SPV3D_ComboAction.h
-  #  SPV3D_FontWidget.h
-  #  SPV3D_GenericRenderWindowInteractor.h
-  #  SPV3D_RecorderDlg.h
-  #  SPV3D_PsOptionsDlg.h      
-  #  SPV3D_RenderWindowInteractor.h
-  #  SPV3D_SetRotationPointDlg.h
-  # SPV3D_ViewModelBase.h
-  # SPV3D_ViewParameterDlg.h
-
-# header files / to be processed by moc / internal
-# TODO: check for MSVS project
-# SET(_moc_internal_HEADERS
-# )
-  # SPV3D_CubeAxesDlg.h
-  # SPV3D_NonIsometricDlg.h
-  # SPV3D_UpdateRateDlg.h
 
 # header files / no moc processing
 SET(_other_HEADERS
    SPV3D.h
    SPV3D_Prs.h
-   #SALOME_Actor.h
 )
-  # SPV3D_Actor.h
-  #  SPV3D_AreaPicker.h
-  #  SPV3D_CubeAxesActor2D.h
-  #  SPV3D_DeviceActor.h
-  #  SPV3D_Event.h
-  #  SPV3D_Functor.h
-  #  SPV3D_ImageWriter.h
-  #  SPV3D_ImageWriterMgr.h
-  #  SPV3D_InteractorStyle.h
-  #  SPV3D_KeyFreeInteractorStyle.h
-  #  SPV3D_Recorder.h
-  # SPV3D_Renderer.h
-  # SPV3D_Selection.h
-  # SPV3D_SelectionEvent.h
-  # SPV3D_Selector.h
-  #  SPV3D_SpaceMouse.h
-  #  SPV3D_Utils.h
-  #  SPV3D_Hash.h
-
-# header files / no moc processing / internal
-# no processing currently: TODO: check for MSVS project
-# SET(_internal_HEADERS
-#   # SPV3D_SelectorDef.h
-#   # SPV3D_Trihedron.h
-#   # SPV3D_AxesActor.h
-#   # SPV3D_AxesWidget.h
-# )
 
 # header files / to install
 SET(SPV3D_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
 
-# --- resources ---
-
-# resource files / to be processed by lrelease
-# SET(_ts_RESOURCES
-#   resources/SPV3D_msg_en.ts
-#   resources/SPV3D_msg_fr.ts
-#   resources/SPV3D_msg_ja.ts
-#   resources/SPV3D_images.ts
-# )
-
-# resource files / static
-# SET(_other_RESOURCES
-#   # resources/vtk_view_graduated_axes.png
-#   # resources/vtk_view_highlight.png
-#   # resources/vtk_view_highlight_dyn.png
-#   # resources/vtk_view_highlight_off.png
-#   # resources/vtk_view_highlight_std.png
-#   # resources/vtk_view_parallel.png
-#   # resources/vtk_view_parameters.png
-#   # resources/vtk_view_perspective.png
-#   # resources/vtk_view_recording_pause.png
-#   # resources/vtk_view_recording_play.png
-#   # resources/vtk_view_recording_start.png
-#   # resources/vtk_view_recording_stop.png
-#   # resources/vtk_view_rotation_point.png
-#   # resources/vtk_view_scaling.png
-#   # resources/vtk_view_selection.png
-#   # resources/vtk_view_stereo.png
-#   # resources/vtk_view_style_switch.png
-#   # resources/vtk_view_update_rate.png
-#   # resources/vtk_view_zooming_style_switch.png
-# )
-
 # --- sources ---
 
 # sources / moc wrappings
@@ -167,36 +82,7 @@ SET(_other_SOURCES
    SPV3D_ViewManager.cxx
    SPV3D_ViewModel.cxx
    SPV3D_ViewWindow.cxx
-   #SPV3D_View.cxx
-   #SALOME_Actor.cxx
 )
-  #SPV3D_Actor.cxx
-  # SPV3D_AreaPicker.cxx
-  # SPV3D_ComboAction.cxx
-  # SPV3D_CubeAxesActor2D.cxx
-  # SPV3D_CubeAxesDlg.cxx
-  # SPV3D_DeviceActor.cxx
-  # SPV3D_FontWidget.cxx
-  # SPV3D_GenericRenderWindowInteractor.cxx
-  # SPV3D_ImageWriter.cxx
-  # SPV3D_ImageWriterMgr.cxx
-  # SPV3D_InteractorStyle.cxx
-  # SPV3D_KeyFreeInteractorStyle.cxx
-  # SPV3D_NonIsometricDlg.cxx
-  # SPV3D_Recorder.cxx
-  # SPV3D_RecorderDlg.cxx
-  # SPV3D_PsOptionsDlg.cxx
-  # SPV3D_RenderWindowInteractor.cxx
-  #SPV3D_Renderer.cxx
-  #SPV3D_Selector.cxx
-  # SPV3D_SetRotationPointDlg.cxx
-  # SPV3D_SpaceMouse.cxx
-  # SPV3D_Trihedron.cxx
-  # SPV3D_UpdateRateDlg.cxx
-  # SPV3D_Utils.cxx
-  #SPV3D_ViewParameterDlg.cxx
-  # SPV3D_AxesActor.cxx
-  # SPV3D_AxesWidget.cxx
 
 # sources / to compile
 SET(SPV3D_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
index 380e55c3d56f9be3053281dcf1122b888bc2edca..d729ff14f59fd6a58b87145f63ce86b400fbd540 100644 (file)
@@ -52,6 +52,10 @@ SPV3D_ViewManager::SPV3D_ViewManager( SUIT_Study* study, SUIT_Desktop* theDeskto
 
   connect( theDesktop, SIGNAL( windowActivated( SUIT_ViewWindow* ) ),
            this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) );
+
+  SPV3D_ViewModel *vm = dynamic_cast<SPV3D_ViewModel*>(getViewModel());
+  if (vm)
+    vm->initialize();
 }
 
 /*!
index 4c4c20c2a51dfca06e7d85d074d301b5a5dbf4a0..a803d6fa4d3532a84ba2f57f298a5652f6776e26 100644 (file)
@@ -24,7 +24,6 @@
 #define SPV3D_VIEWMANAGER_H
 
 #include "SUIT_ViewManager.h"
-//#include "PV3DViewer_ViewManager.h"
 #include "SPV3D.h"
 
 class SUIT_Desktop;
index 1c7d21bba3be736abf835f18b4aa943c78d782d8..b58154d9f385c27c28932fbb70d6f5b912088408 100644 (file)
 // #include "PV3DViewer_Algorithm.h"
 //#include "PV3DViewer_ViewModel.h"
 
+#include <pqActiveObjects.h>
+#include <pqApplicationCore.h>
+//#include <pqDoubleRangeDialog.h>
+//#include <pqHeaderView.h>
+#include <pqObjectBuilder.h>
+#include <pqPipelineSource.h>
+#include <pqRenderView.h>
+
+#include <vtkSMPropertyHelper.h>
+#include <vtkSMParaViewPipelineControllerWithRendering.h>
+#include <vtkSMRenderViewProxy.h>
+#include <vtkSMRepresentationProxy.h>
+#include <vtkSMSourceProxy.h>
+
 #include "SUIT_ViewModel.h"
 #include "SUIT_ViewManager.h"
 
@@ -91,6 +105,16 @@ SPV3D_ViewModel::~SPV3D_ViewModel()
   DBG_FUN();
 }
 
+
+void SPV3D_ViewModel::initialize()
+{
+  DBG_FUN();
+
+  const auto* builder = pqApplicationCore::instance()->getObjectBuilder();
+  QObject::connect(builder, &pqObjectBuilder::sourceCreated, this, &SPV3D_ViewModel::onSourceCreated);
+}
+
+
 #if 0
 /*! Get data for supported background modes: gradient types, identifiers and supported image formats */
 QString SPV3D_ViewModel::backgroundData( QStringList& gradList, QIntList& idList, QIntList& txtList )
@@ -727,6 +751,18 @@ void SPV3D_ViewModel::Display( const SALOME_PV3DPrs* prs )
 void SPV3D_ViewModel::Erase( const SALOME_PV3DPrs* prs, const bool forced )
 {
   DBG_FUN();
+
+  // NYI - hide a source
+  if(const SPV3D_Prs* aPrs = dynamic_cast<const SPV3D_Prs*>( prs )){
+    if(aPrs->IsNull())
+      return;
+    
+    pqObjectBuilder* builder = pqApplicationCore::instance()->getObjectBuilder();
+    pqServer* activeServer = pqActiveObjects::instance().activeServer();
+
+    builder->destroySources(activeServer);
+  }
+
   // try do downcast object
   // if(const SPV3D_Prs* aPrs = dynamic_cast<const SPV3D_Prs*>( prs )){
   //   if(aPrs->IsNull())
@@ -905,3 +941,87 @@ void SPV3D_ViewModel::onViewCreated( SUIT_ViewWindow* view) {
     QTimer::singleShot(500, [svw] () { svw->Repaint(); } );
 #endif
 }
+
+
+
+//-----------------------------------------------------------------------------
+void SPV3D_ViewModel::onSourceCreated(pqPipelineSource* source)
+{
+  MSGEL("-----> SLOT(onSourceCreated)");
+  DBG_FUN();
+
+  std::string sourceXMLName(source->getSourceProxy()->GetXMLName());
+  SHOW(sourceXMLName);
+  SHOW((sourceXMLName=="CubeSource"));
+  pqObjectBuilder* builder = pqApplicationCore::instance()->getObjectBuilder();
+  if (sourceXMLName == "XMLPolyDataReader" || sourceXMLName == "GeometryGenerator" || sourceXMLName == "ShapeSource" || sourceXMLName == "CubeSource")
+  {
+    if (this->GeometrySource)
+    {
+      if (this->GeometrySource == source) {
+        MSGEL("ERROR: onSourceCreated called more than once for same source!!");
+      }
+      else
+        builder->destroy(this->GeometrySource);
+    }
+    this->GeometrySource = source;
+  }
+  else
+  {
+    qWarning("Unsupported Source");
+    return;
+  }
+  this->showSelectedMode();
+}
+
+//-----------------------------------------------------------------------------
+void SPV3D_ViewModel::showSelectedMode()
+{
+  MSGEL("-----> SLOT(showSelectedMode)");
+  DBG_FUN();
+
+  // Only allow to enter group mode in geometry mode
+  //this->Ui->groupModeCheckBox->setEnabled(this->Ui->modeComboBox->currentIndex() == 0);
+
+  vtkNew<vtkSMParaViewPipelineControllerWithRendering> controller;
+  pqView* activeView = pqActiveObjects::instance().activeView();
+  if (activeView)
+  {
+    if (this->GeometrySource)
+    {
+#if PARAVIEW_VERSION_MINOR <= 10
+      this->GeometrySource->updatePipeline();
+      this->GeometrySource->setModifiedState(pqProxy::UNMODIFIED);
+#endif
+
+      //if (this->Ui->modeComboBox->currentIndex() == 0)
+      {
+        vtkSMSourceProxy *sourceProxy = this->GeometrySource->getSourceProxy();
+        vtkSMViewProxy *viewProxy = activeView->getViewProxy();
+        //const char *representationType = "CADRepresentation";
+        controller->Show(sourceProxy, 0, viewProxy);//, representationType);
+        // controller->Show(
+        //   this->GeometrySource->getSourceProxy(), 0, activeView->getViewProxy(), "CADRepresentation");
+      }
+      // else
+      // {
+      //   if (!this->MeshSource)
+      //   {
+      //     this->generateMesh();
+      //   }
+      //   controller->SetVisibility(this->GeometrySource->getSourceProxy(), 0, activeView->getViewProxy(), false);
+      // }
+
+    }
+//     if (this->MeshSource)
+//     {
+// #if PARAVIEW_VERSION_MINOR <= 10
+//       this->MeshSource->updatePipeline();
+//       this->MeshSource->setModifiedState(pqProxy::UNMODIFIED);
+// #endif
+//       controller->SetVisibility(this->MeshSource->getSourceProxy(), 0, activeView->getViewProxy(), this->Ui->modeComboBox->currentIndex() == 1);
+//     }
+  }
+  activeView->render();
+  activeView->resetDisplay();
+}
index 28610f325f12ff1219bc157875b9e77cb77e5270..864e0b9b270a78418df08e950aa1f5d2205a5f32 100644 (file)
@@ -43,34 +43,17 @@ class QMouseEvent;
 class SPV3D_ViewWindow;
 class PV3DViewer_Actor;
 
+class pqPipelineSource;
+class pqCADSelection;
+class pqCADGroupModel;
+
+
 //! Extends two interfaces #SPV3D_ViewModelBase and #SALOME_View 
 class SPV3D_EXPORT SPV3D_ViewModel : public PV3DViewer_ViewModel, public SALOME_View 
 {
   Q_OBJECT
 
 public:
-  /*! supported gradient types */
-  // enum { 
-  //   HorizontalGradient,
-  //   VerticalGradient,
-  //   FirstDiagonalGradient,
-  //   SecondDiagonalGradient,
-  //   FirstCornerGradient,
-  //   SecondCornerGradient,
-  //   ThirdCornerGradient,
-  //   FourthCornerGradient,
-  //   LastGradient = FourthCornerGradient,
-  // };
-
-  // enum {
-  //   CrystalEyesType, RedBlueType,
-  //   InterlacedType,  LeftType,
-  //   RightType,       DresdenType,
-  //   AnaglyphType,    CheckerboardType,
-  //   SplitViewPortHorizontalType
-  // };
-  // typedef SPV3D_ViewWindow TViewWindow;
-  
   //! Define string representation of the viewer type
   static QString           Type() { return "ParaView3D"; }
   // static QString           backgroundData( QStringList&, QIntList&, QIntList& );
@@ -79,6 +62,8 @@ public:
   SPV3D_ViewModel();
   virtual ~SPV3D_ViewModel();
 
+  virtual void initialize();
+  
   //! See #SUIT_ViewModel::createView
   virtual SUIT_ViewWindow* createView(SUIT_Desktop*);
 
@@ -91,99 +76,10 @@ public:
   //! See #SUIT_ViewModel::getType
   virtual QString getType() const { return Type(); }
 
-  // //! Get background color of the viewer [obsolete]
-  // QColor backgroundColor() const;
-
-  // //! Set background color to the viewer [obsolete]
-  // void setBackgroundColor( const QColor& );
-
-  // //! Get background color of the viewer
-  // Qtx::BackgroundData background() const;
-
-  // //! Set background color to the viewer
-  // void setBackground( const Qtx::BackgroundData& );
-
-  // //! Get size of trihedron of the viewer (see #SPV3D_Renderer::SetTrihedronSize)
-  // double trihedronSize() const;
-
-  // //! Shows if the size of trihedron relative (see #SPV3D_Renderer::SetTrihedronSize)
-  // bool trihedronRelative() const;
-
-  // //! Set size of trihedron of the viewer (see #SPV3D_Renderer::SetTrihedronSize)
-  // void setTrihedronSize( const double, const bool = true );
-
-  // //! Get visibility status of the static trihedron
-  // bool isStaticTrihedronVisible() const;
-
-  // //! Set visibility status of the static trihedron
-  // void setStaticTrihedronVisible( const bool );
-
-  // //! Gets projection mode
-  // int projectionMode() const;
-
-  // //! Sets projection mode
-  // void setProjectionMode( const int );
-
-  // //! Gets stereo type
-  // int stereoType() const;
-
-  // //! Sets stereo type
-  // void setStereoType( const int );
-
-  // //! Gets anaglyph filter
-  // int anaglyphFilter() const;
-
-  // //! Sets anaglyph filter
-  // void setAnaglyphFilter( const int );
-
-  // //! Get support quad-buffered stereo
-  // bool isQuadBufferSupport() const;
-
-  // //! Set support quad-buffered stereo
-  // void setQuadBufferSupport( const bool );
-
-  // //! Gets interaction style
-  // int interactionStyle() const;
-
-  // //! Sets interaction style
-  // void setInteractionStyle( const int );
-
-  // //! Gets zooming style
-  // int zoomingStyle() const;
-
-  // //! Sets zooming style
-  // void setZoomingStyle( const int );
-
-  // //! Gets current preselection mode (standard, dynamic or disabled)
-  // Preselection_Mode preSelectionMode() const;
-
-  // //! Sets new preselection mode
-  // void setPreSelectionMode( Preselection_Mode );
-  // //! Get incremental speed (see #SPV3D_InteractorStyle::ControllerIncrement)
-  // int incrementalSpeed() const;
-
-  // //! Returns modification mode of incremental speed (see #SPV3D_InteractorStyle::ControllerIncrement)
-  // int incrementalSpeedMode() const;
-
-  // //! Set the incremental speed for view operation (see #SPV3D_InteractorStyle::ControllerIncrement)
-  // void setIncrementalSpeed( const int, const int = 0 );
-
-  // //! Gets spacemouse button for specified function
-  // int spacemouseBtn( const int ) const;
-
-  // //! Sets spacemouse buttons
-  // void setSpacemouseButtons( const int, const int, const int );
-
 public:
   void enableSelection(bool isEnabled);
   bool isSelectionEnabled() const { return mySelectionEnabled; }
 
-  // void enableMultiselection(bool isEnable);
-  // bool isMultiSelectionEnabled() const { return myMultiSelectionEnabled; }
-
-  // int  getSelectionCount() const;
-
   /* Reimplemented from SALOME_View */
 
   //! See #SALOME_View::Display( const SALOME_Prs* )
@@ -207,42 +103,27 @@ public:
   //! See #SALOME_View::Repaint()
   virtual void Repaint();
 
-//  signals:
-//   void actorAdded(SPV3D_ViewWindow*, PV3DViewer_Actor*);
-//   void actorRemoved(SPV3D_ViewWindow*, PV3DViewer_Actor*);
-
 protected slots:
   void onMousePress(SUIT_ViewWindow*, QMouseEvent*);
   void onMouseMove(SUIT_ViewWindow*, QMouseEvent*);
   void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*);
 
-  // void onDumpView();
-  // void onChangeBackground();
+  void onViewCreated( SUIT_ViewWindow* );
 
-  // void onActorAdded(PV3DViewer_Actor*);
-  // void onActorRemoved(PV3DViewer_Actor*);
+  void onSourceCreated(pqPipelineSource* source);
+  void showSelectedMode();
 
-  void onViewCreated( SUIT_ViewWindow* );
+protected:
+  pqPipelineSource* GeometrySource = nullptr;
+  pqPipelineSource* MeshSource = nullptr;
 
 private:
-  // void updateToolBars();
+  pqCADSelection* selection;
+  pqCADGroupModel* GroupModel;
+  int GroupCounter = 0;
 
-  // Qtx::BackgroundData  myDefaultBackground;
-  // double myTrihedronSize;
-  // bool                 myTrihedronRelative;
-  // bool                 myIsStaticTrihedronVisible;
+private:
   bool                 mySelectionEnabled;
-  // bool                 myMultiSelectionEnabled;
-  // int                  myIncrementSpeed;
-  // int                  myIncrementMode;
-  // int                  myProjMode;
-  // int                  myStereoType;
-  // int                  myAnaglyphFilter;
-  // bool                 myQuadBufferSupport;
-  // int                  myStyle;
-  // int                  myZoomingStyle;
-  // Preselection_Mode    myPreSelectionMode;
-  // int                  mySpaceBtn[3];
 };
 
 #endif