]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
To document the sources
authorapo <apo@opencascade.com>
Thu, 27 Oct 2005 11:27:38 +0000 (11:27 +0000)
committerapo <apo@opencascade.com>
Thu, 27 Oct 2005 11:27:38 +0000 (11:27 +0000)
doc/salome/tui/SUIT/doxyfile
src/SVTK/SVTK_Functor.h
src/SVTK/SVTK_GenericRenderWindowInteractor.h
src/SVTK/SVTK_View.cxx
src/SalomeApp/SalomeApp_VTKSelector.cxx

index c79d1dcf39ed04c1f15d1f12ccb1cebe06a6e961..15f59d894cc955beac0c8b5ea2c3cd4a08fe7daf 100755 (executable)
@@ -10,9 +10,9 @@ CREATE_SUBDIRS         = NO
 OUTPUT_LANGUAGE        = English
 USE_WINDOWS_ENCODING   = NO
 BRIEF_MEMBER_DESC      = YES
-REPEAT_BRIEF           = NO
+REPEAT_BRIEF           = YES
 ABBREVIATE_BRIEF       = 
-ALWAYS_DETAILED_SEC    = YES
+ALWAYS_DETAILED_SEC    = NO
 INLINE_INHERITED_MEMB  = NO
 FULL_PATH_NAMES        = NO
 STRIP_FROM_PATH        = 
index adef12408fb4c65e7d91cd75ebbb11009b314d8c..162d563b98bcf2ac9e980c3c2db09f382d77bf58 100644 (file)
   Combination with algorithms it gives powerful, flexible and simple to extend way to introduce new type of operation.
 */
 
-namespace VTK
+namespace SVTK
 {
+  using namespace VTK;
+
   //! This functor check, if the actor have pointed entry
   template<class TActor> 
   struct TIsSameEntry
index 67c3b846a89033a4ab37318197d995470d1d9723..d15fdc557f994a1e40a6cff5397eba096da52063 100644 (file)
@@ -43,7 +43,7 @@ class SVTK_Renderer;
 
 
 //============================================================================
-//! Implemementation of the class is intended to implement Qt based CreateTimer and DestroyTimer functionality.
+//! Introduction of the class is intended to implement Qt based #CreateTimer and #DestroyTimer functionality.
 /*!
   The class intendes to implement platform indepenedant subclass of vtkRenderWindowInteractor.
   This is done by usage of Qt library.
index ba634b16e7a7a1f824733108522d24ecb0fceac0..6d5ac831ceb7b86c29df733a874d24490911ee28 100644 (file)
@@ -115,21 +115,24 @@ SVTK_SignalHandler
 }
 
 //----------------------------------------------------------------
-struct THighlightAction
+namespace SVTK
 {
-  bool myIsHighlight;
-  THighlightAction( bool theIsHighlight ):
-    myIsHighlight( theIsHighlight )
-  {}
-
-  void
-  operator()( SALOME_Actor* theActor) 
+  struct THighlightAction
   {
-    if(theActor->GetMapper() && theActor->hasIO()){
-      theActor->Highlight( myIsHighlight );
+    bool myIsHighlight;
+    THighlightAction( bool theIsHighlight ):
+      myIsHighlight( theIsHighlight )
+    {}
+    
+    void
+    operator()( SALOME_Actor* theActor) 
+    {
+      if(theActor->GetMapper() && theActor->hasIO()){
+       theActor->Highlight( myIsHighlight );
+      }
     }
-  }
-};
+  };
+}
 
 void
 SVTK_SignalHandler
@@ -137,7 +140,7 @@ SVTK_SignalHandler
 {
   vtkActorCollection* anActors = myMainWindow->getRenderer()->GetActors();
 
-  using namespace VTK;
+  using namespace SVTK;
   ForEach<SALOME_Actor>(anActors,
                        THighlightAction( false ));
   SVTK_Selector* aSelector = myMainWindow->GetSelector();
@@ -173,7 +176,7 @@ void
 SVTK_View
 ::unHighlightAll() 
 {
-  using namespace VTK;
+  using namespace SVTK;
   ForEach<SALOME_Actor>(getRenderer()->GetActors(),
                        THighlightAction( false ));
   Repaint();
@@ -186,7 +189,7 @@ SVTK_View
             bool theIsHighlight, 
             bool theIsUpdate ) 
 {
-  using namespace VTK;
+  using namespace SVTK;
   ForEachIf<SALOME_Actor>(getRenderer()->GetActors(),
                          TIsSameIObject<SALOME_Actor>( theIO ),
                          THighlightAction(theIsHighlight));
@@ -229,7 +232,7 @@ bool
 SVTK_View
 ::isInViewer(const Handle(SALOME_InteractiveObject)& theIObject)
 {
-  using namespace VTK;
+  using namespace SVTK;
   SALOME_Actor* anActor = 
     Find<SALOME_Actor>(getRenderer()->GetActors(),
                       TIsSameIObject<SALOME_Actor>(theIObject));
@@ -241,7 +244,7 @@ bool
 SVTK_View
 ::isVisible(const Handle(SALOME_InteractiveObject)& theIObject)
 {
-  using namespace VTK;
+  using namespace SVTK;
   SALOME_Actor* anActor = 
     Find<SALOME_Actor>(getRenderer()->GetActors(),
                       TIsSameIObject<SALOME_Actor>(theIObject));
@@ -254,7 +257,7 @@ SVTK_View
 ::rename(const Handle(SALOME_InteractiveObject)& theIObject, 
         const QString& theName)
 {
-  using namespace VTK;
+  using namespace SVTK;
   ForEachIf<SALOME_Actor>(getRenderer()->GetActors(),
                          TIsSameIObject<SALOME_Actor>(theIObject),
                          TSetFunction<SALOME_Actor,const char*,QString>
@@ -285,7 +288,7 @@ SVTK_View
 ::SetDisplayMode(const Handle(SALOME_InteractiveObject)& theIObject, 
                 int theMode)
 {
-  using namespace VTK;
+  using namespace SVTK;
   ForEachIf<SALOME_Actor>(getRenderer()->GetActors(),
                          TIsSameIObject<SALOME_Actor>(theIObject),
                          TSetFunction<SALOME_Actor,int>
@@ -312,7 +315,7 @@ void
 SVTK_View
 ::ChangeRepresentationToWireframe(vtkActorCollection* theCollection)
 {
-  using namespace VTK;
+  using namespace SVTK;
   ForEach<SALOME_Actor>(theCollection,
                        TSetFunction<SALOME_Actor,int>
                        (&SALOME_Actor::setDisplayMode,0));
@@ -323,7 +326,7 @@ void
 SVTK_View
 ::ChangeRepresentationToSurface(vtkActorCollection* theCollection)
 {
-  using namespace VTK;
+  using namespace SVTK;
   ForEach<SALOME_Actor>(theCollection,
                        TSetFunction<SALOME_Actor,int>
                        (&SALOME_Actor::setDisplayMode,1));
@@ -331,27 +334,32 @@ SVTK_View
 }
 
 //----------------------------------------------------------------------------
-struct TErase
-{
-  VTK::TSetFunction<vtkActor,int> mySetFunction;
-  TErase():
-    mySetFunction(&vtkActor::SetVisibility,false)
-  {}
-  void operator()(SALOME_Actor* theActor){
-    theActor->SetVisibility(false);
-    // Erase dependent actors
-    vtkActorCollection* aCollection = vtkActorCollection::New(); 
-    theActor->GetChildActors(aCollection);
-    VTK::ForEach<vtkActor>(aCollection,mySetFunction);
-    aCollection->Delete();
-  }
-};
+namespace SVTK
+{
+  struct TErase
+  {
+    VTK::TSetFunction<vtkActor,int> mySetFunction;
+    TErase():
+      mySetFunction(&vtkActor::SetVisibility,false)
+    {}
+    void
+    operator()(SALOME_Actor* theActor)
+    {
+      theActor->SetVisibility(false);
+      // Erase dependent actors
+      vtkActorCollection* aCollection = vtkActorCollection::New(); 
+      theActor->GetChildActors(aCollection);
+      VTK::ForEach<vtkActor>(aCollection,mySetFunction);
+      aCollection->Delete();
+    }
+  };
+}
 
 void
 SVTK_View
 ::EraseAll()
 {   
-  using namespace VTK;
+  using namespace SVTK;
   ForEach<SALOME_Actor>(getRenderer()->GetActors(),
                        TErase());
   Repaint();
@@ -361,7 +369,7 @@ void
 SVTK_View
 ::DisplayAll()
 { 
-  using namespace VTK;
+  using namespace SVTK;
   ForEach<SALOME_Actor>(getRenderer()->GetActors(),
                        TSetVisibility<SALOME_Actor>(true));
   Repaint();
@@ -385,7 +393,7 @@ SVTK_View
 ::Erase(const Handle(SALOME_InteractiveObject)& theIObject, 
        bool theIsUpdate)
 {
-  using namespace VTK;
+  using namespace SVTK;
   ForEachIf<SALOME_Actor>(getRenderer()->GetActors(),
                          TIsSameIObject<SALOME_Actor>(theIObject),
                          TErase());
@@ -411,7 +419,7 @@ SVTK_View
 ::Display(const Handle(SALOME_InteractiveObject)& theIObject, 
          bool theIsUpdate)
 {
-  using namespace VTK;
+  using namespace SVTK;
   ForEachIf<SALOME_Actor>(getRenderer()->GetActors(),
                          TIsSameIObject<SALOME_Actor>(theIObject),
                          TSetVisibility<SALOME_Actor>(true));
@@ -430,25 +438,28 @@ SVTK_View
 
 
 //----------------------------------------------------------------------------
-struct TRemoveAction
-{
-  SVTK_Renderer* myRenderer;
-  TRemoveAction(SVTK_Renderer* theRenderer): 
-    myRenderer(theRenderer)
-  {}
-  void
-  operator()(SALOME_Actor* theActor)
+namespace SVTK
+{
+  struct TRemoveAction
   {
-    myRenderer->RemoveActor(theActor);
-  }
-};
+    SVTK_Renderer* myRenderer;
+    TRemoveAction(SVTK_Renderer* theRenderer): 
+      myRenderer(theRenderer)
+    {}
+    void
+    operator()(SALOME_Actor* theActor)
+    {
+      myRenderer->RemoveActor(theActor);
+    }
+  };
+}
 
 void
 SVTK_View
 ::Remove(const Handle(SALOME_InteractiveObject)& theIObject, 
         bool theIsUpdate)
 {
-  using namespace VTK;
+  using namespace SVTK;
   ForEachIf<SALOME_Actor>(getRenderer()->GetActors(),
                          TIsSameIObject<SALOME_Actor>(theIObject),
                          TRemoveAction(GetRenderer()));
@@ -490,7 +501,7 @@ float
 SVTK_View
 ::GetTransparency(const Handle(SALOME_InteractiveObject)& theIObject) 
 {
-  using namespace VTK;
+  using namespace SVTK;
   SALOME_Actor* anActor = 
     Find<SALOME_Actor>(getRenderer()->GetActors(),
                       TIsSameIObject<SALOME_Actor>(theIObject));
@@ -506,7 +517,7 @@ SVTK_View
                  float theTrans)
 {
   float anOpacity = 1.0 - theTrans;
-  using namespace VTK;
+  using namespace SVTK;
   ForEachIf<SALOME_Actor>(getRenderer()->GetActors(),
                          TIsSameIObject<SALOME_Actor>(theIObject),
                          TSetFunction<SALOME_Actor,float>
@@ -521,7 +532,7 @@ SVTK_View
 {
   float aColor[3] = {theColor.red()/255., theColor.green()/255., theColor.blue()/255.};
 
-  using namespace VTK;
+  using namespace SVTK;
   ForEachIf<SALOME_Actor>(getRenderer()->GetActors(),
                          TIsSameIObject<SALOME_Actor>(theIObject),
                          TSetFunction<SALOME_Actor,const float*>
@@ -533,7 +544,7 @@ QColor
 SVTK_View
 ::GetColor(const Handle(SALOME_InteractiveObject)& theIObject) 
 {
-  using namespace VTK;
+  using namespace SVTK;
   SALOME_Actor* anActor = 
     Find<SALOME_Actor>(getRenderer()->GetActors(),
                       TIsSameIObject<SALOME_Actor>(theIObject));
index 00e55ec478aa4ad2dde829483d0c23806a47c0ee..7f19aa1eef9796bd26c54f630b0e4710e74ade61 100644 (file)
@@ -112,6 +112,7 @@ void
 SalomeApp_VTKSelector
 ::getSelection( SUIT_DataOwnerPtrList& aList ) const
 {
+  using namespace SVTK;
   if(myViewer){
     if(SUIT_ViewManager* aViewMgr = myViewer->getViewManager()){
       if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewMgr->getActiveView())){
@@ -126,7 +127,7 @@ SalomeApp_VTKSelector
              aSelector->GetIndex(anIO,anIds);
              SALOME_Actor* anActor = aSelector->GetActor(anIO);
              if( !anActor )
-               anActor = VTK::Find<SALOME_Actor>(aView->getRenderer()->GetActors(),VTK::TIsSameIObject<SALOME_Actor>(anIO));
+               anActor = Find<SALOME_Actor>(aView->getRenderer()->GetActors(),TIsSameIObject<SALOME_Actor>(anIO));
 
              aList.append(new SalomeApp_SVTKDataOwner(anIO,anIds,aMode,anActor));
              if(MYDEBUG) MESSAGE("VTKSelector::getSelection - "<<anIO->getEntry());