From 0db01af48f68ff4609a70571e69fd40626412d36 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 2 Nov 2009 08:35:26 +0000 Subject: [PATCH] untabify --- src/CAM/CAM_Module.cxx | 4 +- src/LightApp/LightApp_Dialog.cxx | 4 +- src/LightApp/LightApp_Module.cxx | 24 +-- src/OBJECT/SALOME_InteractiveObject.cxx | 4 +- src/SUIT/SUIT_Application.cxx | 6 +- src/SUIT/SUIT_Study.cxx | 2 +- src/SVTK/SVTK_Functor.h | 12 +- src/SVTK/SVTK_View.cxx | 132 ++++++------ src/SVTK/SVTK_ViewWindow.cxx | 260 ++++++++++++------------ src/VTKViewer/VTKViewer_Algorithm.h | 50 ++--- 10 files changed, 249 insertions(+), 249 deletions(-) diff --git a/src/CAM/CAM_Module.cxx b/src/CAM/CAM_Module.cxx index d3dde1a21..9cef82bda 100755 --- a/src/CAM/CAM_Module.cxx +++ b/src/CAM/CAM_Module.cxx @@ -952,9 +952,9 @@ void CAM_Module::connectToStudy( CAM_Study* camStudy ) if( (*it) == this && !camStudy->containsDataModel( dm ) ) { if ( prev ) - camStudy->insertDataModel( (*it)->dataModel(), prev ); + camStudy->insertDataModel( (*it)->dataModel(), prev ); else - camStudy->insertDataModel( (*it)->dataModel(), 0 ); + camStudy->insertDataModel( (*it)->dataModel(), 0 ); } prev = dm; } diff --git a/src/LightApp/LightApp_Dialog.cxx b/src/LightApp/LightApp_Dialog.cxx index 3aed9fe5d..3b2067dfe 100644 --- a/src/LightApp/LightApp_Dialog.cxx +++ b/src/LightApp/LightApp_Dialog.cxx @@ -148,7 +148,7 @@ bool LightApp_Dialog::isObjectShown( const int id ) const { return myObjects.contains( id ) && ( myObjects[ id ].myEdit->isVisible() || - myObjects[ id ].myEdit->isVisibleTo( myObjects[ id ].myEdit->parentWidget() ) ); + myObjects[ id ].myEdit->isVisibleTo( myObjects[ id ].myEdit->parentWidget() ) ); } /*! @@ -203,7 +203,7 @@ void LightApp_Dialog::selectObject( const QString& name, const int type, const Q void LightApp_Dialog::selectObject( const QStringList& _names, const TypesList& _types, const QStringList& _ids, - const bool update ) + const bool update ) { ObjectMap::iterator anIt = myObjects.begin(), aLast = myObjects.end(); diff --git a/src/LightApp/LightApp_Module.cxx b/src/LightApp/LightApp_Module.cxx index 5ebe69044..ab36849ae 100644 --- a/src/LightApp/LightApp_Module.cxx +++ b/src/LightApp/LightApp_Module.cxx @@ -145,7 +145,7 @@ void LightApp_Module::contextMenuPopup( const QString& client, QMenu* menu, QStr * For updating model or whole object browser use update() method can be used. */ void LightApp_Module::updateObjBrowser( bool theIsUpdateDataModel, - SUIT_DataObject* theDataObject ) + SUIT_DataObject* theDataObject ) { bool upd = getApp()->objectBrowser()->autoUpdate(); getApp()->objectBrowser()->setAutoUpdate( false ); @@ -153,12 +153,12 @@ void LightApp_Module::updateObjBrowser( bool theIsUpdateDataModel, if( theIsUpdateDataModel ){ if( CAM_DataModel* aDataModel = dataModel() ){ if ( LightApp_DataModel* aModel = dynamic_cast( aDataModel ) ) { - SUIT_DataObject* aParent = NULL; - if(theDataObject && theDataObject != aDataModel->root()) - aParent = theDataObject->parent(); + SUIT_DataObject* aParent = NULL; + if(theDataObject && theDataObject != aDataModel->root()) + aParent = theDataObject->parent(); - LightApp_DataObject* anObject = dynamic_cast(theDataObject); - LightApp_Study* aStudy = dynamic_cast(getApp()->activeStudy()); + LightApp_DataObject* anObject = dynamic_cast(theDataObject); + LightApp_Study* aStudy = dynamic_cast(getApp()->activeStudy()); aModel->update( anObject, aStudy ); } } @@ -240,9 +240,9 @@ bool LightApp_Module::deactivateModule( SUIT_Study* study ) mySwitchOp = 0; disconnect( application(), SIGNAL( viewManagerAdded( SUIT_ViewManager* ) ), - this, SLOT( onViewManagerAdded( SUIT_ViewManager* ) ) ); + this, SLOT( onViewManagerAdded( SUIT_ViewManager* ) ) ); disconnect( application(), SIGNAL( viewManagerRemoved( SUIT_ViewManager* ) ), - this, SLOT( onViewManagerRemoved( SUIT_ViewManager* ) ) ); + this, SLOT( onViewManagerRemoved( SUIT_ViewManager* ) ) ); // abort all operations MapOfOperation::const_iterator anIt; @@ -385,13 +385,13 @@ QtxPopupMgr* LightApp_Module::popupMgr() QAction *disp = createAction( -1, tr( "TOP_SHOW" ), p, tr( "MEN_SHOW" ), tr( "STB_SHOW" ), - 0, d, false, this, SLOT( onShowHide() ) ), + 0, d, false, this, SLOT( onShowHide() ) ), *erase = createAction( -1, tr( "TOP_HIDE" ), p, tr( "MEN_HIDE" ), tr( "STB_HIDE" ), - 0, d, false, this, SLOT( onShowHide() ) ), + 0, d, false, this, SLOT( onShowHide() ) ), *dispOnly = createAction( -1, tr( "TOP_DISPLAY_ONLY" ), p, tr( "MEN_DISPLAY_ONLY" ), tr( "STB_DISPLAY_ONLY" ), - 0, d, false, this, SLOT( onShowHide() ) ), + 0, d, false, this, SLOT( onShowHide() ) ), *eraseAll = createAction( -1, tr( "TOP_ERASE_ALL" ), p, tr( "MEN_ERASE_ALL" ), tr( "STB_ERASE_ALL" ), - 0, d, false, this, SLOT( onShowHide() ) ); + 0, d, false, this, SLOT( onShowHide() ) ); myDisplay = actionId( disp ); myErase = actionId( erase ); myDisplayOnly = actionId( dispOnly ); diff --git a/src/OBJECT/SALOME_InteractiveObject.cxx b/src/OBJECT/SALOME_InteractiveObject.cxx index e65c01f6b..3e61ed5f6 100755 --- a/src/OBJECT/SALOME_InteractiveObject.cxx +++ b/src/OBJECT/SALOME_InteractiveObject.cxx @@ -51,8 +51,8 @@ SALOME_InteractiveObject::SALOME_InteractiveObject() \param aName - name of object */ SALOME_InteractiveObject::SALOME_InteractiveObject(const char* anEntry, - const char* aComponentDataType, - const char* aName): + const char* aComponentDataType, + const char* aName): myEntry(anEntry), myName(aName), myComponentDataType(aComponentDataType), diff --git a/src/SUIT/SUIT_Application.cxx b/src/SUIT/SUIT_Application.cxx index 204ae53c8..e1393b9bb 100755 --- a/src/SUIT/SUIT_Application.cxx +++ b/src/SUIT/SUIT_Application.cxx @@ -289,10 +289,10 @@ void SUIT_Application::setActiveStudy( SUIT_Study* study ) if ( myStudy ) disconnect( myStudy, SIGNAL( studyModified( SUIT_Study* ) ), - this, SLOT( updateCommandsStatus() ) ); + this, SLOT( updateCommandsStatus() ) ); if ( study ) connect( study, SIGNAL( studyModified( SUIT_Study* ) ), - this, SLOT( updateCommandsStatus() ) ); + this, SLOT( updateCommandsStatus() ) ); myStudy = study; } @@ -677,6 +677,6 @@ void SUIT_Application::onDesktopActivated() */ void SUIT_Application::onHelpContextModule( const QString& /*theComponentName*/, const QString& /*theFileName*/, - const QString& /*theContext*/ ) + const QString& /*theContext*/ ) { } diff --git a/src/SUIT/SUIT_Study.cxx b/src/SUIT/SUIT_Study.cxx index 845b2faba..a9d8ad71e 100755 --- a/src/SUIT/SUIT_Study.cxx +++ b/src/SUIT/SUIT_Study.cxx @@ -288,7 +288,7 @@ bool SUIT_Study::start( SUIT_Operation* theOp, const bool toCheck ) { int anAnsw = SUIT_MessageBox::question( application()->desktop(), tr( "OPERATION_LAUNCH" ), tr( "PREVIOUS_NOT_FINISHED" ), - tr( "CONTINUE" ), tr( "CANCEL" ) ); + tr( "CONTINUE" ), tr( "CANCEL" ) ); if ( anAnsw == 1 ) return false; diff --git a/src/SVTK/SVTK_Functor.h b/src/SVTK/SVTK_Functor.h index eab12cb14..2cf0f02ce 100644 --- a/src/SVTK/SVTK_Functor.h +++ b/src/SVTK/SVTK_Functor.h @@ -54,9 +54,9 @@ namespace SVTK { if ( theActor->hasIO() ) { - Handle(SALOME_InteractiveObject) anIO = theActor->getIO(); - if ( anIO->hasEntry() ) - return myEntry == anIO->getEntry(); + Handle(SALOME_InteractiveObject) anIO = theActor->getIO(); + if ( anIO->hasEntry() ) + return myEntry == anIO->getEntry(); } return false; } @@ -78,8 +78,8 @@ namespace SVTK { if(theActor->hasIO()) { - Handle(SALOME_InteractiveObject) anIO = theActor->getIO(); - return myIObject->isSame(anIO); + Handle(SALOME_InteractiveObject) anIO = theActor->getIO(); + return myIObject->isSame(anIO); } return false; } @@ -102,7 +102,7 @@ namespace SVTK void operator()(TActor* theActor) { if(theActor->GetVisibility() && theActor->GetMapper()) - theActor->highlight( myIsHighlight ); + theActor->highlight( myIsHighlight ); } }; diff --git a/src/SVTK/SVTK_View.cxx b/src/SVTK/SVTK_View.cxx index 7a57c6f15..55d9d2251 100644 --- a/src/SVTK/SVTK_View.cxx +++ b/src/SVTK/SVTK_View.cxx @@ -50,21 +50,21 @@ SVTK_SignalHandler SVTK_RenderWindowInteractor* anInteractor = theMainWindow->GetInteractor(); connect(anInteractor,SIGNAL(KeyPressed(QKeyEvent*)), - this,SIGNAL(KeyPressed(QKeyEvent*)) ); + this,SIGNAL(KeyPressed(QKeyEvent*)) ); connect(anInteractor,SIGNAL(KeyReleased(QKeyEvent*)), - this,SIGNAL(KeyReleased(QKeyEvent*))); + this,SIGNAL(KeyReleased(QKeyEvent*))); connect(anInteractor,SIGNAL(MouseButtonPressed(QMouseEvent*)), - this,SIGNAL(MouseButtonPressed(QMouseEvent*))); + this,SIGNAL(MouseButtonPressed(QMouseEvent*))); connect(anInteractor,SIGNAL(MouseButtonReleased(QMouseEvent*)), - this,SIGNAL(MouseButtonReleased(QMouseEvent*))); + this,SIGNAL(MouseButtonReleased(QMouseEvent*))); connect(anInteractor,SIGNAL(MouseDoubleClicked(QMouseEvent*)), - this,SIGNAL(MouseDoubleClicked(QMouseEvent*))); + this,SIGNAL(MouseDoubleClicked(QMouseEvent*))); connect(anInteractor,SIGNAL(MouseMove(QMouseEvent*)), - this,SIGNAL(MouseMove(QMouseEvent*))); + this,SIGNAL(MouseMove(QMouseEvent*))); connect(anInteractor,SIGNAL(contextMenuRequested(QContextMenuEvent*)), - this,SIGNAL(contextMenuRequested(QContextMenuEvent*))); + this,SIGNAL(contextMenuRequested(QContextMenuEvent*))); connect(anInteractor,SIGNAL(selectionChanged()), - this,SIGNAL(selectionChanged())); + this,SIGNAL(selectionChanged())); } /*! @@ -129,7 +129,7 @@ namespace SVTK operator()( SALOME_Actor* theActor) { if(theActor->GetMapper() && theActor->hasIO()){ - theActor->Highlight( myIsHighlight ); + theActor->Highlight( myIsHighlight ); } } }; @@ -147,14 +147,14 @@ SVTK_SignalHandler using namespace SVTK; ForEach(anActors, - THighlightAction( false )); + THighlightAction( false )); SVTK_Selector* aSelector = myMainWindow->GetSelector(); const SALOME_ListIO& aListIO = aSelector->StoredIObjects(); SALOME_ListIteratorOfListIO anIter(aListIO); for(; anIter.More(); anIter.Next()){ ForEachIf(anActors, - TIsSameIObject(anIter.Value()), - THighlightAction(true)); + TIsSameIObject(anIter.Value()), + THighlightAction(true)); } myMainWindow->Repaint(false); @@ -187,7 +187,7 @@ SVTK_View using namespace SVTK; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); ForEach(aCopy.GetActors(), - THighlightAction( false )); + THighlightAction( false )); Repaint(); } @@ -200,14 +200,14 @@ SVTK_View void SVTK_View ::highlight( const Handle(SALOME_InteractiveObject)& theIO, - bool theIsHighlight, - bool theIsUpdate ) + bool theIsHighlight, + bool theIsUpdate ) { using namespace SVTK; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); ForEachIf(aCopy.GetActors(), - TIsSameIObject( theIO ), - THighlightAction(theIsHighlight)); + TIsSameIObject( theIO ), + THighlightAction(theIsHighlight)); Repaint(); } @@ -223,7 +223,7 @@ SVTK_View VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); SALOME_Actor* anActor = Find(aCopy.GetActors(), - TIsSameEntry(theEntry)); + TIsSameEntry(theEntry)); if(anActor != NULL) return anActor->getIO(); @@ -236,9 +236,9 @@ SVTK_View void SVTK_View ::SetSelectionProp(const double& theRed, - const double& theGreen, - const double& theBlue, - const int& theWidth) + const double& theGreen, + const double& theBlue, + const int& theWidth) { GetRenderer()->SetSelectionProp(theRed,theGreen,theBlue,theWidth); } @@ -249,9 +249,9 @@ SVTK_View void SVTK_View ::SetPreselectionProp(const double& theRed, - const double& theGreen, - const double& theBlue, - const int& theWidth) + const double& theGreen, + const double& theBlue, + const int& theWidth) { GetRenderer()->SetPreselectionProp(theRed,theGreen,theBlue,theWidth); } @@ -262,8 +262,8 @@ SVTK_View void SVTK_View ::SetSelectionTolerance(const double& theTolNodes, - const double& theTolCell, - const double& theTolObjects) + const double& theTolCell, + const double& theTolObjects) { GetRenderer()->SetSelectionTolerance(theTolNodes, theTolCell, theTolObjects); } @@ -280,7 +280,7 @@ SVTK_View VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); SALOME_Actor* anActor = Find(aCopy.GetActors(), - TIsSameIObject(theIObject)); + TIsSameIObject(theIObject)); return anActor != NULL; } @@ -298,7 +298,7 @@ namespace SVTK operator()(SALOME_Actor* theActor) { if( !myResult ) - myResult = theActor->GetVisibility(); + myResult = theActor->GetVisibility(); } }; } @@ -315,8 +315,8 @@ SVTK_View bool aResult; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); ForEachIf(aCopy.GetActors(), - TIsSameIObject(theIObject), - TIsActorVisibleAction(aResult)); + TIsSameIObject(theIObject), + TIsActorVisibleAction(aResult)); return aResult; } @@ -328,14 +328,14 @@ SVTK_View void SVTK_View ::rename(const Handle(SALOME_InteractiveObject)& theIObject, - const QString& theName) + const QString& theName) { using namespace SVTK; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); ForEachIf(aCopy.GetActors(), - TIsSameIObject(theIObject), - TSetFunction - (&SALOME_Actor::setName,theName.toLatin1().data())); + TIsSameIObject(theIObject), + TSetFunction + (&SALOME_Actor::setName,theName.toLatin1().data())); } /*! @@ -371,14 +371,14 @@ SVTK_View void SVTK_View ::SetDisplayMode(const Handle(SALOME_InteractiveObject)& theIObject, - int theMode) + int theMode) { using namespace SVTK; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); ForEachIf(aCopy.GetActors(), - TIsSameIObject(theIObject), - TSetFunction - (&SALOME_Actor::setDisplayMode,theMode)); + TIsSameIObject(theIObject), + TSetFunction + (&SALOME_Actor::setDisplayMode,theMode)); } /*! @@ -413,8 +413,8 @@ SVTK_View { using namespace SVTK; ForEach(theCollection, - TSetFunction - (&SALOME_Actor::setDisplayMode,0)); + TSetFunction + (&SALOME_Actor::setDisplayMode,0)); Repaint(); } @@ -428,8 +428,8 @@ SVTK_View { using namespace SVTK; ForEach(theCollection, - TSetFunction - (&SALOME_Actor::setDisplayMode,1)); + TSetFunction + (&SALOME_Actor::setDisplayMode,1)); Repaint(); } @@ -464,7 +464,7 @@ SVTK_View using namespace SVTK; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); ForEach(aCopy.GetActors(), - TErase()); + TErase()); Repaint(); } @@ -478,7 +478,7 @@ SVTK_View using namespace SVTK; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); ForEach(aCopy.GetActors(), - TSetVisibility(true)); + TSetVisibility(true)); Repaint(); } @@ -490,7 +490,7 @@ SVTK_View void SVTK_View ::Erase(SALOME_Actor* theActor, - bool theIsUpdate) + bool theIsUpdate) { SVTK::TErase()(theActor); @@ -507,13 +507,13 @@ SVTK_View void SVTK_View ::Erase(const Handle(SALOME_InteractiveObject)& theIObject, - bool theIsUpdate) + bool theIsUpdate) { using namespace SVTK; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); ForEachIf(aCopy.GetActors(), - TIsSameIObject(theIObject), - TErase()); + TIsSameIObject(theIObject), + TErase()); if(theIsUpdate) Repaint(); } @@ -524,7 +524,7 @@ SVTK_View void SVTK_View ::Display(SALOME_Actor* theActor, - bool theIsUpdate) + bool theIsUpdate) { GetRenderer()->AddActor(theActor); theActor->SetVisibility(true); @@ -539,13 +539,13 @@ SVTK_View void SVTK_View ::Display(const Handle(SALOME_InteractiveObject)& theIObject, - bool theIsUpdate) + bool theIsUpdate) { using namespace SVTK; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); ForEachIf(aCopy.GetActors(), - TIsSameIObject(theIObject), - TSetVisibility(true)); + TIsSameIObject(theIObject), + TSetVisibility(true)); if(theIsUpdate) Repaint(); @@ -585,13 +585,13 @@ namespace SVTK void SVTK_View ::Remove(const Handle(SALOME_InteractiveObject)& theIObject, - bool theIsUpdate) + bool theIsUpdate) { using namespace SVTK; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); ForEachIf(aCopy.GetActors(), - TIsSameIObject(theIObject), - TRemoveAction(GetRenderer())); + TIsSameIObject(theIObject), + TRemoveAction(GetRenderer())); if(theIsUpdate) Repaint(); } @@ -602,7 +602,7 @@ SVTK_View void SVTK_View ::Remove(SALOME_Actor* theActor, - bool theIsUpdate) + bool theIsUpdate) { GetRenderer()->RemoveActor(theActor); if(theIsUpdate) @@ -644,7 +644,7 @@ SVTK_View VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); SALOME_Actor* anActor = Find(aCopy.GetActors(), - TIsSameIObject(theIObject)); + TIsSameIObject(theIObject)); if(anActor) return 1.0 - anActor->GetOpacity(); return -1.0; @@ -659,15 +659,15 @@ SVTK_View void SVTK_View ::SetTransparency(const Handle(SALOME_InteractiveObject)& theIObject, - float theTrans) + float theTrans) { vtkFloatingPointType anOpacity = 1.0 - theTrans; using namespace SVTK; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); ForEachIf(aCopy.GetActors(), - TIsSameIObject(theIObject), - TSetFunction - (&SALOME_Actor::SetOpacity,anOpacity)); + TIsSameIObject(theIObject), + TSetFunction + (&SALOME_Actor::SetOpacity,anOpacity)); } /*! @@ -678,16 +678,16 @@ SVTK_View void SVTK_View ::SetColor(const Handle(SALOME_InteractiveObject)& theIObject, - const QColor& theColor) + const QColor& theColor) { vtkFloatingPointType aColor[3] = {theColor.red()/255., theColor.green()/255., theColor.blue()/255.}; using namespace SVTK; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); ForEachIf(aCopy.GetActors(), - TIsSameIObject(theIObject), - TSetFunction - (&SALOME_Actor::SetColor,aColor)); + TIsSameIObject(theIObject), + TSetFunction + (&SALOME_Actor::SetColor,aColor)); } @@ -703,7 +703,7 @@ SVTK_View VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); SALOME_Actor* anActor = Find(aCopy.GetActors(), - TIsSameIObject(theIObject)); + TIsSameIObject(theIObject)); if(anActor){ vtkFloatingPointType r,g,b; anActor->GetColor(r,g,b); diff --git a/src/SVTK/SVTK_ViewWindow.cxx b/src/SVTK/SVTK_ViewWindow.cxx index d9f7d1f67..83abf056c 100755 --- a/src/SVTK/SVTK_ViewWindow.cxx +++ b/src/SVTK/SVTK_ViewWindow.cxx @@ -188,7 +188,7 @@ void SVTK_ViewWindow::Initialize(SVTK_ViewModelBase* theModel) To initialize #SVTK_ViewWindow instance */ void SVTK_ViewWindow::Initialize(SVTK_View* theView, - SVTK_ViewModelBase* theModel) + SVTK_ViewModelBase* theModel) { connect(theView,SIGNAL(KeyPressed(QKeyEvent*)), this,SLOT(onKeyPressed(QKeyEvent*)) ); @@ -205,7 +205,7 @@ void SVTK_ViewWindow::Initialize(SVTK_View* theView, connect(theView,SIGNAL(contextMenuRequested(QContextMenuEvent*)), this,SIGNAL(contextMenuRequested(QContextMenuEvent *))); connect(theView,SIGNAL(selectionChanged()), - theModel,SLOT(onSelectionChanged())); + theModel,SLOT(onSelectionChanged())); } /*! @@ -385,8 +385,8 @@ void SVTK_ViewWindow::unHighlightAll() \param theIsUpdate - update current viewer */ void SVTK_ViewWindow::highlight(const Handle(SALOME_InteractiveObject)& theIO, - bool theIsHighlight, - bool theIsUpdate ) + bool theIsHighlight, + bool theIsUpdate ) { myView->highlight( theIO, theIsHighlight, theIsUpdate ); } @@ -424,7 +424,7 @@ Handle(SALOME_InteractiveObject) SVTK_ViewWindow::FindIObject(const char* theEnt \param theImmediatly - update viewer */ void SVTK_ViewWindow::Display(const Handle(SALOME_InteractiveObject)& theIO, - bool theImmediatly) + bool theImmediatly) { myView->Display(theIO,theImmediatly); } @@ -435,7 +435,7 @@ void SVTK_ViewWindow::Display(const Handle(SALOME_InteractiveObject)& theIO, \param theImmediatly - update viewer */ void SVTK_ViewWindow::Erase(const Handle(SALOME_InteractiveObject)& theIO, - bool theImmediatly) + bool theImmediatly) { myView->Erase(theIO,theImmediatly); } @@ -472,8 +472,8 @@ void SVTK_ViewWindow::EraseAll() void SVTK_ViewWindow::setBackgroundColor( const QColor& theColor ) { getRenderer()->SetBackground(theColor.red()/255.0, - theColor.green()/255.0, - theColor.blue()/255.0); + theColor.green()/255.0, + theColor.blue()/255.0); } /*! @@ -484,8 +484,8 @@ QColor SVTK_ViewWindow::backgroundColor() const vtkFloatingPointType aBackgroundColor[3]; getRenderer()->GetBackground(aBackgroundColor); return QColor(int(aBackgroundColor[0]*255), - int(aBackgroundColor[1]*255), - int(aBackgroundColor[2]*255)); + int(aBackgroundColor[1]*255), + int(aBackgroundColor[2]*255)); } @@ -666,8 +666,8 @@ void SVTK_ViewWindow::onSwitchInteractionStyle(bool theOn) // keep the same style extensions SVTK_InteractorStyle* aStyle = (SVTK_InteractorStyle*)GetInteractorStyle(); if ( aStyle ) { - myKeyFreeInteractorStyle->SetControllerIncrement(aStyle->ControllerIncrement()); - myKeyFreeInteractorStyle->SetControllerOnKeyDown(aStyle->ControllerOnKeyDown()); + myKeyFreeInteractorStyle->SetControllerIncrement(aStyle->ControllerIncrement()); + myKeyFreeInteractorStyle->SetControllerOnKeyDown(aStyle->ControllerOnKeyDown()); } PushInteractorStyle(myKeyFreeInteractorStyle.GetPointer()); @@ -702,8 +702,8 @@ void SVTK_ViewWindow::SetIncrementalSpeed(const int theValue, const int theMode) \param theBtn3 - spacemouse button for the "dominant combined switch" */ void SVTK_ViewWindow::SetSpacemouseButtons(const int theBtn1, - const int theBtn2, - const int theBtn3) + const int theBtn2, + const int theBtn3) { int val = theBtn1; myEventDispatcher->InvokeEvent(SVTK::SetSMDecreaseSpeedEvent, &val); @@ -801,7 +801,7 @@ void SVTK_ViewWindow::onMouseDoubleClicked( QMouseEvent* event ) Redirect the request to #SVTK_Renderer::AddActor */ void SVTK_ViewWindow::AddActor( VTKViewer_Actor* theActor, - bool theUpdate ) + bool theUpdate ) { GetRenderer()->AddActor(theActor); if(theUpdate) @@ -813,7 +813,7 @@ void SVTK_ViewWindow::AddActor( VTKViewer_Actor* theActor, Redirect the request to #SVTK_Renderer::RemoveActor */ void SVTK_ViewWindow::RemoveActor( VTKViewer_Actor* theActor, - bool theUpdate ) + bool theUpdate ) { GetRenderer()->RemoveActor(theActor); if(theUpdate) @@ -900,9 +900,9 @@ void SVTK_ViewWindow::RefreshDumpImage() Redirect the request to #SVTK_Renderer::SetSelectionProp */ void SVTK_ViewWindow::SetSelectionProp(const double& theRed, - const double& theGreen, - const double& theBlue, - const int& theWidth) + const double& theGreen, + const double& theBlue, + const int& theWidth) { myView->SetSelectionProp(theRed,theGreen,theBlue,theWidth); } @@ -911,9 +911,9 @@ void SVTK_ViewWindow::SetSelectionProp(const double& theRed, Redirect the request to #SVTK_Renderer::SetSelectionProp */ void SVTK_ViewWindow::SetPreselectionProp(const double& theRed, - const double& theGreen, - const double& theBlue, - const int& theWidth) + const double& theGreen, + const double& theBlue, + const int& theWidth) { myView->SetPreselectionProp(theRed,theGreen,theBlue,theWidth); } @@ -922,8 +922,8 @@ void SVTK_ViewWindow::SetPreselectionProp(const double& theRed, Redirect the request to #SVTK_Renderer::SetSelectionTolerance */ void SVTK_ViewWindow::SetSelectionTolerance(const double& theTolNodes, - const double& theTolItems, - const double& theTolObjects) + const double& theTolItems, + const double& theTolObjects) { myView->SetSelectionTolerance(theTolNodes, theTolItems, theTolObjects); } @@ -1004,7 +1004,7 @@ void getGradAxisVisualParams( QXmlStreamWriter& writer, vtkAxisActor2D* actor, Q writer.writeEndElement(); //params.sprintf( "* Graduated Axis: * Name *%u*%s*%.2f*%.2f*%.2f*%u*%u*%u*%u", isVisible, - // title.toLatin1().data(), color[0], color[1], color[2], font, bold, italic, shadow ); + // title.toLatin1().data(), color[0], color[1], color[2], font, bold, italic, shadow ); // Labels isVisible = actor->GetLabelVisibility(); @@ -1041,7 +1041,7 @@ void getGradAxisVisualParams( QXmlStreamWriter& writer, vtkAxisActor2D* actor, Q writer.writeEndElement(); writer.writeEndElement(); // params += QString().sprintf( "* Labels *%u*%u*%u*%.2f*%.2f*%.2f*%u*%u*%u*%u", isVisible, labels, offset, - // color[0], color[1], color[2], font, bold, italic, shadow ); + // color[0], color[1], color[2], font, bold, italic, shadow ); // Tick marks isVisible = actor->GetTickVisibility(); @@ -1320,45 +1320,45 @@ void SVTK_ViewWindow::doSetVisualParameters( const QString& parameters ) if (aReader.isStartElement()) { QXmlStreamAttributes aAttr = aReader.attributes(); //printf("### Name = %s\n", qPrintable(aReader.name().toString())); - if (aReader.name() == "Position") { - pos[0] = aAttr.value("X").toString().toDouble(); - pos[1] = aAttr.value("Y").toString().toDouble(); - pos[2] = aAttr.value("Z").toString().toDouble(); - //printf("#### Position %f; %f; %f\n", pos[0], pos[1], pos[2]); + if (aReader.name() == "Position") { + pos[0] = aAttr.value("X").toString().toDouble(); + pos[1] = aAttr.value("Y").toString().toDouble(); + pos[2] = aAttr.value("Z").toString().toDouble(); + //printf("#### Position %f; %f; %f\n", pos[0], pos[1], pos[2]); } else if (aReader.name() == "FocalPoint") { - focalPnt[0] = aAttr.value("X").toString().toDouble(); - focalPnt[1] = aAttr.value("Y").toString().toDouble(); - focalPnt[2] = aAttr.value("Z").toString().toDouble(); - //printf("#### FocalPoint %f; %f; %f\n", focalPnt[0], focalPnt[1], focalPnt[2]); + focalPnt[0] = aAttr.value("X").toString().toDouble(); + focalPnt[1] = aAttr.value("Y").toString().toDouble(); + focalPnt[2] = aAttr.value("Z").toString().toDouble(); + //printf("#### FocalPoint %f; %f; %f\n", focalPnt[0], focalPnt[1], focalPnt[2]); } else if (aReader.name() == "ViewUp") { - viewUp[0] = aAttr.value("X").toString().toDouble(); - viewUp[1] = aAttr.value("Y").toString().toDouble(); - viewUp[2] = aAttr.value("Z").toString().toDouble(); - //printf("#### ViewUp %f; %f; %f\n", viewUp[0], viewUp[1], viewUp[2]); + viewUp[0] = aAttr.value("X").toString().toDouble(); + viewUp[1] = aAttr.value("Y").toString().toDouble(); + viewUp[2] = aAttr.value("Z").toString().toDouble(); + //printf("#### ViewUp %f; %f; %f\n", viewUp[0], viewUp[1], viewUp[2]); } else if (aReader.name() == "ViewScale") { - parScale = aAttr.value("Parallel").toString().toDouble(); - scale[0] = aAttr.value("X").toString().toDouble(); - scale[1] = aAttr.value("Y").toString().toDouble(); - scale[2] = aAttr.value("Z").toString().toDouble(); - //printf("#### ViewScale %f; %f; %f\n", scale[0], scale[1], scale[2]); + parScale = aAttr.value("Parallel").toString().toDouble(); + scale[0] = aAttr.value("X").toString().toDouble(); + scale[1] = aAttr.value("Y").toString().toDouble(); + scale[2] = aAttr.value("Z").toString().toDouble(); + //printf("#### ViewScale %f; %f; %f\n", scale[0], scale[1], scale[2]); } else if (aReader.name() == "DisplayCubeAxis") { - if (aAttr.value("Show") == "0") - gradAxesActor->VisibilityOff(); - else - gradAxesActor->VisibilityOn(); + if (aAttr.value("Show") == "0") + gradAxesActor->VisibilityOff(); + else + gradAxesActor->VisibilityOn(); } else if (aReader.name() == "GraduatedAxis") { - if(aAttr.value("Axis") == "X") - setGradAxisVisualParams(aReader, gradAxesActor->GetXAxisActor2D()); - else if(aAttr.value("Axis") == "Y") - setGradAxisVisualParams(aReader, gradAxesActor->GetYAxisActor2D()); - else if(aAttr.value("Axis") == "Z") - setGradAxisVisualParams(aReader, gradAxesActor->GetZAxisActor2D()); + if(aAttr.value("Axis") == "X") + setGradAxisVisualParams(aReader, gradAxesActor->GetXAxisActor2D()); + else if(aAttr.value("Axis") == "Y") + setGradAxisVisualParams(aReader, gradAxesActor->GetYAxisActor2D()); + else if(aAttr.value("Axis") == "Z") + setGradAxisVisualParams(aReader, gradAxesActor->GetZAxisActor2D()); } else if (aReader.name() == "Trihedron") { - if (aAttr.value("isShown") == "0") - GetTrihedron()->VisibilityOff(); - else - GetTrihedron()->VisibilityOn(); - SetTrihedronSize(aAttr.value("Size").toString().toDouble()); + if (aAttr.value("isShown") == "0") + GetTrihedron()->VisibilityOff(); + else + GetTrihedron()->VisibilityOn(); + SetTrihedronSize(aAttr.value("Size").toString().toDouble()); } } } @@ -1398,24 +1398,24 @@ void SVTK_ViewWindow::doSetVisualParameters( const QString& parameters ) // apply graduated axes parameters SVTK_CubeAxesActor2D* gradAxesActor = GetCubeAxes(); if ( gradAxesActor && paramsLst.size() == nAllParams ) { - int i = nNormalParams+1, j = i + nGradAxisParams - 1; - ::setGradAxisVisualParams( gradAxesActor->GetXAxisActor2D(), parameters.section( '*', i, j ) ); - i = j + 1; j += nGradAxisParams; - ::setGradAxisVisualParams( gradAxesActor->GetYAxisActor2D(), parameters.section( '*', i, j ) ); - i = j + 1; j += nGradAxisParams; - ::setGradAxisVisualParams( gradAxesActor->GetZAxisActor2D(), parameters.section( '*', i, j ) ); - - if ( paramsLst[13].toUShort() ) - gradAxesActor->VisibilityOn(); - else - gradAxesActor->VisibilityOff(); + int i = nNormalParams+1, j = i + nGradAxisParams - 1; + ::setGradAxisVisualParams( gradAxesActor->GetXAxisActor2D(), parameters.section( '*', i, j ) ); + i = j + 1; j += nGradAxisParams; + ::setGradAxisVisualParams( gradAxesActor->GetYAxisActor2D(), parameters.section( '*', i, j ) ); + i = j + 1; j += nGradAxisParams; + ::setGradAxisVisualParams( gradAxesActor->GetZAxisActor2D(), parameters.section( '*', i, j ) ); + + if ( paramsLst[13].toUShort() ) + gradAxesActor->VisibilityOn(); + else + gradAxesActor->VisibilityOff(); } else if ( paramsLst.size() == nAllParams ) { - if ( paramsLst[90].toUShort() ) - GetTrihedron()->VisibilityOn(); - else - GetTrihedron()->VisibilityOff(); - - SetTrihedronSize(paramsLst[91].toDouble()); + if ( paramsLst[90].toUShort() ) + GetTrihedron()->VisibilityOn(); + else + GetTrihedron()->VisibilityOff(); + + SetTrihedronSize(paramsLst[91].toDouble()); } } } @@ -1501,56 +1501,56 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) // Dump view anAction = new QtxAction(tr("MNU_DUMP_VIEW"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_DUMP" ) ), - tr( "MNU_DUMP_VIEW" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_DUMP" ) ), + tr( "MNU_DUMP_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_DUMP_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(onDumpView())); mgr->registerAction( anAction, DumpId ); // FitAll anAction = new QtxAction(tr("MNU_FITALL"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITALL" ) ), - tr( "MNU_FITALL" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITALL" ) ), + tr( "MNU_FITALL" ), 0, this); anAction->setStatusTip(tr("DSC_FITALL")); connect(anAction, SIGNAL(activated()), this, SLOT(onFitAll())); mgr->registerAction( anAction, FitAllId ); // FitRect anAction = new QtxAction(tr("MNU_FITRECT"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITAREA" ) ), - tr( "MNU_FITRECT" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITAREA" ) ), + tr( "MNU_FITRECT" ), 0, this); anAction->setStatusTip(tr("DSC_FITRECT")); connect(anAction, SIGNAL(activated()), this, SLOT(activateWindowFit())); mgr->registerAction( anAction, FitRectId ); // Zoom anAction = new QtxAction(tr("MNU_ZOOM_VIEW"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ZOOM" ) ), - tr( "MNU_ZOOM_VIEW" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ZOOM" ) ), + tr( "MNU_ZOOM_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_ZOOM_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(activateZoom())); mgr->registerAction( anAction, ZoomId ); // Panning anAction = new QtxAction(tr("MNU_PAN_VIEW"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_PAN" ) ), - tr( "MNU_PAN_VIEW" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_PAN" ) ), + tr( "MNU_PAN_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_PAN_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(activatePanning())); mgr->registerAction( anAction, PanId ); // Global Panning anAction = new QtxAction(tr("MNU_GLOBALPAN_VIEW"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_GLOBALPAN" ) ), - tr( "MNU_GLOBALPAN_VIEW" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_GLOBALPAN" ) ), + tr( "MNU_GLOBALPAN_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(activateGlobalPanning())); mgr->registerAction( anAction, GlobalPanId ); // Change rotation point anAction = new QtxAction(tr("MNU_CHANGINGROTATIONPOINT_VIEW"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_ROTATION_POINT" ) ), - tr( "MNU_CHANGINGROTATIONPOINT_VIEW" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_ROTATION_POINT" ) ), + tr( "MNU_CHANGINGROTATIONPOINT_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_CHANGINGROTATIONPOINT_VIEW")); anAction->setCheckable(true); connect(anAction, SIGNAL(toggled(bool)), this, SLOT(onChangeRotationPoint(bool))); @@ -1558,75 +1558,75 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) // Rotation anAction = new QtxAction(tr("MNU_ROTATE_VIEW"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ROTATE" ) ), - tr( "MNU_ROTATE_VIEW" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ROTATE" ) ), + tr( "MNU_ROTATE_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_ROTATE_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(activateRotation())); mgr->registerAction( anAction, RotationId ); // Projections anAction = new QtxAction(tr("MNU_FRONT_VIEW"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FRONT" ) ), - tr( "MNU_FRONT_VIEW" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FRONT" ) ), + tr( "MNU_FRONT_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_FRONT_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(onFrontView())); mgr->registerAction( anAction, FrontId ); anAction = new QtxAction(tr("MNU_BACK_VIEW"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BACK" ) ), - tr( "MNU_BACK_VIEW" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BACK" ) ), + tr( "MNU_BACK_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_BACK_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(onBackView())); mgr->registerAction( anAction, BackId ); anAction = new QtxAction(tr("MNU_TOP_VIEW"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TOP" ) ), - tr( "MNU_TOP_VIEW" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TOP" ) ), + tr( "MNU_TOP_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_TOP_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(onTopView())); mgr->registerAction( anAction, TopId ); anAction = new QtxAction(tr("MNU_BOTTOM_VIEW"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BOTTOM" ) ), - tr( "MNU_BOTTOM_VIEW" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BOTTOM" ) ), + tr( "MNU_BOTTOM_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_BOTTOM_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(onBottomView())); mgr->registerAction( anAction, BottomId ); anAction = new QtxAction(tr("MNU_LEFT_VIEW"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_LEFT" ) ), - tr( "MNU_LEFT_VIEW" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_LEFT" ) ), + tr( "MNU_LEFT_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_LEFT_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(onLeftView())); mgr->registerAction( anAction, LeftId ); anAction = new QtxAction(tr("MNU_RIGHT_VIEW"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RIGHT" ) ), - tr( "MNU_RIGHT_VIEW" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RIGHT" ) ), + tr( "MNU_RIGHT_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_RIGHT_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(onRightView())); mgr->registerAction( anAction, RightId ); // Reset anAction = new QtxAction(tr("MNU_RESET_VIEW"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RESET" ) ), - tr( "MNU_RESET_VIEW" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RESET" ) ), + tr( "MNU_RESET_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_RESET_VIEW")); connect(anAction, SIGNAL(activated()), this, SLOT(onResetView())); mgr->registerAction( anAction, ResetId ); // onViewTrihedron: Shows - Hides Trihedron anAction = new QtxAction(tr("MNU_SHOW_TRIHEDRON"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TRIHEDRON" ) ), - tr( "MNU_SHOW_TRIHEDRON" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TRIHEDRON" ) ), + tr( "MNU_SHOW_TRIHEDRON" ), 0, this); anAction->setStatusTip(tr("DSC_SHOW_TRIHEDRON")); connect(anAction, SIGNAL(activated()), this, SLOT(onViewTrihedron())); mgr->registerAction( anAction, ViewTrihedronId ); // onNonIsometric: Manage non-isometric params anAction = new QtxAction(tr("MNU_SVTK_SCALING"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_SCALING" ) ), - tr( "MNU_SVTK_SCALING" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_SCALING" ) ), + tr( "MNU_SVTK_SCALING" ), 0, this); anAction->setStatusTip(tr("DSC_SVTK_SCALING")); anAction->setCheckable(true); connect(anAction, SIGNAL(toggled(bool)), this, SLOT(onNonIsometric(bool))); @@ -1634,8 +1634,8 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) // onGraduatedAxes: Manage graduated axes params anAction = new QtxAction(tr("MNU_SVTK_GRADUATED_AXES"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_GRADUATED_AXES" ) ), - tr( "MNU_SVTK_GRADUATED_AXES" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_GRADUATED_AXES" ) ), + tr( "MNU_SVTK_GRADUATED_AXES" ), 0, this); anAction->setStatusTip(tr("DSC_SVTK_GRADUATED_AXES")); anAction->setCheckable(true); connect(anAction, SIGNAL(toggled(bool)), this, SLOT(onGraduatedAxes(bool))); @@ -1643,8 +1643,8 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) // onGraduatedAxes: Manage graduated axes params anAction = new QtxAction(tr("MNU_SVTK_UPDATE_RATE"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_UPDATE_RATE" ) ), - tr( "MNU_SVTK_UPDATE_RATE" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_UPDATE_RATE" ) ), + tr( "MNU_SVTK_UPDATE_RATE" ), 0, this); anAction->setStatusTip(tr("DSC_SVTK_UPDATE_RATE")); anAction->setCheckable(true); connect(anAction, SIGNAL(toggled(bool)), this, SLOT(onUpdateRate(bool))); @@ -1652,16 +1652,16 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) // Set perspective mode group anAction = new QtxAction(tr("MNU_SVTK_PARALLEL_MODE"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_VIEW_PARALLEL" ) ), - tr( "MNU_SVTK_PARALLEL_MODE" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_VIEW_PARALLEL" ) ), + tr( "MNU_SVTK_PARALLEL_MODE" ), 0, this); anAction->setStatusTip(tr("DSC_SVTK_PARALLEL_MODE")); anAction->setCheckable(true); connect(anAction, SIGNAL(toggled(bool)), this, SLOT(onPerspectiveMode())); mgr->registerAction( anAction, ParallelModeId ); anAction = new QtxAction(tr("MNU_SVTK_PERSPECTIVE_MODE"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_VIEW_PERSPECTIVE" ) ), - tr( "MNU_SVTK_PERSPECTIVE_MODE" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_VIEW_PERSPECTIVE" ) ), + tr( "MNU_SVTK_PERSPECTIVE_MODE" ), 0, this); anAction->setStatusTip(tr("DSC_SVTK_PERSPECTIVE_MODE")); anAction->setCheckable(true); connect(anAction, SIGNAL(toggled(bool)), this, SLOT(onPerspectiveMode())); @@ -1673,8 +1673,8 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) // View Parameters anAction = new QtxAction(tr("MNU_VIEWPARAMETERS_VIEW"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_VIEW_PARAMETERS" ) ), - tr( "MNU_VIEWPARAMETERS_VIEW" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_VIEW_PARAMETERS" ) ), + tr( "MNU_VIEWPARAMETERS_VIEW" ), 0, this); anAction->setStatusTip(tr("DSC_VIEWPARAMETERS_VIEW")); anAction->setCheckable(true); connect(anAction, SIGNAL(toggled(bool)), this, SLOT(onViewParameters(bool))); @@ -1682,8 +1682,8 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) // Switch between interaction styles anAction = new QtxAction(tr("MNU_SVTK_STYLE_SWITCH"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_STYLE_SWITCH" ) ), - tr( "MNU_SVTK_STYLE_SWITCH" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_STYLE_SWITCH" ) ), + tr( "MNU_SVTK_STYLE_SWITCH" ), 0, this); anAction->setStatusTip(tr("DSC_SVTK_STYLE_SWITCH")); anAction->setCheckable(true); connect(anAction, SIGNAL(toggled(bool)), this, SLOT(onSwitchInteractionStyle(bool))); @@ -1691,16 +1691,16 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) // Start recording myStartAction = new QtxAction(tr("MNU_SVTK_RECORDING_START"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_RECORDING_START" ) ), - tr( "MNU_SVTK_RECORDING_START" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_RECORDING_START" ) ), + tr( "MNU_SVTK_RECORDING_START" ), 0, this); myStartAction->setStatusTip(tr("DSC_SVTK_RECORDING_START")); connect( myStartAction, SIGNAL( triggered ( bool ) ), this, SLOT( onStartRecording() ) ); mgr->registerAction( myStartAction, StartRecordingId ); // Play recording myPlayAction = new QtxAction(tr("MNU_SVTK_RECORDING_PLAY"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_RECORDING_PLAY" ) ), - tr( "MNU_SVTK_RECORDING_PLAY" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_RECORDING_PLAY" ) ), + tr( "MNU_SVTK_RECORDING_PLAY" ), 0, this); myPlayAction->setStatusTip(tr("DSC_SVTK_RECORDING_PLAY")); myPlayAction->setEnabled( false ); connect( myPlayAction, SIGNAL( triggered ( bool ) ), this, SLOT( onPlayRecording() ) ); @@ -1708,8 +1708,8 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) // Pause recording myPauseAction = new QtxAction(tr("MNU_SVTK_RECORDING_PAUSE"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_RECORDING_PAUSE" ) ), - tr( "MNU_SVTK_RECORDING_PAUSE" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_RECORDING_PAUSE" ) ), + tr( "MNU_SVTK_RECORDING_PAUSE" ), 0, this); myPauseAction->setStatusTip(tr("DSC_SVTK_RECORDING_PAUSE")); myPauseAction->setEnabled( false ); connect( myPauseAction, SIGNAL( triggered ( bool ) ), this, SLOT( onPauseRecording() ) ); @@ -1717,8 +1717,8 @@ void SVTK_ViewWindow::createActions(SUIT_ResourceMgr* theResourceMgr) // Stop recording myStopAction = new QtxAction(tr("MNU_SVTK_RECORDING_STOP"), - theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_RECORDING_STOP" ) ), - tr( "MNU_SVTK_RECORDING_STOP" ), 0, this); + theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_SVTK_RECORDING_STOP" ) ), + tr( "MNU_SVTK_RECORDING_STOP" ), 0, this); myStopAction->setStatusTip(tr("DSC_SVTK_RECORDING_STOP")); myStopAction->setEnabled( false ); connect( myStopAction, SIGNAL( triggered ( bool ) ), this, SLOT( onStopRecording() ) ); diff --git a/src/VTKViewer/VTKViewer_Algorithm.h b/src/VTKViewer/VTKViewer_Algorithm.h index 436efa9fe..78d489b05 100644 --- a/src/VTKViewer/VTKViewer_Algorithm.h +++ b/src/VTKViewer/VTKViewer_Algorithm.h @@ -68,13 +68,13 @@ namespace VTK template TFunction ForEach(vtkActorCollection *theCollection, TFunction theFun) { - if(theCollection){ - theCollection->InitTraversal(); - while(vtkActor *anAct = theCollection->GetNextActor()) - if(TActor *anActor = dynamic_cast(anAct)) - theFun(anActor); - } - return theFun; + if(theCollection){ + theCollection->InitTraversal(); + while(vtkActor *anAct = theCollection->GetNextActor()) + if(TActor *anActor = dynamic_cast(anAct)) + theFun(anActor); + } + return theFun; } /*!For each actor(for ex: someActor) from \a theCollection(that can be dynamic cast to type TActor and \n @@ -83,17 +83,17 @@ namespace VTK */ template TFunction ForEachIf(vtkActorCollection *theCollection, - TPredicate thePredicate, - TFunction theFun) + TPredicate thePredicate, + TFunction theFun) { - if(theCollection){ - theCollection->InitTraversal(); - while(vtkActor *anAct = theCollection->GetNextActor()) - if(TActor *anActor = dynamic_cast(anAct)) - if(thePredicate(anActor)) - theFun(anActor); - } - return theFun; + if(theCollection){ + theCollection->InitTraversal(); + while(vtkActor *anAct = theCollection->GetNextActor()) + if(TActor *anActor = dynamic_cast(anAct)) + if(thePredicate(anActor)) + theFun(anActor); + } + return theFun; } /*!Find actor from collection, that can be dynamicaly cast to \a TActor, \n @@ -103,14 +103,14 @@ namespace VTK template TActor* Find(vtkActorCollection *theCollection, TPredicate thePredicate) { - if(theCollection){ - theCollection->InitTraversal(); - while(vtkActor *anAct = theCollection->GetNextActor()) - if(TActor *anActor = dynamic_cast(anAct)) - if(thePredicate(anActor)) - return anActor; - } - return NULL; + if(theCollection){ + theCollection->InitTraversal(); + while(vtkActor *anAct = theCollection->GetNextActor()) + if(TActor *anActor = dynamic_cast(anAct)) + if(thePredicate(anActor)) + return anActor; + } + return NULL; } } -- 2.39.2