1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 #include <QColorDialog>
27 #include <vtkCamera.h>
28 #include <vtkRenderer.h>
29 #include <vtkActorCollection.h>
31 //#include "SUIT_Session.h"
32 #include "SVTK_Selection.h"
33 #include "SVTK_ViewModel.h"
34 #include "SVTK_ViewWindow.h"
35 #include "SVTK_View.h"
36 #include "SVTK_Renderer.h"
37 //#include "SVTK_MainWindow.h"
40 #include "VTKViewer_Algorithm.h"
41 #include "VTKViewer_ViewModel.h"
43 #include "SUIT_ViewModel.h"
44 #include "SUIT_ViewManager.h"
46 #include "SALOME_Actor.h"
48 #include "QtxActionToolMgr.h"
49 #include "QtxBackgroundTool.h"
51 // VSR: Uncomment below line to allow texture background support in VTK viewer
52 #define VTK_ENABLE_TEXTURED_BACKGROUND
55 // in order NOT TO link with SalomeApp, here the code returns SALOMEDS_Study.
56 // SalomeApp_Study::studyDS() does it as well, but -- here it is retrieved from
57 // SALOMEDS::StudyManager - no linkage with SalomeApp.
59 // Temporarily commented to avoid awful dependecy on SALOMEDS
60 // TODO: better mechanism of storing display/erse status in a study
61 // should be provided...
62 //static _PTR(Study) getStudyDS()
64 // SALOMEDSClient_Study* aStudy = NULL;
65 // _PTR(StudyManager) aMgr( new SALOMEDS_StudyManager() );
66 // get id of SUIT_Study, if it's a SalomeApp_Study, it will return
67 // id of its underlying SALOMEDS::Study
68 // SUIT_Application* app = SUIT_Session::session()->activeApplication();
69 // if ( !app ) return _PTR(Study)(aStudy);
70 // SUIT_Study* stud = app->activeStudy();
71 // if ( !stud ) return _PTR(Study)(aStudy);
72 // const int id = stud->id(); // virtual method, must return SALOMEDS_Study id
73 // get SALOMEDS_Study with this id from StudyMgr
74 // return aMgr->GetStudyByID( id );
80 SVTK_Viewer::SVTK_Viewer()
82 myTrihedronSize = 105;
83 myTrihedronRelative = true;
84 myIsStaticTrihedronVisible = true;
85 myIncrementSpeed = 10;
90 myDynamicPreSelection = false;
94 myDefaultBackground = Qtx::BackgroundData( Qt::black );
100 SVTK_Viewer::~SVTK_Viewer()
104 /*! Get data for supported background modes: gradient types, identifiers and supported image formats */
105 QString SVTK_Viewer::backgroundData( QStringList& gradList, QIntList& idList, QIntList& txtList )
107 gradList << tr( "GT_HORIZONTALGRADIENT" )
108 << tr( "GT_VERTICALGRADIENT" )
109 << tr( "GT_FIRSTDIAGONALGRADIENT" )
110 << tr( "GT_SECONDDIAGONALGRADIENT" )
111 << tr( "GT_FIRSTCORNERGRADIENT" )
112 << tr( "GT_SECONDCORNERGRADIENT" )
113 << tr( "GT_THIRDCORNERGRADIENT" )
114 << tr( "GT_FOURTHCORNERGRADIENT" );
115 idList << HorizontalGradient
117 << FirstDiagonalGradient
118 << SecondDiagonalGradient
119 << FirstCornerGradient
120 << SecondCornerGradient
121 << ThirdCornerGradient
122 << FourthCornerGradient;
123 #ifdef VTK_ENABLE_TEXTURED_BACKGROUND
124 txtList << Qtx::CenterTexture << Qtx::TileTexture << Qtx::StretchTexture;
126 return tr("BG_IMAGE_FILES");
129 //! Get background color of the viewer [obsolete]
130 QColor SVTK_Viewer::backgroundColor() const
132 return background().color();
135 //! Set background color to the viewer [obsolete]
136 void SVTK_Viewer::setBackgroundColor( const QColor& c )
138 Qtx::BackgroundData bg = background();
144 \return background data
146 Qtx::BackgroundData SVTK_Viewer::background() const
148 return myDefaultBackground;
153 \param theBackground - new background data
155 void SVTK_Viewer::setBackground( const Qtx::BackgroundData& theBackground )
157 myDefaultBackground = theBackground.isValid() ? theBackground : Qtx::BackgroundData( Qt::black );
158 QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
159 for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
160 if(SUIT_ViewWindow* aViewWindow = aViews.at(i)){
161 if(TViewWindow* aView = dynamic_cast<TViewWindow*>(aViewWindow)){
162 aView->setBackground(myDefaultBackground);
168 /*!Create new instance of view window on desktop \a theDesktop.
169 *\retval SUIT_ViewWindow* - created view window pointer.
171 SUIT_ViewWindow* SVTK_Viewer::createView( SUIT_Desktop* theDesktop )
173 TViewWindow* aViewWindow = new TViewWindow(theDesktop);
174 aViewWindow->Initialize(this);
176 aViewWindow->setBackground( background() );
177 aViewWindow->SetTrihedronSize( trihedronSize(), trihedronRelative() );
178 aViewWindow->SetStaticTrihedronVisible( isStaticTrihedronVisible() );
179 aViewWindow->SetProjectionMode( projectionMode() );
180 aViewWindow->SetInteractionStyle( interactionStyle() );
181 aViewWindow->SetZoomingStyle( zoomingStyle() );
182 aViewWindow->SetDynamicPreSelection( dynamicPreSelection() );
183 aViewWindow->SetIncrementalSpeed( incrementalSpeed(), incrementalSpeedMode() );
184 aViewWindow->SetSpacemouseButtons( spacemouseBtn(1), spacemouseBtn(2), spacemouseBtn(3) );
186 connect(aViewWindow, SIGNAL( actorAdded(VTKViewer_Actor*) ),
187 this, SLOT(onActorAdded(VTKViewer_Actor*)));
188 connect(aViewWindow, SIGNAL( actorRemoved(VTKViewer_Actor*) ),
189 this, SLOT(onActorRemoved(VTKViewer_Actor*)));
195 \return trihedron size
197 double SVTK_Viewer::trihedronSize() const
199 return myTrihedronSize;
203 \return true if thihedron changes size in accordance with bounding box
205 bool SVTK_Viewer::trihedronRelative() const
207 return myTrihedronRelative;
211 Sets trihedron size and relativeness( whether thihedron changes size in accordance with bounding box)
212 \param theSize - new size
213 \param theRelative - new relativeness
215 void SVTK_Viewer::setTrihedronSize( const double theSize, const bool theRelative )
217 myTrihedronSize = theSize;
218 myTrihedronRelative = theRelative;
220 if (SUIT_ViewManager* aViewManager = getViewManager()) {
221 QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
222 for ( uint i = 0; i < aViews.count(); i++ )
224 if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
225 aView->SetTrihedronSize( theSize, theRelative );
231 \return visibility status of the static trihedron
233 bool SVTK_Viewer::isStaticTrihedronVisible() const
235 return myIsStaticTrihedronVisible;
239 Sets visibility status of the static trihedron
240 \param theIsVisible - new visibility status
242 void SVTK_Viewer::setStaticTrihedronVisible( const bool theIsVisible )
244 myIsStaticTrihedronVisible = theIsVisible;
246 if (SUIT_ViewManager* aViewManager = getViewManager()) {
247 QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
248 for ( uint i = 0; i < aViews.count(); i++ )
250 if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
251 aView->SetStaticTrihedronVisible( theIsVisible );
257 \return projection mode
259 int SVTK_Viewer::projectionMode() const
266 Sets projection mode: 0 - orthogonal, 1 - perspective projection
267 \param theMode - new projection mode
269 void SVTK_Viewer::setProjectionMode( const int theMode )
271 if ( myProjMode != theMode ) {
272 myProjMode = theMode;
274 if (SUIT_ViewManager* aViewManager = getViewManager()) {
275 QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
276 for ( uint i = 0; i < aViews.count(); i++ )
278 if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
279 aView->SetProjectionMode( theMode );
286 \return interaction style
288 int SVTK_Viewer::interactionStyle() const
294 Sets interaction style: 0 - standard, 1 - keyboard free interaction
295 \param theStyle - new interaction style
297 void SVTK_Viewer::setInteractionStyle( const int theStyle )
301 if (SUIT_ViewManager* aViewManager = getViewManager()) {
302 QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
303 for ( uint i = 0; i < aViews.count(); i++ )
305 if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
306 aView->SetInteractionStyle( theStyle );
312 \return zooming style
314 int SVTK_Viewer::zoomingStyle() const
316 return myZoomingStyle;
320 Sets zooming style: 0 - standard, 1 - advanced (at cursor)
321 \param theStyle - new zooming style
323 void SVTK_Viewer::setZoomingStyle( const int theStyle )
325 myZoomingStyle = theStyle;
327 if (SUIT_ViewManager* aViewManager = getViewManager()) {
328 QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
329 for ( uint i = 0; i < aViews.count(); i++ )
331 if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
332 aView->SetZoomingStyle( theStyle );
338 \return dynamic preselection
340 bool SVTK_Viewer::dynamicPreSelection() const
342 return myDynamicPreSelection;
346 Sets dynamic preselection
347 \param theMode - new dynamic preselection mode
349 void SVTK_Viewer::setDynamicPreSelection( const bool theMode )
351 myDynamicPreSelection = theMode;
353 if (SUIT_ViewManager* aViewManager = getViewManager()) {
354 QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
355 for ( uint i = 0; i < aViews.count(); i++ )
357 if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
358 aView->SetDynamicPreSelection( theMode );
364 \return incremental speed value
366 int SVTK_Viewer::incrementalSpeed() const
368 return myIncrementSpeed;
372 \return modification mode of the incremental speed
374 int SVTK_Viewer::incrementalSpeedMode() const
376 return myIncrementMode;
380 Set the incremental speed value and modification mode
381 \param theValue - new value
382 \param theMode - new mode: 0 - arithmetic, 1 - geometrical progression
384 void SVTK_Viewer::setIncrementalSpeed( const int theValue, const int theMode )
386 myIncrementSpeed = theValue;
387 myIncrementMode = theMode;
389 if (SUIT_ViewManager* aViewManager = getViewManager()) {
390 QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
391 for ( uint i = 0; i < aViews.count(); i++ )
393 if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
394 aView->SetIncrementalSpeed( theValue, theMode );
400 \return spacemouse button assigned to the specified function
401 \param theIndex - function by number (from 1 to 3)
403 int SVTK_Viewer::spacemouseBtn( const int theIndex ) const
405 if ( theIndex < 1 || theIndex > 3 )
407 return mySpaceBtn[theIndex-1];
411 Set the spacemouse buttons
412 \param theBtn1, theBtn2, theBtn3 - new buttons
414 void SVTK_Viewer::setSpacemouseButtons( const int theBtn1, const int theBtn2, const int theBtn3 )
416 mySpaceBtn[0] = theBtn1;
417 mySpaceBtn[1] = theBtn2;
418 mySpaceBtn[2] = theBtn3;
420 if (SUIT_ViewManager* aViewManager = getViewManager()) {
421 QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
422 for ( uint i = 0; i < aViews.count(); i++ )
424 if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
425 aView->SetSpacemouseButtons( theBtn1, theBtn2, theBtn3 );
431 Sets new view manager
432 \param theViewManager - new view manager
434 void SVTK_Viewer::setViewManager(SUIT_ViewManager* theViewManager)
436 SUIT_ViewModel::setViewManager(theViewManager);
438 if ( !theViewManager )
441 connect(theViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)),
442 this, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));
444 connect(theViewManager, SIGNAL(mouseMove(SUIT_ViewWindow*, QMouseEvent*)),
445 this, SLOT(onMouseMove(SUIT_ViewWindow*, QMouseEvent*)));
447 connect(theViewManager, SIGNAL(mouseRelease(SUIT_ViewWindow*, QMouseEvent*)),
448 this, SLOT(onMouseRelease(SUIT_ViewWindow*, QMouseEvent*)));
452 Builds popup for vtk viewer
454 void SVTK_Viewer::contextMenuPopup( QMenu* thePopup )
456 thePopup->addAction( VTKViewer_Viewer::tr( "MEN_DUMP_VIEW" ), this, SLOT( onDumpView() ) );
457 thePopup->addAction( VTKViewer_Viewer::tr( "MEN_CHANGE_BACKGROUND" ), this, SLOT( onChangeBackground() ) );
459 thePopup->addSeparator();
461 if(TViewWindow* aView = dynamic_cast<TViewWindow*>(myViewManager->getActiveView())){
462 //Support of several toolbars in the popup menu
463 QList<QToolBar*> lst = qFindChildren<QToolBar*>( aView );
464 QList<QToolBar*>::const_iterator it = lst.begin(), last = lst.end();
465 for( ; it!=last; it++ )
466 thePopup->addAction( (*it)->toggleViewAction() );
467 aView->RefreshDumpImage();
472 SLOT: called on mouse button press, empty implementation
474 void SVTK_Viewer::onMousePress(SUIT_ViewWindow* vw, QMouseEvent* event)
478 SLOT: called on mouse move, empty implementation
480 void SVTK_Viewer::onMouseMove(SUIT_ViewWindow* vw, QMouseEvent* event)
484 SLOT: called on mouse button release, empty implementation
486 void SVTK_Viewer::onMouseRelease(SUIT_ViewWindow* vw, QMouseEvent* event)
490 Enables/disables selection
491 \param isEnabled - new state
493 void SVTK_Viewer::enableSelection(bool isEnabled)
495 mySelectionEnabled = isEnabled;
496 //!! To be done for view windows
500 Enables/disables selection of many object
501 \param isEnabled - new state
503 void SVTK_Viewer::enableMultiselection(bool isEnable)
505 myMultiSelectionEnabled = isEnable;
506 //!! To be done for view windows
510 SLOT: called on dump view operation is activated, stores scene to raster file
512 void SVTK_Viewer::onDumpView()
514 if(SUIT_ViewWindow* aView = myViewManager->getActiveView())
519 SLOT: called if background color is to be changed changed, passes new color to view port
521 void SVTK_Viewer::onChangeBackground()
523 SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(myViewManager->getActiveView());
527 // get supported gradient types
528 QStringList gradList;
529 QIntList idList, txtList;
530 QString formats = backgroundData( gradList, idList, txtList );
533 Qtx::BackgroundData bgData = QtxBackgroundDialog::getBackground( aView->background(), // initial background
534 aView, // parent for dialog box
535 txtList, // allowed texture modes
536 true, // enable solid color mode
537 true, // enable gradient mode
538 false, // disable custom gradient mode
539 !txtList.isEmpty(), // enable texture mode
540 gradList, // gradient names
541 idList, // gradient identifiers
542 formats ); // image formats
544 // set chosen background data to the viewer
545 if ( bgData.isValid() )
546 aView->setBackground( bgData );
551 \param prs - presentation
553 void SVTK_Viewer::Display( const SALOME_VTKPrs* prs )
555 // try do downcast object
556 if(const SVTK_Prs* aPrs = dynamic_cast<const SVTK_Prs*>( prs )){
559 if(vtkActorCollection* anActorCollection = aPrs->GetObjects()){
560 // get SALOMEDS Study
561 // Temporarily commented to avoid awful dependecy on SALOMEDS
562 // TODO: better mechanism of storing display/erse status in a study
563 // should be provided...
564 // _PTR(Study) aStudy(getStudyDS());
565 anActorCollection->InitTraversal();
566 while(vtkActor* anActor = anActorCollection->GetNextActor()){
567 if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){
568 if(!anAct->ShouldBeDisplayed())
570 // Set visibility flag
571 // Temporarily commented to avoid awful dependecy on SALOMEDS
572 // TODO: better mechanism of storing display/erse status in a study
573 // should be provided...
574 //Handle(SALOME_InteractiveObject) anObj = anAct->getIO();
575 //if(!anObj.IsNull() && anObj->hasEntry() && aStudy){
576 // ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),true,this);
578 // just display the object
579 QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
580 for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
581 if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i))){
582 if(SVTK_View* aView = aViewWindow->getView()){
583 aView->Display(anAct,false);
584 if(anAct->IsSetCamera()){
585 vtkRenderer* aRenderer = aView->getRenderer();
586 anAct->SetCamera( aRenderer->GetActiveCamera() );
599 \param prs - presentation
600 \param forced - removes object from view
602 void SVTK_Viewer::Erase( const SALOME_VTKPrs* prs, const bool forced )
604 // try do downcast object
605 if(const SVTK_Prs* aPrs = dynamic_cast<const SVTK_Prs*>( prs )){
608 if(vtkActorCollection* anActorCollection = aPrs->GetObjects()){
609 // get SALOMEDS Study
610 // Temporarily commented to avoid awful dependecy on SALOMEDS
611 // TODO: better mechanism of storing display/erase status in a study
612 // should be provided...
613 //_PTR(Study) aStudy(getStudyDS());
614 anActorCollection->InitTraversal();
615 while(vtkActor* anActor = anActorCollection->GetNextActor())
616 if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){
617 // Set visibility flag
618 // Temporarily commented to avoid awful dependecy on SALOMEDS
619 // TODO: better mechanism of storing display/erase status in a study
620 // should be provided...
621 //Handle(SALOME_InteractiveObject) anObj = anAct->getIO();
622 //if(!anObj.IsNull() && anObj->hasEntry() && aStudy){
623 // ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),false,this);
625 // just display the object
626 QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
627 for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
628 if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i)))
629 if(SVTK_View* aView = aViewWindow->getView())
632 aView->Remove(anAct,false);
634 aView->Erase(anAct,forced);
643 Erase all presentations
644 \param forced - removes all objects from view
646 void SVTK_Viewer::EraseAll( const bool forced )
648 // Temporarily commented to avoid awful dependecy on SALOMEDS
649 // TODO: better mechanism of storing display/erse status in a study
650 // should be provided...
651 //_PTR(Study) aStudy(getStudyDS());
652 QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
653 for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
654 if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i)))
655 if(SVTK_View* aView = aViewWindow->getView()){
656 vtkRenderer* aRenderer = aView->getRenderer();
657 VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
658 vtkActorCollection* anActorCollection = aCopy.GetActors();
659 anActorCollection->InitTraversal();
660 while(vtkActor* anActor = anActorCollection->GetNextActor()){
661 if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){
662 // Set visibility flag
663 // Temporarily commented to avoid awful dependecy on SALOMEDS
664 // TODO: better mechanism of storing display/erse status in a study
665 // should be provided...
666 //Handle(SALOME_InteractiveObject) anObj = anAct->getIO();
667 //if(!anObj.IsNull() && anObj->hasEntry() && aStudy)
668 // ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),false,this);
670 if(SVTK_Renderer* aRnd = aView->GetRenderer())
671 aRnd->RemoveActor(anAct);
674 anAct->SetVisibility( false );
675 // erase dependent actors
676 vtkActorCollection* aCollection = vtkActorCollection::New();
677 anAct->GetChildActors( aCollection );
678 aCollection->InitTraversal();
679 while(vtkActor* aSubAct = aCollection->GetNextActor())
680 aSubAct->SetVisibility( false );
681 aCollection->Delete();
691 Create presentation corresponding to the entry
694 SALOME_Prs* SVTK_Viewer::CreatePrs( const char* entry )
696 SVTK_Prs* prs = new SVTK_Prs();
698 if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(getViewManager()->getActiveView()))
699 if(SVTK_View* aView = aViewWindow->getView()){
700 vtkRenderer* aRenderer = aView->getRenderer();
701 VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
702 vtkActorCollection* theActors = aCopy.GetActors();
703 theActors->InitTraversal();
705 while( ( ac = theActors->GetNextActor() ) ) {
706 SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( ac );
707 if ( anActor && anActor->hasIO() && !strcmp( anActor->getIO()->getEntry(), entry ) ) {
708 prs->AddObject( ac );
717 \return true if object is displayed in viewer
718 \param obj - object to be checked
720 bool SVTK_Viewer::isVisible( const Handle(SALOME_InteractiveObject)& io )
722 QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
723 for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)
724 if(SUIT_ViewWindow* aViewWindow = aViews.at(i))
725 if(TViewWindow* aViewWnd = dynamic_cast<TViewWindow*>(aViewWindow))
726 if(SVTK_View* aView = aViewWnd->getView())
727 if(!aView->isVisible( io ))
734 \Collect objects visible in viewer
735 \param theList - visible objects collection
737 void SVTK_Viewer::GetVisible( SALOME_ListIO& theList )
739 // here we collect object if it is disaplaed even one view
740 QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
741 for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)
742 if(SUIT_ViewWindow* aViewWindow = aViews.at(i))
743 if(TViewWindow* aViewWnd = dynamic_cast<TViewWindow*>(aViewWindow))
744 if(SVTK_View* aView = aViewWnd->getView())
745 aView->GetVisible( theList );
749 Updates current viewer
751 void SVTK_Viewer::Repaint()
753 // if (theUpdateTrihedron) onAdjustTrihedron();
754 QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
755 for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)
756 if(TViewWindow* aViewWindow = dynamic_cast<TViewWindow*>(aViews.at(i)))
757 if(SVTK_View* aView = aViewWindow->getView())
762 void SVTK_Viewer::onActorAdded(VTKViewer_Actor* theActor)
764 emit actorAdded((SVTK_ViewWindow*)sender(), theActor);
767 void SVTK_Viewer::onActorRemoved(VTKViewer_Actor* theActor)
769 emit actorRemoved((SVTK_ViewWindow*)sender(), theActor);