]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
untabify
authoreap <eap@opencascade.com>
Fri, 11 Dec 2009 09:38:45 +0000 (09:38 +0000)
committereap <eap@opencascade.com>
Fri, 11 Dec 2009 09:38:45 +0000 (09:38 +0000)
265 files changed:
src/CAF/CAF_Application.cxx
src/CAF/CAF_Study.cxx
src/CAM/CAM_Application.cxx
src/CAM/CAM_DataModel.cxx
src/CASCatch/CASCatch_CatchSignals.cxx
src/DDS/DDS_DicItem.cxx
src/Event/SALOME_Event.cxx
src/Event/SALOME_Event.h
src/GLViewer/GLViewer_BaseObjects.h
src/GLViewer/GLViewer_Compass.cxx
src/GLViewer/GLViewer_Context.cxx
src/GLViewer/GLViewer_Drawer.cxx
src/GLViewer/GLViewer_Drawer.h
src/GLViewer/GLViewer_Grid.h
src/GLViewer/GLViewer_MimeData.cxx
src/GLViewer/GLViewer_Object.cxx
src/GLViewer/GLViewer_Object.h
src/GLViewer/GLViewer_ToolTip.cxx
src/GLViewer/GLViewer_Tools.h
src/GLViewer/GLViewer_ViewFrame.cxx
src/GLViewer/GLViewer_ViewPort2d.cxx
src/GLViewer/GLViewer_Viewer.cxx
src/GLViewer/GLViewer_Viewer2d.cxx
src/GLViewer/GLViewer_Viewer2d.h
src/GLViewer/GLViewer_Widget.cxx
src/GLViewer/GLViewer_Widget.h
src/LightApp/LightApp_Application.cxx
src/LightApp/LightApp_Application.h
src/LightApp/LightApp_DataModel.cxx
src/LightApp/LightApp_DataObject.cxx
src/LightApp/LightApp_Displayer.cxx
src/LightApp/LightApp_EventFilter.cxx
src/LightApp/LightApp_Module.h
src/LightApp/LightApp_ModuleDlg.cxx
src/LightApp/LightApp_OBSelector.cxx
src/LightApp/LightApp_Preferences.cxx
src/LightApp/LightApp_PreferencesDlg.cxx
src/LightApp/LightApp_Selection.cxx
src/LightApp/LightApp_SelectionMgr.cxx
src/LightApp/LightApp_SelectionMgr.h
src/LightApp/LightApp_ShowHideOp.cxx
src/LightApp/LightApp_SwitchOp.cxx
src/LightApp/LightApp_VTKSelector.cxx
src/OBJECT/SALOME_AISObject.hxx
src/OBJECT/SALOME_AISObject.ixx
src/OBJECT/SALOME_AISShape.hxx
src/OBJECT/SALOME_AISShape.ixx
src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx
src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx
src/OBJECT/SALOME_Filter.hxx
src/OBJECT/SALOME_Filter.ixx
src/OBJECT/SALOME_InteractiveObject.hxx
src/OBJECT/SALOME_InteractiveObject.ixx
src/OBJECT/SALOME_ListNodeOfListIO.hxx
src/OBJECT/SALOME_ListNodeOfListIO_0.cxx
src/OBJECT/SALOME_TypeFilter.hxx
src/OBJECT/SALOME_TypeFilter.ixx
src/OCCViewer/OCCViewer_ClippingDlg.cxx
src/OCCViewer/OCCViewer_CreateRestoreViewDlg.cxx
src/OCCViewer/OCCViewer_CreateRestoreViewDlg.h
src/OCCViewer/OCCViewer_SetRotationPointDlg.cxx
src/OCCViewer/OCCViewer_SetRotationPointDlg.h
src/OCCViewer/OCCViewer_ToolTip.cxx
src/OCCViewer/OCCViewer_Trihedron.cxx
src/OCCViewer/OCCViewer_Trihedron.h
src/OCCViewer/OCCViewer_VService.cxx
src/OCCViewer/OCCViewer_VService.h
src/OCCViewer/OCCViewer_ViewModel.cxx
src/OCCViewer/OCCViewer_ViewModel.h
src/OCCViewer/OCCViewer_ViewPort.cxx
src/OCCViewer/OCCViewer_ViewPort.h
src/OCCViewer/OCCViewer_ViewPort3d.cxx
src/OCCViewer/OCCViewer_ViewPort3d.h
src/OCCViewer/OCCViewer_ViewSketcher.cxx
src/OCCViewer/OCCViewer_ViewWindow.cxx
src/OCCViewer/OCCViewer_ViewWindow.h
src/ObjBrowser/OB_Browser.cxx
src/Plot2d/Plot2d.cxx
src/Plot2d/Plot2d.h
src/Plot2d/Plot2d_Curve.h
src/Plot2d/Plot2d_SetupCurveDlg.cxx
src/Plot2d/Plot2d_SetupViewDlg.cxx
src/Plot2d/Plot2d_ToolTip.cxx
src/Plot2d/Plot2d_ViewFrame.cxx
src/Plot2d/Plot2d_ViewFrame.h
src/Plot2d/Plot2d_ViewManager.cxx
src/Plot2d/Plot2d_ViewModel.cxx
src/Plot2d/Plot2d_ViewWindow.cxx
src/Plot2d/Plot2d_ViewWindow.h
src/Prs/SALOME_Prs.cxx
src/PyConsole/PyConsole_Editor.cxx
src/PyInterp/PyInterp_Watcher.h
src/Qtx/Qtx.cxx
src/Qtx/Qtx.h
src/Qtx/QtxActionGroup.cxx
src/Qtx/QtxActionMenuMgr.cxx
src/Qtx/QtxActionMgr.h
src/Qtx/QtxActionToolMgr.cxx
src/Qtx/QtxActionToolMgr.h
src/Qtx/QtxColorScale.cxx
src/Qtx/QtxColorScale.h
src/Qtx/QtxDialog.cxx
src/Qtx/QtxDialog.h
src/Qtx/QtxDockAction.h
src/Qtx/QtxDockWidget.cxx
src/Qtx/QtxDoubleSpinBox.cxx
src/Qtx/QtxEvalExpr.cxx
src/Qtx/QtxIntSpinBox.cxx
src/Qtx/QtxListAction.cxx
src/Qtx/QtxLogoMgr.cxx
src/Qtx/QtxMRUAction.cxx
src/Qtx/QtxMRUAction.h
src/Qtx/QtxMainWindow.cxx
src/Qtx/QtxMultiAction.cxx
src/Qtx/QtxPagePrefMgr.cxx
src/Qtx/QtxPathDialog.cxx
src/Qtx/QtxPathDialog.h
src/Qtx/QtxPathListEdit.cxx
src/Qtx/QtxPopupMgr.cxx
src/Qtx/QtxResourceMgr.cxx
src/Qtx/QtxRubberBand.cxx
src/Qtx/QtxRubberBand.h
src/Qtx/QtxSearchTool.cxx
src/Qtx/QtxSplash.cxx
src/Qtx/QtxSplash.h
src/Qtx/QtxTable.cxx
src/Qtx/QtxToolBar.cxx
src/Qtx/QtxToolTip.cxx
src/Qtx/QtxToolTip.h
src/Qtx/QtxTreeView.cxx
src/Qtx/QtxValidator.cxx
src/Qtx/QtxWorkspaceAction.cxx
src/Qtx/QtxWorkstack.cxx
src/Qtx/QtxWorkstack.h
src/Qtx/QtxWorkstackAction.cxx
src/QxGraph/QxGraph_CanvasView.cxx
src/QxGraph/QxGraph_CanvasView.h
src/QxGraph/QxGraph_Prs.cxx
src/QxGraph/QxGraph_ViewManager.cxx
src/QxGraph/QxGraph_ViewWindow.cxx
src/QxScene/QxScene_ViewManager.cxx
src/QxScene/QxScene_ViewWindow.cxx
src/ResExporter/ResourceExporter.cxx
src/SALOME_PY/SalomePy.cxx
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h
src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.cxx
src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.h
src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx
src/SALOME_PYQT/SalomePyQt/SalomePyQt.h
src/SALOME_SWIG/SALOMEGUI_Swig.cxx
src/SOCC/SOCC_ViewModel.cxx
src/SOCC/SOCC_ViewModel.h
src/SOCC/SOCC_ViewWindow.cxx
src/SPlot2d/SPlot2d_ViewModel.cxx
src/SPlot2d/SPlot2d_ViewModel.h
src/SPlot2d/SPlot2d_ViewWindow.cxx
src/STD/STD.h
src/STD/STD_Application.cxx
src/STD/STD_Application.h
src/STD/STD_MDIDesktop.cxx
src/STD/STD_TabDesktop.cxx
src/SUIT/SUIT_Accel.cxx
src/SUIT/SUIT_ActionOperation.cxx
src/SUIT/SUIT_ActionOperation.h
src/SUIT/SUIT_Application.h
src/SUIT/SUIT_DataBrowser.cxx
src/SUIT/SUIT_DataObject.cxx
src/SUIT/SUIT_FileDlg.cxx
src/SUIT/SUIT_FileDlg.h
src/SUIT/SUIT_FileValidator.cxx
src/SUIT/SUIT_LicenseDlg.cxx
src/SUIT/SUIT_MessageBox.cxx
src/SUIT/SUIT_MessageBox.h
src/SUIT/SUIT_SelectionMgr.cxx
src/SUIT/SUIT_Session.cxx
src/SUIT/SUIT_Tools.cxx
src/SUIT/SUIT_TreeModel.cxx
src/SUIT/SUIT_TreeModel.h
src/SUIT/SUIT_TreeSync.h
src/SUIT/SUIT_ViewModel.h
src/SUIT/SUIT_ViewWindow.cxx
src/SUITApp/SUITApp.cxx
src/SUITApp/SUITApp_Application.cxx
src/SUITApp/SUITApp_Application.h
src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx
src/SUPERVGraph/SUPERVGraph_ViewFrame.h
src/SUPERVGraph/SUPERVGraph_ViewManager.cxx
src/SVTK/SALOME_Actor.cxx
src/SVTK/SALOME_Actor.h
src/SVTK/SVTK_Actor.cxx
src/SVTK/SVTK_Actor.h
src/SVTK/SVTK_CubeAxesActor2D.cxx
src/SVTK/SVTK_CubeAxesDlg.cxx
src/SVTK/SVTK_CubeAxesDlg.h
src/SVTK/SVTK_DeviceActor.cxx
src/SVTK/SVTK_DeviceActor.h
src/SVTK/SVTK_DialogBase.cxx
src/SVTK/SVTK_DialogBase.h
src/SVTK/SVTK_FontWidget.cxx
src/SVTK/SVTK_ImageWriter.cxx
src/SVTK/SVTK_ImageWriter.h
src/SVTK/SVTK_ImageWriterMgr.cxx
src/SVTK/SVTK_ImageWriterMgr.h
src/SVTK/SVTK_InteractorStyle.cxx
src/SVTK/SVTK_InteractorStyle.h
src/SVTK/SVTK_KeyFreeInteractorStyle.cxx
src/SVTK/SVTK_NonIsometricDlg.cxx
src/SVTK/SVTK_NonIsometricDlg.h
src/SVTK/SVTK_Recorder.cxx
src/SVTK/SVTK_Recorder.h
src/SVTK/SVTK_RecorderDlg.cxx
src/SVTK/SVTK_RectPicker.cxx
src/SVTK/SVTK_RenderWindowInteractor.cxx
src/SVTK/SVTK_RenderWindowInteractor.h
src/SVTK/SVTK_Renderer.cxx
src/SVTK/SVTK_Renderer.h
src/SVTK/SVTK_Selector.h
src/SVTK/SVTK_SelectorDef.h
src/SVTK/SVTK_SetRotationPointDlg.cxx
src/SVTK/SVTK_SetRotationPointDlg.h
src/SVTK/SVTK_SpaceMouse.cxx
src/SVTK/SVTK_Trihedron.cxx
src/SVTK/SVTK_UpdateRateDlg.cxx
src/SVTK/SVTK_UpdateRateDlg.h
src/SVTK/SVTK_View.h
src/SVTK/SVTK_ViewModel.cxx
src/SVTK/SVTK_ViewParameterDlg.cxx
src/SVTK/SVTK_ViewParameterDlg.h
src/SVTK/SVTK_ViewWindow.h
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_DataModel.cxx
src/SalomeApp/SalomeApp_DataObject.cxx
src/SalomeApp/SalomeApp_DoubleSpinBox.cxx
src/SalomeApp/SalomeApp_IntSpinBox.cxx
src/SalomeApp/SalomeApp_ListView.cxx
src/SalomeApp/SalomeApp_ListView.h
src/SalomeApp/SalomeApp_LoadStudiesDlg.cxx
src/SalomeApp/SalomeApp_Module.cxx
src/SalomeApp/SalomeApp_NoteBookDlg.cxx
src/SalomeApp/SalomeApp_NoteBookDlg.h
src/SalomeApp/SalomeApp_Study.cxx
src/SalomeApp/SalomeApp_StudyPropertiesDlg.cxx
src/SalomeApp/SalomeApp_Tools.cxx
src/SalomeApp/SalomeApp_TypeFilter.cxx
src/SalomeApp/SalomeApp_VisualState.cxx
src/Session/SALOME_Session_Server.cxx
src/Session/Session_ServerCheck.cxx
src/Session/Session_ServerLauncher.cxx
src/Session/Session_ServerLauncher.hxx
src/Session/Session_ServerThread.cxx
src/Session/Session_ServerThread.hxx
src/Session/Session_Session_i.cxx
src/Session/Session_Session_i.hxx
src/Style/Style_Model.cxx
src/Style/Style_PrefDlg.cxx
src/Style/Style_ResourceMgr.cxx
src/Style/Style_Salome.cxx
src/Style/Style_Salome.h
src/Style/Style_Tools.cxx
src/Style/Style_Tools.h
src/TOOLSGUI/ToolsGUI_CatalogGeneratorDlg.cxx
src/TOOLSGUI/ToolsGUI_RegWidget.cxx
src/TOOLSGUI/ToolsGUI_RegWidget.h
src/VTKViewer/VTKViewer_ConvexTool.h

index d92c181d93f3a103335a29273e50e748fd822661..0083bc22a09969c033e24adfdfeedd4161db467e 100755 (executable)
@@ -165,15 +165,15 @@ void CAF_Application::createActions()
 
   QtxListAction* editUndo = 
     new QtxListAction( tr( "TOT_APP_EDIT_UNDO" ), 
-                      resMgr->loadPixmap( "STD", tr( "ICON_EDIT_UNDO" ) ),
-                      tr( "MEN_APP_EDIT_UNDO" ), Qt::CTRL+Qt::Key_Z, desk );
+                       resMgr->loadPixmap( "STD", tr( "ICON_EDIT_UNDO" ) ),
+                       tr( "MEN_APP_EDIT_UNDO" ), Qt::CTRL+Qt::Key_Z, desk );
   editUndo->setStatusTip( tr( "PRP_APP_EDIT_UNDO" ) );
   registerAction( EditUndoId, editUndo );
 
   QtxListAction* editRedo =
     new QtxListAction( tr( "TOT_APP_EDIT_REDO" ), 
-                      resMgr->loadPixmap( "STD", tr( "ICON_EDIT_REDO" ) ),
-                      tr( "MEN_APP_EDIT_REDO" ), Qt::CTRL+Qt::Key_Y, desk );
+                       resMgr->loadPixmap( "STD", tr( "ICON_EDIT_REDO" ) ),
+                       tr( "MEN_APP_EDIT_REDO" ), Qt::CTRL+Qt::Key_Y, desk );
   editRedo->setStatusTip( tr( "PRP_APP_EDIT_REDO" ) );
   registerAction( EditRedoId, editRedo );
 
@@ -247,8 +247,8 @@ bool CAF_Application::onUndo( int numActions )
     {
       if ( !undo( cafStudy ) )
       {
-       ok = false;
-       break;
+        ok = false;
+        break;
       }
       numActions--;
     }
@@ -275,8 +275,8 @@ bool CAF_Application::onRedo( int numActions )
     {
       if ( !redo( cafStudy ) )
       {
-       ok = false;
-       break;
+        ok = false;
+        break;
       }
       numActions--;
     }
index fa5dd5787b0c59e7c21052016376e0c9877585de..3fe00aee1b75e845d89e1b4e12b779719f4996da 100755 (executable)
@@ -379,7 +379,7 @@ bool CAF_Study::undo()
   }
   catch ( Standard_Failure ) {
     SUIT_MessageBox::critical(application()->desktop(), tr( "ERR_ERROR" ),
-                             tr( "ERR_DOC_UNDO" ));
+                              tr( "ERR_DOC_UNDO" ));
     return false;
   }
   return true;
@@ -403,7 +403,7 @@ bool CAF_Study::redo()
   }
   catch ( Standard_Failure ) {
     SUIT_MessageBox::critical( application()->desktop(), tr( "ERR_ERROR" ),
-                              tr( "ERR_DOC_REDO" ) );
+                               tr( "ERR_DOC_REDO" ) );
     return false;
   }
   return true;
index 0e7585504040a4d6391297265ed365b2cce7f922..9800312378dfda2e4526c26e5ee14212c1e0bc71 100755 (executable)
@@ -127,7 +127,7 @@ CAM_Module* CAM_Application::module(  const QString& modName ) const
 {
   CAM_Module* mod = 0;
   for ( QList<CAM_Module*>::const_iterator it = myModules.begin(); 
-       it != myModules.end() && !mod; ++it )
+        it != myModules.end() && !mod; ++it )
     if ( (*it)->moduleName() == modName )
       mod = *it;
   return mod;
@@ -151,7 +151,7 @@ void CAM_Application::modules( CAM_Application::ModuleList& out ) const
   out.clear();
 
   for ( QList<CAM_Module*>::const_iterator it = myModules.begin(); 
-       it != myModules.end(); ++it )
+        it != myModules.end(); ++it )
     out.append( *it );
 }
 
@@ -171,13 +171,13 @@ void CAM_Application::modules( QStringList& lst, const bool loaded ) const
   if ( loaded )
   {
     for ( QList<CAM_Module*>::const_iterator it = myModules.begin(); 
-         it != myModules.end(); ++it )
+          it != myModules.end(); ++it )
       lst.append( (*it)->moduleName() );
   }
   else
   {
     for ( ModuleInfoList::const_iterator it = myInfoList.begin(); 
-         it != myInfoList.end(); ++it )
+          it != myInfoList.end(); ++it )
       lst.append( (*it).title );
   }
 }
@@ -202,7 +202,7 @@ void CAM_Application::addModule( CAM_Module* mod )
 
   ModuleList newList;
   for ( ModuleInfoList::const_iterator it = myInfoList.begin(); 
-       it != myInfoList.end(); ++it )
+        it != myInfoList.end(); ++it )
   {
     if ( (*it).title == mod->moduleName() )
       newList.append( mod );
@@ -215,7 +215,7 @@ void CAM_Application::addModule( CAM_Module* mod )
   }
 
   for ( QList<CAM_Module*>::const_iterator it = myModules.begin();
-       it != myModules.end(); ++it )
+        it != myModules.end(); ++it )
   {
     if ( !newList.contains( *it ) )
       newList.append( *it );
@@ -244,9 +244,9 @@ void CAM_Application::loadModules()
     else {
       QString wrn = tr( "Can not load module %1" ).arg( (*it).title );
       if ( desktop() && desktop()->isVisible() )
-       SUIT_MessageBox::critical( desktop(), tr( "Loading modules" ), wrn );
+        SUIT_MessageBox::critical( desktop(), tr( "Loading modules" ), wrn );
       else
-       qWarning( qPrintable( wrn ) ); 
+        qWarning( qPrintable( wrn ) ); 
     }
   }
 }
@@ -382,7 +382,7 @@ bool CAM_Application::activateModule( CAM_Module* mod )
     {
       // ....      
     }    
-  }    
+  }     
   myModule = mod;
 
   if ( myModule ){
@@ -394,9 +394,9 @@ bool CAM_Application::activateModule( CAM_Module* mod )
       myModule->setToolShown( false );
       QString wrn = tr( "ERROR_ACTIVATE_MODULE_MSG" ).arg( myModule->moduleName() );
       if ( desktop() && desktop()->isVisible() )
-       SUIT_MessageBox::critical( desktop(), tr( "ERROR_TLT" ), wrn );
+        SUIT_MessageBox::critical( desktop(), tr( "ERROR_TLT" ), wrn );
       else
-       qWarning( qPrintable( wrn ) ); 
+        qWarning( qPrintable( wrn ) ); 
       myModule = 0;
       return false;
     }
@@ -592,7 +592,7 @@ void CAM_Application::readModuleList()
     QStringList mods = modules.split( QRegExp( "[:|,\\s]" ), QString::SkipEmptyParts );
     for ( int i = 0; i < mods.count(); i++ ) {
       if ( !mods[i].trimmed().isEmpty() )
-       modList.append( mods[i].trimmed() );
+        modList.append( mods[i].trimmed() );
     }
   }
 
@@ -656,9 +656,9 @@ void CAM_Application::readModuleList()
       SUIT_MessageBox::warning( desktop(), tr( "Warning" ), tr( "Modules list is empty" ) );
     else
       {
-       printf( "****************************************************************\n" );
-       printf( "*    Warning: modules list is empty.\n" );
-       printf( "****************************************************************\n" );
+        printf( "****************************************************************\n" );
+        printf( "*    Warning: modules list is empty.\n" );
+        printf( "****************************************************************\n" );
       }
   }
 }
index a9c5142fd061f98fdb5c65e2b1e7be5f749e7cef..dff6f3bb5f39cab24e345d61b0ac55bd42b2dac5 100755 (executable)
@@ -94,13 +94,13 @@ void CAM_DataModel::setRoot( const CAM_DataObject* newRoot )
 
   if ( myRoot )
     myRoot->disconnect( SIGNAL( destroyed( SUIT_DataObject* ) ), 
-                       this, SLOT( onDestroyed( SUIT_DataObject* ) ) );
+                        this, SLOT( onDestroyed( SUIT_DataObject* ) ) );
 
   myRoot = (CAM_DataObject*)newRoot;
 
   if ( myRoot )
     myRoot->connect( SIGNAL( destroyed( SUIT_DataObject* ) ), 
-                    this, SLOT( onDestroyed( SUIT_DataObject* ) ) );
+                     this, SLOT( onDestroyed( SUIT_DataObject* ) ) );
 
   emit rootChanged( this );
 }
@@ -139,8 +139,8 @@ void CAM_DataModel::onDestroyed( SUIT_DataObject* obj )
   \return \c true if data model is loaded successfully
 */
 bool CAM_DataModel::open( const QString& /*name*/, 
-                         CAM_Study*     /*study*/, 
-                         QStringList    /*files*/ )
+                          CAM_Study*     /*study*/, 
+                          QStringList    /*files*/ )
 {
   return true;
 }
@@ -171,8 +171,8 @@ bool CAM_DataModel::save( QStringList& )
   \return \c true if data model is saved successfully
 */
 bool CAM_DataModel::saveAs( const QString& /*name*/,
-                           CAM_Study*     /*study*/,
-                           QStringList&   /*files*/ )
+                            CAM_Study*     /*study*/,
+                            QStringList&   /*files*/ )
 {
   return true;
 }
index 90f90d55b2631516fa1d6bbbd7fa4dc628808888..9d5c588f741b99fcb4479e0dd8ba225adb69cbc8 100644 (file)
@@ -173,7 +173,7 @@ void CASCatch_CatchSignals::Activate()
 #endif
   act.sa_handler = (SIG_PFV) &SegvHandler ;
 
-#ifdef SA_SIGINFO      // OSF,SOLARIS,IRIX
+#ifdef SA_SIGINFO       // OSF,SOLARIS,IRIX
   act.sa_flags = act.sa_flags | SA_SIGINFO ;
 # ifdef SOLARIS
   act.sa_sigaction = (void(*)(int, siginfo_t *, void*)) &SegvHandler ;
index 6a8954546c2fe97cab83b5d3d50996816d0b6968..87603cd5b7fda41b3e22340aa214b5c38ae722d4 100644 (file)
@@ -199,7 +199,7 @@ Standard_Real DDS_DicItem::GetMinValue() const
 /*!
   \brief Get the minimum value of the parameter for the specified 
          units system \a theSystem.
-        
+         
   Returned value is converted to SI.
 
   \param theUnitsSystem units system
@@ -774,9 +774,9 @@ void DDS_DicItem::FillDataMap( TCollection_AsciiString theID, const LDOM_Element
             {
               //  Read the text in the element "value"
               //LDOM_Text aListItemTxt = (const LDOM_Text&)aListItemValue.getFirstChild();
-             LDOM_Node aNode = aListItemValue.getFirstChild();
-             const LDOM_Text& aText = (const LDOM_Text&) aNode;
-             LDOM_Text aListItemTxt(aText);
+              LDOM_Node aNode = aListItemValue.getFirstChild();
+              const LDOM_Text& aText = (const LDOM_Text&) aNode;
+              LDOM_Text aListItemTxt(aText);
               if ( !aListItemTxt.isNull() )
               {
                 // adding ID and text value to sequence
@@ -855,12 +855,12 @@ void DDS_DicItem::FillDataMap( TCollection_AsciiString theID, const LDOM_Element
         LDOMString v = attr.getValue();
         if( v.Type()==LDOMBasicString::LDOM_Integer )
         {
-               Standard_Integer ival;
-               v.GetInteger( ival );
-               value = TCollection_ExtendedString( ival );
+                Standard_Integer ival;
+                v.GetInteger( ival );
+                value = TCollection_ExtendedString( ival );
         }
         else
-               value = ( Standard_CString )v.GetString();
+                value = ( Standard_CString )v.GetString();
       }
       else
         continue;
@@ -894,7 +894,7 @@ void DDS_DicItem::FillDataMap( TCollection_AsciiString theID, const LDOM_Element
       else if ( anUnitData.myUnits.ToCString()[0] ) // treat '%' as unit with scale 100
         anUnitData.myScale = 0.01;
     }
-         catch( Standard_Failure ) {
+          catch( Standard_Failure ) {
       anUnitData.myUnits.Clear();
     }
 
index 60a5dc254ee790643fc37421f624733cfc5abc05..43b11026c458c310171f30ffa1495ff8c0a45d0a 100755 (executable)
@@ -136,7 +136,7 @@ void SALOME_CustomEvent::setData( void* data )
   \class SALOME_Event
   \brief The class which encapsulates data and functionality required for 
          posting component-specific events to perform arbitrary operations 
-        in the main GUI thread. 
+         in the main GUI thread. 
 
   SALOME_Event objects can be posted by any thread belonging to the GUI process.
   
index 8493680737e0547b1e21bb79088f5c4177b3fd69..0c6fb56cfdca30e23651aa58280df3662352a210 100644 (file)
@@ -75,7 +75,7 @@ public:
   TResult myResult;
   typedef TResult (TObject::* TAction)();
   TMemFunEvent(TObject* theObject, TAction theAction, 
-              TResult theResult = TResult()):
+               TResult theResult = TResult()):
     myObject(theObject),
     myAction(theAction),
     myResult(theResult)
@@ -114,7 +114,7 @@ public:
   TResult myResult;
   typedef TResult (TObject::* TAction)(TArg);
   TMemFun1ArgEvent(TObject* theObject, TAction theAction, TArg theArg, 
-                  TResult theResult = TResult()):
+                   TResult theResult = TResult()):
     myObject(theObject),
     myAction(theAction),
     myResult(theResult),
@@ -158,8 +158,8 @@ public:
   TResult myResult;
   typedef TResult (TObject::* TAction)(TArg,TArg1);
   TMemFun2ArgEvent(TObject* theObject, TAction theAction, 
-                  TArg theArg, TArg1 theArg1,
-                  TResult theResult = TResult()):
+                   TArg theArg, TArg1 theArg1,
+                   TResult theResult = TResult()):
     myObject(theObject),
     myAction(theAction),
     myResult(theResult),
index 464c63049634a8ac757eb4d2844c40a6c65183dd..5c5ee929bed419acd8cbef2be2b6a40a047bb2b8 100644 (file)
@@ -178,7 +178,7 @@ public:
   
   //! Export numbers of highlighted/selected lines
   void                    exportNumbers( QList<int>& high, QList<int>& unhigh,
-                                        QList<int>& sel, QList<int>& unsel );
+                                         QList<int>& sel, QList<int>& unsel );
 
   //! Returns numbers of selected lines
   QList<int>              getSelectedElements() { return mySelNumbers; }
index 9ceee0874d8e83562a71ad59b9e7b9b5ccda2b51..47e0fcddc1967ee3f48837e617b4b3dd66c79703 100644 (file)
@@ -112,7 +112,7 @@ void GLViewer_Compass::setArrowWidthTop( const int WidthTop )
 void GLViewer_Compass::setArrowWidthBottom( const int WidthBot )
 { 
   if( WidthBot > myArrowWidthTop || WidthBot < 1 )
-    return;    
+    return;     
   myArrowWidthBottom=WidthBot;
 }
 
index c839a22f04d4ccb0977f268a31c9b7b88138452c..403e694cd7bca8c257d1d0261053cc4725539a84 100644 (file)
@@ -210,10 +210,10 @@ int GLViewer_Context::Select( bool Append, bool byCircle )
         if ( !Append )
         {
             for( it = mySelectedObjects.begin(), itEnd = mySelectedObjects.end() ; it != itEnd; ++it )
-                   if( myLastPicked != *it )
+                    if( myLastPicked != *it )
                 {
-                       updateAll = (*it)->unselect() || updateAll;
-                       aList.append( *it );
+                        updateAll = (*it)->unselect() || updateAll;
+                        aList.append( *it );
                 }
 
             if( updateAll || myUpdateAll )
@@ -257,10 +257,10 @@ int GLViewer_Context::Select( bool Append, bool byCircle )
         if ( !Append )
         {
             for( it = mySelectedObjects.begin(), itEnd = mySelectedObjects.end() ; it != itEnd; ++it )
-                   if ( myLastPicked != *it )
+                    if ( myLastPicked != *it )
                 {
-                       updateAll = (*it)->unselect() || updateAll;
-                       aList.append( *it );
+                        updateAll = (*it)->unselect() || updateAll;
+                        aList.append( *it );
                 }
 
             if( updateAll || myUpdateAll )
index 5da2863e2ec499bde93c126e7bbed89e07b399ba..43d4c2c13c2f73c1e5b6205a9f0f33fee9e75b71 100644 (file)
@@ -516,25 +516,25 @@ void GLViewer_Drawer::destroyAllTextures()
 */
 void GLViewer_Drawer::setAntialiasing(const bool on)
 {
-       if (on)
-       {
+        if (on)
+        {
     glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
     glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
 
-               glEnable(GL_POINT_SMOOTH);
-               glEnable(GL_LINE_SMOOTH);
-               glEnable(GL_POLYGON_SMOOTH);
-               glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 
-               glEnable (GL_BLEND);
-       }
-       else
-       {
-               glDisable(GL_POINT_SMOOTH);
-               glDisable(GL_LINE_SMOOTH);
-               glDisable(GL_POLYGON_SMOOTH);
-               glBlendFunc (GL_ONE, GL_ZERO);
-               glDisable (GL_BLEND);
-       }
+                glEnable(GL_POINT_SMOOTH);
+                glEnable(GL_LINE_SMOOTH);
+                glEnable(GL_POLYGON_SMOOTH);
+                glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 
+                glEnable (GL_BLEND);
+        }
+        else
+        {
+                glDisable(GL_POINT_SMOOTH);
+                glDisable(GL_LINE_SMOOTH);
+                glDisable(GL_POLYGON_SMOOTH);
+                glBlendFunc (GL_ONE, GL_ZERO);
+                glDisable (GL_BLEND);
+        }
 }
 
 /*! Loads texture from file
@@ -949,7 +949,7 @@ bool GLViewer_Drawer::translateToEMF( HDC hDC, GLViewer_CoordSystem* aViewerCS,
   \param fillingColor - color of filling
 */
 void GLViewer_Drawer::drawRectangle( GLViewer_Rect* rect, GLfloat lineWidth, GLfloat gap,
-                                    QColor color, bool filled, QColor fillingColor )
+                                     QColor color, bool filled, QColor fillingColor )
 {
   if( !rect )
     return;
@@ -1014,7 +1014,7 @@ void GLViewer_Drawer::drawContour( const GLViewer_PntList& pntList, QColor color
   \param isStripe - enables line stipple
 */
 void GLViewer_Drawer::drawContour( GLViewer_Rect* rect, QColor color, GLfloat lineWidth,
-                                  GLushort pattern, bool isStripe )
+                                   GLushort pattern, bool isStripe )
 {
   float x1 = rect->left();
   float x2 = rect->right();
@@ -1137,9 +1137,9 @@ void GLViewer_Drawer::drawCross( GLfloat x, GLfloat y, QColor color )
   \param filled - drawn as filled
 */
 void GLViewer_Drawer::drawArrow( const GLfloat red, const GLfloat green, const GLfloat blue,
-                                GLfloat lineWidth,
-                                GLfloat staff, GLfloat length, GLfloat width,
-                                GLfloat x, GLfloat y, GLfloat angle, GLboolean filled )
+                                 GLfloat lineWidth,
+                                 GLfloat staff, GLfloat length, GLfloat width,
+                                 GLfloat x, GLfloat y, GLfloat angle, GLboolean filled )
 {
   GLfloat vx1 = x;
   GLfloat vy1 = y + staff + length;
index 89a3ed58f2d5d8caf407c4a2a0fc8b008239b654..03c1ec8d5440402ffc1ded2d6442e7fd2b9691b0 100644 (file)
@@ -236,8 +236,8 @@ public:
   //! Returns object priority
   int                             getPriority() const { return myPriority; }
 
-       //! The function enables and disables antialiasing in Open GL (for points, lines and polygons).
-       void                            setAntialiasing(const bool on);
+        //! The function enables and disables antialiasing in Open GL (for points, lines and polygons).
+        void                            setAntialiasing(const bool on);
   
   //! Clears all generated textures
   static void                     destroyAllTextures();
@@ -342,7 +342,7 @@ public:
   */
   void                            drawText( const QString& text,
                                             GLfloat xPos,
-                                                                         GLfloat yPos,
+                                                                          GLfloat yPos,
                                             const QColor& color,
                                             QFont* aFont,
                                             int theSeparator,
@@ -359,8 +359,8 @@ public:
    *\param smallFont - font format
   */
   void                            drawGLText( QString text,
-                                                                           float x,
-                                                                           float y,
+                                                                            float x,
+                                                                            float y,
                                               int hPosition = GLText_Center,
                                               int vPosition = GLText_Center,
                                               QColor color = Qt::black,
@@ -404,7 +404,7 @@ protected:
   //! Draw basic primitives: rectangle, contour, polygon, vertex, cross, arrow
   //* with predefined color
   static void                     drawRectangle( GLViewer_Rect*, GLfloat, GLfloat = 0, QColor = Qt::black, 
-                                                bool = false, QColor = Qt::white );
+                                                 bool = false, QColor = Qt::white );
   static void                     drawContour( GLViewer_Rect*, QColor, GLfloat, GLushort, bool );
   static void                     drawContour( const GLViewer_PntList&, QColor, GLfloat );
   static void                     drawPolygon( GLViewer_Rect*, QColor, GLushort, bool );
@@ -412,8 +412,8 @@ protected:
   static void                     drawVertex( GLfloat, GLfloat, QColor );
   static void                     drawCross( GLfloat, GLfloat, QColor );
   static void                     drawArrow( const GLfloat red, const GLfloat green, const GLfloat blue,
-                                            GLfloat, GLfloat, GLfloat, GLfloat,
-                                            GLfloat, GLfloat, GLfloat, GLboolean = GL_FALSE );
+                                             GLfloat, GLfloat, GLfloat, GLfloat,
+                                             GLfloat, GLfloat, GLfloat, GLboolean = GL_FALSE );
 
   //! Draw object text
   virtual void                    drawText( GLViewer_Object* theObject );
index 5d3f15e1d23579926e693ad56a8c73723f481f50..e2dba9f47d5d8a2eb9738251f360c3ff9769efbe 100644 (file)
@@ -58,10 +58,10 @@ public:
   * \param xScale and \param yScal  - scale factors along x and y direction
   */
   GLViewer_Grid( GLfloat width, GLfloat height,
-                GLfloat winW, GLfloat winH,
-                GLfloat xSize, GLfloat ySize,
-                GLfloat xPan, GLfloat yPan,
-                GLfloat xScale, GLfloat yScale );
+                 GLfloat winW, GLfloat winH,
+                 GLfloat xSize, GLfloat ySize,
+                 GLfloat xPan, GLfloat yPan,
+                 GLfloat xScale, GLfloat yScale );
   ~GLViewer_Grid();
 
   //! Draws grid
index 1fbe5e90a9babdb59b64fcf4eabb953b09274d80..345d686ac944637be40d68dd9062433bf6f02781 100644 (file)
@@ -204,7 +204,7 @@ QList<GLViewer_Object*> GLViewer_MimeData::getObjects( QByteArray theArray, QStr
             for( j = 0; j < aObjNum; j++ )
             {
                 QByteArray aTempArray;
-               aTempArray.resize(aObjSizeList[j]);
+                aTempArray.resize(aObjSizeList[j]);
                 for( ; anIndex < aCurIndex + aObjSizeList[j]; anIndex++ )
                     aTempArray[anIndex-aCurIndex] = theArray[anIndex];
                 aObjects.append( aTempArray );
index 6afe3be259603e258319633ae88afe62bd2d3233..f998aefa7d00c9298973428f8ea384bf2f90ffb0 100644 (file)
@@ -168,8 +168,8 @@ QByteArray GLViewer_Object::getByteCopy()
 
     QByteArray aResult;
     aResult.resize( 2*anISize + sizeOf8Float + 
-                   aTypeLength + aToolTipLength +
-                   aGLText.size() + aAspect.size() );
+                    aTypeLength + aToolTipLength +
+                    aGLText.size() + aAspect.size() );
     // puts 8 float values into the byte array
     char* aPointer = (char*)&aRectData;
     for( i = 0; i < sizeOf8Float; i++, aPointer++ )
index a694e88b691762421f0112db0c8fbd3108cc287e..b4499d38ee65f7e4a40ae111343fd7725e955505 100644 (file)
@@ -82,7 +82,7 @@ public:
    *\param isCircle - = true if sensitive area of detection is round
   */
   virtual GLboolean         highlight( GLfloat x,
-                                      GLfloat y,
+                                       GLfloat y,
                                        GLfloat tol,
                                        GLboolean isCircle = GL_FALSE ) = 0;
   //! Clears all highlight information
index 0397cb1224b414df0e2628a02d66efbb8406ff95..c75d9acb461d30111a0ee8696649c565a42a3fb2 100644 (file)
@@ -48,7 +48,7 @@ GLViewer_ObjectTip::GLViewer_ObjectTip( GLViewer_ViewPort2d* theParent )
   mypViewPort = theParent;
   //mypLabel = NULL;
   mypLabel = new QLabel( "Test", NULL, 
-                        Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::Tool | Qt::X11BypassWindowManagerHint );
+                         Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::Tool | Qt::X11BypassWindowManagerHint );
   mypLabel->setObjectName("ObjectTipText");
   mypLabel->setMargin( 1 );
   //mypLabel->setAutoMask( FALSE );
@@ -146,9 +146,9 @@ bool GLViewer_ObjectTip::eventFilter( QObject* theObj, QEvent* e )
     case QEvent::MouseButtonDblClick:
     case QEvent::KeyPress:
     case QEvent::KeyRelease:
-           // input - turn off tool tip mode
-           hideTipAndSleep();
-           break;*/
+            // input - turn off tool tip mode
+            hideTipAndSleep();
+            break;*/
     case QEvent::MouseMove:
       {
         //hideTipAndSleep();
index 222c27052640bc72b437746ee4c3b265b1401bc7..26e9835f518298e980b38f0efb95d9bf3d6b071e 100644 (file)
@@ -39,8 +39,8 @@
 class GLVIEWER_API GLViewer_Tools
 {
 public:
-       //GLViewer_Tools();
-       //virtual ~GLViewer_Tools();
+        //GLViewer_Tools();
+        //virtual ~GLViewer_Tools();
   //static 
 
 };
index 4fa9bc87640dfd54ae0bd31ce10aa18af93e9f96..94f705082909d8e911da8b2ffa58ebc16542f4c7 100644 (file)
@@ -94,55 +94,55 @@ void GLViewer_ViewFrame::createActions()
 
   // Dump view
   aAction = new QtxAction(tr("MNU_DUMP_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_DUMP" ) ),
-                         tr( "MNU_DUMP_VIEW" ), 0, this);
+                          tr( "MNU_DUMP_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_DUMP_VIEW"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onDumpView()));
   toolMgr()->registerAction( aAction, DumpId );
 
   // FitAll
   aAction = new QtxAction(tr("MNU_FITALL"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_FITALL" ) ),
-                         tr( "MNU_FITALL" ), 0, this);
+                          tr( "MNU_FITALL" ), 0, this);
   aAction->setStatusTip(tr("DSC_FITALL"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitAll()));
   toolMgr()->registerAction( aAction, FitAllId );
 
   // FitRect
   aAction = new QtxAction(tr("MNU_FITRECT"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_FITAREA" ) ),
-                         tr( "MNU_FITRECT" ), 0, this);
+                          tr( "MNU_FITRECT" ), 0, this);
   aAction->setStatusTip(tr("DSC_FITRECT"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitArea()));
   toolMgr()->registerAction( aAction, FitRectId );
 
   // FitSelect
   aAction = new QtxAction(tr("MNU_FITSELECT"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_FITSELECT" ) ),
-                         tr( "MNU_FITSELECT" ), 0, this);
+                          tr( "MNU_FITSELECT" ), 0, this);
   aAction->setStatusTip(tr("DSC_FITSELECT"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitSelect()));
   toolMgr()->registerAction( aAction, FitSelectId );
 
   // Zoom
   aAction = new QtxAction(tr("MNU_ZOOM_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_ZOOM" ) ),
-                         tr( "MNU_ZOOM_VIEW" ), 0, this);
+                          tr( "MNU_ZOOM_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_ZOOM_VIEW"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onViewZoom()));
   toolMgr()->registerAction( aAction, ZoomId );
 
   // Panning
   aAction = new QtxAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_PAN" ) ),
-                         tr( "MNU_PAN_VIEW" ), 0, this);
+                          tr( "MNU_PAN_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_PAN_VIEW"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onViewPan()));
   toolMgr()->registerAction( aAction, PanId );
 
   // Global Panning
   aAction = new QtxAction(tr("MNU_GLOBALPAN_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_GLOBALPAN" ) ),
-                         tr( "MNU_GLOBALPAN_VIEW" ), 0, this);
+                          tr( "MNU_GLOBALPAN_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onViewGlobalPan()));
   toolMgr()->registerAction( aAction, GlobalPanId );
 
   aAction = new QtxAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "GLViewer", tr( "ICON_GL_RESET" ) ),
-                         tr( "MNU_RESET_VIEW" ), 0, this);
+                          tr( "MNU_RESET_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_RESET_VIEW"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onViewReset()));
   toolMgr()->registerAction( aAction, ResetId );
index 0cd5b9371a988114675d4e6494566f75d505d5b1..4e4447b623fe392a6610bee62b85e130faf5cda3 100644 (file)
@@ -1188,12 +1188,12 @@ void GLViewer_ViewPort2d::drawSelectByRect( int x, int y )
     {
         myRectBand->hide();    /* erase */
 
-       mypLastPoint->setX( x );
+        mypLastPoint->setX( x );
         mypLastPoint->setY( y );
 
-       QRect aRect = selectionRect();
-       myRectBand->setGeometry( aRect );    /* draw */
-       myRectBand->setVisible( aRect.isValid() );
+        QRect aRect = selectionRect();
+        myRectBand->setGeometry( aRect );    /* draw */
+        myRectBand->setVisible( aRect.isValid() );
     }
 
 }
@@ -1215,8 +1215,8 @@ void GLViewer_ViewPort2d::finishSelectByRect()
         mypFirstPoint = NULL;
         mypLastPoint = NULL;
 
-       delete myRectBand;
-       myRectBand = 0;
+        delete myRectBand;
+        myRectBand = 0;
     }
 }
 
index 95647f30bf831e3585bb7a35edc9b1de22e44c73..ca290be8e1c6b507aa03aa205ca913ef39d27461 100644 (file)
@@ -873,7 +873,7 @@ void GLViewer_ViewSketcher::onSketch( SketchState state )
                         qAbs( myStart.x() - myCurr.x() ), qAbs( myStart.y() - myCurr.y() ) );
             if ( !rect.isEmpty() )
             {
-               if ( !sketchRect->isEmpty() && myRectBand )
+                if ( !sketchRect->isEmpty() && myRectBand )
                     myRectBand->hide();    /* erase */
                 *sketchRect = rect;
                 if ( state != Fin )
index d801cb6425c65a1d3e9bba79a482e0cc953fa6a9..f5d4e20ba27be711b40335bbae07ed0f97948ebb 100644 (file)
@@ -103,7 +103,7 @@ void GLViewer_Viewer2d::onChangeBgColor()
     return;
   GLViewer_ViewPort2d* vp = ( ( GLViewer_ViewPort2d* )getActiveView()->getViewPort() );
 
-  QColor selColor = QColorDialog::getColor( vp->backgroundColor(), vp );       
+  QColor selColor = QColorDialog::getColor( vp->backgroundColor(), vp );        
   if ( selColor.isValid() ) {
     vp->setBackgroundColor( selColor );
   }
index 968aef8d390f154e265af4942e1118f834c647bf..b06ef330e9ffa5219ba065597ca83b04e1938d5a 100644 (file)
@@ -164,7 +164,7 @@ public:
    * output paper size \param aPType, with margins in mm
   */
   virtual bool         translateTo( VectorFileType aType, QString FileName, PaperType aPType, 
-                                  double mmLeft, double mmRight, double mmTop, double mmBottom );
+                                   double mmLeft, double mmRight, double mmTop, double mmBottom );
     
   //bool                 isSketchingActive();
   //int                  getSketchingType();
index 30e1fa91548a4304b0eadce5c21b6bc4d69b029f..2153cea3e1b550c5057c68d751a237f3a9d87713 100644 (file)
@@ -131,7 +131,7 @@ void GLViewer_Widget::setScale( GLfloat xScale, GLfloat yScale, GLfloat zScale )
   \return start point of curren rotation of Window in OpenGL global scene
 */
 void GLViewer_Widget::getRotationStart( GLfloat& rotationStartX,
-                                       GLfloat& rotationStartY,
+                                        GLfloat& rotationStartY,
                                         GLfloat& rotationStartZ )
 {
     rotationStartX = myRotationStartX;
@@ -143,7 +143,7 @@ void GLViewer_Widget::getRotationStart( GLfloat& rotationStartX,
   A function for installing the rotation angle of Window in OpenGL global scene in degree (Only in 2D)
 */
 void GLViewer_Widget::setRotationStart( GLfloat rotationStartX,
-                                       GLfloat rotationStartY,
+                                        GLfloat rotationStartY,
                                         GLfloat rotationStartZ )
 {
     myRotationStartX = rotationStartX;
@@ -159,9 +159,9 @@ void GLViewer_Widget::setRotationStart( GLfloat rotationStartX,
   \param rotationCenterZ - center z
 */
 void GLViewer_Widget::getRotation( GLfloat& rotationAngle,
-                                  GLfloat& rotationCenterX,
-                                  GLfloat& rotationCenterY,
-                                  GLfloat& rotationCenterZ )
+                                   GLfloat& rotationCenterX,
+                                   GLfloat& rotationCenterY,
+                                   GLfloat& rotationCenterZ )
 {
     rotationAngle = myRotationAngle;
     rotationCenterX = myRotationCenterX;
@@ -177,9 +177,9 @@ void GLViewer_Widget::getRotation( GLfloat& rotationAngle,
   \param rotationCenterZ - center z
 */
 void GLViewer_Widget::setRotation( GLfloat rotationAngle,
-                                  GLfloat rotationCenterX,
-                                  GLfloat rotationCenterY,
-                                  GLfloat rotationCenterZ )
+                                   GLfloat rotationCenterX,
+                                   GLfloat rotationCenterY,
+                                   GLfloat rotationCenterZ )
 {
     myRotationAngle = rotationAngle;
     myRotationCenterX = rotationCenterX;
@@ -488,20 +488,20 @@ void AddImagePart( QFile& hFile, QImage& image, int w1, int w2, int h1, int h2,
     {           
       uchar* theCurLine = image.scanLine( i ), cur;
       for( int j=w1; j<=w2; j++ )
-       for( int k=0; k<3; k++ )
-       {
-         cur = *(theCurLine+4*j+2-k);
-         *(line+cur_index) = hex( cur/16 ); //HI
-         *(line+cur_index+1) = hex( cur%16 ); //LO
-         full++;
-         cur_index+=2;
-         if( cur_index>=80 )
-         {
-           aBuffer += line;
-           aBuffer += "\n";
-           cur_index = 0;
-         }
-       }           
+        for( int k=0; k<3; k++ )
+        {
+          cur = *(theCurLine+4*j+2-k);
+          *(line+cur_index) = hex( cur/16 ); //HI
+          *(line+cur_index+1) = hex( cur%16 ); //LO
+          full++;
+          cur_index+=2;
+          if( cur_index>=80 )
+          {
+            aBuffer += line;
+            aBuffer += "\n";
+            cur_index = 0;
+          }
+        }           
     }
     
     aBuffer += "> false 3 colorimage\n\n";
index 5a4d428e82d924c7de81b79b040e770cf8fa5467..f073b7fd5d34d3affc52bc6c7f41fd7eb88657ab 100644 (file)
@@ -63,11 +63,11 @@ public:
   //! Returns scales on OpenGL scene along 3 directions
   /*! in 2d scene zScale = 1.0 */
   void                   getScale( GLfloat& xScale,
-                                  GLfloat& yScale,
-                                  GLfloat& zScale );
+                                   GLfloat& yScale,
+                                   GLfloat& zScale );
   //! A function for installing the scales of OpenGL scene
   void                   setScale( GLfloat xScale,
-                                  GLfloat yScale,
+                                   GLfloat yScale,
                                    GLfloat zScaleGLfloat );
   
   //! Returns offset parameters of Window in OpenGL global scene
@@ -84,17 +84,17 @@ public:
 
   //! Returns start point of curren rotation of Window in OpenGL global scene
   void                   getRotationStart( GLfloat& rotationStartX,
-                                          GLfloat& rotationStartY,
-                                          GLfloat& rotationStartZ );
+                                           GLfloat& rotationStartY,
+                                           GLfloat& rotationStartZ );
   //! A function for installing the start point of curren rotation of Window in OpenGL global scene
   void                   setRotationStart( GLfloat rotationStartX,
-                                          GLfloat rotationStartY,
-                                          GLfloat rotationStartZ );
+                                           GLfloat rotationStartY,
+                                           GLfloat rotationStartZ );
   //! Returns parameters of current rotation
   void                   getRotation( GLfloat& rotationAngle,
-                                     GLfloat& rotationCenterX,
-                                     GLfloat& rotationCenterY,
-                                     GLfloat& rotationCenterZ );
+                                      GLfloat& rotationCenterX,
+                                      GLfloat& rotationCenterY,
+                                      GLfloat& rotationCenterZ );
   //! A function for installing the parameters of current rotation
   void                   setRotation( GLfloat, GLfloat, GLfloat, GLfloat );
 
index 2b524699c8ef74514222147c3eae6ada7cb7758e..c08d3db605ee02c1a56104add87e2046fc3d82a7 100644 (file)
 
 static const char* imageEmptyIcon[] = {
 "20 20 1 1",
-".     c None",
+".      c None",
 "....................",
 "....................",
 "....................",
@@ -307,11 +307,11 @@ LightApp_Application::LightApp_Application()
     {
       aFamily = *it;
       if ( famdb.contains(aFamily) )
-       {
-         f.setFamily( aFamily );
-         aResMgr->setValue( "PyConsole", "font", f );
-         break;
-       }
+        {
+          f.setFamily( aFamily );
+          aResMgr->setValue( "PyConsole", "font", f );
+          break;
+        }
     }
 }
 
@@ -369,16 +369,16 @@ QString LightApp_Application::applicationVersion() const
       if ( vf.open( QIODevice::ReadOnly ) )
       {
         QString line( vf.readLine( 1024 ) );
-       vf.close();
+        vf.close();
 
-       if ( !line.isEmpty() )
+        if ( !line.isEmpty() )
         {
-         while ( !line.isEmpty() && line.at( line.length() - 1 ) == QChar( '\n' ) )
-           line.remove( line.length() - 1, 1 );
+          while ( !line.isEmpty() && line.at( line.length() - 1 ) == QChar( '\n' ) )
+            line.remove( line.length() - 1, 1 );
 
-         int idx = line.lastIndexOf( ":" );
-         if ( idx != -1 )
-           _app_version = line.mid( idx + 1 ).trimmed();
+          int idx = line.lastIndexOf( ":" );
+          if ( idx != -1 )
+            _app_version = line.mid( idx + 1 ).trimmed();
         }
       }
     }
@@ -443,9 +443,9 @@ void LightApp_Application::createActionForViewer( const int id,
                                                   const int accel )
 {
   QAction* a = createAction( id, tr( QString( "NEW_WINDOW_%1" ).arg( suffix ).toLatin1().constData() ), QIcon(),
-                            tr( QString( "NEW_WINDOW_%1" ).arg( suffix ).toLatin1().constData() ),
-                            tr( QString( "NEW_WINDOW_%1" ).arg( suffix ).toLatin1().constData() ),
-                            accel, desktop(), false, this, SLOT( onNewWindow() ) );
+                             tr( QString( "NEW_WINDOW_%1" ).arg( suffix ).toLatin1().constData() ),
+                             tr( QString( "NEW_WINDOW_%1" ).arg( suffix ).toLatin1().constData() ),
+                             accel, desktop(), false, this, SLOT( onNewWindow() ) );
   createMenu( a, parentId, -1 );
 }
 
@@ -459,8 +459,8 @@ void LightApp_Application::createActions()
 
   //! Preferences
   createAction( PreferencesId, tr( "TOT_DESK_PREFERENCES" ), QIcon(),
-               tr( "MEN_DESK_PREFERENCES" ), tr( "PRP_DESK_PREFERENCES" ),
-               Qt::CTRL+Qt::Key_R, desk, false, this, SLOT( onPreferences() ) );
+                tr( "MEN_DESK_PREFERENCES" ), tr( "PRP_DESK_PREFERENCES" ),
+                Qt::CTRL+Qt::Key_R, desk, false, this, SLOT( onPreferences() ) );
 
   //! Help for modules
   int helpMenu = createMenu( tr( "MEN_DESK_HELP" ), -1, -1, 1000 );
@@ -487,14 +487,14 @@ void LightApp_Application::createActions()
       QStringList idxLst = QStringList() << modDir << "share" << "doc" << "salome" << "gui" << modName << "index.html";
       QString indexFile = idxLst.join( QDir::separator() );          // index file
       if ( QFile::exists( indexFile ) ) {
-       QAction* a = createAction( id, tr( "%1 Help" ).arg( aModule ),
-                                  resMgr->loadPixmap( "STD", tr( "ICON_HELP" ), false ),
-                                  tr( "%1 Help" ).arg( aModule ),
-                                  tr( "%1 Help" ).arg( aModule ),
-                                  0, desk, false, this, SLOT( onHelpContentsModule() ) );
-       a->setData( indexFile );
-       createMenu( a, helpModuleMenu, -1 );
-       id++;
+        QAction* a = createAction( id, tr( "%1 Help" ).arg( aModule ),
+                                   resMgr->loadPixmap( "STD", tr( "ICON_HELP" ), false ),
+                                   tr( "%1 Help" ).arg( aModule ),
+                                   tr( "%1 Help" ).arg( aModule ),
+                                   0, desk, false, this, SLOT( onHelpContentsModule() ) );
+        a->setData( indexFile );
+        createMenu( a, helpModuleMenu, -1 );
+        id++;
       }
     }
   }
@@ -542,10 +542,10 @@ void LightApp_Application::createActions()
       QPixmap icon = resMgr->loadPixmap( modName, iconName, false );
       if ( icon.isNull() )
       {
-       icon = modIcon;
-       INFOS ( "****************************************************************" << std::endl
-            << "*    Icon for " << (*it).toLatin1().constData() << " not found. Using the default one." << std::endl
-            << "****************************************************************" << std::endl );
+        icon = modIcon;
+        INFOS ( "****************************************************************" << std::endl
+             << "*    Icon for " << (*it).toLatin1().constData() << " not found. Using the default one." << std::endl
+             << "****************************************************************" << std::endl );
       }
 
       icon = Qtx::scaleIcon( icon, iconSize );
@@ -593,7 +593,7 @@ void LightApp_Application::createActions()
 #endif
 
   createAction( RenameId, tr( "TOT_RENAME" ), QIcon(), tr( "MEN_DESK_RENAME" ), tr( "PRP_RENAME" ),
-               Qt::SHIFT+Qt::Key_R, desk, false, this, SLOT( onRenameWindow() ) );
+                Qt::SHIFT+Qt::Key_R, desk, false, this, SLOT( onRenameWindow() ) );
   createMenu( RenameId, windowMenu, -1 );
 
   int fileMenu = createMenu( tr( "MEN_DESK_FILE" ), -1 );
@@ -643,9 +643,9 @@ void LightApp_Application::onModuleActivation( const QString& modName )
       putInfo( tr("INF_CANCELLED") );
 
       LightApp_ModuleAction* moduleAction =
-       qobject_cast<LightApp_ModuleAction*>( action( ModulesListId ) );
+        qobject_cast<LightApp_ModuleAction*>( action( ModulesListId ) );
       if ( moduleAction )
-       moduleAction->setActiveModule( QString() );
+        moduleAction->setActiveModule( QString() );
       cancelled = true;
     }
   }
@@ -839,10 +839,10 @@ class RunBrowser: public QThread
 {
 public:
   RunBrowser( LightApp_Application* app,
-             const QString&        theApp,
-             const QString&        theParams,
-             const QString&        theHelpFile,
-             const QString&        theContext = QString() )
+              const QString&        theApp,
+              const QString&        theParams,
+              const QString&        theHelpFile,
+              const QString&        theContext = QString() )
     : myApp( theApp ),
       myParams( theParams ),
 #ifdef WIN32
@@ -861,16 +861,16 @@ public:
     if ( !myApp.isEmpty()) {
       QString aCommand = QString( "%1 %2 %3" ).arg( myApp, myParams, myHelpFile );
       if ( !myContext.isEmpty() )
-       aCommand += "#" + myContext;
+        aCommand += "#" + myContext;
 
       QProcess* proc = new QProcess();
 
       proc->start( aCommand );
       if ( !proc->waitForStarted() ) {
-       SALOME_CustomEvent* ce2000 = new SALOME_CustomEvent( 2000 );
-       QString* msg = new QString( QObject::tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ).arg( myApp, myHelpFile ) );
-       ce2000->setData( msg );
-       QApplication::postEvent( myLApp, ce2000 );
+        SALOME_CustomEvent* ce2000 = new SALOME_CustomEvent( 2000 );
+        QString* msg = new QString( QObject::tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ).arg( myApp, myHelpFile ) );
+        ce2000->setData( msg );
+        QApplication::postEvent( myLApp, ce2000 );
       }
     }
   }
@@ -916,8 +916,8 @@ void LightApp_Application::onHelpContentsModule()
   else
   {
     if ( SUIT_MessageBox::question( desktop(), tr( "WRN_WARNING" ), tr( "DEFINE_EXTERNAL_BROWSER" ),
-                                   SUIT_MessageBox::Yes | SUIT_MessageBox::No,
-                                   SUIT_MessageBox::Yes ) == SUIT_MessageBox::Yes )
+                                    SUIT_MessageBox::Yes | SUIT_MessageBox::No,
+                                    SUIT_MessageBox::Yes ) == SUIT_MessageBox::Yes )
 
       showPreferences( tr( "PREF_APP" ) );
   }
@@ -927,34 +927,34 @@ void LightApp_Application::onHelpContentsModule()
   SLOT: Displays help contents for choosen dialog
 */
 void LightApp_Application::onHelpContextModule( const QString& theComponentName,
-                                               const QString& theFileName,
-                                               const QString& theContext )
+                                                const QString& theFileName,
+                                                const QString& theContext )
 {
   QString homeDir = "";
   if ( !theComponentName.isEmpty() ) {
     QString dir = getenv( ( theComponentName + "_ROOT_DIR" ).toLatin1().constData() );
     if ( !dir.isEmpty() )
       homeDir = Qtx::addSlash( Qtx::addSlash( dir )      +
-                              Qtx::addSlash( "share" )  +
-                              Qtx::addSlash( "doc" )    +
-                              Qtx::addSlash( "salome" ) +
-                              Qtx::addSlash( "gui" )    +
-                              Qtx::addSlash( theComponentName ) );
+                               Qtx::addSlash( "share" )  +
+                               Qtx::addSlash( "doc" )    +
+                               Qtx::addSlash( "salome" ) +
+                               Qtx::addSlash( "gui" )    +
+                               Qtx::addSlash( theComponentName ) );
   }
 
   QString helpFile = QFileInfo( homeDir + theFileName ).absoluteFilePath();
   SUIT_ResourceMgr* resMgr = resourceMgr();
-       QString platform;
+        QString platform;
 #ifdef WIN32
-       platform = "winapplication";
+        platform = "winapplication";
 #else
-       platform = "application";
+        platform = "application";
 #endif
-       QString anApp = resMgr->stringValue("ExternalBrowser", platform);
+        QString anApp = resMgr->stringValue("ExternalBrowser", platform);
 #ifdef WIN32
-       QString quote("\"");
-       anApp.prepend( quote );
-       anApp.append( quote );
+        QString quote("\"");
+        anApp.prepend( quote );
+        anApp.append( quote );
 #endif
   QString aParams = resMgr->stringValue("ExternalBrowser", "parameters");
 
@@ -966,8 +966,8 @@ void LightApp_Application::onHelpContextModule( const QString& theComponentName,
   else
   {
     if ( SUIT_MessageBox::question( desktop(), tr( "WRN_WARNING" ), tr( "DEFINE_EXTERNAL_BROWSER" ),
-                                   SUIT_MessageBox::Yes | SUIT_MessageBox::No,
-                                   SUIT_MessageBox::Yes ) == SUIT_MessageBox::Yes )
+                                    SUIT_MessageBox::Yes | SUIT_MessageBox::No,
+                                    SUIT_MessageBox::Yes ) == SUIT_MessageBox::Yes )
       showPreferences( tr( "PREF_APP" ) );
   }
 }
@@ -1032,8 +1032,8 @@ void LightApp_Application::addWindow( QWidget* wid, const int flag, const int st
       f = resourceMgr()->fontValue( "PyConsole", "font" );
     else
       {
-       f = ( ( PyConsole_Console* )wid )->font();
-       resourceMgr()->setValue( "PyConsole", "font", f );
+        f = ( ( PyConsole_Console* )wid )->font();
+        resourceMgr()->setValue( "PyConsole", "font", f );
       }
   }
   else
@@ -1179,7 +1179,7 @@ void LightApp_Application::updateObjectBrowser( const bool updateModels )
       study->dataModels( dm_list );
       QListIterator<CAM_DataModel*> it( dm_list );
       while ( it.hasNext() ) {
-       CAM_DataModel* camDM = it.next();
+        CAM_DataModel* camDM = it.next();
         if ( camDM && camDM->inherits( "LightApp_DataModel" ) )
           ((LightApp_DataModel*)camDM)->update();
       }
@@ -1322,13 +1322,13 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType
       vm->setProjectionMode( resMgr->integerValue( "VTKViewer", "projection_mode", vm->projectionMode() ) );
       vm->setBackgroundColor( resMgr->colorValue( "VTKViewer", "background", vm->backgroundColor() ) );
       vm->setTrihedronSize( resMgr->doubleValue( "VTKViewer", "trihedron_size", vm->trihedronSize() ),
-                           resMgr->booleanValue( "VTKViewer", "relative_size", vm->trihedronRelative() ) );
+                            resMgr->booleanValue( "VTKViewer", "relative_size", vm->trihedronRelative() ) );
       vm->setInteractionStyle( resMgr->integerValue( "VTKViewer", "navigation_mode", vm->interactionStyle() ) );
       vm->setIncrementalSpeed( resMgr->integerValue( "VTKViewer", "speed_value", vm->incrementalSpeed() ),
-                              resMgr->integerValue( "VTKViewer", "speed_mode", vm->incrementalSpeedMode() ) );
+                               resMgr->integerValue( "VTKViewer", "speed_mode", vm->incrementalSpeedMode() ) );
       vm->setSpacemouseButtons( resMgr->integerValue( "VTKViewer", "spacemouse_func1_btn", vm->spacemouseBtn(1) ),
-                               resMgr->integerValue( "VTKViewer", "spacemouse_func2_btn", vm->spacemouseBtn(2) ),
-                               resMgr->integerValue( "VTKViewer", "spacemouse_func5_btn", vm->spacemouseBtn(3) ) );
+                                resMgr->integerValue( "VTKViewer", "spacemouse_func2_btn", vm->spacemouseBtn(2) ),
+                                resMgr->integerValue( "VTKViewer", "spacemouse_func5_btn", vm->spacemouseBtn(3) ) );
       new LightApp_VTKSelector( vm, mySelMgr );
     }
 #else
@@ -1722,11 +1722,11 @@ LightApp_Preferences* LightApp_Application::preferences( const bool crt ) const
     for ( QStringList::const_iterator it = modNameList.begin(); it != modNameList.end(); ++it )
     {
       if ( !app->isLibExists( *it ) )
-       continue;
+        continue;
 
       int modId = _prefs_->addPreference( *it );
       if ( iconMap.contains( *it ) )
-       _prefs_->setItemIcon( modId, Qtx::scaleIcon( resMgr->loadPixmap( moduleName( *it ), iconMap[*it], false ), 20 ) );
+        _prefs_->setItemIcon( modId, Qtx::scaleIcon( resMgr->loadPixmap( moduleName( *it ), iconMap[*it], false ), 20 ) );
     }
 
     ModuleList modList;
@@ -1738,13 +1738,13 @@ LightApp_Preferences* LightApp_Application::preferences( const bool crt ) const
 
       CAM_Module* anItem = itr.next();
       if ( anItem->inherits( "LightApp_Module" ) )
-       mod = (LightApp_Module*)anItem;
+        mod = (LightApp_Module*)anItem;
 
       if ( mod && !_prefs_->hasModule( mod->moduleName() ) )
       {
-       _prefs_->addPreference( mod->moduleName() );
-       mod->createPreferences();
-       that->emptyPreferences( mod->moduleName() );
+        _prefs_->addPreference( mod->moduleName() );
+        mod->createPreferences();
+        that->emptyPreferences( mod->moduleName() );
       }
     }
   }
@@ -1812,7 +1812,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   pref->addPreference( tr( "PREF_STORE_POS" ),  studyGroup, LightApp_Preferences::Bool, "Study", "store_positions" );
 
   int autoSaveInterval = pref->addPreference( tr( "PREF_AUTO_SAVE" ),  studyGroup, 
-                                             LightApp_Preferences::IntSpin, "Study", "auto_save_interval" );
+                                              LightApp_Preferences::IntSpin, "Study", "auto_save_interval" );
   pref->setItemProperty( "min",        0, autoSaveInterval );
   pref->setItemProperty( "max",     1440, autoSaveInterval );
   pref->setItemProperty( "special", tr( "PREF_AUTO_SAVE_DISABLED" ), autoSaveInterval );
@@ -1850,21 +1850,21 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
 
   // OCC Viewer
   int occTS = pref->addPreference( tr( "PREF_TRIHEDRON_SIZE" ), occGroup,
-                                  LightApp_Preferences::DblSpin, "OCCViewer", "trihedron_size" );
+                                   LightApp_Preferences::DblSpin, "OCCViewer", "trihedron_size" );
   pref->setItemProperty( "min", 1.0E-06, occTS );
   pref->setItemProperty( "max", 1000, occTS );
 
 
   int isoU = pref->addPreference( tr( "PREF_ISOS_U" ), occGroup,
-                                 LightApp_Preferences::IntSpin, "OCCViewer", "iso_number_u" );
+                                  LightApp_Preferences::IntSpin, "OCCViewer", "iso_number_u" );
   pref->setItemProperty( "min", 0, isoU );
   pref->setItemProperty( "max", 100000, isoU );
 
   pref->addPreference( tr( "PREF_VIEWER_BACKGROUND" ), occGroup,
-                      LightApp_Preferences::Color, "OCCViewer", "background" );
+                       LightApp_Preferences::Color, "OCCViewer", "background" );
 
   int isoV = pref->addPreference( tr( "PREF_ISOS_V" ), occGroup,
-                                 LightApp_Preferences::IntSpin, "OCCViewer", "iso_number_v" );
+                                  LightApp_Preferences::IntSpin, "OCCViewer", "iso_number_v" );
   pref->setItemProperty( "min", 0, isoV );
   pref->setItemProperty( "max", 100000, isoV );
 
@@ -1873,7 +1873,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   pref->setItemProperty( "columns", 2, vtkGen );
 
   int vtkProjMode = pref->addPreference( tr( "PREF_PROJECTION_MODE" ), vtkGen,
-                                        LightApp_Preferences::Selector, "VTKViewer", "projection_mode" );
+                                         LightApp_Preferences::Selector, "VTKViewer", "projection_mode" );
   QStringList aProjModeList;
   aProjModeList.append( tr("PREF_ORTHOGRAPHIC") );
   aProjModeList.append( tr("PREF_PERSPECTIVE") );
@@ -1886,10 +1886,10 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   pref->setItemProperty( "indexes", aModeIndexesList, vtkProjMode );
 
   pref->addPreference( tr( "PREF_VIEWER_BACKGROUND" ), vtkGen,
-                      LightApp_Preferences::Color, "VTKViewer", "background" );
+                       LightApp_Preferences::Color, "VTKViewer", "background" );
 
   int vtkTS = pref->addPreference( tr( "PREF_TRIHEDRON_SIZE" ), vtkGen,
-                                  LightApp_Preferences::DblSpin, "VTKViewer", "trihedron_size" );
+                                   LightApp_Preferences::DblSpin, "VTKViewer", "trihedron_size" );
 
   pref->setItemProperty( "min", 1.0E-06, vtkTS );
   pref->setItemProperty( "max", 150, vtkTS );
@@ -1897,7 +1897,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   pref->addPreference( tr( "PREF_RELATIVE_SIZE" ), vtkGen, LightApp_Preferences::Bool, "VTKViewer", "relative_size" );
 
   int vtkStyleMode = pref->addPreference( tr( "PREF_NAVIGATION" ), vtkGen,
-                                         LightApp_Preferences::Selector, "VTKViewer", "navigation_mode" );
+                                          LightApp_Preferences::Selector, "VTKViewer", "navigation_mode" );
   QStringList aStyleModeList;
   aStyleModeList.append( tr("PREF_STANDARD_STYLE") );
   aStyleModeList.append( tr("PREF_KEYFREE_STYLE") );
@@ -1908,13 +1908,13 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   pref->addPreference( "", vtkGroup, LightApp_Preferences::Space );
 
   int vtkSpeed = pref->addPreference( tr( "PREF_INCREMENTAL_SPEED" ), vtkGen,
-                                     LightApp_Preferences::IntSpin, "VTKViewer", "speed_value" );
+                                      LightApp_Preferences::IntSpin, "VTKViewer", "speed_value" );
 
   pref->setItemProperty( "min", 1, vtkSpeed );
   pref->setItemProperty( "max", 1000, vtkSpeed );
 
   int vtkSpeedMode = pref->addPreference( tr( "PREF_INCREMENTAL_SPEED_MODE" ), vtkGen,
-                                         LightApp_Preferences::Selector, "VTKViewer", "speed_mode" );
+                                          LightApp_Preferences::Selector, "VTKViewer", "speed_mode" );
   QStringList aSpeedModeList;
   aSpeedModeList.append( tr("PREF_ARITHMETIC") );
   aSpeedModeList.append( tr("PREF_GEOMETRICAL") );
@@ -1925,14 +1925,14 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   int vtkSM = pref->addPreference( tr( "PREF_FRAME_SPACEMOUSE" ), vtkGroup, LightApp_Preferences::GroupBox );
   pref->setItemProperty( "columns", 2, vtkSM );
   int spacemousePref1 = pref->addPreference( tr( "PREF_SPACEMOUSE_FUNC_1" ), vtkSM,
-                                            LightApp_Preferences::Selector, "VTKViewer",
-                                            "spacemouse_func1_btn" ); //decrease_speed_increment
+                                             LightApp_Preferences::Selector, "VTKViewer",
+                                             "spacemouse_func1_btn" ); //decrease_speed_increment
   int spacemousePref2 = pref->addPreference( tr( "PREF_SPACEMOUSE_FUNC_2" ), vtkSM,
-                                            LightApp_Preferences::Selector, "VTKViewer",
-                                            "spacemouse_func2_btn" ); //increase_speed_increment
+                                             LightApp_Preferences::Selector, "VTKViewer",
+                                             "spacemouse_func2_btn" ); //increase_speed_increment
   int spacemousePref3 = pref->addPreference( tr( "PREF_SPACEMOUSE_FUNC_3" ), vtkSM,
-                                            LightApp_Preferences::Selector, "VTKViewer",
-                                            "spacemouse_func5_btn" ); //dominant_combined_switch
+                                             LightApp_Preferences::Selector, "VTKViewer",
+                                             "spacemouse_func5_btn" ); //dominant_combined_switch
 
   QStringList values;
   values.append( tr( "PREF_SPACEMOUSE_BTN_1" ) );
@@ -1969,7 +1969,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   pref->setItemProperty( "columns", 2, vtkRec );
 
   int modePref = pref->addPreference( tr( "PREF_RECORDING_MODE" ), vtkRec,
-                                     LightApp_Preferences::Selector, "VTKViewer", "recorder_mode" );
+                                      LightApp_Preferences::Selector, "VTKViewer", "recorder_mode" );
   values.clear();
   values.append( tr( "PREF_SKIPPED_FRAMES" ) );
   values.append( tr( "PREF_ALL_DISLPAYED_FRAMES" ) );
@@ -1980,26 +1980,26 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   pref->setItemProperty( "indexes", indices, modePref );
 
   int fpsPref = pref->addPreference( tr( "PREF_FPS" ), vtkRec,
-                                    LightApp_Preferences::DblSpin, "VTKViewer", "recorder_fps" );
+                                     LightApp_Preferences::DblSpin, "VTKViewer", "recorder_fps" );
   pref->setItemProperty( "min", 0.1, fpsPref );
   pref->setItemProperty( "max", 100, fpsPref );
 
   int qualityPref = pref->addPreference( tr( "PREF_QUALITY" ), vtkRec,
-                                        LightApp_Preferences::IntSpin, "VTKViewer", "recorder_quality" );
+                                         LightApp_Preferences::IntSpin, "VTKViewer", "recorder_quality" );
   pref->setItemProperty( "min", 1, qualityPref );
   pref->setItemProperty( "max", 100, qualityPref );
 
   pref->addPreference( tr( "PREF_PROGRESSIVE" ), vtkRec,
-                      LightApp_Preferences::Bool, "VTKViewer", "recorder_progressive" );
+                       LightApp_Preferences::Bool, "VTKViewer", "recorder_progressive" );
 
   int vtkGN = pref->addPreference( tr( "PREF_FRAME_GROUP_NAMES" ), vtkGroup,
-                                  LightApp_Preferences::GroupBox, "VTKViewer", "show_group_names" );
+                                   LightApp_Preferences::GroupBox, "VTKViewer", "show_group_names" );
   pref->setItemProperty( "columns", 2, vtkGN );
 
   pref->addPreference( tr( "PREF_GROUP_NAMES_TEXT_COLOR" ), vtkGN,
-                      LightApp_Preferences::Color, "VTKViewer", "group_names_text_color" );
+                       LightApp_Preferences::Color, "VTKViewer", "group_names_text_color" );
   int transPref = pref->addPreference( tr( "PREF_GROUP_NAMES_TRANSPARENCY" ), vtkGN,
-                                      LightApp_Preferences::DblSpin, "VTKViewer", "group_names_transparency" );
+                                       LightApp_Preferences::DblSpin, "VTKViewer", "group_names_transparency" );
 
   pref->setItemProperty( "min", 0.0, transPref );
   pref->setItemProperty( "max", 1.0, transPref );
@@ -2007,10 +2007,10 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
 
   // Plot2d
   pref->addPreference( tr( "PREF_SHOW_LEGEND" ), plot2dGroup,
-                      LightApp_Preferences::Bool, "Plot2d", "ShowLegend" );
+                       LightApp_Preferences::Bool, "Plot2d", "ShowLegend" );
 
   int legendPosition = pref->addPreference( tr( "PREF_LEGEND_POSITION" ), plot2dGroup,
-                                           LightApp_Preferences::Selector, "Plot2d", "LegendPos" );
+                                            LightApp_Preferences::Selector, "Plot2d", "LegendPos" );
   aValuesList.clear();
   anIndicesList.clear();
   aValuesList   << tr("PREF_LEFT") << tr("PREF_RIGHT") << tr("PREF_TOP") << tr("PREF_BOTTOM");
@@ -2020,7 +2020,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   pref->setItemProperty( "indexes", anIndicesList, legendPosition );
 
   int curveType = pref->addPreference( tr( "PREF_CURVE_TYPE" ), plot2dGroup,
-                                      LightApp_Preferences::Selector, "Plot2d", "CurveType" );
+                                       LightApp_Preferences::Selector, "Plot2d", "CurveType" );
   aValuesList.clear();
   anIndicesList.clear();
   aValuesList   << tr("PREF_POINTS") << tr("PREF_LINES") << tr("PREF_SPLINE");
@@ -2030,7 +2030,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   pref->setItemProperty( "indexes", anIndicesList, curveType );
 
   int markerSize = pref->addPreference( tr( "PREF_MARKER_SIZE" ), plot2dGroup,
-                                       LightApp_Preferences::IntSpin, "Plot2d", "MarkerSize" );
+                                        LightApp_Preferences::IntSpin, "Plot2d", "MarkerSize" );
 
   pref->setItemProperty( "min", 0, markerSize );
   pref->setItemProperty( "max", 100, markerSize );
@@ -2041,58 +2041,58 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   anIndicesList << 0                 << 1                     ;
 
   int horScale = pref->addPreference( tr( "PREF_HOR_AXIS_SCALE" ), plot2dGroup,
-                                     LightApp_Preferences::Selector, "Plot2d", "HorScaleMode" );
+                                      LightApp_Preferences::Selector, "Plot2d", "HorScaleMode" );
 
   pref->setItemProperty( "strings", aValuesList,   horScale );
   pref->setItemProperty( "indexes", anIndicesList, horScale );
 
   int verScale = pref->addPreference( tr( "PREF_VERT_AXIS_SCALE" ), plot2dGroup,
-                                     LightApp_Preferences::Selector, "Plot2d", "VerScaleMode" );
+                                      LightApp_Preferences::Selector, "Plot2d", "VerScaleMode" );
 
   pref->setItemProperty( "strings", aValuesList,   verScale );
   pref->setItemProperty( "indexes", anIndicesList, verScale );
 
   pref->addPreference( tr( "PREF_VIEWER_BACKGROUND" ), plot2dGroup,
-                      LightApp_Preferences::Color, "Plot2d", "Background" );
+                       LightApp_Preferences::Color, "Plot2d", "Background" );
 
   int dirTab = pref->addPreference( tr( "PREF_TAB_DIRECTORIES" ), salomeCat );
   int dirGroup = pref->addPreference( tr( "PREF_GROUP_DIRECTORIES" ), dirTab );
   pref->addPreference( tr( "" ), dirGroup,
-                      LightApp_Preferences::DirList, "FileDlg", "QuickDirList" );
+                       LightApp_Preferences::DirList, "FileDlg", "QuickDirList" );
 
   /* VSR : 26/02/09 : temporarily comment : SUPERV is not migrated to Qt 4
   pref->setItemProperty( "columns", 4, supervGroup );
   pref->addPreference( tr( "PREF_VIEWER_BACKGROUND" ), supervGroup,
-                      LightApp_Preferences::Color, "SUPERVGraph", "Background" );
+                       LightApp_Preferences::Color, "SUPERVGraph", "Background" );
   pref->addPreference( tr( "PREF_SUPERV_TITLE_COLOR" ), supervGroup,
-                      LightApp_Preferences::Color, "SUPERVGraph", "Title" );
+                       LightApp_Preferences::Color, "SUPERVGraph", "Title" );
 //  pref->addPreference( tr( "PREF_SUPERV_CTRL_COLOR" ), supervGroup,
-//                    LightApp_Preferences::Color, "SUPERVGraph", "Ctrl" );
+//                     LightApp_Preferences::Color, "SUPERVGraph", "Ctrl" );
   ----> end VSR : 26/02/09 */
 
   int obTab = pref->addPreference( tr( "PREF_TAB_OBJBROWSER" ), salomeCat );
   int stGroup = pref->addPreference( tr( "PREF_OBJ_BROWSER_SEARCH_TOOL" ), obTab );
   pref->addPreference( tr( "PREF_AUTO_HIDE_SEARCH_TOOL" ), stGroup, LightApp_Preferences::Bool,
-                      "ObjectBrowser", "auto_hide_search_tool" );
+                       "ObjectBrowser", "auto_hide_search_tool" );
 
   int objSetGroup = pref->addPreference( tr( "PREF_OBJ_BROWSER_SETTINGS" ), obTab );
   pref->setItemProperty( "columns", 2, objSetGroup );
   pref->addPreference( tr( "PREF_AUTO_SIZE_FIRST" ), objSetGroup, LightApp_Preferences::Bool,
-                      "ObjectBrowser", "auto_size_first" );
+                       "ObjectBrowser", "auto_size_first" );
   pref->addPreference( tr( "PREF_AUTO_SIZE" ), objSetGroup, LightApp_Preferences::Bool,
-                      "ObjectBrowser", "auto_size" );
+                       "ObjectBrowser", "auto_size" );
   pref->addPreference( tr( "PREF_RESIZE_ON_EXPAND_ITEM" ), objSetGroup, LightApp_Preferences::Bool,
-                      "ObjectBrowser", "resize_on_expand_item" );
+                       "ObjectBrowser", "resize_on_expand_item" );
 
   // MRU preferences
   int mruGroup = pref->addPreference( tr( "PREF_GROUP_MRU" ), genTab, LightApp_Preferences::Auto, "MRU", "show_mru" );
   pref->setItemProperty( "columns", 4, mruGroup );
   int mruVisCount = pref->addPreference( tr( "PREF_MRU_VISIBLE_COUNT" ), mruGroup, LightApp_Preferences::IntSpin,
-                                        "MRU", "visible_count" );
+                                         "MRU", "visible_count" );
   pref->setItemProperty( "min", 0,   mruVisCount );
   pref->setItemProperty( "max", 100, mruVisCount );
   int mruLinkType = pref->addPreference( tr( "PREF_MRU_LINK_TYPE" ), mruGroup, LightApp_Preferences::Selector,
-                                        "MRU", "link_type" );
+                                         "MRU", "link_type" );
   aValuesList.clear();
   anIndicesList.clear();
   aValuesList   << tr("PREF_MRU_LINK_AUTO") << tr("PREF_MRU_LINK_SHORT") << tr("PREF_MRU_LINK_FULL");
@@ -2125,7 +2125,7 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString
     {
       SUIT_ViewModel* vm = it.next()->getViewModel();
       if ( !vm || !vm->inherits( "OCCViewer_Viewer" ) )
-       continue;
+        continue;
 
       OCCViewer_Viewer* occVM = (OCCViewer_Viewer*)vm;
       occVM->setTrihedronSize( sz );
@@ -2147,13 +2147,13 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString
     {
       SUIT_ViewModel* vm = it.next()->getViewModel();
       if ( !vm || !vm->inherits( "SVTK_Viewer" ) )
-       continue;
+        continue;
 
       SVTK_Viewer* vtkVM = dynamic_cast<SVTK_Viewer*>( vm );
       if( vtkVM )
       {
-       vtkVM->setTrihedronSize( sz, isRelative );
-       vtkVM->Repaint();
+        vtkVM->setTrihedronSize( sz, isRelative );
+        vtkVM->Repaint();
       }
     }
 #endif
@@ -2173,7 +2173,7 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString
     {
       SUIT_ViewModel* vm = it.next()->getViewModel();
       if ( !vm || !vm->inherits( "SVTK_Viewer" ) )
-       continue;
+        continue;
 
       SVTK_Viewer* vtkVM = dynamic_cast<SVTK_Viewer*>( vm );
       if( vtkVM ) vtkVM->setIncrementalSpeed( speed, mode );
@@ -2194,7 +2194,7 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString
     {
       SUIT_ViewModel* vm = it.next()->getViewModel();
       if ( !vm || !vm->inherits( "SVTK_Viewer" ) )
-       continue;
+        continue;
 
       SVTK_Viewer* vtkVM = dynamic_cast<SVTK_Viewer*>( vm );
       if( vtkVM ) vtkVM->setProjectionMode( mode );
@@ -2215,7 +2215,7 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString
     {
       SUIT_ViewModel* vm = it.next()->getViewModel();
       if ( !vm || !vm->inherits( "SVTK_Viewer" ) )
-       continue;
+        continue;
 
       SVTK_Viewer* vtkVM = dynamic_cast<SVTK_Viewer*>( vm );
       if( vtkVM ) vtkVM->setInteractionStyle( mode );
@@ -2226,8 +2226,8 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString
 
 #ifndef DISABLE_VTKVIEWER
   if ( sec == QString( "VTKViewer" ) && (param == QString( "spacemouse_func1_btn" ) ||
-                                        param == QString( "spacemouse_func2_btn" ) ||
-                                        param == QString( "spacemouse_func5_btn" ) ) )
+                                         param == QString( "spacemouse_func2_btn" ) ||
+                                         param == QString( "spacemouse_func5_btn" ) ) )
   {
     int btn1 = resMgr->integerValue( "VTKViewer", "spacemouse_func1_btn", 1 );
     int btn2 = resMgr->integerValue( "VTKViewer", "spacemouse_func2_btn", 2 );
@@ -2240,7 +2240,7 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString
     {
       SUIT_ViewModel* vm = it.next()->getViewModel();
       if ( !vm || !vm->inherits( "SVTK_Viewer" ) )
-       continue;
+        continue;
 
       SVTK_Viewer* vtkVM = dynamic_cast<SVTK_Viewer*>( vm );
       if( vtkVM ) vtkVM->setSpacemouseButtons( btn1, btn2, btn3 );
@@ -2261,7 +2261,7 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString
     {
       OCCViewer_ViewManager* mgr = dynamic_cast<OCCViewer_ViewManager*>( it.next() );
       if( mgr && mgr->getOCCViewer() )
-       mgr->getOCCViewer()->setIsos( u, v );
+        mgr->getOCCViewer()->setIsos( u, v );
     }
   }
 #endif
@@ -2277,13 +2277,13 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString
       bool autoSizeFirst = resMgr->booleanValue( "ObjectBrowser", "auto_size_first", true );
       ob->setAutoSizeFirstColumn( autoSizeFirst );
       if ( autoSizeFirst )
-       ob->adjustFirstColumnWidth();
+        ob->adjustFirstColumnWidth();
     }
     else if ( param=="auto_size" ) {
       bool autoSize = resMgr->booleanValue( "ObjectBrowser", "auto_size", false );
       ob->setAutoSizeColumns(autoSize);
       if ( autoSize )
-       ob->adjustColumnsWidth();
+        ob->adjustColumnsWidth();
     }
     else if ( param=="resize_on_expand_item" ) {
       bool resizeOnExpandItem = resMgr->booleanValue( "ObjectBrowser", "resize_on_expand_item", false );
@@ -2310,7 +2310,7 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString
   {
     if( param=="font" )
       if( pythonConsole() )
-       pythonConsole()->setFont( resMgr->fontValue( "PyConsole", "font" ) );
+        pythonConsole()->setFont( resMgr->fontValue( "PyConsole", "font" ) );
   }
 #endif
 
@@ -2319,17 +2319,17 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString
     QtxMRUAction* mru = ::qobject_cast<QtxMRUAction*>( action( MRUId ) );
     if ( mru ) {
       if ( param == "visible_count" )
-       mru->setVisibleCount( resMgr->integerValue( "MRU", "visible_count", 5 ) );    // 5 MRU items by default
+        mru->setVisibleCount( resMgr->integerValue( "MRU", "visible_count", 5 ) );    // 5 MRU items by default
       else if ( param == "max_count" )
-       mru->setHistoryCount( resMgr->integerValue( "MRU", "max_count", -1 ) );       // unlimited history by default
+        mru->setHistoryCount( resMgr->integerValue( "MRU", "max_count", -1 ) );       // unlimited history by default
       else if ( param == "insert_mode" )
-       mru->setInsertMode( resMgr->integerValue( "MRU", "insert_mode", 0 ) );        // QtxMRUAction::MoveFirst by default
+        mru->setInsertMode( resMgr->integerValue( "MRU", "insert_mode", 0 ) );        // QtxMRUAction::MoveFirst by default
       else if ( param == "link_type" )
-       mru->setLinkType( resMgr->integerValue( "MRU", "link_type", 0 ) );            // QtxMRUAction::LinkAuto by default
+        mru->setLinkType( resMgr->integerValue( "MRU", "link_type", 0 ) );            // QtxMRUAction::LinkAuto by default
       else if ( param == "show_clear" )
-       mru->setClearPossible( resMgr->booleanValue( "MRU", "show_clear", false ) );  // do not show "Clear" item by default
+        mru->setClearPossible( resMgr->booleanValue( "MRU", "show_clear", false ) );  // do not show "Clear" item by default
       else if ( param == "show_mru" )
-       mru->setVisible( resMgr->booleanValue( "MRU", "show_mru", false ) );          // do not show MRU menu item by default
+        mru->setVisible( resMgr->booleanValue( "MRU", "show_mru", false ) );          // do not show MRU menu item by default
     }
   }
 }
@@ -2548,7 +2548,7 @@ void LightApp_Application::updateWindows()
     for ( QMap<int, int>::ConstIterator it = winMap.begin(); it != winMap.end(); ++it )
     {
       if ( !dockWindow( it.key() ) )
-       getWindow( it.key() );
+        getWindow( it.key() );
     }
   }
 
@@ -2971,8 +2971,8 @@ bool LightApp_Application::isLibExists( const QString& moduleTitle ) const
 
     if( inf.exists() )
       {
-       isLibFound = true;
-       break;
+        isLibFound = true;
+        break;
       }
   }
 
@@ -3000,27 +3000,27 @@ bool LightApp_Application::isLibExists( const QString& moduleTitle ) const
       bool isPyLib = false, isPyGuiLib = false;
       QStringList::const_iterator anIt = paths.begin(), aLast = paths.end();
       for( ; anIt!=aLast; anIt++ )
-       {
-         QFileInfo inf( Qtx::addSlash( *anIt ) + pylib );
-         QFileInfo infgui( Qtx::addSlash( *anIt ) + pylibgui );
+        {
+          QFileInfo inf( Qtx::addSlash( *anIt ) + pylib );
+          QFileInfo infgui( Qtx::addSlash( *anIt ) + pylibgui );
 
           if(!isPythonLightModule)
             if( !isPyLib && inf.exists() )
               isPyLib = true;
 
-         if( !isPyGuiLib && infgui.exists() )
-           isPyGuiLib = true;
+          if( !isPyGuiLib && infgui.exists() )
+            isPyGuiLib = true;
 
-         if ((isPyLib || isPythonLightModule ) && isPyGuiLib && isLibFound)
-           return true;
-       }
+          if ((isPyLib || isPythonLightModule ) && isPyGuiLib && isLibFound)
+            return true;
+        }
 
       printf( "****************************************************************\n" );
       printf( "*    Warning: python library for %s cannot be found:\n", moduleTitle.toLatin1().constData() );
       if (!isPyLib)
-       printf( "*    No module named %s\n", moduleName( moduleTitle ).toLatin1().constData() );
+        printf( "*    No module named %s\n", moduleName( moduleTitle ).toLatin1().constData() );
       if (!isPyGuiLib)
-       printf( "*    No module named %s\n", (moduleName( moduleTitle ) + QString("GUI")).toLatin1().constData() );
+        printf( "*    No module named %s\n", (moduleName( moduleTitle ) + QString("GUI")).toLatin1().constData() );
       printf( "****************************************************************\n" );
       return true;
   }
@@ -3054,9 +3054,9 @@ bool LightApp_Application::event( QEvent* e )
     SALOME_CustomEvent* ce = ( SALOME_CustomEvent* )e;
     QString* d = ( QString* )ce->data();
     if( SUIT_MessageBox::question(0, tr("WRN_WARNING"),
-                                 d ? *d : "",
-                                 SUIT_MessageBox::Yes | SUIT_MessageBox::No,
-                                 SUIT_MessageBox::Yes ) == SUIT_MessageBox::Yes )
+                                  d ? *d : "",
+                                  SUIT_MessageBox::Yes | SUIT_MessageBox::No,
+                                  SUIT_MessageBox::Yes ) == SUIT_MessageBox::Yes )
       showPreferences( tr( "PREF_APP" ) );
     if( d )
       delete d;
@@ -3070,9 +3070,9 @@ bool LightApp_Application::checkDataObject(LightApp_DataObject* theObj)
 {
   if (theObj)
     {
-      bool isSuitable =        !theObj->entry().isEmpty() &&
-                       !theObj->componentDataType().isEmpty() &&
-                       !theObj->name().isEmpty();
+      bool isSuitable = !theObj->entry().isEmpty() &&
+                        !theObj->componentDataType().isEmpty() &&
+                        !theObj->name().isEmpty();
       return isSuitable;
     }
 
@@ -3087,7 +3087,7 @@ int LightApp_Application::openChoice( const QString& aName )
   {
     // Do you want to reload it?
     if ( SUIT_MessageBox::question( desktop(), tr( "WRN_WARNING" ), tr( "QUE_DOC_ALREADYOPEN" ).arg( aName ),
-                                   SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::No ) == SUIT_MessageBox::Yes )
+                                    SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::No ) == SUIT_MessageBox::Yes )
       choice = OpenReload;
   }
 
@@ -3106,20 +3106,20 @@ bool LightApp_Application::openAction( const int choice, const QString& aName )
       QList<SUIT_Application*> appList = session->applications();
       for ( QList<SUIT_Application*>::iterator it = appList.begin(); it != appList.end() && !app; ++it )
       {
-       if ( (*it)->activeStudy() && (*it)->activeStudy()->studyName() == aName )
-         app = ::qobject_cast<STD_Application*>( *it );
+        if ( (*it)->activeStudy() && (*it)->activeStudy()->studyName() == aName )
+          app = ::qobject_cast<STD_Application*>( *it );
       }
 
       if ( app )
       {
-       app->onCloseDoc( false );
-       appList = session->applications();
-       STD_Application* other = 0;
-       for ( QList<SUIT_Application*>::iterator it = appList.begin(); it != appList.end() && !other; ++it )
-         other = ::qobject_cast<STD_Application*>( *it );
-
-       if ( other )
-         res = other->onOpenDoc( aName );
+        app->onCloseDoc( false );
+        appList = session->applications();
+        STD_Application* other = 0;
+        for ( QList<SUIT_Application*>::iterator it = appList.begin(); it != appList.end() && !other; ++it )
+          other = ::qobject_cast<STD_Application*>( *it );
+
+        if ( other )
+          res = other->onOpenDoc( aName );
       }
     }
     break;
index a1d1911e15fd8a87765db684ee5b5c16195e8b81..652c0528b960772832c890cc28b50753a2f7f720 100644 (file)
@@ -78,11 +78,11 @@ public:
   enum { MenuWindowId = 6 };
 
   enum { RenameId = CAM_Application::UserID,
-        CloseId, CloseAllId, GroupAllId,
-        PreferencesId, MRUId, ModulesListId,
+         CloseId, CloseAllId, GroupAllId,
+         PreferencesId, MRUId, ModulesListId,
          NewGLViewId, NewPlot2dId, NewOCCViewId, NewVTKViewId, NewQxGraphViewId,
-        NewQxSceneViewId = NewQxGraphViewId, StyleId,
-        UserID };
+         NewQxSceneViewId = NewQxGraphViewId, StyleId,
+         UserID };
 
 protected:
   enum { NewStudyId = 1, OpenStudyId };
@@ -112,10 +112,10 @@ public:
   virtual QString                     getFileFilter() const;
 
   virtual QString                     getFileName( bool open, const QString& initial, const QString& filters,
-                                                  const QString& caption, QWidget* parent );
+                                                   const QString& caption, QWidget* parent );
   virtual QString                     getDirectory( const QString& initial, const QString& caption, QWidget* parent );
   virtual QStringList                 getOpenFileNames( const QString& initial, const QString& filters,
-                                                       const QString& caption, QWidget* parent );
+                                                        const QString& caption, QWidget* parent );
 
   void                                updateActions();
 
index 653256f95f5bfa7257e0785fe88ef897ac348d5b..f843e4a4a7ce76fd79c6e380418dc943f50b3740 100644 (file)
@@ -41,7 +41,7 @@ LightApp_DataModel::LightApp_DataModel( CAM_Module* theModule )
 {
   myGroupId = 0;
   if( module() )
-       myGroupId = qHash( module()->name() );
+        myGroupId = qHash( module()->name() );
 }
 
 /*!
@@ -206,5 +206,5 @@ void LightApp_DataModel::unregisterColumn( SUIT_DataBrowser* browser, const QStr
 {
   SUIT_AbstractModel* m = dynamic_cast<SUIT_AbstractModel*>( browser ? browser->model() : 0 );
   if( m )
-       m->unregisterColumn( groupId(), name );
+        m->unregisterColumn( groupId(), name );
 }
index 504ae52f342658a9735a419b9713728100450a5a..1ea74a77a33cf46ca081614b96e5398a6bdf58aa 100644 (file)
@@ -237,28 +237,28 @@ bool LightApp_DataObject::compare( const QVariant& left, const QVariant& right,
       bool result = true;
       bool calculated = false;
       for ( int i = 0; i < idsLeft.count() || i < idsRight.count(); i++ ) {
-       bool okLeft = true, okRight = true;
-       int lid = 0, rid = 0;
-       if ( i < idsLeft.count() )
-         lid = idsLeft[i].toInt( &okLeft );
-       if ( i < idsRight.count() )
-         rid = idsRight[i].toInt( &okRight );
-       if ( okLeft && okRight ) {
-         // both seem to be correct integer ID
-         return lid < rid;
-       }
-       else if ( okLeft || okRight ) {
-         // objects with correct (int) ID have higher priority
-         return okLeft;
-       }
-       else {
-         // both not integer ID
-         int r = QString::localeAwareCompare( idsLeft[i], idsRight[i] ); 
-         if ( !calculated && r != 0 ) {
-           result = r < 0;
-           calculated = true;
-         }
-       }
+        bool okLeft = true, okRight = true;
+        int lid = 0, rid = 0;
+        if ( i < idsLeft.count() )
+          lid = idsLeft[i].toInt( &okLeft );
+        if ( i < idsRight.count() )
+          rid = idsRight[i].toInt( &okRight );
+        if ( okLeft && okRight ) {
+          // both seem to be correct integer ID
+          return lid < rid;
+        }
+        else if ( okLeft || okRight ) {
+          // objects with correct (int) ID have higher priority
+          return okLeft;
+        }
+        else {
+          // both not integer ID
+          int r = QString::localeAwareCompare( idsLeft[i], idsRight[i] ); 
+          if ( !calculated && r != 0 ) {
+            result = r < 0;
+            calculated = true;
+          }
+        }
       }
       // we should reach this if the entries are exactly equal
       return result; 
index c050811d1ebf4b85e96cf79d881bb30f6fe81f08..f0f40c5a446430e81f3613ed451179793e1b7bbe 100644 (file)
@@ -98,13 +98,13 @@ void LightApp_Displayer::Redisplay( const QString& entry, const bool updateViewe
 
       SUIT_ViewModel* vmodel = vman->getViewModel();
       if( !vmodel )
-       continue;
-       
+        continue;
+        
       SALOME_View* view = dynamic_cast<SALOME_View*>(vmodel);
       if( view && ( IsDisplayed( entry, view ) || view == GetActiveView() ) )
       {
-       Erase( entry, true, false, view );
-       Display( entry, updateViewer, view );
+        Erase( entry, true, false, view );
+        Display( entry, updateViewer, view );
       }
     }
   }
@@ -127,7 +127,7 @@ void LightApp_Displayer::Erase( const QString& entry, const bool forced,
     if ( prs ) {
       vf->Erase( prs, forced );
       if ( updateViewer )
-       vf->Repaint();
+        vf->Repaint();
       delete prs;  // delete presentation because displayer is its owner
     }
   }
@@ -207,8 +207,8 @@ SALOME_View* LightApp_Displayer::GetActiveView()
   if (  SUIT_Application* app = session->activeApplication() ) {
     if ( LightApp_Application* sApp = dynamic_cast<LightApp_Application*>( app ) ) {
       if( SUIT_ViewManager* vman = sApp->activeViewManager() ) {
-       if ( SUIT_ViewModel* vmod = vman->getViewModel() )
-         return dynamic_cast<SALOME_View*>( vmod );
+        if ( SUIT_ViewModel* vmod = vman->getViewModel() )
+          return dynamic_cast<SALOME_View*>( vmod );
       }
     }
   }
@@ -236,8 +236,8 @@ bool LightApp_Displayer::canBeDisplayed( const QString& entry ) const
   if(  SUIT_Application* app = session->activeApplication() )
     if( LightApp_Application* sApp = dynamic_cast<LightApp_Application*>( app ) )
       if( SUIT_ViewManager* vman = sApp->activeViewManager() )
-       if( SUIT_ViewModel* vmod = vman->getViewModel() )
-         viewerType = vmod->getType();
+        if( SUIT_ViewModel* vmod = vman->getViewModel() )
+          viewerType = vmod->getType();
   return canBeDisplayed( entry, viewerType );
 }
 
index 30ea24f795517a283aa42119e5088ebe9a266a66..dbeb54835ea17347fc22f5d0b809d295da031922 100644 (file)
@@ -54,14 +54,14 @@ bool LightApp_EventFilter::eventFilter( QObject* o, QEvent* e )
       SUIT_Desktop* aDesktop = 0;
       
       while( parent )
-       {
-         if ( aDesktop = dynamic_cast<SUIT_Desktop*>(parent) )
-           break;
-         parent = parent->parentWidget();
-       }
+        {
+          if ( aDesktop = dynamic_cast<SUIT_Desktop*>(parent) )
+            break;
+          parent = parent->parentWidget();
+        }
       
       if ( aDesktop )
-       aDesktop->emitActivated();
+        aDesktop->emitActivated();
     }
 
   else if(e->type() == SALOME_EVENT)
index 9d5b40562bb08ddead9c36b2647d2edeabb39ee9..c608497e52197b151afc0b15a2b386256a865fc9 100644 (file)
@@ -119,8 +119,8 @@ protected:
 
   int                                 addPreference( const QString& label );
   int                                 addPreference( const QString& label, const int pId, const int = LightApp_Preferences::Auto,
-                                                    const QString& section = QString(),
-                                                    const QString& param = QString() );
+                                                     const QString& section = QString(),
+                                                     const QString& param = QString() );
   QVariant                            preferenceProperty( const int, const QString& ) const;
   void                                setPreferenceProperty( const int, const QString&, const QVariant& );
 
index a675d7a8b3b860157192fdb031ed793866ec57cc..fe086470337756492de79993727f05a562dbe3e1 100644 (file)
@@ -148,8 +148,8 @@ static const char* const default_icon[] = {
   \param icon module icon
 */
 LightApp_ModuleDlg::LightApp_ModuleDlg( QWidget*       parent, 
-                                       const QString& component, 
-                                       const QPixmap& icon )
+                                        const QString& component, 
+                                        const QPixmap& icon )
 : QDialog ( parent )
 {
   setModal( true );
@@ -242,7 +242,7 @@ QPushButton* LightApp_ModuleDlg::findButton( const int id ) const
 {
   QPushButton* btn = 0;
   for ( ButtonMap::ConstIterator it = myButtons.begin(); 
-       it != myButtons.end() && !btn; ++it ) {
+        it != myButtons.end() && !btn; ++it ) {
     if ( it.value() == id )
       btn = it.key();
   }
index ede0e004c088ba36e5e91609b5dddbe20326069c..d6b98efcf6045761cf9a4f36de6bc0540d952b26 100644 (file)
@@ -130,8 +130,8 @@ void LightApp_OBSelector::getSelection( SUIT_DataOwnerPtrList& theList ) const
 #ifndef DISABLE_SALOMEOBJECT
         Handle(SALOME_InteractiveObject) aSObj = new SALOME_InteractiveObject
           ( obj->entry().toLatin1().constData(),
-           obj->componentDataType().toLatin1().constData(),
-           obj->name().toLatin1().constData() );
+            obj->componentDataType().toLatin1().constData(),
+            obj->name().toLatin1().constData() );
         LightApp_DataOwner* owner = new LightApp_DataOwner( aSObj  );
 #else
         LightApp_DataOwner* owner = new LightApp_DataOwner( obj->entry() );
@@ -152,12 +152,12 @@ void LightApp_OBSelector::setSelection( const SUIT_DataOwnerPtrList& theList )
   if ( !myBrowser )
     return;
 
-  if( myEntries.count() == 0 ||        myModifiedTime < myBrowser->getModifiedTime() )
+  if( myEntries.count() == 0 || myModifiedTime < myBrowser->getModifiedTime() )
     fillEntries( myEntries );
 
   DataObjectList objList;
   for ( SUIT_DataOwnerPtrList::const_iterator it = theList.begin(); 
-       it != theList.end(); ++it ) {
+        it != theList.end(); ++it ) {
     const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*>( (*it).operator->() );
     if ( owner && myEntries.contains( owner->entry() ) )
       objList.append( myEntries[owner->entry()] );
index c97e2d6de68d2cc5d5c35fb90ac11304bfdd8309..ecdb2579b46027e04cb697a047aff818c0025905 100644 (file)
@@ -97,7 +97,7 @@ void LightApp_Preferences::onApply()
 void LightApp_Preferences::changedResources( const ResourceMap& map )
 {
   for ( ResourceMap::ConstIterator it = map.begin(); 
-       it != map.end(); ++it )
+        it != map.end(); ++it )
   {
     QString sec, param;
     it.key()->resource( sec, param );
index 748d42b54bbf60b000aa6ca35d5fcdb7f3feedaa..b66fa3648cf36fc51c3131c6eb8d2dd963009f7f 100644 (file)
@@ -132,16 +132,16 @@ void LightApp_PreferencesDlg::onApply()
 void LightApp_PreferencesDlg::onDefault()
 {
   if( SUIT_MessageBox::Ok == SUIT_MessageBox::question( this, tr( "WARNING" ), tr( "DEFAULT_QUESTION" ),
-                                                       SUIT_MessageBox::Ok | SUIT_MessageBox::Cancel,
-                                                       SUIT_MessageBox::Ok ) )
+                                                        SUIT_MessageBox::Ok | SUIT_MessageBox::Cancel,
+                                                        SUIT_MessageBox::Ok ) )
     {
       if ( myPrefs && myPrefs->resourceMgr() )
-       {
+        {
           QtxResourceMgr::WorkingMode prev = myPrefs->resourceMgr()->workingMode();
-         myPrefs->resourceMgr()->setWorkingMode( QtxResourceMgr::IgnoreUserValues );
-         myPrefs->retrieve();
+          myPrefs->resourceMgr()->setWorkingMode( QtxResourceMgr::IgnoreUserValues );
+          myPrefs->retrieve();
           myPrefs->resourceMgr()->setWorkingMode( prev );
-       }
+        }
     }
 }
 
index 09fab94d7b1f69f99ea10dbddd34eb319a0fafa1..b39d13121d6ff1f071b87f1e818dd3d1781a3742 100644 (file)
@@ -76,11 +76,11 @@ void LightApp_Selection::init( const QString& client, LightApp_SelectionMgr* mgr
       SUIT_Selector* selector = it.next();
       if( selector->type() != client && selector->isEnabled() )
       {
-       //mgr->selected( cur_sel, selector->type() );
+        //mgr->selected( cur_sel, selector->type() );
         selector->selected( cur_sel );
-       SUIT_DataOwnerPtrList::const_iterator aLIt = cur_sel.begin(), aLLast = cur_sel.end();
-       for( ; aLIt!=aLLast; aLIt++ )
-         sel.append( *aLIt ); //check entry and don't append if such entry is in list already
+        SUIT_DataOwnerPtrList::const_iterator aLIt = cur_sel.begin(), aLLast = cur_sel.end();
+        for( ; aLIt!=aLLast; aLIt++ )
+          sel.append( *aLIt ); //check entry and don't append if such entry is in list already
       }
     }
 
@@ -95,14 +95,14 @@ void LightApp_Selection::init( const QString& client, LightApp_SelectionMgr* mgr
       if( sowner )
       {
         entry = referencedToEntry( sowner->entry() );
-       if( entries.contains( entry ) )
-         continue;
+        if( entries.contains( entry ) )
+          continue;
 
-       entries.insert( entry, 0 );
+        entries.insert( entry, 0 );
         myEntries.insert( num, entry );
-       myIsReferences.insert( num, sowner->entry() != entry );
+        myIsReferences.insert( num, sowner->entry() != entry );
         processOwner( sowner );
-       num++;
+        num++;
       }
     }
   }
@@ -256,7 +256,7 @@ SUIT_ViewWindow* LightApp_Selection::activeVW() const
     if ( app ) {
       SUIT_Desktop* desk = app->desktop();
       if ( desk ) 
-       return desk->activeWindow();
+        return desk->activeWindow();
     }
   }
   return 0;
index 1c389db587140e717e61193094b40908e9a6ca5c..9a40604d9c635a093f15708e737c30fb91bf9310 100644 (file)
@@ -107,7 +107,7 @@ void LightApp_SelectionMgr::selectedObjects( SALOME_ListIO& theList, const QStri
     }
     else {
       if( !entryMap.contains( entry ) && !owner->IO().IsNull() )
-       theList.Append( owner->IO() );
+        theList.Append( owner->IO() );
     }
 
     entryMap.insert(checkEntry, 1);
@@ -188,7 +188,7 @@ void LightApp_SelectionMgr::GetIndexes( const Handle(SALOME_InteractiveObject)&
     const LightApp_DataSubOwner* subOwner = dynamic_cast<const LightApp_DataSubOwner*>( (*itr).operator->() );
     if ( subOwner )
       if ( subOwner->entry() == QString(IObject->getEntry()) )
-       theIndex.Add( subOwner->index() );
+        theIndex.Add( subOwner->index() );
   }
   
 }
@@ -208,7 +208,7 @@ void LightApp_SelectionMgr::GetIndexes( const QString& theEntry, TColStd_Indexed
     const LightApp_DataSubOwner* subOwner = dynamic_cast<const LightApp_DataSubOwner*>( (*itr).operator->() );
     if ( subOwner )
       if ( subOwner->entry() == theEntry )
-       theIndex.Add( subOwner->index() );
+        theIndex.Add( subOwner->index() );
   }
 
 }
@@ -234,14 +234,14 @@ void LightApp_SelectionMgr::AddOrRemoveIndex( const Handle(SALOME_InteractiveObj
       const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*>( (*itr).operator->() );
       if ( owner )
       {
-       if ( owner->entry() != ioEntry )
-       {
-         const LightApp_DataSubOwner* subOwner = dynamic_cast<const LightApp_DataSubOwner*>( owner );
-         if ( subOwner )
-           remainsOwners.append( new LightApp_DataSubOwner( subOwner->entry(), subOwner->index() ) );
-         else
-           remainsOwners.append( new LightApp_DataOwner( owner->entry() ) );
-       }
+        if ( owner->entry() != ioEntry )
+        {
+          const LightApp_DataSubOwner* subOwner = dynamic_cast<const LightApp_DataSubOwner*>( owner );
+          if ( subOwner )
+            remainsOwners.append( new LightApp_DataSubOwner( subOwner->entry(), subOwner->index() ) );
+          else
+            remainsOwners.append( new LightApp_DataOwner( owner->entry() ) );
+        }
       }
     }
   }
@@ -268,7 +268,7 @@ void LightApp_SelectionMgr::AddOrRemoveIndex( const Handle(SALOME_InteractiveObj
   select 'subobjects' with given indexes
 */
 void LightApp_SelectionMgr::selectObjects( const Handle(SALOME_InteractiveObject)& IObject, 
-                                           TColStd_IndexedMapOfInteger theIndex, bool append )
+                                            TColStd_IndexedMapOfInteger theIndex, bool append )
 {
   SUIT_DataOwnerPtrList aList;
 
@@ -278,7 +278,7 @@ void LightApp_SelectionMgr::selectObjects( const Handle(SALOME_InteractiveObject
     {
       int i;
       for ( i = 1; i <= theIndex.Extent(); i++ )
-       aList.append( new LightApp_DataSubOwner( QString(IObject->getEntry()), theIndex( i ) ) );
+        aList.append( new LightApp_DataSubOwner( QString(IObject->getEntry()), theIndex( i ) ) );
     }
 
   setSelected( aList, append );
@@ -296,13 +296,13 @@ void LightApp_SelectionMgr::selectObjects( MapIOOfMapOfInteger theMapIO, bool ap
   for ( ; it.More(); it.Next() ) 
     {
       if ( it.Value().IsEmpty() )
-       aList.append( new LightApp_DataOwner( QString(it.Key()->getEntry()) ) );
+        aList.append( new LightApp_DataOwner( QString(it.Key()->getEntry()) ) );
       else
-       {
-         int i;
-         for ( i = 1; i <= it.Value().Extent(); i++ )
-           aList.append( new LightApp_DataSubOwner( QString(it.Key()->getEntry()), it.Value()( i ) ) );
-       }
+        {
+          int i;
+          for ( i = 1; i <= it.Value().Extent(); i++ )
+            aList.append( new LightApp_DataSubOwner( QString(it.Key()->getEntry()), it.Value()( i ) ) );
+        }
     }
   
   setSelected( aList, append );
@@ -333,8 +333,8 @@ void LightApp_SelectionMgr::selectedSubOwners( MapEntryOfMapOfInteger& theMap )
       if ( !theMap.IsBound( subOwner->entry().toLatin1().data() ) )
 #endif
       {
-       anIndexes.Clear();
-       //Bug 17269: GetIndexes( subOwner->entry(), anIndexes );
+        anIndexes.Clear();
+        //Bug 17269: GetIndexes( subOwner->entry(), anIndexes );
         //Bug 17269: To avoid multiple calling of selected(aList)
         for ( SUIT_DataOwnerPtrList::const_iterator itr2 = itr; itr2 != aList.end(); ++itr2 )
         {
@@ -345,7 +345,7 @@ void LightApp_SelectionMgr::selectedSubOwners( MapEntryOfMapOfInteger& theMap )
               anIndexes.Add( subOwner2->index() );
         }
         //
-       theMap.Bind( subOwner->entry().toLatin1().data(), anIndexes );
+        theMap.Bind( subOwner->entry().toLatin1().data(), anIndexes );
       }
     }
   }
index 57a4efbe79654d96932fe80f6171d543f9b44cab..9a6b11804baab82c119518fcb3050002ea1936b8 100644 (file)
@@ -63,17 +63,17 @@ public:
   void                   setSelectedObjects( const SALOME_ListIO&, const bool = false );
 
   void                   GetIndexes( const Handle(SALOME_InteractiveObject)& IObject, 
-                                    TColStd_IndexedMapOfInteger& theIndex );
+                                     TColStd_IndexedMapOfInteger& theIndex );
   void                   GetIndexes( const QString& theEntry, 
-                                    TColStd_IndexedMapOfInteger& theIndex );
+                                     TColStd_IndexedMapOfInteger& theIndex );
 
   //bool                   AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& IObject, 
   void                   AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& IObject, 
-                                          const TColStd_MapOfInteger& theIndices, 
-                                          bool modeShift );
+                                           const TColStd_MapOfInteger& theIndices, 
+                                           bool modeShift );
 
   void                   selectObjects( const Handle(SALOME_InteractiveObject)& IObject, 
-                                       TColStd_IndexedMapOfInteger theIndex, bool append );
+                                        TColStd_IndexedMapOfInteger theIndex, bool append );
   void                   selectObjects( MapIOOfMapOfInteger theMapIO, bool append );
 
   void                   selectedSubOwners( MapEntryOfMapOfInteger& theMap );
index e6cefd5c01bc2c85172685669a80a40091634b05..a48129436d5d28d8062fb35c68e317f876de5c42 100644 (file)
@@ -104,7 +104,7 @@ void LightApp_ShowHideOp::startOperation()
     {
       LightApp_Displayer* disp = LightApp_Displayer::FindDisplayer( app->moduleTitle( *anIt ), true );
       if( disp )
-       disp->EraseAll( false, false, 0 );
+        disp->EraseAll( false, false, 0 );
     }
     if( myActionType==ERASE_ALL )
     {
index 69fcb3282fb62ec5b1b8439d50c6ca5d324f64a8..3034bb80caae1da1d611cbb712609f1b520053bc 100755 (executable)
@@ -102,7 +102,7 @@ LightApp_Operation* LightApp_SwitchOp::operation( QWidget* theWg ) const
       SUIT_Operation* anOp = anIter.next();
           
       if ( anOp &&
-          anOp->inherits( "LightApp_Operation" ) &&
+           anOp->inherits( "LightApp_Operation" ) &&
            ((LightApp_Operation*)anOp)->dlg() == aDlg )
         return ((LightApp_Operation*)anOp);
     }
index cb27f6aee4e293c7627491d745a8cea38bbc4c09..625c6b70a07a85e732d90d2ef95137241c3b7e0c 100644 (file)
@@ -47,7 +47,7 @@
   Constructor.
 */
 LightApp_SVTKDataOwner::LightApp_SVTKDataOwner( const Handle(SALOME_InteractiveObject)& theIO,
-                                                                 SUIT_Desktop* theDesktop )
+                                                                  SUIT_Desktop* theDesktop )
 : LightApp_DataOwner( theIO ),
 myDesktop( theDesktop )
 {
@@ -137,7 +137,7 @@ LightApp_SVTKDataOwner::~LightApp_SVTKDataOwner()
 */
 LightApp_VTKSelector
 ::LightApp_VTKSelector( SVTK_ViewModelBase* viewer, 
-                       SUIT_SelectionMgr* mgr ): 
+                        SUIT_SelectionMgr* mgr ): 
   SUIT_Selector( mgr, viewer ),
   myViewer( viewer )
 {
@@ -188,17 +188,17 @@ LightApp_VTKSelector
   if(myViewer){
     if(SUIT_ViewManager* aViewManager = myViewer->getViewManager()){
       if(SVTK_ViewManager* aViewMgr = dynamic_cast<SVTK_ViewManager*>(aViewManager)){
-       if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewMgr->getActiveView())){
-         if(SVTK_Selector* aSelector = aView->GetSelector()){
-           const SALOME_ListIO& aListIO = aSelector->StoredIObjects();
-           SALOME_ListIteratorOfListIO anIter(aListIO);
-           for(; anIter.More(); anIter.Next()){
-             Handle(SALOME_InteractiveObject) anIO = anIter.Value();
-             if(anIO->hasEntry())
-               aList.append(new LightApp_SVTKDataOwner(anIO,aViewMgr->getDesktop()));
-           }
-         }
-       }
+        if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewMgr->getActiveView())){
+          if(SVTK_Selector* aSelector = aView->GetSelector()){
+            const SALOME_ListIO& aListIO = aSelector->StoredIObjects();
+            SALOME_ListIteratorOfListIO anIter(aListIO);
+            for(; anIter.More(); anIter.Next()){
+              Handle(SALOME_InteractiveObject) anIO = anIter.Value();
+              if(anIO->hasEntry())
+                aList.append(new LightApp_SVTKDataOwner(anIO,aViewMgr->getDesktop()));
+            }
+          }
+        }
       }
     }
   }
@@ -214,45 +214,45 @@ LightApp_VTKSelector
   if(myViewer){
     if(SUIT_ViewManager* aViewMgr = myViewer->getViewManager()){
       if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewMgr->getActiveView())){
-       if(SVTK_Selector* aSelector = aView->GetSelector()){
-         SALOME_ListIO anAppendList;
-         const SALOME_ListIO& aStoredList = aSelector->StoredIObjects();
-         SUIT_DataOwnerPtrList::const_iterator anIter = theList.begin();
-         for(; anIter != theList.end(); ++anIter){
-           const SUIT_DataOwner* aDataOwner = (*anIter).get();
-           if(const LightApp_SVTKDataOwner* anOwner = dynamic_cast<const LightApp_SVTKDataOwner*>(aDataOwner)){
-             aSelector->SetSelectionMode(anOwner->GetMode());
-             Handle(SALOME_InteractiveObject) anIO = anOwner->IO();
+        if(SVTK_Selector* aSelector = aView->GetSelector()){
+          SALOME_ListIO anAppendList;
+          const SALOME_ListIO& aStoredList = aSelector->StoredIObjects();
+          SUIT_DataOwnerPtrList::const_iterator anIter = theList.begin();
+          for(; anIter != theList.end(); ++anIter){
+            const SUIT_DataOwner* aDataOwner = (*anIter).get();
+            if(const LightApp_SVTKDataOwner* anOwner = dynamic_cast<const LightApp_SVTKDataOwner*>(aDataOwner)){
+              aSelector->SetSelectionMode(anOwner->GetMode());
+              Handle(SALOME_InteractiveObject) anIO = anOwner->IO();
 
-             aSelector->AddIObject(anIO);
+              aSelector->AddIObject(anIO);
 
-             anAppendList.Append(anIO);
-             aSelector->AddOrRemoveIndex(anIO,anOwner->GetIds(),false);
-           }else if(const LightApp_DataOwner* anOwner = dynamic_cast<const LightApp_DataOwner*>(aDataOwner)){
-             Handle(SALOME_InteractiveObject) anIO = 
-               new SALOME_InteractiveObject(anOwner->entry().toLatin1(),"");
-             aSelector->AddIObject(anIO);
-             anAppendList.Append(anIO);
-           }
-         }
-         // To remove IOs, which is not selected.
-         QMap< QString, Handle( SALOME_InteractiveObject )> toRemove;
-         SALOME_ListIteratorOfListIO anIt( aStoredList );
-         for( ; anIt.More(); anIt.Next() )
-           if( !anIt.Value().IsNull() )
-             toRemove[ anIt.Value()->getEntry() ] = anIt.Value();
+              anAppendList.Append(anIO);
+              aSelector->AddOrRemoveIndex(anIO,anOwner->GetIds(),false);
+            }else if(const LightApp_DataOwner* anOwner = dynamic_cast<const LightApp_DataOwner*>(aDataOwner)){
+              Handle(SALOME_InteractiveObject) anIO = 
+                new SALOME_InteractiveObject(anOwner->entry().toLatin1(),"");
+              aSelector->AddIObject(anIO);
+              anAppendList.Append(anIO);
+            }
+          }
+          // To remove IOs, which is not selected.
+          QMap< QString, Handle( SALOME_InteractiveObject )> toRemove;
+          SALOME_ListIteratorOfListIO anIt( aStoredList );
+          for( ; anIt.More(); anIt.Next() )
+            if( !anIt.Value().IsNull() )
+              toRemove[ anIt.Value()->getEntry() ] = anIt.Value();
 
-         anIt = SALOME_ListIteratorOfListIO(anAppendList);
-         for( ; anIt.More(); anIt.Next() )
-           toRemove.remove( anIt.Value()->getEntry() );
+          anIt = SALOME_ListIteratorOfListIO(anAppendList);
+          for( ; anIt.More(); anIt.Next() )
+            toRemove.remove( anIt.Value()->getEntry() );
 
-         QMap< QString, Handle( SALOME_InteractiveObject )>::const_iterator RIt = toRemove.begin(),
-                                                                            REnd = toRemove.end();
-         for( ; RIt!=REnd; RIt++ )
-           aSelector->RemoveIObject( RIt.value() );
-         
-         aView->onSelectionChanged();
-       }
+          QMap< QString, Handle( SALOME_InteractiveObject )>::const_iterator RIt = toRemove.begin(),
+                                                                             REnd = toRemove.end();
+          for( ; RIt!=REnd; RIt++ )
+            aSelector->RemoveIObject( RIt.value() );
+          
+          aView->onSelectionChanged();
+        }
       }
     }
   }
index 56455d7adefd9c6df2a2c1a7dc50b261fb14ecfb..b94df74c82ed8412c89041418cf718c4e686d15e 100755 (executable)
@@ -83,7 +83,7 @@ Standard_EXPORT ~SALOME_AISObject();
  //
  Standard_EXPORT friend Handle_Standard_Type& SALOME_AISObject_Type_();
  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean             IsKind(const Handle(Standard_Type)&) const;
+ Standard_EXPORT Standard_Boolean              IsKind(const Handle(Standard_Type)&) const;
 
 protected:
 
index df38078059118445d3b3e78b5570c32f4f87caaa..dbf37bdbfcc6dc56cd9028c307434971eb9c8c8c 100755 (executable)
@@ -50,10 +50,10 @@ Standard_EXPORT Handle_Standard_Type& SALOME_AISObject_Type_()
 
   static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,aType5,NULL};
   static Handle_Standard_Type _aType = new Standard_Type("SALOME_AISObject",
-                                                        sizeof(SALOME_AISObject),
-                                                        1,
-                                                        (Standard_Address)_Ancestors,
-                                                        (Standard_Address)NULL);
+                                                         sizeof(SALOME_AISObject),
+                                                         1,
+                                                         (Standard_Address)_Ancestors,
+                                                         (Standard_Address)NULL);
 
   return _aType;
 }
index ae878704b6b736242a9303c8d57c9a20a5ca6f08..9d5cc5a24a4050ed6d773596cbe0171f408ce03c 100755 (executable)
@@ -87,7 +87,7 @@ Standard_EXPORT ~SALOME_AISShape();
  //
  Standard_EXPORT friend Handle_Standard_Type& SALOME_AISShape_Type_();
  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean             IsKind(const Handle(Standard_Type)&) const;
+ Standard_EXPORT Standard_Boolean              IsKind(const Handle(Standard_Type)&) const;
 
 protected:
 
index e67417c06793faf0fe4fc1ce622bd6c5547049ec..1b68f13e4ad3571c7f5d0346abe8e170e7438325 100755 (executable)
@@ -52,10 +52,10 @@ Standard_EXPORT Handle_Standard_Type& SALOME_AISShape_Type_()
 
   static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,aType5,aType6,NULL};
   static Handle_Standard_Type _aType = new Standard_Type("SALOME_AISShape",
-                                                        sizeof(SALOME_AISShape),
-                                                        1,
-                                                        (Standard_Address)_Ancestors,
-                                                        (Standard_Address)NULL);
+                                                         sizeof(SALOME_AISShape),
+                                                         1,
+                                                         (Standard_Address)_Ancestors,
+                                                         (Standard_Address)NULL);
 
   return _aType;
 }
index 4a97001888bbe3dfb32d0f1b89d67f239d2cf5bc..5bb115dc403fa58322af75fabf31f8a16bd0701b 100644 (file)
@@ -86,7 +86,7 @@ Standard_EXPORT ~SALOME_DataMapNodeOfDataMapOfIOMapOfInteger();
  //
  Standard_EXPORT friend Handle_Standard_Type& SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_Type_();
  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean             IsKind(const Handle(Standard_Type)&) const;
+ Standard_EXPORT Standard_Boolean              IsKind(const Handle(Standard_Type)&) const;
 
 protected:
 
index 68dc7cad665caea2bc23d9bada83c0195798bf42..cf7b68692a1fdd9efde2f9dea0b6043bd22020e7 100644 (file)
@@ -69,10 +69,10 @@ Standard_EXPORT Handle_Standard_Type& SALOME_DataMapNodeOfDataMapOfIOMapOfIntege
 
   static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
   static Handle_Standard_Type _aType = new Standard_Type("SALOME_DataMapNodeOfDataMapOfIOMapOfInteger",
-                                                        sizeof(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger),
-                                                        1,
-                                                        (Standard_Address)_Ancestors,
-                                                        (Standard_Address)NULL);
+                                                         sizeof(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger),
+                                                         1,
+                                                         (Standard_Address)_Ancestors,
+                                                         (Standard_Address)NULL);
 
   return _aType;
 }
index 29735f5da0b25854cc788a82bba251a6b72f0d8d..808b0563b2854385b2929bcc639a7014900c639b 100644 (file)
@@ -75,7 +75,7 @@ Standard_EXPORT ~SALOME_Filter();
  //
  Standard_EXPORT friend Handle_Standard_Type& SALOME_Filter_Type_();
  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean            IsKind(const Handle(Standard_Type)&) const;
+ Standard_EXPORT Standard_Boolean             IsKind(const Handle(Standard_Type)&) const;
 
 protected:
 
index 1745ba8c43866467474d512532af83dd28e384e0..59d5ba2a045db23c00fa2d0824b52f91f789213b 100644 (file)
@@ -44,10 +44,10 @@ Standard_EXPORT Handle_Standard_Type& SALOME_Filter_Type_()
 
   static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
   static Handle_Standard_Type _aType = new Standard_Type("SALOME_Filter",
-                                                        sizeof(SALOME_Filter),
-                                                        1,
-                                                        (Standard_Address)_Ancestors,
-                                                        (Standard_Address)NULL);
+                                                         sizeof(SALOME_Filter),
+                                                         1,
+                                                         (Standard_Address)_Ancestors,
+                                                         (Standard_Address)NULL);
 
   return _aType;
 }
index a888e1b73f550dd84436fea1a0f6b5ac2e58d750..ed938b85300e39cab0a96163d05fd01870974b5e 100755 (executable)
@@ -73,8 +73,8 @@ public:
  // 
 Standard_EXPORT   SALOME_InteractiveObject();
 Standard_EXPORT   SALOME_InteractiveObject(const char* anEntry, 
-                                          const char* aComponentDataType,
-                                          const char* aName = "");
+                                           const char* aComponentDataType,
+                                           const char* aName = "");
 Standard_EXPORT   void setEntry(const char* anEntry) ;
 Standard_EXPORT   const char* getEntry() ;
 Standard_EXPORT   void setName(const char* aName) ;
@@ -105,7 +105,7 @@ friend Standard_Boolean IsEqual(const Handle(SALOME_InteractiveObject)& anIO1,
  //
  Standard_EXPORT friend Handle_Standard_Type& SALOME_InteractiveObject_Type_();
  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean             IsKind(const Handle(Standard_Type)&) const;
+ Standard_EXPORT Standard_Boolean              IsKind(const Handle(Standard_Type)&) const;
 
 protected:
 
index 31b640c7d62221283006836e6e14cb640c4d2bee..b7f7e93e7ed97b03ba59b4d0d3908c05bafe078e 100755 (executable)
@@ -44,10 +44,10 @@ Standard_EXPORT Handle_Standard_Type& SALOME_InteractiveObject_Type_()
 
   static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
   static Handle_Standard_Type _aType = new Standard_Type("SALOME_InteractiveObject",
-                                                        sizeof(SALOME_InteractiveObject),
-                                                        1,
-                                                        (Standard_Address)_Ancestors,
-                                                        (Standard_Address)NULL);
+                                                         sizeof(SALOME_InteractiveObject),
+                                                         1,
+                                                         (Standard_Address)_Ancestors,
+                                                         (Standard_Address)NULL);
 
   return _aType;
 }
index e3579c28ead25a07994731bfec9f050a958da878..7c1fb354291f176776089190b3d8eb9d33b1900c 100644 (file)
@@ -79,7 +79,7 @@ Standard_EXPORT ~SALOME_ListNodeOfListIO();
  //
  Standard_EXPORT friend Handle_Standard_Type& SALOME_ListNodeOfListIO_Type_();
  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean             IsKind(const Handle(Standard_Type)&) const;
+ Standard_EXPORT Standard_Boolean              IsKind(const Handle(Standard_Type)&) const;
 
 protected:
 
index f69e501e7efcf5a5fd26fa4e7531c5ec82d661fa..fa60f0edc95f1ae74b9d72f2b1df303eafdf88fa 100644 (file)
@@ -62,10 +62,10 @@ Standard_EXPORT Handle_Standard_Type& SALOME_ListNodeOfListIO_Type_()
 
   static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
   static Handle_Standard_Type _aType = new Standard_Type("SALOME_ListNodeOfListIO",
-                                                        sizeof(SALOME_ListNodeOfListIO),
-                                                        1,
-                                                        (Standard_Address)_Ancestors,
-                                                        (Standard_Address)NULL);
+                                                         sizeof(SALOME_ListNodeOfListIO),
+                                                         1,
+                                                         (Standard_Address)_Ancestors,
+                                                         (Standard_Address)NULL);
 
   return _aType;
 }
index 178618c30322a6fa49d97da86d9cba0df4d24062..b4304ce892dd800be934c5c6d2324c6bb4895d9d 100644 (file)
@@ -79,7 +79,7 @@ Standard_EXPORT ~SALOME_TypeFilter();
  //
  Standard_EXPORT friend Handle_Standard_Type& SALOME_TypeFilter_Type_();
  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean             IsKind(const Handle(Standard_Type)&) const;
+ Standard_EXPORT Standard_Boolean              IsKind(const Handle(Standard_Type)&) const;
 
 protected:
 
index 6e2350a0d7759eba4d788183e61486e2c6f59907..8cc87c16b16d740727d76375d183b2d74f6e853f 100644 (file)
@@ -46,10 +46,10 @@ Standard_EXPORT Handle_Standard_Type& SALOME_TypeFilter_Type_()
 
   static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
   static Handle_Standard_Type _aType = new Standard_Type("SALOME_TypeFilter",
-                                                        sizeof(SALOME_TypeFilter),
-                                                        1,
-                                                        (Standard_Address)_Ancestors,
-                                                        (Standard_Address)NULL);
+                                                         sizeof(SALOME_TypeFilter),
+                                                         1,
+                                                         (Standard_Address)_Ancestors,
+                                                         (Standard_Address)NULL);
 
   return _aType;
 }
index 11213fd3898dab5d2ef9af9049d13ab652c42ed8..0a7e75f9790b3fc67768761f4b080366bd6aaf2e 100644 (file)
@@ -325,7 +325,7 @@ void OCCViewer_ClippingDlg::ClickOnApply()
   qApp->processEvents();
   
   myView->setCuttingPlane( true, SpinBox_X->value() , SpinBox_Y->value() , SpinBox_Z->value(),
-                                SpinBox_Dx->value(), SpinBox_Dy->value(), SpinBox_Dz->value() );
+                                 SpinBox_Dx->value(), SpinBox_Dy->value(), SpinBox_Dz->value() );
   
   QApplication::restoreOverrideCursor(); 
   
@@ -496,7 +496,7 @@ void OCCViewer_ClippingDlg::displayPreview()
       
       intersector.Perform( gp_Lin( aCenter, aNormal), gp_Pln( aBasePnt, aNormal), Precision::Confusion() );
       if ( intersector.IsDone() && intersector.NbPoints() == 1 )
-       aBasePnt = intersector.Point( 1 );
+        aBasePnt = intersector.Point( 1 );
     }
   
   myPreviewPlane = new AIS_Plane( new Geom_Plane( aBasePnt, aNormal ) );
@@ -579,7 +579,7 @@ void OCCViewer_ClippingDlg::ReserveClippingPlane()
     {
       aView3d->InitActivePlanes();
       if ( aView3d->MoreActivePlanes() )
-       myClippingPlane = aView3d->ActivePlane();
+        myClippingPlane = aView3d->ActivePlane();
     }
 }
 
index f1980d61d2411958800b55b2ed173a48e1cc9d21..718e9a61c6ffd96c0cc5438a84829c4b7ec7f8db 100755 (executable)
@@ -43,7 +43,7 @@ OCCViewer_CreateRestoreViewDlg::OCCViewer_CreateRestoreViewDlg( QWidget* aWin, O
   myKeyFlag = 0;
 
   int aQuantityOfItems = myParametersMap.count();
-       
+        
   setFixedSize( 400, 300 );
 
   QGridLayout* aGrid = new QGridLayout( this );
@@ -52,9 +52,9 @@ OCCViewer_CreateRestoreViewDlg::OCCViewer_CreateRestoreViewDlg( QWidget* aWin, O
 
   QWidget* aWidget1 = new QWidget( this );
   QWidget* aWidget2 = new QWidget( this );
-       
+        
   QHBoxLayout* aLayout = new QHBoxLayout( aWidget1 );
-       
+        
   myListBox = new QListWidget( aWidget1 );
   myListBox->installEventFilter( this );
 
@@ -62,7 +62,7 @@ OCCViewer_CreateRestoreViewDlg::OCCViewer_CreateRestoreViewDlg( QWidget* aWin, O
   myCurViewPort->getView()->SetBackgroundColor( Quantity_NOC_BLACK );
 
   myListBox->setEditTriggers( QAbstractItemView::DoubleClicked );
-       
+        
   if ( aQuantityOfItems )
   {
     myListBox->clear();
@@ -81,7 +81,7 @@ OCCViewer_CreateRestoreViewDlg::OCCViewer_CreateRestoreViewDlg( QWidget* aWin, O
 
   connect( myListBox, SIGNAL( itemClicked( QListWidgetItem* ) ), this, SLOT( changeImage( QListWidgetItem* ) ) );
   connect( myListBox, SIGNAL( itemChanged( QListWidgetItem* ) ), this, SLOT( editItemText( QListWidgetItem* ) ) );
-       
+        
   aLayout->addWidget( myListBox );
   aLayout->addWidget( myCurViewPort, 30 );
 
@@ -90,8 +90,8 @@ OCCViewer_CreateRestoreViewDlg::OCCViewer_CreateRestoreViewDlg( QWidget* aWin, O
   aButtonLayout->setSpacing( 5 );
 
   QPushButton* theOk     = new QPushButton( tr( "Ok" ), aWidget2 );            theOk->setAutoDefault( false );
-  QPushButton* theCancel = new QPushButton( tr( "Cancel" ), aWidget2 );                 theCancel->setAutoDefault( false );
-  QPushButton* theDelete = new QPushButton( tr( "Delete" ), aWidget2 );                 theDelete->setAutoDefault( false );
+  QPushButton* theCancel = new QPushButton( tr( "Cancel" ), aWidget2 );          theCancel->setAutoDefault( false );
+  QPushButton* theDelete = new QPushButton( tr( "Delete" ), aWidget2 );          theDelete->setAutoDefault( false );
   QPushButton* theClearAll = new QPushButton( tr( "Clear List" ), aWidget2 );  theClearAll->setAutoDefault( false );
 
   aButtonLayout->addWidget( theOk );
@@ -101,7 +101,7 @@ OCCViewer_CreateRestoreViewDlg::OCCViewer_CreateRestoreViewDlg( QWidget* aWin, O
 
   aGrid->addWidget( aWidget1, 0, 0 );
   aGrid->addWidget( aWidget2, 1, 0 );
-       
+        
   connect( theOk, SIGNAL( clicked() ), this, SLOT( OKpressed() ) );
   connect( theCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
   connect( theDelete, SIGNAL( clicked() ), this, SLOT( deleteSelectedItems() ) );
@@ -130,25 +130,25 @@ void OCCViewer_CreateRestoreViewDlg::changeImage( QListWidgetItem* curItem )
     {
       for( int i = 0; i < (int)myListBox->count(); i++ )
       {
-       if( myListBox->item( i )->isSelected() && i != index )
-       {
-         myListBox->clearSelection();
-         if( i > index )
-         {
-           lowLevel  = index;
-           highLevel = i;
-         }
-         else
-         {
-           lowLevel  = i;
-           highLevel = index;
-         }
-         for( int j = lowLevel; j <= highLevel; j++ )
-           myListBox->item( j )->setSelected( TRUE );
-         break;
-       }
-       if( myListBox->item( i )->isSelected() && i == index )
-         myListBox->item( i )->setSelected( TRUE );
+        if( myListBox->item( i )->isSelected() && i != index )
+        {
+          myListBox->clearSelection();
+          if( i > index )
+          {
+            lowLevel  = index;
+            highLevel = i;
+          }
+          else
+          {
+            lowLevel  = i;
+            highLevel = index;
+          }
+          for( int j = lowLevel; j <= highLevel; j++ )
+            myListBox->item( j )->setSelected( TRUE );
+          break;
+        }
+        if( myListBox->item( i )->isSelected() && i == index )
+          myListBox->item( i )->setSelected( TRUE );
       }
     }
     
@@ -186,18 +186,18 @@ void OCCViewer_CreateRestoreViewDlg::deleteSelectedItems()
     for( int i = 0; i < (int)myListBox->count(); i++ )
       if( myListBox->item( i )->isSelected() && ( myListBox->item( i )->flags() & Qt::ItemIsEditable ) )
       {
-       QListWidgetItem* anItemToDelete = myListBox->takeItem( i );
-       delete anItemToDelete;
-       for( int j = i; j < (int)myParametersMap.count(); j++ )
-         if( j != myParametersMap.count() - 1 )
-           myParametersMap[ j ] = myParametersMap[ j + 1 ];
-         else
-           myParametersMap.removeAt( j );
-       if( i != myListBox->count() )
-         curIndex = i;
-       else
-         curIndex = i - 1;
-       i--;
+        QListWidgetItem* anItemToDelete = myListBox->takeItem( i );
+        delete anItemToDelete;
+        for( int j = i; j < (int)myParametersMap.count(); j++ )
+          if( j != myParametersMap.count() - 1 )
+            myParametersMap[ j ] = myParametersMap[ j + 1 ];
+          else
+            myParametersMap.removeAt( j );
+        if( i != myListBox->count() )
+          curIndex = i;
+        else
+          curIndex = i - 1;
+        i--;
       }
     if( curIndex >= 0 )
     {
@@ -252,12 +252,12 @@ bool OCCViewer_CreateRestoreViewDlg::eventFilter( QObject* anObj, QEvent* anEv )
     if( aKeyEv->key() == Qt::Key_Control )
     {
       myKeyFlag = 1;
-      myListBox->setSelectionMode( QAbstractItemView::MultiSelection );        
+      myListBox->setSelectionMode( QAbstractItemView::MultiSelection ); 
     }
     else if( aKeyEv->key() == Qt::Key_Shift )
     {
       myKeyFlag = 2;
-      myListBox->setSelectionMode( QAbstractItemView::MultiSelection );        
+      myListBox->setSelectionMode( QAbstractItemView::MultiSelection ); 
     }
     else
       myListBox->setSelectionMode( QAbstractItemView::SingleSelection );
index 1a08d04eaaa96b1b185d922e0c3476c2413530c2..bc67b546861b8da5f2fec58ef8155ec51bae4a52 100755 (executable)
@@ -43,32 +43,32 @@ class QListWidgetItem;
 
 class OCCVIEWER_EXPORT OCCViewer_CreateRestoreViewDlg : public QDialog
 {
-       Q_OBJECT
+        Q_OBJECT
 
 public:
-       OCCViewer_CreateRestoreViewDlg( QWidget*, OCCViewer_Viewer* );
-       virtual ~OCCViewer_CreateRestoreViewDlg();
+        OCCViewer_CreateRestoreViewDlg( QWidget*, OCCViewer_Viewer* );
+        virtual ~OCCViewer_CreateRestoreViewDlg();
 
-       const viewAspectList&         parameters() const;
-       viewAspect                    currentItem() const;
-       virtual bool                  eventFilter( QObject*, QEvent* );
+        const viewAspectList&         parameters() const;
+        viewAspect                    currentItem() const;
+        virtual bool                  eventFilter( QObject*, QEvent* );
 
 public slots:
-       void                          OKpressed();
-       void                          clearList();
-       void                          editItemText( QListWidgetItem* );
-       void                          changeImage( QListWidgetItem* );
-       void                          deleteSelectedItems();
+        void                          OKpressed();
+        void                          clearList();
+        void                          editItemText( QListWidgetItem* );
+        void                          changeImage( QListWidgetItem* );
+        void                          deleteSelectedItems();
 
 signals:
-       void                          dlgOk();
+        void                          dlgOk();
 
 private:
-       int                           myKeyFlag;
-       QListWidget*                  myListBox;
-       OCCViewer_ViewPort3d*         myCurViewPort;
-       viewAspect                    myCurrentItem;
-       viewAspectList                myParametersMap;
+        int                           myKeyFlag;
+        QListWidget*                  myListBox;
+        OCCViewer_ViewPort3d*         myCurViewPort;
+        viewAspect                    myCurrentItem;
+        viewAspectList                myParametersMap;
 };
 
 #ifdef WIN32
index 8d8b6b6966bab59ef641c4093bac9df844f7dee5..4e4f95d97acbb8b39abba3c270939f12f67e6f96 100644 (file)
@@ -208,8 +208,8 @@ OCCViewer_SetRotationPointDlg
   }
   else
     myView->activateSetRotationSelected(myX->text().toDouble(), 
-                                       myY->text().toDouble(), 
-                                       myZ->text().toDouble());
+                                        myY->text().toDouble(), 
+                                        myZ->text().toDouble());
 }
 
 void
@@ -220,8 +220,8 @@ OCCViewer_SetRotationPointDlg
     mySelectPoint->toggle();
   setCoords();
   myView->activateSetRotationSelected(myX->text().toDouble(), 
-                                     myY->text().toDouble(), 
-                                     myZ->text().toDouble());
+                                      myY->text().toDouble(), 
+                                      myZ->text().toDouble());
 }
 
 void
@@ -241,12 +241,12 @@ OCCViewer_SetRotationPointDlg
   if ( !myIsBBCenter->isChecked() )
   {
     if ( mySelectPoint->isChecked()
-        &&
-        ( myX->hasFocus() || myY->hasFocus() || myZ->hasFocus() ) )
+         &&
+         ( myX->hasFocus() || myY->hasFocus() || myZ->hasFocus() ) )
       mySelectPoint->toggle();
     myView->activateSetRotationSelected(myX->text().toDouble(), 
-                                       myY->text().toDouble(), 
-                                       myZ->text().toDouble());
+                                        myY->text().toDouble(), 
+                                        myZ->text().toDouble());
   }
 }
 
index 03651d66c9ee174ad4366ead8ddc47a5b4569f7d..cc3a907aee455be4fda88cef022ab1d1e9c8a01c 100644 (file)
@@ -41,7 +41,7 @@ class OCCVIEWER_EXPORT OCCViewer_SetRotationPointDlg : public QDialog
 
 public:
   OCCViewer_SetRotationPointDlg(OCCViewer_ViewWindow* , QWidget* parent = 0, 
-                               const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
+                                const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
   ~OCCViewer_SetRotationPointDlg();
 
   void SetAction( QtxAction* theAction ) { myAction = theAction; }
index 3efef8d2ba67123aabd2ec73c7c3a8d81fc1253b..03ff55fff12a7b3d12b86d2cd618cf3aa62a5acd 100644 (file)
@@ -41,7 +41,7 @@ OCCViewer_ToolTip::OCCViewer_ToolTip( OCCViewer_ViewWindow* wnd )
   myWnd( wnd )
 {
   connect( this, SIGNAL( maybeTip( QPoint, QString&, QFont&, QRect&, QRect& ) ),
-          this, SLOT( onToolTip( QPoint, QString&, QFont&, QRect&, QRect& ) ) );
+           this, SLOT( onToolTip( QPoint, QString&, QFont&, QRect&, QRect& ) ) );
 }
 
 /*!
index e875d9af92a968f010799a27533a57cb46674426..3637ca04ed3fc951814ca61b7cf5934a49d2c009 100755 (executable)
@@ -88,8 +88,8 @@ void OCCViewer_Trihedron::bounds( Graphic3d_CBounds& aMinMax ) const
  * Redefined method. Calculates the object presentation.
  */
 void OCCViewer_Trihedron::Compute( const Handle( PrsMgr_PresentationManager3d )&,
-                                  const Handle( Prs3d_Presentation )& aPrs,
-                                  const Standard_Integer aMode )
+                                   const Handle( Prs3d_Presentation )& aPrs,
+                                   const Standard_Integer aMode )
 {
   if( aPrs.IsNull() )
     return;
@@ -102,7 +102,7 @@ void OCCViewer_Trihedron::Compute( const Handle( PrsMgr_PresentationManager3d )&
  * Redefined method. Does nothing.
  */
 void OCCViewer_Trihedron::ComputeSelection( const Handle( SelectMgr_Selection )& theSelection,
-                                           const Standard_Integer theMode )
+                                            const Standard_Integer theMode )
 {
 }
 
index 549e592e095ebca336009cc9f236c00bc628c6ce..87ea6645f0a647ccecc74d2d6a5b729295b2665f 100644 (file)
@@ -39,11 +39,11 @@ public:
   virtual ~OCCViewer_Trihedron();
 
   virtual void           Compute( const Handle(PrsMgr_PresentationManager3d)&,
-                                 const Handle(Prs3d_Presentation)&,
-                                 const Standard_Integer );
+                                  const Handle(Prs3d_Presentation)&,
+                                  const Standard_Integer );
 
   virtual void           ComputeSelection( const Handle( SelectMgr_Selection )&,
-                                          const Standard_Integer );
+                                           const Standard_Integer );
 
   virtual void           bounds( Graphic3d_CBounds& ) const;
 
index 02f104d7ed1551523e12b93bc67c9eb5ae8d9f18..af826923d8de934dafb1944495e8d07b2fb31bd5 100755 (executable)
@@ -84,9 +84,9 @@ return XServiceImageDevice;
     Create native view window for CasCade view [ static ]
 */
 Handle(Aspect_Window) OCCViewer_VService::CreateWindow( const Handle(V3d_View)& view,
-                                                       const Standard_Integer hiwin,
-                                                       const Standard_Integer lowin,
-                                                       const Xw_WindowQuality quality )
+                                                        const Standard_Integer hiwin,
+                                                        const Standard_Integer lowin,
+                                                        const Xw_WindowQuality quality )
 {
 #ifdef WNT
   Handle(WNT_Window) viewWindow = new WNT_Window( Handle(Graphic3d_WNTGraphicDevice)::DownCast(view->Viewer()->Device()), hiwin, lowin );
@@ -102,9 +102,9 @@ Handle(Aspect_Window) OCCViewer_VService::CreateWindow( const Handle(V3d_View)&
     Maps CasCade view to the window [ static ]
 */
 void OCCViewer_VService::SetWindow( const Handle(V3d_View)& view,
-                                   const Standard_Integer hiwin,
-                                   const Standard_Integer lowin,
-                                   const Xw_WindowQuality quality )
+                                    const Standard_Integer hiwin,
+                                    const Standard_Integer lowin,
+                                    const Xw_WindowQuality quality )
 {
   view->SetWindow( OCCViewer_VService::CreateWindow( view, hiwin, lowin, quality ) );
 }
@@ -113,13 +113,13 @@ void OCCViewer_VService::SetWindow( const Handle(V3d_View)& view,
     Magnifies 'view' based on previous view [ static ]
 */
 void OCCViewer_VService::SetMagnify( const Handle(V3d_View)& view,
-                                  const Standard_Integer hiwin,
-                                  const Standard_Integer lowin,
-                                  const Handle(V3d_View)& prevView,
-                                  const Standard_Integer x1,
-                                  const Standard_Integer y1,
-                                  const Standard_Integer x2,
-                                  const Standard_Integer y2,
+                                   const Standard_Integer hiwin,
+                                   const Standard_Integer lowin,
+                                   const Handle(V3d_View)& prevView,
+                                   const Standard_Integer x1,
+                                   const Standard_Integer y1,
+                                   const Standard_Integer x2,
+                                   const Standard_Integer y2,
                                const Xw_WindowQuality aQuality )
 {
 #ifdef WNT
@@ -164,11 +164,11 @@ Handle(V3d_Viewer) OCCViewer_VService::Viewer3d( const Standard_CString aDisplay
     Creates view 2D and maps it to the window [ static ]
 */
 /*Handle(V2d_View) OCCViewer_VService::View2d( const Handle(V2d_Viewer)& aViewer,
-                                                          const Standard_Integer hiwin,
-                                                          const Standard_Integer lowin,
-                                                          const Xw_WindowQuality aQuality,
-                                                          const Standard_Boolean Update,
-                                                          const Quantity_NameOfColor BackColor )
+                                                           const Standard_Integer hiwin,
+                                                           const Standard_Integer lowin,
+                                                           const Xw_WindowQuality aQuality,
+                                                           const Standard_Boolean Update,
+                                                           const Quantity_NameOfColor BackColor )
 {
 #ifdef WNT
     Handle(WNT_GraphicDevice) GD = Handle(WNT_GraphicDevice)::DownCast(aViewer->Device());
@@ -189,11 +189,11 @@ Handle(V3d_Viewer) OCCViewer_VService::Viewer3d( const Standard_CString aDisplay
     Creates view 2D and maps it to the window [ static ]
 */
 /*Handle(V2d_View) OCCViewer_VService::dpsView2d( const Handle(V2d_Viewer)& aViewer,
-                                                             const Standard_Integer hiwin,
-                                                             const Standard_Integer lowin,
-                                                             const Xw_WindowQuality aQuality,
-                                                             const Standard_Boolean Update,
-                                                             const Quantity_NameOfColor BackColor )
+                                                              const Standard_Integer hiwin,
+                                                              const Standard_Integer lowin,
+                                                              const Xw_WindowQuality aQuality,
+                                                              const Standard_Boolean Update,
+                                                              const Quantity_NameOfColor BackColor )
 {
 #ifdef WNT
     Handle(WNT_GraphicDevice) GD = Handle(WNT_GraphicDevice)::DownCast(aViewer->Device());
@@ -215,8 +215,8 @@ Handle(V3d_Viewer) OCCViewer_VService::Viewer3d( const Standard_CString aDisplay
     Creates viewer 2D [ static ]
 */
 /*Handle(V2d_Viewer) OCCViewer_VService::Viewer2d( const Standard_CString aDisplay,
-                                                          const Standard_ExtString aName,
-                                                          const Standard_CString aDomain )
+                                                           const Standard_ExtString aName,
+                                                           const Standard_CString aDomain )
 {
 #ifdef WNT
     if ( XServiceDefault2dDevice.IsNull() )
@@ -232,9 +232,9 @@ Handle(V3d_Viewer) OCCViewer_VService::Viewer3d( const Standard_CString aDisplay
     Creates viewer 2D [ static ]
 */
 /*Handle(V2d_Viewer) OCCViewer_VService::Viewer2d( const Standard_CString aDisplay,
-                                                          const Handle(Graphic2d_View)& aView,
-                                                          const Standard_ExtString aName,
-                                                          const Standard_CString aDomain )
+                                                           const Handle(Graphic2d_View)& aView,
+                                                           const Standard_ExtString aName,
+                                                           const Standard_CString aDomain )
 {
 #ifdef WNT
     if ( XServiceDefault2dDevice.IsNull() )
index 2e7b392f639895b8054b20176687a23a8508dc0d..aa2889a13129cc4e5af861f7dc89e55c475e75c7 100755 (executable)
@@ -95,9 +95,9 @@ public:
     // STATIC METHODS
     static Handle(Aspect_Window) 
                     CreateWindow( const Handle(V3d_View)& view,
-                                 const Standard_Integer hiwin,
-                                 const Standard_Integer lowin,
-                                 const Xw_WindowQuality quality );
+                                  const Standard_Integer hiwin,
+                                  const Standard_Integer lowin,
+                                  const Xw_WindowQuality quality );
 
     static void     SetWindow( const Handle(  V3d_View )& view,
                                const Standard_Integer hiwin,
index 8f8e8fabf1e8d3f5ea70004a16f920f3f31dc7b5..9e9753410bb88a12a661038bc3b66548ffb1bbb9 100755 (executable)
@@ -180,7 +180,7 @@ void OCCViewer_Viewer::setViewManager(SUIT_ViewManager* theViewManager)
   SUIT_ViewModel::setViewManager(theViewManager);
   if (theViewManager) {
     connect(theViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)), 
-           this, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));
+            this, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));
 
     connect(theViewManager, SIGNAL(mouseMove(SUIT_ViewWindow*, QMouseEvent*)), 
             this, SLOT(onMouseMove(SUIT_ViewWindow*, QMouseEvent*)));
@@ -415,7 +415,7 @@ void OCCViewer_Viewer::onClearViewAspects()
 */
 void OCCViewer_Viewer::clearViewAspects()
 {
-       myViewAspects.clear();
+        myViewAspects.clear();
 }
 
 /*!
@@ -423,7 +423,7 @@ void OCCViewer_Viewer::clearViewAspects()
 */
 const viewAspectList& OCCViewer_Viewer::getViewAspects()
 {
-       return myViewAspects;
+        return myViewAspects;
 }
 
 /*!
@@ -432,7 +432,7 @@ const viewAspectList& OCCViewer_Viewer::getViewAspects()
 */
 void OCCViewer_Viewer::appendViewAspect( const viewAspect& aParams )
 {
-       myViewAspects.append( aParams );
+        myViewAspects.append( aParams );
 }
 
 /*!
@@ -441,7 +441,7 @@ void OCCViewer_Viewer::appendViewAspect( const viewAspect& aParams )
 */
 void OCCViewer_Viewer::updateViewAspects( const viewAspectList& aViewList )
 {
-       myViewAspects = aViewList;
+        myViewAspects = aViewList;
 }
 
 /*!
index dbddfa2391307b6d3fc63e97dfa5f5b83bd066fb..9bf960ef9002fea9010945788b409f49029bfbf8 100755 (executable)
@@ -44,25 +44,25 @@ class AIS_ListOfInteractive;
 struct viewAspect
 {
 public:
-       double    scale;
-       double  centerX;
-       double  centerY;
-       double    projX;
-       double    projY;
-       double    projZ;
-       double    twist;
-       double      atX;
-       double      atY;
-       double      atZ;
-       double     eyeX;
-       double     eyeY;
-       double     eyeZ;
+        double    scale;
+        double  centerX;
+        double  centerY;
+        double    projX;
+        double    projY;
+        double    projZ;
+        double    twist;
+        double      atX;
+        double      atY;
+        double      atZ;
+        double     eyeX;
+        double     eyeY;
+        double     eyeZ;
         double   scaleX;
         double   scaleY;
         double   scaleZ;
-       QString    name;
-       bool     isVisible;
-       double   size;
+        QString    name;
+        bool     isVisible;
+        double   size;
 };
 
 typedef QList<viewAspect> viewAspectList;
@@ -135,7 +135,7 @@ public:
 
   /* Selection management */
   bool    highlight( const Handle(AIS_InteractiveObject)&, bool, bool=true );
-  bool   unHighlightAll( bool=true ); 
+  bool    unHighlightAll( bool=true ); 
   bool    isInViewer( const Handle(AIS_InteractiveObject)&, bool=false );
   bool    isVisible( const Handle(AIS_InteractiveObject)& );
 
index bd625113747d639daf9a55bf09c75e936d2d334d..f7b7f77a6e58d322cc13af068346468301c64c24 100755 (executable)
 
 struct CMapEntry
 {
-       CMapEntry();
-       ~CMapEntry();
-       Colormap          cmap;
-       bool              alloc;
-       XStandardColormap scmap;
+        CMapEntry();
+        ~CMapEntry();
+        Colormap          cmap;
+        bool              alloc;
+        XStandardColormap scmap;
 };
 
 /*!
@@ -64,9 +64,9 @@ struct CMapEntry
 */
 CMapEntry::CMapEntry()
 {
-       cmap = 0;
-       alloc = false;
-       scmap.colormap = 0;
+        cmap = 0;
+        alloc = false;
+        scmap.colormap = 0;
 }
 
 /*!
@@ -74,8 +74,8 @@ CMapEntry::CMapEntry()
 */
 CMapEntry::~CMapEntry()
 {
-       if ( alloc )
-         XFreeColormap( QX11Info::display(), cmap );
+        if ( alloc )
+          XFreeColormap( QX11Info::display(), cmap );
 }
 
 static QMultiHash<int,CMapEntry> *cmap_dict = 0;
@@ -83,13 +83,13 @@ static bool mesa_gl = false;
 
 static void cleanup_cmaps()
 {
-       if ( !cmap_dict )
-               return;
-       //while (!cmap_dict->isEmpty())
-       //  cmap_dict->erase(cmap_dict->begin());
-       cmap_dict->clear();
-       delete cmap_dict;
-       cmap_dict = 0;
+        if ( !cmap_dict )
+                return;
+        //while (!cmap_dict->isEmpty())
+        //  cmap_dict->erase(cmap_dict->begin());
+        cmap_dict->clear();
+        delete cmap_dict;
+        cmap_dict = 0;
 }
 
 static Colormap choose_cmap( Display *dpy, XVisualInfo *vi )
@@ -130,17 +130,17 @@ static Colormap choose_cmap( Display *dpy, XVisualInfo *vi )
     {
       if ( XGetRGBColormaps( dpy, RootWindow( dpy, vi->screen ), &c, &n, hp_cmaps ) )
       {
-       i = 0;
-       while ( i < n && x.cmap == 0 )
-       {
-         if ( c[i].visualid == vi->visual->visualid )
-         {
-           x.cmap = c[i].colormap;
-           x.scmap = c[i];
-         }
-         i++;
-       }
-       XFree( (char*)c );
+        i = 0;
+        while ( i < n && x.cmap == 0 )
+        {
+          if ( c[i].visualid == vi->visual->visualid )
+          {
+            x.cmap = c[i].colormap;
+            x.scmap = c[i];
+          }
+          i++;
+        }
+        XFree( (char*)c );
       }
     }
   }
@@ -151,17 +151,17 @@ static Colormap choose_cmap( Display *dpy, XVisualInfo *vi )
     {
       if ( XGetRGBColormaps( dpy, RootWindow( dpy, vi->screen ), &c, &n, XA_RGB_DEFAULT_MAP ) )
       {
-       i = 0;
-       while ( i < n && x.cmap == 0 )
-       {
-         if ( c[i].visualid == vi->visualid )
-         {
-           x.cmap = c[i].colormap;
-           x.scmap = c[i];
-         }
-         i++;
-       }
-       XFree( (char *)c );
+        i = 0;
+        while ( i < n && x.cmap == 0 )
+        {
+          if ( c[i].visualid == vi->visualid )
+          {
+            x.cmap = c[i].colormap;
+            x.scmap = c[i];
+          }
+          i++;
+        }
+        XFree( (char *)c );
       }
     }
   }
@@ -185,7 +185,7 @@ static Colormap choose_cmap( Display *dpy, XVisualInfo *vi )
 OCCViewer_ViewPort::OCCViewer_ViewPort( QWidget* parent )
 : QWidget( parent )
 {
-       initialize();
+        initialize();
 }
 
 /*!
@@ -193,7 +193,7 @@ OCCViewer_ViewPort::OCCViewer_ViewPort( QWidget* parent )
 */
 OCCViewer_ViewPort::~OCCViewer_ViewPort()
 {
-       cleanup();
+        cleanup();
 }
 
 /*!
@@ -226,33 +226,33 @@ void OCCViewer_ViewPort::cleanup()
 void OCCViewer_ViewPort::selectVisualId()
 {
 #if !defined WNT
-       XVisualInfo* pVisualInfo;
-       if ( QX11Info::display() )
-       {
-               /* Initialization with the default VisualID */
-               Visual *v = DefaultVisual( QX11Info::display(), DefaultScreen( QX11Info::display() ) );
-               int visualID = XVisualIDFromVisual( v );
+        XVisualInfo* pVisualInfo;
+        if ( QX11Info::display() )
+        {
+                /* Initialization with the default VisualID */
+                Visual *v = DefaultVisual( QX11Info::display(), DefaultScreen( QX11Info::display() ) );
+                int visualID = XVisualIDFromVisual( v );
 
-               /*  Here we use the settings from Optimizer_ViewInfo::TxglCreateWindow() */
-               int visualAttr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 1, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1,
-                                                        GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER, None };
+                /*  Here we use the settings from Optimizer_ViewInfo::TxglCreateWindow() */
+                int visualAttr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 1, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1,
+                                                         GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER, None };
 
-               pVisualInfo = ::glXChooseVisual( QX11Info::display(), DefaultScreen( QX11Info::display() ), visualAttr );
+                pVisualInfo = ::glXChooseVisual( QX11Info::display(), DefaultScreen( QX11Info::display() ), visualAttr );
 
-               if ( isVisible() )
-                 hide();
+                if ( isVisible() )
+                  hide();
 
-               XSetWindowAttributes a;
+                XSetWindowAttributes a;
 
-               a.colormap = choose_cmap( QX11Info::display(), pVisualInfo );       /* find best colormap */
-               a.background_pixel = QColormap::instance().pixel( backgroundColor() );
-               a.border_pixel = QColormap::instance().pixel( Qt::black );
-               Window p = RootWindow( QX11Info::display(), DefaultScreen( QX11Info::display() ) );
-               if ( parentWidget() )
-                 p = parentWidget()->winId();
+                a.colormap = choose_cmap( QX11Info::display(), pVisualInfo );       /* find best colormap */
+                a.background_pixel = QColormap::instance().pixel( backgroundColor() );
+                a.border_pixel = QColormap::instance().pixel( Qt::black );
+                Window p = RootWindow( QX11Info::display(), DefaultScreen( QX11Info::display() ) );
+                if ( parentWidget() )
+                  p = parentWidget()->winId();
 
-               Window w;
-       /*        if ( type == Type2D )  // creating simple X window for 2d
+                Window w;
+        /*        if ( type == Type2D )  // creating simple X window for 2d
         {
             unsigned long xbackground =
                 BlackPixel( QX11Info::display(), DefaultScreen( QX11Info::display() ) );
@@ -264,59 +264,59 @@ void OCCViewer_ViewPort::selectVisualId()
         }
         else if ( type == Type3D )
         {
-                   w = XCreateWindow( QX11Info::display(), p,  x(), y(), width(), height(),
+                    w = XCreateWindow( QX11Info::display(), p,  x(), y(), width(), height(),
                                0, pVisualInfo->depth, InputOutput, pVisualInfo->visual,
                                CWBackPixel | CWBorderPixel | CWColormap, &a );
-               }
-               else
-               return;*/
-       w = XCreateWindow( QX11Info::display(), p,  x(), y(), width(), height(),
-                          0, pVisualInfo->depth, InputOutput, pVisualInfo->visual,
-                          CWBackPixel | CWBorderPixel | CWColormap, &a );
-       
-               Window *cmw;
-               Window *cmwret;
-               int count;
-               if ( XGetWMColormapWindows( QX11Info::display(), topLevelWidget()->winId(), &cmwret, &count ) )
-               {
-                       cmw = new Window[count+1];
-                       memcpy( (char*)cmw, (char*)cmwret, sizeof(Window) * count );
-                       XFree( (char*)cmwret );
+                }
+                else
+                return;*/
+        w = XCreateWindow( QX11Info::display(), p,  x(), y(), width(), height(),
+                           0, pVisualInfo->depth, InputOutput, pVisualInfo->visual,
+                           CWBackPixel | CWBorderPixel | CWColormap, &a );
+        
+                Window *cmw;
+                Window *cmwret;
+                int count;
+                if ( XGetWMColormapWindows( QX11Info::display(), topLevelWidget()->winId(), &cmwret, &count ) )
+                {
+                        cmw = new Window[count+1];
+                        memcpy( (char*)cmw, (char*)cmwret, sizeof(Window) * count );
+                        XFree( (char*)cmwret );
             int i;
 
-                       for ( i = 0; i < count; i++ )
-                       {
-                               if ( cmw[i] == winId() ) /* replace old window */
-                               {
-                                       cmw[i] = w;
-                                       break;
-                               }
-                       }
-
-                       if ( i >= count )                        /* append new window */
-                               cmw[count++] = w;
-               }
-               else
-               {
-                       count = 1;
-                       cmw = new Window[count];
-                       cmw[0] = w;
-               }
-
-               /* Creating new window (with good VisualID) for this widget */
-               create(w);
-               XSetWMColormapWindows( QX11Info::display(), topLevelWidget()->winId(), cmw, count );
-               delete[] cmw;
-
-               if ( isVisible() )
+                        for ( i = 0; i < count; i++ )
+                        {
+                                if ( cmw[i] == winId() ) /* replace old window */
+                                {
+                                        cmw[i] = w;
+                                        break;
+                                }
+                        }
+
+                        if ( i >= count )                        /* append new window */
+                                cmw[count++] = w;
+                }
+                else
+                {
+                        count = 1;
+                        cmw = new Window[count];
+                        cmw[0] = w;
+                }
+
+                /* Creating new window (with good VisualID) for this widget */
+                create(w);
+                XSetWMColormapWindows( QX11Info::display(), topLevelWidget()->winId(), cmw, count );
+                delete[] cmw;
+
+                if ( isVisible() )
             show();
 
-               if ( pVisualInfo )
+                if ( pVisualInfo )
         {
-                       XFree( (char *)pVisualInfo );
-               }
-               XFlush( QX11Info::display() );
-       }
+                        XFree( (char *)pVisualInfo );
+                }
+                XFlush( QX11Info::display() );
+        }
 #endif
 }
 
@@ -353,7 +353,7 @@ bool OCCViewer_ViewPort::isSketchingEnabled() const
 */
 void OCCViewer_ViewPort::setSketchingEnabled( bool enable )
 {
-       myEnableSketching = enable;
+        myEnableSketching = enable;
 }
 
 /*!
@@ -370,7 +370,7 @@ bool OCCViewer_ViewPort::isTransformEnabled() const
 */
 void OCCViewer_ViewPort::setTransformEnabled( bool enable )
 {
-       myEnableTransform = enable;
+        myEnableTransform = enable;
 }
 
 /*!
@@ -426,12 +426,12 @@ void OCCViewer_ViewPort::keyReleaseEvent( QKeyEvent *e )
 */
 void OCCViewer_ViewPort::paintEvent( QPaintEvent* )
 {
-       if ( myPaintersRedrawing )
-       {
-               QPainter p( this );
-               emit vpDrawExternal( &p );
-               myPaintersRedrawing = false;
-       }
+        if ( myPaintersRedrawing )
+        {
+                QPainter p( this );
+                emit vpDrawExternal( &p );
+                myPaintersRedrawing = false;
+        }
 }
 
 /*!
@@ -439,8 +439,8 @@ void OCCViewer_ViewPort::paintEvent( QPaintEvent* )
 */
 void OCCViewer_ViewPort::redrawPainters()
 {
-       myPaintersRedrawing = true;
-       repaint();
+        myPaintersRedrawing = true;
+        repaint();
 }
 
 /*!
@@ -463,14 +463,14 @@ QPaintEngine* OCCViewer_ViewPort::paintEngine() const
 */
 /*void OCCViewer_ViewPort::onCreatePopup( QPopupMenu* popup )
 {
-       if ( popup )
-       {
-               QtxAction* a = new QtxAction( "", tr( "MEN_VP_CHANGEBGR" ), 0, this );
+        if ( popup )
+        {
+                QtxAction* a = new QtxAction( "", tr( "MEN_VP_CHANGEBGR" ), 0, this );
         a->setStatusTip( tr( "PRP_VP_CHANGEBGR" ) );
-               connect( a, SIGNAL( activated() ), SLOT( onChangeBgColor()));
-               myPopupActions.append( a );
-               a->addTo( popup );
-       }
+                connect( a, SIGNAL( activated() ), SLOT( onChangeBgColor()));
+                myPopupActions.append( a );
+                a->addTo( popup );
+        }
 }*/
 
 /*!
@@ -478,14 +478,14 @@ QPaintEngine* OCCViewer_ViewPort::paintEngine() const
 */
 /*void OCCViewer_ViewPort::onDestroyPopup( QPopupMenu* popup )
 {
-       if ( popup )
-       {
-               for ( QtxAction* a = myPopupActions.first(); a; a = myPopupActions.next() )
-                       a->removeFrom( popup );
-               //while (!myPopupActions.isEmpty())
-               //  delete myPopupActions.takeFirst();
-               myPopupActions.clear();
-       }
+        if ( popup )
+        {
+                for ( QtxAction* a = myPopupActions.first(); a; a = myPopupActions.next() )
+                        a->removeFrom( popup );
+                //while (!myPopupActions.isEmpty())
+                //  delete myPopupActions.takeFirst();
+                myPopupActions.clear();
+        }
 }*/
 
 /*!
index 74c22f68c2f4587049af4909f2cf377bde1d7922..5f038cd1128c0ead3cee47b9d1c57ab2a6527018 100755 (executable)
@@ -55,67 +55,67 @@ public:
   virtual ~OCCViewer_ViewPort();
 
 public:
-  void                          setSketchingEnabled( bool );
+  void                           setSketchingEnabled( bool );
   bool                           isSketchingEnabled() const;
-  void                          setTransformEnabled( bool );
+  void                           setTransformEnabled( bool );
   bool                           isTransformEnabled() const;
 
   virtual QColor                 backgroundColor() const;
   virtual void                   setBackgroundColor( const QColor& );
 
-  void                          redrawPainters();
+  void                           redrawPainters();
 
   virtual void                   onUpdate();
 
   virtual QPaintEngine*          paintEngine() const;
 
 protected:
-//     enum ViewType { Type2D, Type3D };
-  void                          selectVisualId();
+//      enum ViewType { Type2D, Type3D };
+  void                           selectVisualId();
 
 // EVENTS
   virtual void                   paintEvent( QPaintEvent *);
-  virtual void                  mouseMoveEvent( QMouseEvent *);
-  virtual void                  mouseReleaseEvent( QMouseEvent *);
-  virtual void                  mousePressEvent( QMouseEvent *);
-  virtual void                  mouseDoubleClickEvent( QMouseEvent *);
+  virtual void                   mouseMoveEvent( QMouseEvent *);
+  virtual void                   mouseReleaseEvent( QMouseEvent *);
+  virtual void                   mousePressEvent( QMouseEvent *);
+  virtual void                   mouseDoubleClickEvent( QMouseEvent *);
   virtual void                   keyPressEvent( QKeyEvent *);
   virtual void                   keyReleaseEvent( QKeyEvent *);
 
 // TO BE REDEFINED
-  virtual void                  reset() = 0;
-  virtual void                  pan( int, int ) = 0;
-  virtual void                  setCenter( int, int ) = 0;
-  virtual void                  fitRect( const QRect& ) = 0;
-  virtual void                  zoom( int, int, int, int ) = 0;
-  virtual void                  fitAll( bool keepScale = false, bool withZ = true, bool upd = true ) = 0;
+  virtual void                   reset() = 0;
+  virtual void                   pan( int, int ) = 0;
+  virtual void                   setCenter( int, int ) = 0;
+  virtual void                   fitRect( const QRect& ) = 0;
+  virtual void                   zoom( int, int, int, int ) = 0;
+  virtual void                   fitAll( bool keepScale = false, bool withZ = true, bool upd = true ) = 0;
 
 // POPUP
 //  void                             onCreatePopup( QPopupMenu* );
 //  void                             onDestroyPopup( QPopupMenu* );
 
 protected slots:
-  virtual void                  onChangeBgColor();
+  virtual void                   onChangeBgColor();
 
 signals:
-  void                          vpKeyEvent( QKeyEvent* );
-  void                          vpMouseEvent( QMouseEvent* );
-  void                          vpDrawExternal( QPainter* );
+  void                           vpKeyEvent( QKeyEvent* );
+  void                           vpMouseEvent( QMouseEvent* );
+  void                           vpDrawExternal( QPainter* );
   void                           vpChangeBGColor( QColor );
 
 private:
-  void                          initialize();
-  void                          cleanup();
+  void                           initialize();
+  void                           cleanup();
 
 protected:
   Handle(Aspect_Window)          myWindow;
-  bool                          myEnableSketching;
-  bool                          myEnableTransform;
-  bool                          myPaintersRedrawing; /* set to draw externally */
+  bool                           myEnableSketching;
+  bool                           myEnableTransform;
+  bool                           myPaintersRedrawing; /* set to draw externally */
   QList<QtxAction*>              myPopupActions;
 
 private:
-  static int                    nCounter; /* objects counter */
+  static int                     nCounter; /* objects counter */
 };
 
 #ifdef WIN32
index 523018d335f8978151cf08d7c3594a76b771c8f9..40876920c9151258946d609680303fa1e9a53651 100755 (executable)
@@ -187,10 +187,10 @@ bool OCCViewer_ViewPort3d::syncronize( const OCCViewer_ViewPort3d* ref )
 
   /* Syncronize view types */
   /*    if ( tgtView->Type() != refView->Type() )
-       {
-       setActive( refView->Type() );
-       tgtView = getView();
-       }*/
+        {
+        setActive( refView->Type() );
+        tgtView = getView();
+        }*/
 
   /*  The following params are copied:
       - view type( ortho/persp )
@@ -244,7 +244,7 @@ void OCCViewer_ViewPort3d::setZSize( double zsize )
   myActiveView->SetZSize( zsize );
   /*    if ( !myOrthoView.IsNull() )
         myOrthoView->SetZSize( zsize );
-       if ( !myPerspView.IsNull() )
+        if ( !myPerspView.IsNull() )
         myPerspView->SetZSize( zsize );*/
 }
 
@@ -271,7 +271,7 @@ void OCCViewer_ViewPort3d::setBackgroundColor( const QColor& color )
 {
   if ( !activeView().IsNull() ) {
     activeView()->SetBackgroundColor( Quantity_TOC_RGB, color.red()/255.,
-                                     color.green()/255., color.blue()/255.);
+                                      color.green()/255., color.blue()/255.);
     activeView()->Update();
     emit vpChangeBGColor( color );
   }
@@ -342,8 +342,8 @@ void OCCViewer_ViewPort3d::pan( int dx, int dy )
   Inits 'rotation' transformation. [ protected ]
 */
 void OCCViewer_ViewPort3d::startRotation( int x, int y, 
-                                         int theRotationPointType,
-                                         const gp_Pnt& theSelectedPoint )
+                                          int theRotationPointType,
+                                          const gp_Pnt& theSelectedPoint )
 {
   if ( !activeView().IsNull() ) {
     myDegenerated = activeView()->DegenerateModeIsOn();
@@ -367,17 +367,17 @@ void OCCViewer_ViewPort3d::startRotation( int x, int y,
       ry = Standard_Real(activeView()->Convert(Y)); 
       
       activeView()->Rotate( 0., 0., 0., 
-                           theSelectedPoint.X(),theSelectedPoint.Y(), theSelectedPoint.Z(), 
-                           Standard_True );
+                            theSelectedPoint.X(),theSelectedPoint.Y(), theSelectedPoint.Z(), 
+                            Standard_True );
       
       Quantity_Ratio zRotationThreshold;
       zRotation = Standard_False;
       zRotationThreshold = 0.45;
       if( zRotationThreshold > 0. ) {
-       Standard_Real dx = Abs(sx - rx/2.);
-       Standard_Real dy = Abs(sy - ry/2.);
-       Standard_Real dd = zRotationThreshold * (rx + ry)/2.;
-       if( dx > dd || dy > dd ) zRotation = Standard_True;
+        Standard_Real dx = Abs(sx - rx/2.);
+        Standard_Real dy = Abs(sy - ry/2.);
+        Standard_Real dd = zRotationThreshold * (rx + ry)/2.;
+        if( dx > dd || dy > dd ) zRotation = Standard_True;
       }
       break;
     default:
@@ -390,8 +390,8 @@ void OCCViewer_ViewPort3d::startRotation( int x, int y,
   Rotates the viewport. [ protected ]
 */
 void OCCViewer_ViewPort3d::rotate( int x, int y, 
-                                  int theRotationPointType,
-                                  const gp_Pnt& theSelectedPoint )
+                                   int theRotationPointType,
+                                   const gp_Pnt& theSelectedPoint )
 {
   if ( !activeView().IsNull() ) {
     switch ( theRotationPointType ) {
@@ -401,19 +401,19 @@ void OCCViewer_ViewPort3d::rotate( int x, int y,
     case OCCViewer_ViewWindow::SELECTED:
       double dx, dy, dz;
       if( zRotation ) {
-       dz = atan2(Standard_Real(x)-rx/2., ry/2.-Standard_Real(y)) - 
-         atan2(sx-rx/2.,ry/2.-sy);
-       dx = dy = 0.;
+        dz = atan2(Standard_Real(x)-rx/2., ry/2.-Standard_Real(y)) - 
+          atan2(sx-rx/2.,ry/2.-sy);
+        dx = dy = 0.;
       }
       else {
-       dx = (Standard_Real(x) - sx) * Standard_PI/rx;
-       dy = (sy - Standard_Real(y)) * Standard_PI/ry;
-       dz = 0.;
+        dx = (Standard_Real(x) - sx) * Standard_PI/rx;
+        dy = (sy - Standard_Real(y)) * Standard_PI/ry;
+        dz = 0.;
       }
       
       activeView()->Rotate( dx, dy, dz, 
-                           theSelectedPoint.X(),theSelectedPoint.Y(), theSelectedPoint.Z(),
-                           Standard_False );
+                            theSelectedPoint.X(),theSelectedPoint.Y(), theSelectedPoint.Z(),
+                            Standard_False );
       break;
     default:
       break;
index 41d2c67440d80daeb94d4c3039634d0cd7349726..7cb9fb20c44c95636079d012f5991eb807a83de9 100755 (executable)
@@ -47,13 +47,13 @@ public:
 
 public:
   Handle(V3d_View)        getView() const;
-  Handle(V3d_View)       setView( const Handle(V3d_View)& );
+  Handle(V3d_View)        setView( const Handle(V3d_View)& );
   Handle(V3d_Viewer)      getViewer() const;
 
   void setAnimationMode(bool theDegenerated);
 
-  virtual void         setBackgroundColor( const QColor& color);
-  virtual QColor       backgroundColor() const;
+  virtual void          setBackgroundColor( const QColor& color);
+  virtual QColor        backgroundColor() const;
 
 //   void         setActive( V3d_TypeOfView );
   virtual bool syncronize( const OCCViewer_ViewPort3d* );
@@ -64,21 +64,21 @@ public:
   virtual void onUpdate();
 
   // TRANSFORMATIONS
-  virtual void         reset();
-  virtual void         pan( int , int );
-  virtual void         setCenter( int , int );
-  virtual void         fitRect( const QRect& );
-  virtual void         zoom( int, int, int, int );
-  virtual void         fitAll( bool keepScale = false, bool withZ = true, bool upd = true );
-
-  void                 startRotation( int, int, int, const gp_Pnt& );
-  void                 rotate( int, int, int, const gp_Pnt& );
-  void                 endRotation();
+  virtual void          reset();
+  virtual void          pan( int , int );
+  virtual void          setCenter( int , int );
+  virtual void          fitRect( const QRect& );
+  virtual void          zoom( int, int, int, int );
+  virtual void          fitAll( bool keepScale = false, bool withZ = true, bool upd = true );
+
+  void                  startRotation( int, int, int, const gp_Pnt& );
+  void                  rotate( int, int, int, const gp_Pnt& );
+  void                  endRotation();
   bool                  isBusy() {return myBusy;} // check that View Port is fully initialized
 
 protected:
     // EVENTS
-  virtual void         paintEvent( QPaintEvent* );
+  virtual void          paintEvent( QPaintEvent* );
   virtual void          resizeEvent( QResizeEvent* );
 
   // initialization
@@ -88,17 +88,17 @@ private:
   Handle(V3d_View) activeView() const;
   Handle(V3d_View) inactiveView() const;
   bool             mapView( const Handle(V3d_View)& );
-  bool            setWindow( const Handle(V3d_View)& );
-  bool            mapped( const Handle(V3d_View)& ) const;
+  bool             setWindow( const Handle(V3d_View)& );
+  bool             mapped( const Handle(V3d_View)& ) const;
 
 private:
-  Handle(V3d_View)     myOrthoView;
-  Handle(V3d_View)     myPerspView;
-  Handle(V3d_View)     myActiveView;
-  bool                 myDegenerated;
+  Handle(V3d_View)      myOrthoView;
+  Handle(V3d_View)      myPerspView;
+  Handle(V3d_View)      myActiveView;
+  bool                  myDegenerated;
   bool                  myAnimate;
   bool                  myBusy;
-  double               myScale;
+  double                myScale;
 };
 
 #ifdef WIN32
index eec828a81dc587dab09435cb6231c293525f816b..17ca4d8a7b515cd565aaf4f7bf1199b5d1652d94 100755 (executable)
@@ -255,7 +255,7 @@ void OCCViewer_RectSketcher::onMouse( QMouseEvent* e )
     myResult = Accept;
     QApplication::postEvent( avp, new QMouseEvent( e->type(), e->pos(),
                                                    e->globalPos(), e->button(), 
-                                                  e->buttons(), e->modifiers() ) );
+                                                   e->buttons(), e->modifiers() ) );
   }
 }
 
@@ -432,7 +432,7 @@ void OCCViewer_PolygonSketcher::onMouse( QMouseEvent* e )
     myResult = Reject;
     QApplication::postEvent( avp, new QMouseEvent( e->type(), e->pos(),
                                                    e->globalPos(), e->button(), 
-                                                  e->buttons(), e->modifiers() ) );
+                                                   e->buttons(), e->modifiers() ) );
   }
   else if ( e->type() == QEvent::MouseButtonRelease && ( e->button() & myAddButton ) )
   {
@@ -540,7 +540,7 @@ bool OCCViewer_PolygonSketcher::isValid( const QPolygon* aPoints, const QPoint&
 }
 
 bool OCCViewer_PolygonSketcher::isIntersect( const QPoint& aStart1, const QPoint& anEnd1,
-                                            const QPoint& aStart2, const QPoint& anEnd2 ) const
+                                             const QPoint& aStart2, const QPoint& anEnd2 ) const
 {
   if ( ( aStart1 == aStart2 && anEnd1 == anEnd2 ) ||
        ( aStart1 == anEnd2 && anEnd1 == aStart2 ) )
index ea102e914998b28dce6bdb002b38d65d1eff1e5d..977c462b8d5b988834c34a8aa83503389ed5c0a6 100755 (executable)
@@ -198,7 +198,7 @@ const char* imageCrossCursor[] = {
   \param theModel OCC 3D viewer
 */
 OCCViewer_ViewWindow::OCCViewer_ViewWindow( SUIT_Desktop*     theDesktop,
-                                           OCCViewer_Viewer* theModel )
+                                            OCCViewer_Viewer* theModel )
 : SUIT_ViewWindow( theDesktop )
 {
   myModel = theModel;
@@ -360,65 +360,65 @@ void OCCViewer_ViewWindow::vpMousePressEvent( QMouseEvent* theEvent )
 
   case ROTATE:
     if ( theEvent->button() == Qt::LeftButton ) {
-           myViewPort->startRotation(myStartX, myStartY, myCurrPointType, mySelectedPoint);
-           emit vpTransformationStarted ( ROTATE );
-         }
+            myViewPort->startRotation(myStartX, myStartY, myCurrPointType, mySelectedPoint);
+            emit vpTransformationStarted ( ROTATE );
+          }
     break;
 
   default:
   /*  Try to activate a transformation */
     switch ( getButtonState(theEvent) ) {
     case ZOOMVIEW:
-           activateZoom();
+            activateZoom();
       break;
     case PANVIEW:
-           activatePanning();
+            activatePanning();
       break;
     case ROTATE:
-           activateRotation();
-           myViewPort->startRotation(myStartX, myStartY, myCurrPointType, mySelectedPoint);
+            activateRotation();
+            myViewPort->startRotation(myStartX, myStartY, myCurrPointType, mySelectedPoint);
       break;
     default:
       if ( myRotationPointSelection )
       {
-       if ( theEvent->button() == Qt::LeftButton )
-       {
-         Handle(AIS_InteractiveContext) ic = myModel->getAISContext();
-         ic->Select();
-         for ( ic->InitSelected(); ic->MoreSelected(); ic->NextSelected() )
-         {
-           TopoDS_Shape aShape = ic->SelectedShape();
-           if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX )
-           {
-             gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( ic->SelectedShape() ) );
-             if ( mySetRotationPointDlg )
-             {
-               myRotationPointSelection = false;
-               mySetRotationPointDlg->setCoords(aPnt.X(), aPnt.Y(), aPnt.Z());
-             }
-           }
-           else
-           {
-             myCurrPointType = myPrevPointType;
-             break;
-           }
-         }
-         if ( ic->NbSelected() == 0 ) myCurrPointType = myPrevPointType;
-         if ( mySetRotationPointDlg ) mySetRotationPointDlg->toggleChange();
-         ic->CloseAllContexts();
-         myOperation = NOTHING;
-         myViewPort->setCursor( myCursor );
-         myCursorIsHand = false;
-         myRotationPointSelection = false;
-       }
+        if ( theEvent->button() == Qt::LeftButton )
+        {
+          Handle(AIS_InteractiveContext) ic = myModel->getAISContext();
+          ic->Select();
+          for ( ic->InitSelected(); ic->MoreSelected(); ic->NextSelected() )
+          {
+            TopoDS_Shape aShape = ic->SelectedShape();
+            if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX )
+            {
+              gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( ic->SelectedShape() ) );
+              if ( mySetRotationPointDlg )
+              {
+                myRotationPointSelection = false;
+                mySetRotationPointDlg->setCoords(aPnt.X(), aPnt.Y(), aPnt.Z());
+              }
+            }
+            else
+            {
+              myCurrPointType = myPrevPointType;
+              break;
+            }
+          }
+          if ( ic->NbSelected() == 0 ) myCurrPointType = myPrevPointType;
+          if ( mySetRotationPointDlg ) mySetRotationPointDlg->toggleChange();
+          ic->CloseAllContexts();
+          myOperation = NOTHING;
+          myViewPort->setCursor( myCursor );
+          myCursorIsHand = false;
+          myRotationPointSelection = false;
+        }
       }
       else
-       emit mousePressed(this, theEvent);
+        emit mousePressed(this, theEvent);
       break;
     }
     /* notify that we start a transformation */
     if ( transformRequested() )
-           emit vpTransformationStarted ( myOperation );
+            emit vpTransformationStarted ( myOperation );
   }
   if ( transformRequested() )
     setTransformInProcess( true );
@@ -438,7 +438,7 @@ void OCCViewer_ViewWindow::vpMousePressEvent( QMouseEvent* theEvent )
 void OCCViewer_ViewWindow::activateZoom()
 {
   if ( !transformRequested() && !myCursorIsHand )
-    myCursor = cursor();               /* save old cursor */
+    myCursor = cursor();                /* save old cursor */
 
   if ( myOperation != ZOOMVIEW ) {
     QPixmap zoomPixmap (imageZoomCursor);
@@ -457,7 +457,7 @@ void OCCViewer_ViewWindow::activateZoom()
 void OCCViewer_ViewWindow::activatePanning()
 {
   if ( !transformRequested() && !myCursorIsHand )
-    myCursor = cursor();               // save old cursor
+    myCursor = cursor();                // save old cursor
 
   if ( myOperation != PANVIEW ) {
     QCursor panCursor (Qt::SizeAllCursor);
@@ -474,7 +474,7 @@ void OCCViewer_ViewWindow::activatePanning()
 void OCCViewer_ViewWindow::activateRotation()
 {
   if ( !transformRequested() && !myCursorIsHand )
-    myCursor = cursor();               // save old cursor
+    myCursor = cursor();                // save old cursor
 
   if ( myOperation != ROTATE ) {
     QPixmap rotatePixmap (imageRotateCursor);
@@ -666,7 +666,7 @@ void OCCViewer_ViewWindow::activateGlobalPanning()
     QCursor glPanCursor (globalPanPixmap);
     myCurScale = aView3d->Scale();
     aView3d->FitAll(0.01, false);
-    myCursor = cursor();               // save old cursor
+    myCursor = cursor();                // save old cursor
     myViewPort->fitAll(); // fits view before selecting a new scene center
     setTransformRequested( PANGLOBAL );
     myViewPort->setCursor( glPanCursor );
@@ -681,7 +681,7 @@ void OCCViewer_ViewWindow::activateGlobalPanning()
 void OCCViewer_ViewWindow::activateWindowFit()
 {
   if ( !transformRequested() && !myCursorIsHand )
-    myCursor = cursor();               /* save old cursor */
+    myCursor = cursor();                /* save old cursor */
 
   if ( myOperation != WINDOWFIT ) {
     QCursor handCursor (Qt::PointingHandCursor);
@@ -742,45 +742,45 @@ void OCCViewer_ViewWindow::vpMouseMoveEvent( QMouseEvent* theEvent )
       int aState = theEvent->modifiers();
       int aButton = theEvent->buttons();
       if ( aButton == Qt::LeftButton && ( aState == Qt::NoModifier || Qt::ShiftModifier ) ) {
-       myDrawRect = myEnableDrawMode;
-       if ( myDrawRect ) {
-         drawRect();
-         if ( !myCursorIsHand )        {   // we are going to sketch a rectangle
-           QCursor handCursor (Qt::PointingHandCursor);
-           myCursorIsHand = true;
-           myCursor = cursor();
-           myViewPort->setCursor( handCursor );
-         }
-       }
+        myDrawRect = myEnableDrawMode;
+        if ( myDrawRect ) {
+          drawRect();
+          if ( !myCursorIsHand )        {   // we are going to sketch a rectangle
+            QCursor handCursor (Qt::PointingHandCursor);
+            myCursorIsHand = true;
+            myCursor = cursor();
+            myViewPort->setCursor( handCursor );
+          }
+        }
       }
       else if ( aButton == Qt::RightButton && ( aState == Qt::NoModifier || Qt::ShiftModifier ) ) {
-       OCCViewer_ViewSketcher* sketcher = 0;
-       QList<OCCViewer_ViewSketcher*>::Iterator it;
-       for ( it = mySketchers.begin(); it != mySketchers.end() && !sketcher; ++it )
-       {
-         OCCViewer_ViewSketcher* sk = (*it);
-         if( sk->isDefault() && sk->sketchButton() == aButton )
-           sketcher = sk;
-       }
-       if ( sketcher && myCurSketch == -1 )
-       {
-         activateSketching( sketcher->type() );
-         if ( mypSketcher )
-         {
-           myCurSketch = mypSketcher->sketchButton();
-
-           if ( l_mbPressEvent )
-           {
-             QApplication::sendEvent( getViewPort(), l_mbPressEvent );
-             delete l_mbPressEvent;
-             l_mbPressEvent = 0;
-           }
-           QApplication::sendEvent( getViewPort(), theEvent );
-         }
-       }
+        OCCViewer_ViewSketcher* sketcher = 0;
+        QList<OCCViewer_ViewSketcher*>::Iterator it;
+        for ( it = mySketchers.begin(); it != mySketchers.end() && !sketcher; ++it )
+        {
+          OCCViewer_ViewSketcher* sk = (*it);
+          if( sk->isDefault() && sk->sketchButton() == aButton )
+            sketcher = sk;
+        }
+        if ( sketcher && myCurSketch == -1 )
+        {
+          activateSketching( sketcher->type() );
+          if ( mypSketcher )
+          {
+            myCurSketch = mypSketcher->sketchButton();
+
+            if ( l_mbPressEvent )
+            {
+              QApplication::sendEvent( getViewPort(), l_mbPressEvent );
+              delete l_mbPressEvent;
+              l_mbPressEvent = 0;
+            }
+            QApplication::sendEvent( getViewPort(), theEvent );
+          }
+        }
       }
       else
-       emit mouseMoving( this, theEvent );
+        emit mouseMoving( this, theEvent );
     }
   }
 }
@@ -797,13 +797,13 @@ void OCCViewer_ViewWindow::vpMouseReleaseEvent(QMouseEvent* theEvent)
       int prevState = myCurSketch;
       if(theEvent->button() == Qt::RightButton)
       {
-       QList<OCCViewer_ViewSketcher*>::Iterator it;
-       for ( it = mySketchers.begin(); it != mySketchers.end() && myCurSketch != -1; ++it )
-       {
-         OCCViewer_ViewSketcher* sk = (*it);
-         if( ( sk->sketchButton() & theEvent->button() ) && sk->sketchButton() == myCurSketch )
-           myCurSketch = -1;
-       }
+        QList<OCCViewer_ViewSketcher*>::Iterator it;
+        for ( it = mySketchers.begin(); it != mySketchers.end() && myCurSketch != -1; ++it )
+        {
+          OCCViewer_ViewSketcher* sk = (*it);
+          if( ( sk->sketchButton() & theEvent->button() ) && sk->sketchButton() == myCurSketch )
+            myCurSketch = -1;
+        }
       }
 
       emit mouseReleased(this, theEvent);
@@ -1353,11 +1353,11 @@ void OCCViewer_ViewWindow::onAmbientToogle()
     {
       Handle(V3d_Light) light = viewer->DefinedLight();
       if(light->Type() != V3d_AMBIENT)
-       {
-         Handle(V3d_View) aView3d = myViewPort->getView();
-         if( aView3d->IsActiveLight(light) ) viewer->SetLightOff(light);
-         else viewer->SetLightOn(light);
-       }
+        {
+          Handle(V3d_View) aView3d = myViewPort->getView();
+          if( aView3d->IsActiveLight(light) ) viewer->SetLightOff(light);
+          else viewer->SetLightOn(light);
+        }
       viewer->NextDefinedLights();
     }
   viewer->Update();
@@ -1403,7 +1403,7 @@ void OCCViewer_ViewWindow::performRestoring( const viewAspect& anItem )
   aView3d->SetAxialScale( anItem.scaleX, anItem.scaleY, anItem.scaleZ );
   myModel->setTrihedronShown( anItem.isVisible );
   myModel->setTrihedronSize( anItem.size );
-       
+        
   myRestoreFlag = 0;
 }
 
@@ -1451,8 +1451,8 @@ QImage OCCViewer_ViewWindow::dumpView()
 }
 
 bool OCCViewer_ViewWindow::dumpViewToFormat( const QImage& img, 
-                                            const QString& fileName, 
-                                            const QString& format )
+                                             const QString& fileName, 
+                                             const QString& format )
 {
   if ( format != "PS" && format != "EPS")
     return SUIT_ViewWindow::dumpViewToFormat( img, fileName, format );
@@ -1485,7 +1485,7 @@ QString OCCViewer_ViewWindow::filter() const
   \param dz Z coordinate of plane normal
 */
 void OCCViewer_ViewWindow::setCuttingPlane( bool on, const double x,  const double y,  const double z,
-                                           const double dx, const double dy, const double dz )
+                                            const double dx, const double dy, const double dz )
 {
   Handle(V3d_View) view = myViewPort->getView();
   if ( view.IsNull() )
@@ -1570,7 +1570,7 @@ viewAspect OCCViewer_ViewWindow::getViewParams() const
   params.scaleX   = aScaleX;
   params.scaleY   = aScaleY;
   params.scaleZ   = aScaleZ;
-  params.name    = aName;
+  params.name     = aName;
   params.isVisible= isShown;
   params.size     = size;
 
@@ -1587,9 +1587,9 @@ QString OCCViewer_ViewWindow::getVisualParameters()
   viewAspect params = getViewParams();
   QString retStr;
   retStr.sprintf( "%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e", params.scale,
-                 params.centerX, params.centerY, params.projX, params.projY, params.projZ, params.twist,
-                 params.atX, params.atY, params.atZ, params.eyeX, params.eyeY, params.eyeZ,
-                 params.scaleX, params.scaleY, params.scaleZ );
+                  params.centerX, params.centerY, params.projX, params.projY, params.projZ, params.twist,
+                  params.atX, params.atY, params.atZ, params.eyeX, params.eyeY, params.eyeZ,
+                  params.scaleX, params.scaleY, params.scaleZ );
   retStr += QString().sprintf("*%u*%.2f", params.isVisible, params.size );
   return retStr;
 }
@@ -1746,19 +1746,19 @@ void OCCViewer_ViewWindow::onSketchingFinished()
     {
     case Rect:
       {
-       QRect* aRect = (QRect*)mypSketcher->data();
-       if( aRect )
-       {
-         int aLeft = aRect->left();
-         int aRight = aRect->right();
-         int aTop = aRect->top();
-         int aBottom = aRect->bottom();
-
-         if( append )
-           ic->ShiftSelect( aLeft, aBottom, aRight, aTop, getViewPort()->getView(), Standard_False );
-         else
-           ic->Select( aLeft, aBottom, aRight, aTop, getViewPort()->getView(), Standard_False );
-       }
+        QRect* aRect = (QRect*)mypSketcher->data();
+        if( aRect )
+        {
+          int aLeft = aRect->left();
+          int aRight = aRect->right();
+          int aTop = aRect->top();
+          int aBottom = aRect->bottom();
+
+          if( append )
+            ic->ShiftSelect( aLeft, aBottom, aRight, aTop, getViewPort()->getView(), Standard_False );
+          else
+            ic->Select( aLeft, aBottom, aRight, aTop, getViewPort()->getView(), Standard_False );
+        }
       }
       break;
     case Polygon:
@@ -1766,21 +1766,21 @@ void OCCViewer_ViewWindow::onSketchingFinished()
         QPolygon* aPolygon = (QPolygon*)mypSketcher->data();
         if( aPolygon )
         {
-         int size = aPolygon->size();
-         TColgp_Array1OfPnt2d anArray( 1, size );
-
-         QPolygon::Iterator it = aPolygon->begin();
-         QPolygon::Iterator itEnd = aPolygon->end();
-         for( int index = 1; it != itEnd; ++it, index++ )
-         {
-           QPoint aPoint = *it;
-           anArray.SetValue( index, gp_Pnt2d( aPoint.x(), aPoint.y() ) );
-         }
-
-         if( append )
-           ic->ShiftSelect( anArray, getViewPort()->getView(), Standard_False );
-         else
-           ic->Select( anArray, getViewPort()->getView(), Standard_False );
+          int size = aPolygon->size();
+          TColgp_Array1OfPnt2d anArray( 1, size );
+
+          QPolygon::Iterator it = aPolygon->begin();
+          QPolygon::Iterator itEnd = aPolygon->end();
+          for( int index = 1; it != itEnd; ++it, index++ )
+          {
+            QPoint aPoint = *it;
+            anArray.SetValue( index, gp_Pnt2d( aPoint.x(), aPoint.y() ) );
+          }
+
+          if( append )
+            ic->ShiftSelect( anArray, getViewPort()->getView(), Standard_False );
+          else
+            ic->Select( anArray, getViewPort()->getView(), Standard_False );
         }
       }
       break;
index b4c117b713eace90e6c140997d8403f75b2331d6..b9c736756fb9a8cf6c68e026c39ec21984237b5e 100755 (executable)
@@ -47,12 +47,12 @@ class OCCVIEWER_EXPORT OCCViewer_ViewWindow : public SUIT_ViewWindow
 
 public:
   enum { DumpId, FitAllId, FitRectId, ZoomId, PanId, GlobalPanId,
-        ChangeRotationPointId, RotationId,
+         ChangeRotationPointId, RotationId,
          FrontId, BackId, TopId, BottomId, LeftId, RightId, ResetId, CloneId, ClippingId, MemId, RestoreId,
          TrihedronShowId, AxialScaleId, AmbientId };
 
   enum OperationType{ NOTHING, PANVIEW, ZOOMVIEW, ROTATE, 
-                     PANGLOBAL, WINDOWFIT, FITALLVIEW, RESETVIEW,
+                      PANGLOBAL, WINDOWFIT, FITALLVIEW, RESETVIEW,
                       FRONTVIEW, BACKVIEW, TOPVIEW, BOTTOMVIEW, LEFTVIEW, RIGHTVIEW };
 
   enum RotationPointType{ GRAVITY, SELECTED };
@@ -137,8 +137,8 @@ protected:
   void setTransformRequested ( OperationType );
 
   /* Transformation is selected and already started */
-  bool         transformInProcess() const;
-  void         setTransformInProcess( bool );
+  bool          transformInProcess() const;
+  void          setTransformInProcess( bool );
 
   void vpMousePressEvent(QMouseEvent* theEvent);
   void vpMouseReleaseEvent(QMouseEvent* theEvent);
@@ -176,20 +176,20 @@ protected:
   gp_Pnt                mySelectedPoint;
   bool                  myRotationPointSelection;
 
-  int                                  myRestoreFlag;
+  int                                   myRestoreFlag;
 
-  int                                  myStartX;
-  int                                  myStartY;
-  int                                  myCurrX;
-  int                                  myCurrY;
+  int                                   myStartX;
+  int                                   myStartY;
+  int                                   myCurrX;
+  int                                   myCurrY;
 
-  bool                 myEventStarted;       // set when transformation is in process 
-  bool                 myCursorIsHand;                 
-  bool                 myDrawRect;           // set when a rect is used for selection or magnify 
-  bool                 myEnableDrawMode;
-  bool                 myPaintersRedrawing;  // set to draw with external painters 
+  bool                  myEventStarted;       // set when transformation is in process 
+  bool                  myCursorIsHand;                 
+  bool                  myDrawRect;           // set when a rect is used for selection or magnify 
+  bool                  myEnableDrawMode;
+  bool                  myPaintersRedrawing;  // set to draw with external painters 
  
-  QCursor              myCursor;
+  QCursor               myCursor;
 
   double myCurScale;
 
index 4fd97c7c0cc23c694a4472b9e1a2edb547613383..0e8f33a6331ff018fc327f472b3d9ac3ace8cb89 100755 (executable)
@@ -91,7 +91,7 @@ OB_Browser::ToolTip::~ToolTip()
 void OB_Browser::ToolTip::maybeTip( const QPoint& pos )
 {
   if ( !parentWidget() || !myBrowser || !myBrowser->isShowToolTips() )
-         return;
+          return;
 
   QListView* lv = myBrowser->listView();
 
@@ -163,7 +163,7 @@ OB_Browser::OB_Browser( QWidget* parent, QAbstractItemModel* model )
   setModel( model );
 
   connect( myView, SIGNAL( selectionChanged() ),
-          this,   SIGNAL( selectionChanged() ) );
+           this,   SIGNAL( selectionChanged() ) );
 
 }
 
@@ -758,7 +758,7 @@ void OB_Browser::restoreState( const DataObjectMap& selObjs, const DataObjectMap
     {
       bool parentOpen = true;
       if( item && item->parent() )
-       parentOpen = item->parent()->isOpen();
+        parentOpen = item->parent()->isOpen();
 
       if ( openObjs[obj] && parentOpen )
         lv->setOpen( item, true );
@@ -767,10 +767,10 @@ void OB_Browser::restoreState( const DataObjectMap& selObjs, const DataObjectMap
     {
       bool parentOpen = true;
       if( item && item->parent() )
-       parentOpen = item->parent()->isOpen();
+        parentOpen = item->parent()->isOpen();
 
       if( parentOpen )
-       lv->setOpen( item, true );
+        lv->setOpen( item, true );
     }
 
     if ( !curItem && ( curObj == obj || ( !curKey.isNull() && curKey == key )) )
@@ -984,12 +984,12 @@ void OB_Browser::createPopupMenu( QMenu* menu )
   bool closed = false, opened = false;
   
   for ( QModelIndexList::Iterator it = indexes.begin(); 
-       it != indexes.end() && !closed; ++it ) {
+        it != indexes.end() && !closed; ++it ) {
     closed = hasCollased( *it );
   }
 
   for ( QModelIndexList::Iterator it = indexes.begin(); 
-       it != indexes.end() && !opened; ++it ) {
+        it != indexes.end() && !opened; ++it ) {
     opened = hasExpanded( *it );
   }
 
@@ -1033,8 +1033,8 @@ bool OB_Browser::hasCollased( const QModelIndex& index ) const
     if ( !result && hasChildren ) {
       int rows = model()->rowCount( index );
       for ( int i = 0; i < rows && !result; i ++ ) {
-       QModelIndex child = model()->index( i, 0, index );
-       result = hasCollased( child );
+        QModelIndex child = model()->index( i, 0, index );
+        result = hasCollased( child );
       }
     }
   }
@@ -1055,8 +1055,8 @@ bool OB_Browser::hasExpanded( const QModelIndex& index ) const
     if ( !result && hasChildren ) {
       int rows = model()->rowCount( index );
       for ( int i = 0; i < rows && !result; i ++ ) {
-       QModelIndex child = model()->index( i, 0, index );
-       result = hasExpanded( child );
+        QModelIndex child = model()->index( i, 0, index );
+        result = hasExpanded( child );
       }
     }
   }
index 2be404b088590d188a38641816cfdb009dda42a8..769a419db8b7e06e3c7845f0c828d9ecba4b04b1 100755 (executable)
@@ -156,7 +156,7 @@ Plot2d::LineType Plot2d::qwt2plotLine( Qt::PenStyle p )
   \param width line width
 */
 void Plot2d::drawLine( QPainter* painter, const QPoint& p1, const QPoint& p2, 
-                      Qt::PenStyle type, const QColor& color, int width )
+                       Qt::PenStyle type, const QColor& color, int width )
 {
   painter->save();
   QPen pen( type );
@@ -177,7 +177,7 @@ void Plot2d::drawLine( QPainter* painter, const QPoint& p1, const QPoint& p2,
   \param width line width
 */
 void Plot2d::drawLine( QPainter* painter, const QPoint& p1, const QPoint& p2, 
-                      Plot2d::LineType type, const QColor& color, int width )
+                       Plot2d::LineType type, const QColor& color, int width )
 {
   drawLine( painter, p1, p2, plot2qwtLine( type ), color, width );
 }
@@ -194,7 +194,7 @@ void Plot2d::drawLine( QPainter* painter, const QPoint& p1, const QPoint& p2,
   \param width line width
 */
 void Plot2d::drawLine( QPainter* painter, int x1, int y1, int x2, int y2,
-                      Qt::PenStyle type, const QColor& color, int width )
+                       Qt::PenStyle type, const QColor& color, int width )
 {
   drawLine( painter, QPoint( x1, y1 ), QPoint( x2, y2 ), type, color, width );
 }
@@ -211,10 +211,10 @@ void Plot2d::drawLine( QPainter* painter, int x1, int y1, int x2, int y2,
   \param width line width
 */
 void Plot2d::drawLine( QPainter* painter, int x1, int y1, int x2, int y2,
-                      Plot2d::LineType type, const QColor& color, int width )
+                       Plot2d::LineType type, const QColor& color, int width )
 {
   drawLine( painter, QPoint( x1, y1 ), QPoint( x2, y2 ), 
-           plot2qwtLine( type), color, width );
+            plot2qwtLine( type), color, width );
 }
 
 /*!
@@ -226,7 +226,7 @@ void Plot2d::drawLine( QPainter* painter, int x1, int y1, int x2, int y2,
   \param color marker color
 */
 void Plot2d::drawMarker( QPainter* painter, const QPoint& p, const QRect& r,
-                        QwtSymbol::Style type, const QColor& color )
+                         QwtSymbol::Style type, const QColor& color )
 {
   painter->save();
   painter->setPen( color );
@@ -314,7 +314,7 @@ void Plot2d::drawMarker( QPainter* painter, const QPoint& p, const QRect& r,
   \param color marker color
 */
 void Plot2d::drawMarker( QPainter* painter, const QPoint& p, const QRect& r,
-                        Plot2d::MarkerType type, const QColor& color )
+                         Plot2d::MarkerType type, const QColor& color )
 {
   drawMarker( painter, p, r, plot2qwtMarker( type ), color ); 
 }
@@ -330,7 +330,7 @@ void Plot2d::drawMarker( QPainter* painter, const QPoint& p, const QRect& r,
   \param color marker color
 */
 void Plot2d::drawMarker( QPainter* painter, int x, int y, int w, int h,
-                        QwtSymbol::Style type, const QColor& color )
+                         QwtSymbol::Style type, const QColor& color )
 {
   drawMarker( painter, QPoint( x, y ), QRect( 0, 0, w, h ), type, color ); 
 }
@@ -346,7 +346,7 @@ void Plot2d::drawMarker( QPainter* painter, int x, int y, int w, int h,
   \param color marker color
 */
 void Plot2d::drawMarker( QPainter* painter, int x, int y, int w, int h,
-                        Plot2d::MarkerType type, const QColor& color )
+                         Plot2d::MarkerType type, const QColor& color )
 {
   drawMarker( painter, QPoint( x, y ), QRect( 0, 0, w, h ), plot2qwtMarker( type ), color ); 
 }
index 9da6d8434c5e41a6464baa581f4d56b752a8b9c7..1800ee2eb273c3c4fe5df9924ed58467aebac624 100755 (executable)
@@ -43,15 +43,15 @@ class QPainter;
 namespace Plot2d
 {
   typedef enum { None, 
-                Circle,  
-                Rectangle,
-                Diamond,
-                DTriangle,
-                UTriangle,
-                LTriangle,
-                RTriangle,
-                Cross,
-                XCross
+                 Circle,  
+                 Rectangle,
+                 Diamond,
+                 DTriangle,
+                 UTriangle,
+                 LTriangle,
+                 RTriangle,
+                 Cross,
+                 XCross
   } MarkerType;
 
   typedef enum {
@@ -70,30 +70,30 @@ namespace Plot2d
   LineType                 qwt2plotLine( Qt::PenStyle );
 
   void                     drawLine( QPainter*, const QPoint&, const QPoint&, 
-                                    Qt::PenStyle = Qt::SolidLine, 
-                                    const QColor& = Qt::black, int = 0 );
+                                     Qt::PenStyle = Qt::SolidLine, 
+                                     const QColor& = Qt::black, int = 0 );
   void                     drawLine( QPainter*, const QPoint&, const QPoint&, 
-                                    LineType = Solid, 
-                                    const QColor& = Qt::black, int = 0 );
+                                     LineType = Solid, 
+                                     const QColor& = Qt::black, int = 0 );
   void                     drawLine( QPainter*, int, int, int, int,
-                                    Qt::PenStyle = Qt::SolidLine, 
-                                    const QColor& = Qt::black, int = 0 );
+                                     Qt::PenStyle = Qt::SolidLine, 
+                                     const QColor& = Qt::black, int = 0 );
   void                     drawLine( QPainter*, int, int, int, int,
-                                    LineType = Solid, 
-                                    const QColor& = Qt::black, int = 0 );
+                                     LineType = Solid, 
+                                     const QColor& = Qt::black, int = 0 );
 
   void                     drawMarker( QPainter*, const QPoint&, const QRect&,
-                                      QwtSymbol::Style = QwtSymbol::Ellipse,
-                                      const QColor& = Qt::black );
+                                       QwtSymbol::Style = QwtSymbol::Ellipse,
+                                       const QColor& = Qt::black );
   void                     drawMarker( QPainter*, const QPoint&, const QRect&,
-                                      MarkerType = Circle,
-                                      const QColor& = Qt::black );
+                                       MarkerType = Circle,
+                                       const QColor& = Qt::black );
   void                     drawMarker( QPainter*, int, int, int, int,
-                                      QwtSymbol::Style = QwtSymbol::Ellipse,
-                                      const QColor& = Qt::black );
+                                       QwtSymbol::Style = QwtSymbol::Ellipse,
+                                       const QColor& = Qt::black );
   void                     drawMarker( QPainter*, int, int, int, int,
-                                      MarkerType = Circle,
-                                      const QColor& = Qt::black );
+                                       MarkerType = Circle,
+                                       const QColor& = Qt::black );
 }
 
 #if defined WIN32
index a8e4f98bf0c149f3fe3831e9e089bf1ea2bd7015..c8a4015021a3e821552c9cf354761b1fa0cd2145 100755 (executable)
@@ -68,7 +68,7 @@ public:
   pointList          getPointList() const;
 
   void               setData( const double*, const double*, 
-                             long, const QStringList& = QStringList() );
+                              long, const QStringList& = QStringList() );
   double*            horData() const;
   double*            verData() const;
 
index fd8f700532157b8f712807356f021d95ac762a63..384f5c259da0e5e99f7a393eeb4436cd86c52d2b 100644 (file)
@@ -255,7 +255,7 @@ QPixmap Plot2d_SetupCurveDlg::lineIcon( Plot2d::LineType type ) const
   px.fill( QColor( 255, 255, 255, 0 ) );
   QPainter p( &px );
   Plot2d::drawLine( &p, 5, sz.height()/2, sz.width()-5, sz.height()/2, type,
-                   myLineCombo->palette().color( QPalette::Text ), 1 );
+                    myLineCombo->palette().color( QPalette::Text ), 1 );
   return px;
 }
 
@@ -271,7 +271,7 @@ QPixmap Plot2d_SetupCurveDlg::markerIcon( Plot2d::MarkerType type ) const
   px.fill( QColor( 255, 255, 255, 0 ) );
   QPainter p( &px );
   Plot2d::drawMarker( &p, sz.width()/2, sz.height()/2, MSIZE, MSIZE, type,
-                     myMarkerCombo->palette().color( QPalette::Text ) );
+                      myMarkerCombo->palette().color( QPalette::Text ) );
   return px;
 }
 
@@ -287,11 +287,11 @@ void Plot2d_SetupCurveDlg::updatePreview()
   QPainter p( &px );
 
   Plot2d::drawLine( &p, 5+MSIZE/2, sz.height()/2, sz.width()-5-MSIZE/2, sz.height()/2,
-                   getLine(), getColor(), getLineWidth() );
+                    getLine(), getColor(), getLineWidth() );
   Plot2d::drawMarker( &p, 5+MSIZE/2, sz.height()/2, MSIZE, MSIZE,
-                     getMarker(), getColor() );
+                      getMarker(), getColor() );
   Plot2d::drawMarker( &p, sz.width()-5-MSIZE/2, sz.height()/2, MSIZE, MSIZE,
-                     getMarker(), getColor() );
+                      getMarker(), getColor() );
 
   myPreview->setPixmap( px );
 }
index 211a2faea272afd4631045b7d45a4182a57a7f82..7551bd56173ce44d57f485cc4522e44b5dccbd28 100755 (executable)
@@ -57,8 +57,8 @@ const int MIN_SPIN_WIDTH  = 70;
   \param secondAxisY if \c true, show widgets for the second (right) vertical axis
 */
 Plot2d_SetupViewDlg::Plot2d_SetupViewDlg( QWidget* parent, 
-                                         bool showDefCheck, 
-                                         bool secondAxisY )
+                                          bool showDefCheck, 
+                                          bool secondAxisY )
 : QDialog( parent ), 
   mySecondAxisY( secondAxisY )
 {
index ba44643f7dae1edafb1e1767081c05f6199f4966..99b52c73ced070cd2d05e2cf72e6df6aa8a688e7 100644 (file)
@@ -42,7 +42,7 @@ Plot2d_ToolTip::Plot2d_ToolTip( Plot2d_ViewFrame* frame, Plot2d_Plot2d* plot )
   myPlot( plot )
 {
   connect( this, SIGNAL( maybeTip( QPoint, QString&, QFont&, QRect&, QRect& ) ),
-          this, SLOT( onToolTip( QPoint, QString&, QFont&, QRect&, QRect& ) ) );
+           this, SLOT( onToolTip( QPoint, QString&, QFont&, QRect&, QRect& ) ) );
 }
 
 Plot2d_ToolTip::~Plot2d_ToolTip()
index a870b9f9d0ab7099e5646087a6904a4beddfe49d..d5958c31e39606bc0d6f83d4c28c3316f2657736 100755 (executable)
@@ -178,13 +178,13 @@ Plot2d_ViewFrame::Plot2d_ViewFrame( QWidget* parent, const QString& title )
 
   //  createActions();
   connect( myPlot, SIGNAL( legendClicked( QwtPlotItem* ) ), 
-          this, SIGNAL( legendClicked( QwtPlotItem* ) ) );
+           this, SIGNAL( legendClicked( QwtPlotItem* ) ) );
 
   // IPAL 21465
   /*  connect( myPlot->axisWidget( QwtPlot::xBottom ), SIGNAL( scaleDivChanged() ),
-          myPlot, SLOT( onScaleDivChanged() ) );
+           myPlot, SLOT( onScaleDivChanged() ) );
   connect( myPlot->axisWidget( QwtPlot::yLeft ), SIGNAL( scaleDivChanged() ),
-          myPlot, SLOT( onScaleDivChanged() ) );
+           myPlot, SLOT( onScaleDivChanged() ) );
   if (mySecondY)
     connect( myPlot->axisWidget( QwtPlot::yRight ), SIGNAL( scaleDivChanged() ),
     myPlot, SLOT( onScaleDivChanged() ) );*/
@@ -315,7 +315,7 @@ bool Plot2d_ViewFrame::eventFilter( QObject* watched, QEvent* e )
           if ( plotMouseMoved( m ) )
             return true;
         }
-       break;
+        break;
       }
       case QEvent::MouseButtonPress: {
         QMouseEvent* me = (QMouseEvent*)e;
@@ -787,9 +787,9 @@ void Plot2d_ViewFrame::fitArea( const QRect& area )
   "Fit Data" command for TUI interface
 */
 void Plot2d_ViewFrame::fitData(const int mode,
-                              const double xMin, const double xMax,
-                              const double yMin, const double yMax,
-                              double y2Min, double y2Max)
+                               const double xMin, const double xMax,
+                               const double yMin, const double yMax,
+                               double y2Min, double y2Max)
 {
   if ( mode == 0 || mode == 2 ) {
     myPlot->setAxisScale( QwtPlot::yLeft, yMin, yMax );
@@ -805,8 +805,8 @@ void Plot2d_ViewFrame::fitData(const int mode,
   Gets current fit ranges for view frame
 */
 void Plot2d_ViewFrame::getFitRanges(double& xMin,double& xMax,
-                                   double& yMin, double& yMax,
-                                   double& y2Min, double& y2Max)
+                                    double& yMin, double& yMax,
+                                    double& y2Min, double& y2Max)
 {
   int ixMin = myPlot->canvasMap( QwtPlot::xBottom ).transform( myPlot->canvasMap( QwtPlot::xBottom ).s1() );
   int ixMax = myPlot->canvasMap( QwtPlot::xBottom ).transform( myPlot->canvasMap( QwtPlot::xBottom ).s2() );
@@ -830,8 +830,8 @@ void Plot2d_ViewFrame::getFitRanges(double& xMin,double& xMax,
   Gets current fit ranges by Curves
 */
 void Plot2d_ViewFrame::getFitRangeByCurves(double& xMin,double& xMax,
-                                          double& yMin, double& yMax,
-                                          double& y2Min, double& y2Max)
+                                           double& yMin, double& yMax,
+                                           double& y2Min, double& y2Max)
 {
   CurveDict cdict = getCurves();
   if ( !cdict.isEmpty() ) {
@@ -1031,7 +1031,7 @@ void Plot2d_ViewFrame::onFitData()
 */
 void Plot2d_ViewFrame::onChangeBackground()
 {
-  QColor selColor = QColorDialog::getColor ( backgroundColor(), this );        
+  QColor selColor = QColorDialog::getColor ( backgroundColor(), this ); 
   if ( selColor.isValid() ) {
     setBackgroundColor( selColor );
   }
@@ -1910,7 +1910,7 @@ void Plot2d_Plot2d::onScaleDivChanged()
       QwtScaleDraw* aQwtSD = axisScaleDraw(axisId);
       Plot2d_ScaleDraw* aPlot2dSD = dynamic_cast<Plot2d_ScaleDraw*>(aQwtSD);
       if ( !aPlot2dSD && aPrecision > 6 || aPlot2dSD && aPlot2dSD->precision() != aPrecision )
-       setAxisScaleDraw( axisId, new Plot2d_ScaleDraw(*aQwtSD, 'f', aPrecision) );
+        setAxisScaleDraw( axisId, new Plot2d_ScaleDraw(*aQwtSD, 'f', aPrecision) );
     }
   }
 }
@@ -2076,7 +2076,7 @@ QString Plot2d_ViewFrame::getVisualParameters()
   getFitRanges( xmin, xmax, ymin, ymax, y2min, y2max );
   QString retStr;
   retStr.sprintf( "%d*%d*%d*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e", myXMode,
-                 myYMode, mySecondY, xmin, xmax, ymin, ymax, y2min, y2max );
+                  myYMode, mySecondY, xmin, xmax, ymin, ymax, y2min, y2max );
   return retStr; 
 }
 
@@ -2121,16 +2121,16 @@ void Plot2d_ViewFrame::incrementalPan( const int incrX, const int incrY ) {
   QwtScaleMap yMap = myPlot->canvasMap( QwtPlot::yLeft );
   
   myPlot->setAxisScale( QwtPlot::yLeft, 
-                       myPlot->invTransform( QwtPlot::yLeft, yMap.transform( yMap.s1() )-incrY ), 
-                       myPlot->invTransform( QwtPlot::yLeft, yMap.transform( yMap.s2() )-incrY ) );
+                        myPlot->invTransform( QwtPlot::yLeft, yMap.transform( yMap.s1() )-incrY ), 
+                        myPlot->invTransform( QwtPlot::yLeft, yMap.transform( yMap.s2() )-incrY ) );
   myPlot->setAxisScale( QwtPlot::xBottom, 
-                       myPlot->invTransform( QwtPlot::xBottom, xMap.transform( xMap.s1() )-incrX ),
-                       myPlot->invTransform( QwtPlot::xBottom, xMap.transform( xMap.s2() )-incrX ) ); 
+                        myPlot->invTransform( QwtPlot::xBottom, xMap.transform( xMap.s1() )-incrX ),
+                        myPlot->invTransform( QwtPlot::xBottom, xMap.transform( xMap.s2() )-incrX ) ); 
   if (mySecondY) {
     QwtScaleMap y2Map = myPlot->canvasMap( QwtPlot::yRight );
     myPlot->setAxisScale( QwtPlot::yRight,
-                         myPlot->invTransform( QwtPlot::yRight, y2Map.transform( y2Map.s1() )-incrY ), 
-                         myPlot->invTransform( QwtPlot::yRight, y2Map.transform( y2Map.s2() )-incrY ) );
+                          myPlot->invTransform( QwtPlot::yRight, y2Map.transform( y2Map.s1() )-incrY ), 
+                          myPlot->invTransform( QwtPlot::yRight, y2Map.transform( y2Map.s2() )-incrY ) );
   }
   myPlot->replot();
 }
@@ -2143,13 +2143,13 @@ void Plot2d_ViewFrame::incrementalZoom( const int incrX, const int incrY ) {
   QwtScaleMap yMap = myPlot->canvasMap( QwtPlot::yLeft );
   
   myPlot->setAxisScale( QwtPlot::yLeft, yMap.s1(), 
-                       myPlot->invTransform( QwtPlot::yLeft, yMap.transform( yMap.s2() ) + incrY ) );
+                        myPlot->invTransform( QwtPlot::yLeft, yMap.transform( yMap.s2() ) + incrY ) );
   myPlot->setAxisScale( QwtPlot::xBottom, xMap.s1(), 
-                       myPlot->invTransform( QwtPlot::xBottom, xMap.transform( xMap.s2() ) - incrX ) );
+                        myPlot->invTransform( QwtPlot::xBottom, xMap.transform( xMap.s2() ) - incrX ) );
   if (mySecondY) {
     QwtScaleMap y2Map = myPlot->canvasMap( QwtPlot::yRight );
     myPlot->setAxisScale( QwtPlot::yRight, y2Map.s1(),
-                         myPlot->invTransform( QwtPlot::yRight, y2Map.transform( y2Map.s2() ) + incrY ) );
+                          myPlot->invTransform( QwtPlot::yRight, y2Map.transform( y2Map.s2() ) + incrY ) );
   }
   myPlot->replot();
 }
index 3308b6682b48bb65d643754af126a5f578cb3dac..16aca311a0442d25d98ce319273d1b4305442445 100755 (executable)
@@ -82,17 +82,17 @@ public:
   void    fitAll();
   void    fitArea( const QRect& area );
   void    fitData(const int mode,
-                 const double xMin, const double xMax,
-                 const double yMin, const double yMax,
-                 const double y2Min = 0, const double y2Max = 0);
+                  const double xMin, const double xMax,
+                  const double yMin, const double yMax,
+                  const double y2Min = 0, const double y2Max = 0);
 
   void    getFitRanges(double& xMin, double& xMax,
-                      double& yMin, double& yMax,
-                      double& y2Min, double& y2Max);
+                       double& yMin, double& yMax,
+                       double& y2Min, double& y2Max);
 
   void    getFitRangeByCurves(double& xMin, double& xMax,
-                             double& yMin, double& yMax,
-                             double& y2Min, double& y2Max);
+                              double& yMin, double& yMax,
+                              double& y2Min, double& y2Max);
 
   /* view parameters */
   void    copyPreferences( Plot2d_ViewFrame* );
index 25280c5c94201bb4f1345d37cc334f412e29e7ce..374b777d607d60a5efb1637370fc3879da8d7799 100755 (executable)
@@ -63,7 +63,7 @@ bool Plot2d_ViewManager::insertView( SUIT_ViewWindow* theView )
     Plot2d_ViewFrame* aViewFrame = view->getViewFrame();
     Plot2d_Viewer* aViewer = getPlot2dModel();
     connect( aViewFrame, SIGNAL( legendClicked( QwtPlotItem* ) ), 
-            aViewer, SLOT( onLegendClicked( QwtPlotItem* ) ) );
+             aViewer, SLOT( onLegendClicked( QwtPlotItem* ) ) );
   }
   return res;
 }
index 0786c6fa484822f1ab5f004ad66497e0bf8d9257..ccbf57cd5e1049fa3a34a31524d5e7c6771085f7 100755 (executable)
@@ -229,6 +229,6 @@ void Plot2d_Viewer::setViewManager( SUIT_ViewManager* mgr )
   {
     Plot2d_ViewManager* pmgr = ( Plot2d_ViewManager* )mgr;
     connect( pmgr, SIGNAL( cloneView( Plot2d_ViewFrame*, Plot2d_ViewFrame* ) ),
-            this, SLOT( onCloneView( Plot2d_ViewFrame*, Plot2d_ViewFrame* ) ) );
+             this, SLOT( onCloneView( Plot2d_ViewFrame*, Plot2d_ViewFrame* ) ) );
   }
 }
index 4f3dda2ca8365800bb0b6df37e41c112a02b5562..33cc3fa4651cc2d6adf8966178299216871c6855 100755 (executable)
@@ -69,7 +69,7 @@ Plot2d_ViewWindow::Plot2d_ViewWindow( SUIT_Desktop* theDesktop, Plot2d_Viewer* t
   connect( myViewFrame, SIGNAL( vpModeVerChanged() ), this, SLOT( onChangeVerMode() ) );
   connect( myViewFrame, SIGNAL( vpCurveChanged() ),   this, SLOT( onChangeCurveMode() ) );
   connect( myViewFrame, SIGNAL( contextMenuRequested( QContextMenuEvent* ) ),
-          this,        SIGNAL( contextMenuRequested( QContextMenuEvent* ) ) );
+           this,        SIGNAL( contextMenuRequested( QContextMenuEvent* ) ) );
 
   myViewFrame->installEventFilter( this );
 }
@@ -186,9 +186,9 @@ void Plot2d_ViewWindow::createActions()
 
   // 1. Dump View
   aAction = new QtxAction( tr( "MNU_DUMP_VIEW" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_DUMP" ) ),
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_DUMP" ) ),
                            tr( "MNU_DUMP_VIEW" ),
-                          0, this);
+                           0, this);
   aAction->setStatusTip( tr( "DSC_DUMP_VIEW" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onDumpView() ) );
   mgr->registerAction( aAction, DumpId );
@@ -197,27 +197,27 @@ void Plot2d_ViewWindow::createActions()
 
   // 2.1. Fit All
   aAction = new QtxAction( tr( "MNU_FITALL" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_FIT_ALL" ) ),
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_FIT_ALL" ) ),
                            tr( "MNU_FITALL" ),
-                          0, this);
+                           0, this);
   aAction->setStatusTip( tr( "DSC_FITALL" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onFitAll() ) );
   mgr->registerAction( aAction, FitAllId );
 
   // 2.2. Fit Rect
   aAction = new QtxAction( tr( "MNU_FITRECT" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_FIT_AREA" ) ),
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_FIT_AREA" ) ),
                            tr( "MNU_FITRECT" ),
-                          0, this);
+                           0, this);
   aAction->setStatusTip( tr( "DSC_FITRECT" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onFitRect() ) );
   mgr->registerAction( aAction, FitRectId );
 
   // 2.3. Zoom
   aAction = new QtxAction( tr( "MNU_ZOOM_VIEW" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_ZOOM" ) ),
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_ZOOM" ) ),
                            tr( "MNU_ZOOM_VIEW" ),
-                          0, this);
+                           0, this);
   aAction->setStatusTip( tr( "DSC_ZOOM_VIEW" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onZoom() ) );
   mgr->registerAction( aAction, ZoomId );
@@ -233,18 +233,18 @@ void Plot2d_ViewWindow::createActions()
 
   // 3.1. Panning
   aAction = new QtxAction( tr( "MNU_PAN_VIEW" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_PAN" ) ),
-                          tr( "MNU_PAN_VIEW" ), 
-                          0, this);
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_PAN" ) ),
+                           tr( "MNU_PAN_VIEW" ), 
+                           0, this);
   aAction->setStatusTip( tr( "DSC_PAN_VIEW" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onPanning() ) );
   mgr->registerAction( aAction, PanId );
 
   // 3.2. Global Panning
   aAction = new QtxAction( tr( "MNU_GLOBALPAN_VIEW" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_GLOBALPAN" ) ),
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_GLOBALPAN" ) ),
                            tr( "MNU_GLOBALPAN_VIEW" ),
-                          0, this);
+                           0, this);
   aAction->setStatusTip( tr( "DSC_GLOBALPAN_VIEW" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onGlobalPanning() ) );
   mgr->registerAction( aAction, GlobalPanId );
@@ -259,27 +259,27 @@ void Plot2d_ViewWindow::createActions()
   
   // 4.1. Points
   aAction = new QtxAction( tr( "TOT_PLOT2D_CURVES_POINTS" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_CURVES_POINTS" ) ),
-                          tr( "MEN_PLOT2D_CURVES_POINTS" ),
-                          0, this );
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_CURVES_POINTS" ) ),
+                           tr( "MEN_PLOT2D_CURVES_POINTS" ),
+                           0, this );
   aAction->setStatusTip( tr( "PRP_PLOT2D_CURVES_POINTS" ) );
   aAction->setCheckable( true );
   mgr->registerAction( aAction, CurvPointsId );
 
   // 4.2. Lines
   aAction = new QtxAction( tr( "TOT_PLOT2D_CURVES_LINES" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_CURVES_LINES" ) ),
-                          tr( "MEN_PLOT2D_CURVES_LINES" ),
-                          0, this );
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_CURVES_LINES" ) ),
+                           tr( "MEN_PLOT2D_CURVES_LINES" ),
+                           0, this );
   aAction->setStatusTip( tr( "PRP_PLOT2D_CURVES_LINES" ) );
   aAction->setCheckable( true );
   mgr->registerAction( aAction, CurvLinesId );
 
   // 4.3. Splines
   aAction = new QtxAction( tr( "TOT_PLOT2D_CURVES_SPLINES" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_CURVES_SPLINES" ) ),
-                          tr( "MEN_PLOT2D_CURVES_SPLINES" ),
-                          0, this );
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_CURVES_SPLINES" ) ),
+                           tr( "MEN_PLOT2D_CURVES_SPLINES" ),
+                           0, this );
   aAction->setStatusTip( tr( "PRP_PLOT2D_CURVES_SPLINES" ) );
   aAction->setCheckable( true );
   mgr->registerAction( aAction, CurvSplinesId );
@@ -295,9 +295,9 @@ void Plot2d_ViewWindow::createActions()
 
   // 5.1. Linear
   aAction = new QtxAction( tr( "TOT_PLOT2D_MODE_LINEAR_HOR" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_MODE_LINEAR_HOR" ) ),
-                          tr( "MEN_PLOT2D_MODE_LINEAR_HOR" ),
-                          0, this );
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_MODE_LINEAR_HOR" ) ),
+                           tr( "MEN_PLOT2D_MODE_LINEAR_HOR" ),
+                           0, this );
   aAction->setStatusTip( tr( "PRP_PLOT2D_MODE_LINEAR_HOR" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewHorMode() ) );
   aAction->setCheckable( true );
@@ -305,9 +305,9 @@ void Plot2d_ViewWindow::createActions()
   
   // 5.2. Logarithmic
   aAction = new QtxAction( tr( "TOT_PLOT2D_MODE_LOGARITHMIC_HOR" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_MODE_LOGARITHMIC_HOR" ) ),
-                          tr( "MEN_PLOT2D_MODE_LOGARITHMIC_HOR" ),
-                          0, this );
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_MODE_LOGARITHMIC_HOR" ) ),
+                           tr( "MEN_PLOT2D_MODE_LOGARITHMIC_HOR" ),
+                           0, this );
   aAction->setStatusTip( tr( "PRP_PLOT2D_MODE_LOGARITHMIC_HOR" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewHorMode() ) );
   aAction->setCheckable( true );
@@ -322,9 +322,9 @@ void Plot2d_ViewWindow::createActions()
 
   // 6.1. Linear
   aAction = new QtxAction( tr( "TOT_PLOT2D_MODE_LINEAR_VER" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_MODE_LINEAR_VER" ) ),
-                          tr( "MEN_PLOT2D_MODE_LINEAR_VER" ),
-                          0, this );
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_MODE_LINEAR_VER" ) ),
+                           tr( "MEN_PLOT2D_MODE_LINEAR_VER" ),
+                           0, this );
   aAction->setStatusTip( tr( "PRP_PLOT2D_MODE_LINEAR_VER" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewVerMode() ) );
   aAction->setCheckable( true );
@@ -332,9 +332,9 @@ void Plot2d_ViewWindow::createActions()
 
   // 6.2. Logarithmic
   aAction = new QtxAction( tr( "TOT_PLOT2D_MODE_LOGARITHMIC_VER" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_MODE_LOGARITHMIC_VER" ) ),
-                          tr( "MEN_PLOT2D_MODE_LOGARITHMIC_VER" ),
-                          0, this );
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_MODE_LOGARITHMIC_VER" ) ),
+                           tr( "MEN_PLOT2D_MODE_LOGARITHMIC_VER" ),
+                           0, this );
   aAction->setStatusTip( tr( "PRP_PLOT2D_MODE_LOGARITHMIC_VER" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewVerMode() ) );
   aAction->setCheckable( true );
@@ -347,9 +347,9 @@ void Plot2d_ViewWindow::createActions()
 
   // 7. Legend
   aAction = new QtxAction( tr( "TOT_PLOT2D_SHOW_LEGEND" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_SHOW_LEGEND" ) ),
-                          tr( "MEN_PLOT2D_SHOW_LEGEND" ),
-                          0, this );
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_SHOW_LEGEND" ) ),
+                           tr( "MEN_PLOT2D_SHOW_LEGEND" ),
+                           0, this );
   aAction->setStatusTip( tr( "PRP_PLOT2D_SHOW_LEGEND" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onLegend() ) );
   aAction->setCheckable( true );
@@ -357,18 +357,18 @@ void Plot2d_ViewWindow::createActions()
 
   // 8. Settings
   aAction = new QtxAction( tr( "TOT_PLOT2D_SETTINGS" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_SETTINGS" ) ),
-                          tr( "MEN_PLOT2D_SETTINGS" ),
-                          0, this );
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_SETTINGS" ) ),
+                           tr( "MEN_PLOT2D_SETTINGS" ),
+                           0, this );
   aAction->setStatusTip( tr( "PRP_PLOT2D_SETTINGS" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), myViewFrame, SLOT( onSettings() ) );
   mgr->registerAction( aAction, CurvSettingsId );
 
   // 9. Clone
   aAction = new QtxAction( tr( "MNU_CLONE_VIEW" ),
-                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_CLONE_VIEW" ) ),
+                           aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_CLONE_VIEW" ) ),
                            tr( "MNU_CLONE_VIEW" ),
-                          0, this);
+                           0, this);
   aAction->setStatusTip( tr( "DSC_CLONE_VIEW" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SIGNAL( cloneView() ) );
   mgr->registerAction( aAction, CloneId );
@@ -601,8 +601,8 @@ QImage Plot2d_ViewWindow::dumpView()
   \param format image format ("BMP" [default], "JPEG", "JPG", "PNG")
 */
 bool Plot2d_ViewWindow::dumpViewToFormat( const QImage&  img,
-                                         const QString& fileName, 
-                                         const QString& format )
+                                          const QString& fileName, 
+                                          const QString& format )
 {
   bool res = myViewFrame ? myViewFrame->print( fileName, format ) : false;
   if( !res )
index 9ddd4c664214b978063467404b7434e40f46ff5d..bd3c15dcb2e48a1e255e369422a6707d9539aa08 100755 (executable)
@@ -48,14 +48,14 @@ class PLOT2D_EXPORT Plot2d_ViewWindow : public SUIT_ViewWindow
 
 public:
   enum { DumpId, 
-        ScaleOpId, FitAllId, FitRectId, ZoomId,
-        MoveOpId, PanId, GlobalPanId,
-        PModeXLinearId, PModeXLogarithmicId, 
+         ScaleOpId, FitAllId, FitRectId, ZoomId,
+         MoveOpId, PanId, GlobalPanId,
+         PModeXLinearId, PModeXLogarithmicId, 
          PModeYLinearId, PModeYLogarithmicId,
-        CurvPointsId, CurvLinesId, CurvSplinesId, 
-        LegendId,
-        CurvSettingsId,
-        CloneId };
+         CurvPointsId, CurvLinesId, CurvSplinesId, 
+         LegendId,
+         CurvSettingsId,
+         CloneId };
 
 public:
   Plot2d_ViewWindow( SUIT_Desktop*, Plot2d_Viewer* );
@@ -98,8 +98,8 @@ public slots:
 protected:
   virtual QImage    dumpView();
   virtual bool      dumpViewToFormat( const QImage&, 
-                                     const QString&, 
-                                     const QString& );
+                                      const QString&, 
+                                      const QString& );
   virtual QString   filter() const;
 
 signals:
index 693c6e6d36812850d4309e28aecd95add87495ec..4b28dbe6b2b0365c42324cade385bd66c0592d18 100755 (executable)
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-// File:       SALOME_Prs.cxx
-// Created:    Wed Apr 28 15:03:43 2004
-// Author:     Sergey ANIKIN
-//             <san@startrex.nnov.opencascade.com>
+// File:        SALOME_Prs.cxx
+// Created:     Wed Apr 28 15:03:43 2004
+// Author:      Sergey ANIKIN
+//              <san@startrex.nnov.opencascade.com>
 //
 #include "SALOME_Prs.h"
 
index ae6563bb3fe11caff3d1b2d1086daafe44d7d25a..c437262dac154b0e7597e1055365a6029046632b 100644 (file)
@@ -134,9 +134,9 @@ public:
     \param sync        if True the request is processed synchronously 
   */
   ExecCommand( PyInterp_Interp*        theInterp, 
-              const QString&          theCommand,
-              PyConsole_Editor*       theListener, 
-              bool                    sync = false )
+               const QString&          theCommand,
+               PyConsole_Editor*       theListener, 
+               bool                    sync = false )
     : PyInterp_LockRequest( theInterp, theListener, sync ),
       myCommand( theCommand ), myState( PyInterp_Event::ES_OK )
   {}
@@ -152,9 +152,9 @@ protected:
     {
       int ret = getInterp()->run( myCommand.toLatin1() );
       if ( ret < 0 )
-       myState = PyInterp_Event::ES_ERROR;
+        myState = PyInterp_Event::ES_ERROR;
       else if ( ret > 0 )
-       myState = PyInterp_Event::ES_INCOMPLETE;
+        myState = PyInterp_Event::ES_INCOMPLETE;
     } 
   }
 
@@ -211,7 +211,7 @@ void staticCallback( void* data, char* c )
   \param theParent parent widget
 */
 PyConsole_Editor::PyConsole_Editor( PyConsole_Interp* theInterp, 
-                                   QWidget*          theParent )
+                                    QWidget*          theParent )
 : QTextEdit( theParent ),
   myInterp( 0 ),
   myCmdInHistory( -1 ),
@@ -276,7 +276,7 @@ void PyConsole_Editor::setIsSync( const bool on )
   \param newBlock if True, then the string is printed on a new line
 */
 void PyConsole_Editor::addText( const QString& str, 
-                               const bool     newBlock )
+                                const bool     newBlock )
 {
   moveCursor( QTextCursor::End );
   if ( newBlock )
@@ -413,11 +413,11 @@ void PyConsole_Editor::dropEvent( QDropEvent* event )
   }
   // create new drop event and use it instead of the original
   QDropEvent de( pos,
-                event->possibleActions(),
-                event->mimeData(),
-                event->mouseButtons(),
-                event->keyboardModifiers(),
-                event->type() );
+                 event->possibleActions(),
+                 event->mimeData(),
+                 event->mouseButtons(),
+                 event->keyboardModifiers(),
+                 event->type() );
   QTextEdit::dropEvent( &de );
   // accept the original event
   event->acceptProposedAction();
@@ -527,7 +527,7 @@ void PyConsole_Editor::keyPressEvent( QKeyEvent* event )
     // any printed key: just print it
     {
       if ( curLine < endLine || curCol < PROMPT_SIZE ) {
-       moveCursor( QTextCursor::End );
+        moveCursor( QTextCursor::End );
       }
       QTextEdit::keyPressEvent( event );
       break;
@@ -547,35 +547,35 @@ void PyConsole_Editor::keyPressEvent( QKeyEvent* event )
     // - with <Ctrl>+<Shift> modifier keys pressed: scroll one row up
     {
       if ( ctrlPressed && shftPressed ) {
-       int value   = verticalScrollBar()->value();
-       int spacing = fontMetrics().lineSpacing();
-       verticalScrollBar()->setValue( value > spacing ? value-spacing : 0 );
+        int value   = verticalScrollBar()->value();
+        int spacing = fontMetrics().lineSpacing();
+        verticalScrollBar()->setValue( value > spacing ? value-spacing : 0 );
       }
       else if ( shftPressed || ctrlPressed ) {
-       if ( curLine > 0 )
-         moveCursor( QTextCursor::Up, 
-                     shftPressed ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor );
+        if ( curLine > 0 )
+          moveCursor( QTextCursor::Up, 
+                      shftPressed ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor );
       }
       else { 
-       if ( myCmdInHistory < 0 && myHistory.count() > 0 ) {
-         // set history browsing mode
-         myCmdInHistory = myHistory.count();
-         // remember current command
-         QTextBlock par = document()->end().previous();
-         myCurrentCommand = par.text().remove( 0, PROMPT_SIZE );
-       }
-       if ( myCmdInHistory > 0 ) {
-         myCmdInHistory--;
-         // get previous command in the history
-         QString previousCommand = myHistory.at( myCmdInHistory );
-         // print previous command
-         moveCursor( QTextCursor::End );
-         moveCursor( QTextCursor::StartOfBlock, QTextCursor::KeepAnchor );
-         textCursor().removeSelectedText();
-         addText( myPrompt + previousCommand ); 
-         // move cursor to the end
-         moveCursor( QTextCursor::End );
-       }
+        if ( myCmdInHistory < 0 && myHistory.count() > 0 ) {
+          // set history browsing mode
+          myCmdInHistory = myHistory.count();
+          // remember current command
+          QTextBlock par = document()->end().previous();
+          myCurrentCommand = par.text().remove( 0, PROMPT_SIZE );
+        }
+        if ( myCmdInHistory > 0 ) {
+          myCmdInHistory--;
+          // get previous command in the history
+          QString previousCommand = myHistory.at( myCmdInHistory );
+          // print previous command
+          moveCursor( QTextCursor::End );
+          moveCursor( QTextCursor::StartOfBlock, QTextCursor::KeepAnchor );
+          textCursor().removeSelectedText();
+          addText( myPrompt + previousCommand ); 
+          // move cursor to the end
+          moveCursor( QTextCursor::End );
+        }
       }
       break;
     }
@@ -587,40 +587,40 @@ void PyConsole_Editor::keyPressEvent( QKeyEvent* event )
     // - with <Ctrl>+<Shift> modifier keys pressed: scroll one row down
     {
       if ( ctrlPressed && shftPressed ) {
-       int value   = verticalScrollBar()->value();
-       int maxval  = verticalScrollBar()->maximum();
-       int spacing = fontMetrics().lineSpacing();
-       verticalScrollBar()->setValue( value+spacing < maxval ? value+spacing : maxval );
+        int value   = verticalScrollBar()->value();
+        int maxval  = verticalScrollBar()->maximum();
+        int spacing = fontMetrics().lineSpacing();
+        verticalScrollBar()->setValue( value+spacing < maxval ? value+spacing : maxval );
       }
       else if ( shftPressed || ctrlPressed) {
-       if ( curLine < endLine )
-         moveCursor( QTextCursor::Down, 
-                     shftPressed ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor );
+        if ( curLine < endLine )
+          moveCursor( QTextCursor::Down, 
+                      shftPressed ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor );
       }
       else { 
-       if ( myCmdInHistory >= 0 ) {
-         // get next command in the history
-         myCmdInHistory++;
-         QString nextCommand;
-         if ( myCmdInHistory < myHistory.count() ) {
-           // next command in history
-           nextCommand = myHistory.at( myCmdInHistory );
-         }
-         else {
-           // end of history is reached
-           // last printed command
-           nextCommand = myCurrentCommand;
-           // unset history browsing mode
-           myCmdInHistory = -1;
-         }
-         // print next or current command
-         moveCursor( QTextCursor::End );
-         moveCursor( QTextCursor::StartOfBlock, QTextCursor::KeepAnchor );
-         textCursor().removeSelectedText();
-         addText( myPrompt + nextCommand );
-         // move cursor to the end
-         moveCursor( QTextCursor::End );
-       }
+        if ( myCmdInHistory >= 0 ) {
+          // get next command in the history
+          myCmdInHistory++;
+          QString nextCommand;
+          if ( myCmdInHistory < myHistory.count() ) {
+            // next command in history
+            nextCommand = myHistory.at( myCmdInHistory );
+          }
+          else {
+            // end of history is reached
+            // last printed command
+            nextCommand = myCurrentCommand;
+            // unset history browsing mode
+            myCmdInHistory = -1;
+          }
+          // print next or current command
+          moveCursor( QTextCursor::End );
+          moveCursor( QTextCursor::StartOfBlock, QTextCursor::KeepAnchor );
+          textCursor().removeSelectedText();
+          addText( myPrompt + nextCommand );
+          // move cursor to the end
+          moveCursor( QTextCursor::End );
+        }
       }
       break;
     }
@@ -633,11 +633,11 @@ void PyConsole_Editor::keyPressEvent( QKeyEvent* event )
     {
       QString txt = textCursor().block().text();
       if ( !shftPressed && isCommand( txt ) && curCol <= PROMPT_SIZE ) {
-       moveCursor( QTextCursor::Up );
-       moveCursor( QTextCursor::EndOfBlock );
+        moveCursor( QTextCursor::Up );
+        moveCursor( QTextCursor::EndOfBlock );
       }
       else {
-       QTextEdit::keyPressEvent( event );
+        QTextEdit::keyPressEvent( event );
       }
       break;
     }
@@ -650,21 +650,21 @@ void PyConsole_Editor::keyPressEvent( QKeyEvent* event )
     {
       QString txt = textCursor().block().text();
       if ( !shftPressed ) {
-       if ( curCol < txt.length() ) {
-         if ( isCommand( txt ) && curCol < PROMPT_SIZE ) {
-           cur.setPosition( cur.block().position() + PROMPT_SIZE );
-           setTextCursor( cur );
-           break;
-         }
-       }
-       else {
-         if ( curLine < endLine && isCommand( textCursor().block().next().text() ) ) {
-           cur.setPosition( cur.position() + PROMPT_SIZE+1 );
-           setTextCursor( cur );
-           horizontalScrollBar()->setValue( horizontalScrollBar()->minimum() );
-           break;
-         }
-       }
+        if ( curCol < txt.length() ) {
+          if ( isCommand( txt ) && curCol < PROMPT_SIZE ) {
+            cur.setPosition( cur.block().position() + PROMPT_SIZE );
+            setTextCursor( cur );
+            break;
+          }
+        }
+        else {
+          if ( curLine < endLine && isCommand( textCursor().block().next().text() ) ) {
+            cur.setPosition( cur.position() + PROMPT_SIZE+1 );
+            setTextCursor( cur );
+            horizontalScrollBar()->setValue( horizontalScrollBar()->minimum() );
+            break;
+          }
+        }
       }
       QTextEdit::keyPressEvent( event );
       break;
@@ -677,49 +677,49 @@ void PyConsole_Editor::keyPressEvent( QKeyEvent* event )
     // - with <Ctrl>+<Shift> modifier keys pressed: scroll one page up
     {
       if ( ctrlPressed && shftPressed ) {
-       verticalScrollBar()->triggerAction(QAbstractSlider::SliderPageStepSub);
+        verticalScrollBar()->triggerAction(QAbstractSlider::SliderPageStepSub);
       }
       else if ( shftPressed || ctrlPressed ) {
-       bool moved = false;
-       qreal lastY = cursorRect( cur ).top();
-       qreal distance = 0;
-       // move using movePosition to keep the cursor's x
-       do {
-         qreal y = cursorRect( cur ).top();
-         distance += qAbs( y - lastY );
-         lastY = y;
-         moved = cur.movePosition( QTextCursor::Up, 
-                                   shftPressed ? QTextCursor::KeepAnchor : 
-                                                 QTextCursor::MoveAnchor );
-       } while ( moved && distance < viewport()->height() );
-       if ( moved ) {
-         cur.movePosition( QTextCursor::Down, 
-                           shftPressed ? QTextCursor::KeepAnchor : 
-                                         QTextCursor::MoveAnchor );
-         verticalScrollBar()->triggerAction( QAbstractSlider::SliderPageStepSub );
-       }
-       setTextCursor( cur );
+        bool moved = false;
+        qreal lastY = cursorRect( cur ).top();
+        qreal distance = 0;
+        // move using movePosition to keep the cursor's x
+        do {
+          qreal y = cursorRect( cur ).top();
+          distance += qAbs( y - lastY );
+          lastY = y;
+          moved = cur.movePosition( QTextCursor::Up, 
+                                    shftPressed ? QTextCursor::KeepAnchor : 
+                                                  QTextCursor::MoveAnchor );
+        } while ( moved && distance < viewport()->height() );
+        if ( moved ) {
+          cur.movePosition( QTextCursor::Down, 
+                            shftPressed ? QTextCursor::KeepAnchor : 
+                                          QTextCursor::MoveAnchor );
+          verticalScrollBar()->triggerAction( QAbstractSlider::SliderPageStepSub );
+        }
+        setTextCursor( cur );
       }
       else { 
-       if ( myCmdInHistory < 0 && myHistory.count() > 0 ) {
-         // set history browsing mode
-         myCmdInHistory = myHistory.count();
-         // remember current command
-         QTextBlock par = document()->end().previous();
-         myCurrentCommand = par.text().remove( 0, PROMPT_SIZE );
-       }
-       if ( myCmdInHistory > 0 ) {
-         myCmdInHistory = 0;
-         // get very first command in the history
-         QString firstCommand = myHistory.at( myCmdInHistory );
-         // print first command
-         moveCursor( QTextCursor::End );
-         moveCursor( QTextCursor::StartOfBlock, QTextCursor::KeepAnchor );
-         textCursor().removeSelectedText();
-         addText( myPrompt + firstCommand ); 
-         // move cursor to the end
-         moveCursor( QTextCursor::End );
-       }
+        if ( myCmdInHistory < 0 && myHistory.count() > 0 ) {
+          // set history browsing mode
+          myCmdInHistory = myHistory.count();
+          // remember current command
+          QTextBlock par = document()->end().previous();
+          myCurrentCommand = par.text().remove( 0, PROMPT_SIZE );
+        }
+        if ( myCmdInHistory > 0 ) {
+          myCmdInHistory = 0;
+          // get very first command in the history
+          QString firstCommand = myHistory.at( myCmdInHistory );
+          // print first command
+          moveCursor( QTextCursor::End );
+          moveCursor( QTextCursor::StartOfBlock, QTextCursor::KeepAnchor );
+          textCursor().removeSelectedText();
+          addText( myPrompt + firstCommand ); 
+          // move cursor to the end
+          moveCursor( QTextCursor::End );
+        }
       }
       break;
     }
@@ -731,41 +731,41 @@ void PyConsole_Editor::keyPressEvent( QKeyEvent* event )
     // - with <Ctrl>+<Shift> modifier keys pressed: scroll one page down
     {
       if ( ctrlPressed && shftPressed ) {
-       verticalScrollBar()->triggerAction(QAbstractSlider::SliderPageStepAdd);
+        verticalScrollBar()->triggerAction(QAbstractSlider::SliderPageStepAdd);
       }
       else if ( shftPressed || ctrlPressed ) {
-       bool moved = false;
-       qreal lastY = cursorRect( cur ).top();
-       qreal distance = 0;
-       // move using movePosition to keep the cursor's x
-       do {
-         qreal y = cursorRect( cur ).top();
-         distance += qAbs( y - lastY );
-         lastY = y;
-         moved = cur.movePosition( QTextCursor::Down, 
-                                   shftPressed ? QTextCursor::KeepAnchor : 
-                                                 QTextCursor::MoveAnchor );
-       } while ( moved && distance < viewport()->height() );
-       if ( moved ) {
-         cur.movePosition( QTextCursor::Up, 
-                           shftPressed ? QTextCursor::KeepAnchor : 
-                                         QTextCursor::MoveAnchor );
-         verticalScrollBar()->triggerAction( QAbstractSlider::SliderPageStepSub );
-       }
-       setTextCursor( cur );
+        bool moved = false;
+        qreal lastY = cursorRect( cur ).top();
+        qreal distance = 0;
+        // move using movePosition to keep the cursor's x
+        do {
+          qreal y = cursorRect( cur ).top();
+          distance += qAbs( y - lastY );
+          lastY = y;
+          moved = cur.movePosition( QTextCursor::Down, 
+                                    shftPressed ? QTextCursor::KeepAnchor : 
+                                                  QTextCursor::MoveAnchor );
+        } while ( moved && distance < viewport()->height() );
+        if ( moved ) {
+          cur.movePosition( QTextCursor::Up, 
+                            shftPressed ? QTextCursor::KeepAnchor : 
+                                          QTextCursor::MoveAnchor );
+          verticalScrollBar()->triggerAction( QAbstractSlider::SliderPageStepSub );
+        }
+        setTextCursor( cur );
       }
       else { 
-       if ( myCmdInHistory >= 0 ) {
-         // unset history browsing mode
-         myCmdInHistory = -1;
-         // print current command
-         moveCursor( QTextCursor::End );
-         moveCursor( QTextCursor::StartOfBlock, QTextCursor::KeepAnchor );
-         textCursor().removeSelectedText();
-         addText( myPrompt + myCurrentCommand ); 
-         // move cursor to the end
-         moveCursor( QTextCursor::End );
-       }
+        if ( myCmdInHistory >= 0 ) {
+          // unset history browsing mode
+          myCmdInHistory = -1;
+          // print current command
+          moveCursor( QTextCursor::End );
+          moveCursor( QTextCursor::StartOfBlock, QTextCursor::KeepAnchor );
+          textCursor().removeSelectedText();
+          addText( myPrompt + myCurrentCommand ); 
+          // move cursor to the end
+          moveCursor( QTextCursor::End );
+        }
       }
       break;
     }
@@ -777,29 +777,29 @@ void PyConsole_Editor::keyPressEvent( QKeyEvent* event )
     // - with <Ctrl>+<Shift> modifier keys pressed: move cursor to the very first symbol with selection
     {
       if ( ctrlPressed ) { 
-       moveCursor( QTextCursor::Start, 
-                   shftPressed ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor );
+        moveCursor( QTextCursor::Start, 
+                    shftPressed ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor );
       }
       else {
-       QString txt = textCursor().block().text();
-       if ( isCommand( txt ) ) {
-         if ( shftPressed ) {
-           if ( curCol > PROMPT_SIZE ) {
-             cur.movePosition( QTextCursor::StartOfLine, QTextCursor::KeepAnchor );
-             cur.movePosition( QTextCursor::Right, QTextCursor::KeepAnchor, PROMPT_SIZE );
-           }
-         }
-         else {
-           cur.movePosition( QTextCursor::StartOfLine );
-           cur.movePosition( QTextCursor::Right, QTextCursor::MoveAnchor, PROMPT_SIZE );
-         }
-         setTextCursor( cur );
-       }
-       else {
-         moveCursor( QTextCursor::StartOfBlock, 
-                     shftPressed ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor );
-       }
-       horizontalScrollBar()->setValue( horizontalScrollBar()->minimum() );
+        QString txt = textCursor().block().text();
+        if ( isCommand( txt ) ) {
+          if ( shftPressed ) {
+            if ( curCol > PROMPT_SIZE ) {
+              cur.movePosition( QTextCursor::StartOfLine, QTextCursor::KeepAnchor );
+              cur.movePosition( QTextCursor::Right, QTextCursor::KeepAnchor, PROMPT_SIZE );
+            }
+          }
+          else {
+            cur.movePosition( QTextCursor::StartOfLine );
+            cur.movePosition( QTextCursor::Right, QTextCursor::MoveAnchor, PROMPT_SIZE );
+          }
+          setTextCursor( cur );
+        }
+        else {
+          moveCursor( QTextCursor::StartOfBlock, 
+                      shftPressed ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor );
+        }
+        horizontalScrollBar()->setValue( horizontalScrollBar()->minimum() );
       }
       break;
     }
@@ -811,7 +811,7 @@ void PyConsole_Editor::keyPressEvent( QKeyEvent* event )
     // - with <Ctrl>+<Shift> modifier keys pressed: move cursor to the very last symbol with selection
     {
       moveCursor( ctrlPressed ? QTextCursor::End : QTextCursor::EndOfBlock, 
-                 shftPressed ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor );
+                  shftPressed ? QTextCursor::KeepAnchor : QTextCursor::MoveAnchor );
       break;
     }  
   case Qt::Key_Backspace :
@@ -822,27 +822,27 @@ void PyConsole_Editor::keyPressEvent( QKeyEvent* event )
     // works only for last (command) line
     {
       if ( cur.hasSelection() ) {
-       cut();
+        cut();
       }
       else if ( cur.position() > document()->end().previous().position() + PROMPT_SIZE ) {
-       if ( shftPressed ) {
-         moveCursor( QTextCursor::PreviousWord, QTextCursor::KeepAnchor );
-         textCursor().removeSelectedText();
-       }
-       else if ( ctrlPressed ) {
-         cur.setPosition( document()->end().previous().position() + PROMPT_SIZE, 
-                          QTextCursor::KeepAnchor );
-         setTextCursor( cur );
-         textCursor().removeSelectedText();
-       }
-       else {
-         QTextEdit::keyPressEvent( event );
-       }
+        if ( shftPressed ) {
+          moveCursor( QTextCursor::PreviousWord, QTextCursor::KeepAnchor );
+          textCursor().removeSelectedText();
+        }
+        else if ( ctrlPressed ) {
+          cur.setPosition( document()->end().previous().position() + PROMPT_SIZE, 
+                           QTextCursor::KeepAnchor );
+          setTextCursor( cur );
+          textCursor().removeSelectedText();
+        }
+        else {
+          QTextEdit::keyPressEvent( event );
+        }
       }
       else {
-       cur.setPosition( document()->end().previous().position() + PROMPT_SIZE );
-       setTextCursor( cur );
-       horizontalScrollBar()->setValue( horizontalScrollBar()->minimum() );
+        cur.setPosition( document()->end().previous().position() + PROMPT_SIZE );
+        setTextCursor( cur );
+        horizontalScrollBar()->setValue( horizontalScrollBar()->minimum() );
       }
       break;
     }
@@ -854,25 +854,25 @@ void PyConsole_Editor::keyPressEvent( QKeyEvent* event )
     // works only for last (command) line
     {
       if ( cur.hasSelection() ) {
-       cut();
+        cut();
       }
       else if ( cur.position() > document()->end().previous().position() + PROMPT_SIZE-1 ) {
-       if ( shftPressed ) {
-         moveCursor( QTextCursor::NextWord, QTextCursor::KeepAnchor );
-         textCursor().removeSelectedText();
-       }
-       else if ( ctrlPressed ) {
-         moveCursor( QTextCursor::EndOfBlock, QTextCursor::KeepAnchor );
-         textCursor().removeSelectedText();
-       }
-       else {
-         QTextEdit::keyPressEvent( event );
-       }
+        if ( shftPressed ) {
+          moveCursor( QTextCursor::NextWord, QTextCursor::KeepAnchor );
+          textCursor().removeSelectedText();
+        }
+        else if ( ctrlPressed ) {
+          moveCursor( QTextCursor::EndOfBlock, QTextCursor::KeepAnchor );
+          textCursor().removeSelectedText();
+        }
+        else {
+          QTextEdit::keyPressEvent( event );
+        }
       }
       else {
-       cur.setPosition( document()->end().previous().position() + PROMPT_SIZE );
-       setTextCursor( cur );
-       horizontalScrollBar()->setValue( horizontalScrollBar()->minimum() );
+        cur.setPosition( document()->end().previous().position() + PROMPT_SIZE );
+        setTextCursor( cur );
+        horizontalScrollBar()->setValue( horizontalScrollBar()->minimum() );
       }
       break;
     }
@@ -882,13 +882,13 @@ void PyConsole_Editor::keyPressEvent( QKeyEvent* event )
     // - with <Shift> modifier key pressed: paste() to the command line
     {
       if ( ctrlPressed ) {
-       copy();
+        copy();
       }
       else if ( shftPressed ) {
-       paste();
+        paste();
       }
       else
-       QTextEdit::keyPressEvent( event );
+        QTextEdit::keyPressEvent( event );
       break;
     }
   }
@@ -997,7 +997,7 @@ void PyConsole_Editor::onPyInterpChanged( PyConsole_Interp* interp )
       viewport()->unsetCursor();
       // stop event loop (if running)
       if( myEventLoop)
-       myEventLoop->exit();
+        myEventLoop->exit();
     }
     else {
       // clear contents
index ffa8d8e9afd7c02ed789cb1a88bc137e38811e21..242dc41005ec3ae7e5c3aaa8c7ed88c333fc4a80 100755 (executable)
@@ -34,7 +34,7 @@
 
 // Private class that keeps track of destructions of request listeners
 class PYINTERP_EXPORT PyInterp_Watcher : public QObject
-{                                          
+{                                           
   Q_OBJECT
 
 public:
index f0b532fa2e1a79308c0134e72aa96884287791ec..a9163e978487c2eab55445f5ada2be4839ac5580 100755 (executable)
@@ -478,7 +478,7 @@ bool Qtx::rmDir( const QString& thePath )
     {
       QFileInfo inf = *it;
       if ( inf.fileName() == "." || inf.fileName() == ".." )
-       continue;
+        continue;
       stat = stat && rmDir( inf.absoluteFilePath() );
     }
     stat = stat && aDir.rmdir( thePath );
@@ -559,7 +559,7 @@ bool Qtx::dos2unix( const QString& absName )
     if ( nbwri != outcnt )
     {
       ::fclose( src );
-                       ::fclose( tgt );
+                        ::fclose( tgt );
       QFile::remove( QString( temp ) );
       return false;
     }
@@ -695,20 +695,20 @@ QString Qtx::makeEnvVarSubst( const QString& str, const SubstMode mode )
     {
       QString envName = findEnvVar( res, start, len );
       if ( envName.isNull() )
-       break;
+        break;
 
       QString newStr;
       if ( ::getenv( envName.toLatin1() ) || mode == Always )
-       newStr = QString( ::getenv( envName.toLatin1() ) );
+        newStr = QString( ::getenv( envName.toLatin1() ) );
 
       if ( newStr.isNull() )
       {
-       if ( ignoreMap.contains( envName ) )
-       {
-         start += len;
-         continue;
-       }
-       ignoreMap.insert( envName, 0 );
+        if ( ignoreMap.contains( envName ) )
+        {
+          start += len;
+          continue;
+        }
+        ignoreMap.insert( envName, 0 );
       }
       res.replace( start, len, newStr );
     }
@@ -1249,25 +1249,25 @@ bool Qtx::stringToLinearGradient( const QString& str, QLinearGradient& gradient
       // spread type
       if ( vals.count() > 5 )
       {
-       QString spread = vals[ 5 ].trimmed().toLower();
-       if ( spread == "pad" || spread == "0" )
-         gradient.setSpread( QGradient::PadSpread );
-       else if ( spread == "repeat" || spread == "2" )
-         gradient.setSpread( QGradient::RepeatSpread );
-       else if ( spread == "reflect" || spread == "1" )
-         gradient.setSpread( QGradient::ReflectSpread );
+        QString spread = vals[ 5 ].trimmed().toLower();
+        if ( spread == "pad" || spread == "0" )
+          gradient.setSpread( QGradient::PadSpread );
+        else if ( spread == "repeat" || spread == "2" )
+          gradient.setSpread( QGradient::RepeatSpread );
+        else if ( spread == "reflect" || spread == "1" )
+          gradient.setSpread( QGradient::ReflectSpread );
       }
       // stop points
       QGradientStops stops;
       for ( int i = 6; i < vals.count(); i+=2 )
       {
-       bool bOk5, bOk6 = false;
-       QColor c;
-       double stop = vals[i].toDouble( &bOk5 );
-       if ( i+1 < vals.count() )
-         bOk6 = stringToColor( vals[ i+1 ], c );
-       if ( bOk5 && stop >= 0.0 && stop <= 1.0 && bOk6 && c.isValid() )
-         stops.append( QGradientStop( stop, c ) );
+        bool bOk5, bOk6 = false;
+        QColor c;
+        double stop = vals[i].toDouble( &bOk5 );
+        if ( i+1 < vals.count() )
+          bOk6 = stringToColor( vals[ i+1 ], c );
+        if ( bOk5 && stop >= 0.0 && stop <= 1.0 && bOk6 && c.isValid() )
+          stops.append( QGradientStop( stop, c ) );
       }
       gradient.setStops( stops );
       success = true;
@@ -1303,25 +1303,25 @@ bool Qtx::stringToRadialGradient( const QString& str, QRadialGradient& gradient
       // spread type
       if ( vals.count() > 6 )
       {
-       QString spread = vals[ 6 ].trimmed().toLower();
-       if ( spread == "pad" || spread == "0" )
-         gradient.setSpread( QGradient::PadSpread );
-       else if ( spread == "repeat" || spread == "2" )
-         gradient.setSpread( QGradient::RepeatSpread );
-       else if ( spread == "reflect" || spread == "1" )
-         gradient.setSpread( QGradient::ReflectSpread );
+        QString spread = vals[ 6 ].trimmed().toLower();
+        if ( spread == "pad" || spread == "0" )
+          gradient.setSpread( QGradient::PadSpread );
+        else if ( spread == "repeat" || spread == "2" )
+          gradient.setSpread( QGradient::RepeatSpread );
+        else if ( spread == "reflect" || spread == "1" )
+          gradient.setSpread( QGradient::ReflectSpread );
       }
       // stop points
       QGradientStops stops;
       for ( int i = 7; i < vals.count(); i+=2 )
       {
-       bool bOk7, bOk8 = false;
-       QColor c;
-       double stop = vals[i].toDouble( &bOk7 );
-       if ( i+1 < vals.count() )
-         bOk8 = stringToColor( vals[ i+1 ], c );
-       if ( bOk7 && stop >= 0.0 && stop <= 1.0 && bOk8 && c.isValid() )
-         stops.append( QGradientStop( stop, c ) );
+        bool bOk7, bOk8 = false;
+        QColor c;
+        double stop = vals[i].toDouble( &bOk7 );
+        if ( i+1 < vals.count() )
+          bOk8 = stringToColor( vals[ i+1 ], c );
+        if ( bOk7 && stop >= 0.0 && stop <= 1.0 && bOk8 && c.isValid() )
+          stops.append( QGradientStop( stop, c ) );
       }
       gradient.setStops( stops );
       success = true;
@@ -1355,25 +1355,25 @@ bool Qtx::stringToConicalGradient( const QString& str, QConicalGradient& gradien
       // spread type
       if ( vals.count() > 4 )
       {
-       QString spread = vals[ 4 ].trimmed().toLower();
-       if ( spread == "pad" || spread == "0" )
-         gradient.setSpread( QGradient::PadSpread );
-       else if ( spread == "repeat" || spread == "2" )
-         gradient.setSpread( QGradient::RepeatSpread );
-       else if ( spread == "reflect" || spread == "1" )
-         gradient.setSpread( QGradient::ReflectSpread );
+        QString spread = vals[ 4 ].trimmed().toLower();
+        if ( spread == "pad" || spread == "0" )
+          gradient.setSpread( QGradient::PadSpread );
+        else if ( spread == "repeat" || spread == "2" )
+          gradient.setSpread( QGradient::RepeatSpread );
+        else if ( spread == "reflect" || spread == "1" )
+          gradient.setSpread( QGradient::ReflectSpread );
       }
       // stop points
       QGradientStops stops;
       for ( int i = 5; i < vals.count(); i+=2 )
       {
-       bool bOk4, bOk5 = false;
-       QColor c;
-       double stop = vals[i].toDouble( &bOk4 );
-       if ( i+1 < vals.count() )
-         bOk5 = stringToColor( vals[ i+1 ], c );
-       if ( bOk4 && stop >= 0.0 && stop <= 1.0 && bOk5 && c.isValid() )
-         stops.append( QGradientStop( stop, c ) );
+        bool bOk4, bOk5 = false;
+        QColor c;
+        double stop = vals[i].toDouble( &bOk4 );
+        if ( i+1 < vals.count() )
+          bOk5 = stringToColor( vals[ i+1 ], c );
+        if ( bOk4 && stop >= 0.0 && stop <= 1.0 && bOk5 && c.isValid() )
+          stops.append( QGradientStop( stop, c ) );
       }
       gradient.setStops( stops );
       success = true;
index 69bcd4acab2b3d666c45d3ae155944d558a0474f..b5dd9f2efe77e0b5ffad1588cb3e469256be45dd 100755 (executable)
@@ -100,16 +100,16 @@ public:
   };
 
   typedef enum {
-       Shown,   //!< column should be always visible
-       Hidden,  //!< column should be always hidden
-       Toggled  //!< it should be possible to show/hide the column with help of popup menu
+        Shown,   //!< column should be always visible
+        Hidden,  //!< column should be always hidden
+        Toggled  //!< it should be possible to show/hide the column with help of popup menu
   } Appropriate;  //!< appropriate status
 
   //! Environment variables substitution mode
   typedef enum {
-       Always, //!< substitute environment variable by it's value if variable exists, and "" otherwise
-       Never,  //!< keep environment variable as is without any substitution
-       Auto    //!< substitute environment variable by it's value if variable exists, and keep it as is otherwise
+        Always, //!< substitute environment variable by it's value if variable exists, and "" otherwise
+        Never,  //!< keep environment variable as is without any substitution
+        Auto    //!< substitute environment variable by it's value if variable exists, and keep it as is otherwise
   } SubstMode;
 
   static QString     toQString( const char*, const int = -1 );
index eeea9d7775c24d4358727ba93d5508a978b3e4c0..eb651239d35a479fb6b1bd8cd70619dd152522f7 100644 (file)
@@ -203,7 +203,7 @@ void QtxActionGroup::onTriggered( QAction* a )
     {
       QtxComboBox* cb = ::qobject_cast<QtxComboBox*>( *it );
       if ( cb )
-       cb->setCurrentId( id );
+        cb->setCurrentId( id );
     }
   }
   
@@ -226,7 +226,7 @@ void QtxActionGroup::updateAction( QWidget* w )
       
       QList<QAction*> lst = actions();
       for ( QList<QAction*>::iterator it = lst.begin(); it != lst.end(); ++it )
-       w->removeAction( *it );
+        w->removeAction( *it );
     }
   }
   else
@@ -237,7 +237,7 @@ void QtxActionGroup::updateAction( QWidget* w )
     else {
       QList<QAction*> lst = actions();
       for ( QList<QAction*>::iterator it = lst.begin(); it != lst.end(); ++it )
-       w->removeAction( *it );
+        w->removeAction( *it );
     }
   }
 }
index 8e29512927efab055ea5c0f6d8e709bdc0b02ee7..90acf3ff7953ff395c221167298998a7c30a5b48 100644 (file)
@@ -71,9 +71,9 @@ QtxActionMenuMgr::MenuNode::MenuNode()
   \param _group menu node group ID
 */
 QtxActionMenuMgr::MenuNode::MenuNode( MenuNode* p,
-                                     const int _id,
-                                     const int _idx,
-                                     const int _group )
+                                      const int _id,
+                                      const int _idx,
+                                      const int _group )
 : parent( p ), id( _id ), idx( _idx ), group( _group ), visible( true ), emptyEnabled( 0 )
 {
   if ( p )
@@ -886,7 +886,7 @@ void QtxActionMenuMgr::updateMenu( MenuNode* startNode, const bool rec, const bo
     {
       a = foralit.next();
       if ( !mw->actions().contains( a ) )
-       foralit.remove();
+        foralit.remove();
     }
   }
   QList<QAction*> alist = mw->actions();
index f80591374626a5ec154c4c37058a6f2406945c65..b4b2fa68ffcae14bf7b9be03f76dd45226d5ea39 100644 (file)
@@ -113,7 +113,7 @@ public:
   Reader* reader() const;
 
   virtual int    append( const QString&, const bool,
-                        const ItemAttributes&, const int ) = 0;
+                         const ItemAttributes&, const int ) = 0;
   virtual void   connect( QAction* ) const;
 
   virtual bool   loadPixmap( const QString&, QPixmap& ) const;
@@ -121,7 +121,7 @@ public:
 protected:
   static int     intValue( const ItemAttributes&, const QString&, const int );
   static QString strValue( const ItemAttributes&, const QString&,
-                          const QString& = QString() );
+                           const QString& = QString() );
 private:
   QtxActionMgr::Reader*  myReader;  //!< actions reader
 };
index 45a28aa048cc2d1f8b37ea8e2283efea40705916..8b209ecff98b42ee3a94bd457151e076914e0605 100644 (file)
@@ -104,7 +104,7 @@ int QtxActionToolMgr::createToolBar( const QString& title, const int tid, QMainW
 }
 
 int QtxActionToolMgr::createToolBar( const QString& title, bool floatable, Qt::ToolBarAreas dockAreas, 
-                                    int tid, QMainWindow* mw )
+                                     int tid, QMainWindow* mw )
 {
   static int _toolBarId = -1;
 
@@ -429,8 +429,8 @@ bool QtxActionToolMgr::containsAction( const int id, const int tid ) const
     {
       const NodeList& list = it.value().nodes;
       for ( NodeList::const_iterator nit = list.begin(); nit != list.end(); ++nit )
-       if ( (*nit).id == id )
-         return true;
+        if ( (*nit).id == id )
+          return true;
     }
   }
   return false;
index 5f81e6e21abc54aeb67cb13ed690c630c5bb2b47..e38aae58b57768dcecca3937e0a60677d4a454b3 100644 (file)
@@ -66,7 +66,7 @@ public:
 
   int             createToolBar( const QString&, int = -1, QMainWindow* = 0 );
   int             createToolBar( const QString&, bool, Qt::ToolBarAreas = Qt::AllToolBarAreas, 
-                                int = -1, QMainWindow* = 0 );
+                                 int = -1, QMainWindow* = 0 );
   void            removeToolBar( const QString& );
   void            removeToolBar( const int );
 
index 40911008049c7aa08c1825231a59ec83c48c6c2c..3b1cbef9389fd28440cdb230070e8840a4728b87 100755 (executable)
@@ -530,7 +530,7 @@ QSize QtxColorScale::sizeHint() const
   \return color scale size
 */
 QSize QtxColorScale::calculateSize( const bool min, const int flags, const bool title,
-                                   const bool labels, const bool colors ) const
+                                    const bool labels, const bool colors ) const
 {
   int num = intervalsNumber();
   
@@ -585,7 +585,7 @@ QSize QtxColorScale::calculateSize( const bool min, const int flags, const bool
     {
       QPainter p( (QtxColorScale*)this );
       if ( scaleWidth )
-       srt->setTextWidth( scaleWidth );
+        srt->setTextWidth( scaleWidth );
       
       titleHeight = (int)srt->size().height() + spacer;
       titleWidth = (int)srt->size().width() + 10;
@@ -615,9 +615,9 @@ QPixmap QtxColorScale::dump() const
     {
       bool scale = ( myDumpMode == ScaleDump || myDumpMode == FullDump );
       bool label = ( myDumpMode == ScaleDump || myDumpMode == FullDump ) &&
-       labelPosition() != None;
+        labelPosition() != None;
       bool title = ( myDumpMode == TitleDump || myDumpMode == FullDump ) &&
-       titlePosition() != None;
+        titlePosition() != None;
       QColor bgc = palette().color( backgroundRole() );
       QPainter p;
       p.begin( &aPix );
@@ -666,9 +666,9 @@ QPixmap QtxColorScale::dump( const QColor& bg, const int w, const int h ) const
       QSize sz = calculateSize( false, myFlags & ~WrapTitle, title, label, scale );
       
       if ( W < 0 )
-       W = sz.width();
+        W = sz.width();
       if ( H < 0 )
-       H = sz.height();
+        H = sz.height();
     }
     
     aPix = QPixmap( W, H );
@@ -724,8 +724,8 @@ void QtxColorScale::drawContents( QPainter* p )
   QRect aDrawRect = contentsRect();
   
   drawScale( p, false/*testFlags( Transparent )*/, aDrawRect.x(),
-            aDrawRect.y(), aDrawRect.width(), aDrawRect.height(),
-            titlePosition() != None, labelPosition() != None, true );
+             aDrawRect.y(), aDrawRect.width(), aDrawRect.height(),
+             titlePosition() != None, labelPosition() != None, true );
 }
 
 /*!
@@ -906,13 +906,13 @@ void QtxColorScale::drawScale( QPainter* p, const QColor& bg, const bool transp,
       int pos2 = lab - 1 - i2;
       if ( filter && !( pos1 % filter ) )
       {
-       p->drawText( x, (int)( Y + i1 * step + ascent + offset ), labels[i1] );
-       last1 = i1;
+        p->drawText( x, (int)( Y + i1 * step + ascent + offset ), labels[i1] );
+        last1 = i1;
       }
       if ( filter && !( pos2 % filter ) )
       {
-       p->drawText( x, (int)( Y + i2 * step + ascent + offset ), labels[i2] );
-       last2 = i2;
+        p->drawText( x, (int)( Y + i2 * step + ascent + offset ), labels[i2] );
+        last2 = i2;
       }
       i1++;
       i2--;
@@ -922,8 +922,8 @@ void QtxColorScale::drawScale( QPainter* p, const QColor& bg, const bool transp,
     while ( pos <= i2 && i0 == -1 )
     {
       if ( filter && !( pos % filter ) &&
-          qAbs( pos - last1 ) >= filter && qAbs( pos - last2 ) >= filter )
-       i0 = pos;
+           qAbs( pos - last1 ) >= filter && qAbs( pos - last2 ) >= filter )
+        i0 = pos;
       pos++;
     }
 
index 8b601adbf5d3f61b2076003a2f4b934a5bb9f325..91bdd458aae3df2e0e9a92a2db1b66cfa4de7cac 100755 (executable)
@@ -137,12 +137,12 @@ private:
   double                getNumber( const int ) const;
   QTextDocument*        textDocument( const int ) const;
   void                  drawScale( QPainter*, const bool, const int, const int,
-                                  const int, const int, const bool, const bool, const bool ) const;
+                                   const int, const int, const bool, const bool, const bool ) const;
   void                  drawScale( QPainter*, const QColor&, const bool,
-                                  const int, const int, const int, const int,
-                                  const bool, const bool, const bool ) const;
+                                   const int, const int, const int, const int,
+                                   const bool, const bool, const bool ) const;
   QSize                 calculateSize( const bool, const int,
-                                      const bool, const bool, const bool ) const;
+                                       const bool, const bool, const bool ) const;
 
 private:
   double                myMin;             //!< lower limit
index 3200b78516ab5213c68eec21dadd1ab95cdade92..a2b86279b6885a3d1839f69fb250f71cc983e71a 100755 (executable)
@@ -260,7 +260,7 @@ void QtxDialog::Area::layoutButtons()
     {
       buttonId[mit.value()] = mit.key();
       if ( mit.key() >= 0 )
-       src.append( mit.value() );
+        src.append( mit.value() );
     }
   }
 
@@ -321,7 +321,7 @@ void QtxDialog::Area::layoutButtons()
     {
       buttonLayout->addWidget( other[i] );
       if ( aPolicy == QtxDialog::Uniform && i < (int)other.count() - 1  )
-       buttonLayout->addStretch( 1 );
+        buttonLayout->addStretch( 1 );
     }
   }
 
@@ -446,10 +446,10 @@ QtxDialog::QtxDialog( QWidget* parent, bool modal, bool allowResize, const int f
 #endif
            ( ( allowResize 
 #ifdef WIN32 
-              // in qwidget_win.cpp flag WStyle_ContextHelp will be unset in WStyle_MinMax in switched ON
-              && !( wf & Qt::WindowContextHelpButtonHint )
+               // in qwidget_win.cpp flag WStyle_ContextHelp will be unset in WStyle_MinMax in switched ON
+               && !( wf & Qt::WindowContextHelpButtonHint )
 #endif
-              ) ? Qt::WindowMaximizeButtonHint : 0 ) ) ),
+               ) ? Qt::WindowMaximizeButtonHint : 0 ) ) ),
   myInited( false ),
   mySender( 0 ),
   myAlignment( 0 ),
@@ -1051,7 +1051,7 @@ void QtxDialog::removeButton( const int id )
     for ( ButtonMap::Iterator it = myButton.begin(); it != myButton.end(); ++it )
     {
       if ( it.key() < 0 )
-       map.insert( it.key(), it.value() );
+        map.insert( it.key(), it.value() );
     }
   }
   else if ( myButton.contains( id ) )
@@ -1212,7 +1212,7 @@ QtxDialog::ButtonMap QtxDialog::buttons( const int f ) const
   {
     for ( ButtonMap::ConstIterator it = myButton.begin(); it != myButton.end(); ++it )
       if ( f == -1 || ( it.key() >= 0 && f & it.key() ) )
-       retmap.insert( it.key(), it.value() );
+        retmap.insert( it.key(), it.value() );
   }
   return retmap;
 }
@@ -1541,7 +1541,7 @@ void QtxDialog::adjustButtons()
     const QList<QAbstractButton*>& lst = aIt.value()->buttons();
     for ( QList<QAbstractButton*>::const_iterator bIt = lst.begin(); bIt != lst.end(); ++bIt )
       if ( (*bIt)->isVisibleTo( this ) )
-       minWidth = qMax( minWidth, (*bIt)->sizeHint().width() );
+        minWidth = qMax( minWidth, (*bIt)->sizeHint().width() );
   }
 
   for ( AreaMap::Iterator aItr = myArea.begin(); aItr != myArea.end(); ++aItr )
@@ -1549,7 +1549,7 @@ void QtxDialog::adjustButtons()
     const QList<QAbstractButton*>& lst = aItr.value()->buttons();
     for ( QList<QAbstractButton*>::const_iterator bItr = lst.begin(); bItr != lst.end(); ++bItr )
       if ( (*bItr)->isVisibleTo( this ) )
-       (*bItr)->setMinimumWidth( minWidth );
+        (*bItr)->setMinimumWidth( minWidth );
   }
 }
 
index bd5824924ab18bc7a6f9144ef79820927ff13cb7..e35487f38d70eff882acf4edafea43d540a17ea2 100755 (executable)
@@ -48,41 +48,41 @@ class QTX_EXPORT QtxDialog : public QDialog
 public:
   //! Buttons alignment type
   typedef enum { Position,          //!< buttons are placed according their position
-                Expand,            //!< buttons occupy all available space
-                Uniform            //!< buttons are uniformly placed in the area
+                 Expand,            //!< buttons occupy all available space
+                 Uniform            //!< buttons are uniformly placed in the area
   } PlacePolicy;
   //! Buttons area
   typedef enum { TopArea,           //!< horizontal area at the top side of the dialog box
-                BottomArea,        //!< horizontal area at the bottom side of the dialog box
-                LeftArea,          //!< vertical area at the left side of the dialog box
-                RightArea          //!< vertical area at the right side of the dialog box
+                 BottomArea,        //!< horizontal area at the bottom side of the dialog box
+                 LeftArea,          //!< vertical area at the left side of the dialog box
+                 RightArea          //!< vertical area at the right side of the dialog box
   } ButtonArea;
   //! Button position
   typedef enum { Left,              //!< set button left-most
-                Right,             //!< set button right-most
-                Center,            //!< place button in the center
-                Top = Left,        //!< set button top-most
-                Bottom = Right     //!< set button bottom-most
+                 Right,             //!< set button right-most
+                 Center,            //!< place button in the center
+                 Top = Left,        //!< set button top-most
+                 Bottom = Right     //!< set button bottom-most
   } ButtonPosition;
   //! Button ID flags
   typedef enum { None      = 0x00000000,                      //!< no button used
-                OK        = 0x00000001,                      //!< OK button
-                Apply     = 0x00000002,                      //!< Apply button
-                Cancel    = 0x00000004,                      //!< Cancel button
-                Yes       = 0x00000008,                      //!< Yes button
-                No        = 0x00000010,                      //!< No button
-                Close     = 0x00000020,                      //!< Close button
-                Help      = 0x00000040,                      //!< Help button
-                OKCancel  = OK  | Cancel,                    //!< OK & Cancel button
-                YesNo     = Yes | No,                        //!< Yes & No buttons
-                Standard  = OK  | Cancel | Help,             //!< OK, Cancel & Help buttons
-                All       = Standard | YesNo | Apply | Close //!< all buttons
+                 OK        = 0x00000001,                      //!< OK button
+                 Apply     = 0x00000002,                      //!< Apply button
+                 Cancel    = 0x00000004,                      //!< Cancel button
+                 Yes       = 0x00000008,                      //!< Yes button
+                 No        = 0x00000010,                      //!< No button
+                 Close     = 0x00000020,                      //!< Close button
+                 Help      = 0x00000040,                      //!< Help button
+                 OKCancel  = OK  | Cancel,                    //!< OK & Cancel button
+                 YesNo     = Yes | No,                        //!< Yes & No buttons
+                 Standard  = OK  | Cancel | Help,             //!< OK, Cancel & Help buttons
+                 All       = Standard | YesNo | Apply | Close //!< all buttons
   } ButtonFlags;
   //! Dialog box flags
   typedef enum { Accept    = 0x000001, //!< allow dialog box accepting control
-                Reject    = 0x000002, //!< allow dialog box rejecting control
-                AlignOnce = 0x000004, //!< align dialog box only when it is first time shown
-                SetFocus  = 0x000008  //!< allow to set focus on dialog box when it is shown (user can use setFocusProxy() and specify own initial focus widget)
+                 Reject    = 0x000002, //!< allow dialog box rejecting control
+                 AlignOnce = 0x000004, //!< align dialog box only when it is first time shown
+                 SetFocus  = 0x000008  //!< allow to set focus on dialog box when it is shown (user can use setFocusProxy() and specify own initial focus widget)
   } DialogFlags;
   
 public:
index fbc1b2d39131c831ad3251bbb5dd50399bd07abe..756cbd314ceaf268b9c4e1edd1e00e38d6a8c74d 100755 (executable)
@@ -46,8 +46,8 @@ class QTX_EXPORT QtxDockAction : public QtxAction
 public:
   //! Dock windows type.
   enum { ToolBar,      //!< list toolbars only
-        DockWidget,   //!< list dockable windows only
-        Both          //!< list toolbars and dockable windows
+         DockWidget,   //!< list dockable windows only
+         Both          //!< list toolbars and dockable windows
   } DockType;
 
 public:
index a14b2fd40fab4b3d0b375e2b109bf4c974395a3d..a7adfc5d11932c3b62de1b9252232d3d9751f919 100644 (file)
@@ -269,7 +269,7 @@ void QtxDockWidget::Watcher::updateVisibility()
     if ( l )
     {
       for ( int i = 0; i < (int)l->count() && !vis; i++ )
-       vis = l->itemAt( i ) && l->itemAt( i )->widget() && l->itemAt( i )->widget()->isVisibleTo( myCont );
+        vis = l->itemAt( i ) && l->itemAt( i )->widget() && l->itemAt( i )->widget()->isVisibleTo( myCont );
     }
   }
 
index 87d5b6008bcc823aa522d5c8faf72a87f4743016..dad449f6caae8e58439e932c56d5d7cdeadc3df2 100644 (file)
@@ -65,7 +65,7 @@ QtxDoubleSpinBox::QtxDoubleSpinBox( QWidget* parent )
   myPrecision(0)
 {
   connect( lineEdit(), SIGNAL( textChanged( const QString& ) ), 
-          this, SLOT( onTextChanged( const QString& ) ) );
+           this, SLOT( onTextChanged( const QString& ) ) );
 }
 
 /*!
@@ -90,7 +90,7 @@ QtxDoubleSpinBox::QtxDoubleSpinBox( double min, double max, double step, QWidget
   setSingleStep( step );
 
   connect( lineEdit(), SIGNAL( textChanged( const QString& ) ), 
-          this, SLOT( onTextChanged( const QString& ) ) );
+           this, SLOT( onTextChanged( const QString& ) ) );
 }
 
 /*!
@@ -116,7 +116,7 @@ QtxDoubleSpinBox::QtxDoubleSpinBox( double min, double max, double step, int pre
   setSingleStep( step );
 
   connect( lineEdit(), SIGNAL( textChanged( const QString& ) ), 
-          this, SLOT( onTextChanged( const QString& ) ) );
+           this, SLOT( onTextChanged( const QString& ) ) );
 }
 
 /*!
@@ -275,30 +275,30 @@ QValidator::State QtxDoubleSpinBox::validate( QString& str, int& pos ) const
   else
     {
       if ( str.length() >= overhead && str.startsWith( pref ) &&
-          str.right( suff.length() ) == suff )
-       {
-         QString core = str.mid( pref.length(), str.length() - overhead );
-         int corePos = pos - pref.length();
-         state = v.validate( core, corePos );
-         pos = corePos + pref.length();
-         str.replace( pref.length(), str.length() - overhead, core );
-       }
+           str.right( suff.length() ) == suff )
+        {
+          QString core = str.mid( pref.length(), str.length() - overhead );
+          int corePos = pos - pref.length();
+          state = v.validate( core, corePos );
+          pos = corePos + pref.length();
+          str.replace( pref.length(), str.length() - overhead, core );
+        }
       else
-       {
-         state = v.validate( str, pos );
-         if ( state == QValidator::Invalid )
-           {
-             QString special = this->specialValueText().trimmed();
-             QString candidate = str.trimmed();
-             if ( special.startsWith( candidate ) )
-               {
-                 if ( candidate.length() == special.length() )
-                   state = QValidator::Acceptable;
-                 else
-                   state = QValidator::Intermediate;
-               }
-           }
-       }
+        {
+          state = v.validate( str, pos );
+          if ( state == QValidator::Invalid )
+            {
+              QString special = this->specialValueText().trimmed();
+              QString candidate = str.trimmed();
+              if ( special.startsWith( candidate ) )
+                {
+                  if ( candidate.length() == special.length() )
+                    state = QValidator::Acceptable;
+                  else
+                    state = QValidator::Intermediate;
+                }
+            }
+        }
     }
   return state;
 }
index 3f8630d82d1a38d428e000b03b09ff1883139fa5..140a3173a4113088baeaf183f81b5dbb97fb3e50 100644 (file)
@@ -445,7 +445,7 @@ bool QtxEvalParser::prepare( const QString& expr, Postfix& post )
       mLen = 0;
       if ( oPos != pos && cPos != pos )
       {
-             int i; 
+              int i; 
         for ( i = pos + 1; i < (int)expr.length(); i++ )
         {
           if ( expr[i].isSpace() )
@@ -2309,7 +2309,7 @@ QtxEvalExpr::Error QtxEvalSetSets::calculate( const QString& op, QVariant& v1, Q
         v1 = res;
       }
       else
-             v1 = QVariant( v2.toList().contains( v1 ) );
+              v1 = QVariant( v2.toList().contains( v1 ) );
     }
   }
   return err;
@@ -2417,8 +2417,8 @@ int QtxEvalSetConst::priority( const QString& /*op*/, bool /*isBin*/ ) const
   \return error code (QtxEvalExpr::Error)
 */
 QtxEvalExpr::Error QtxEvalSetConst::isValid( const QString&       /*op*/, 
-                                            const QVariant::Type /*t1*/,
-                                            const QVariant::Type /*t2*/ ) const
+                                             const QVariant::Type /*t1*/,
+                                             const QVariant::Type /*t2*/ ) const
 {
   return QtxEvalExpr::InvalidOperation;
 }
index 426e31bb91de721e45033baaf44829dc51c12296..02a92596e4f627827a4793d303bd1de83159c4ac 100755 (executable)
@@ -62,7 +62,7 @@ QtxIntSpinBox::QtxIntSpinBox( QWidget* parent )
 {
   setCorrectionMode( QSpinBox::CorrectToNearestValue );
   connect( lineEdit(), SIGNAL( textChanged( const QString& ) ), 
-          this, SLOT( onTextChanged( const QString& ) ) );
+           this, SLOT( onTextChanged( const QString& ) ) );
 }
 
 /*!
@@ -86,7 +86,7 @@ QtxIntSpinBox::QtxIntSpinBox( int min, int max, int step, QWidget* parent )
   setCorrectionMode( QSpinBox::CorrectToNearestValue );
 
   connect( lineEdit(), SIGNAL( textChanged( const QString& ) ), 
-          this, SLOT( onTextChanged( const QString& ) ) );
+           this, SLOT( onTextChanged( const QString& ) ) );
 }
 
 /*!
index b63f0fcd1bc197647dea9435745945944436a188..6162a28fe9a170197c58617eb81a5bac09b20ec5 100755 (executable)
@@ -587,7 +587,7 @@ QtxListAction::QtxListAction( QObject* parent )
   \param parent parent object
 */
 QtxListAction::QtxListAction( const QIcon& icon, const QString& menuText, 
-                             int accel, QObject* parent )
+                              int accel, QObject* parent )
 : QtxAction( menuText, icon, menuText, accel, parent ),
   myFrame( 0 )
 {
@@ -615,7 +615,7 @@ QtxListAction::QtxListAction( const QString& menuText, int accel, QObject* paren
   \param parent parent object
 */
 QtxListAction::QtxListAction( const QString& text, const QString& menuText, 
-                             int accel, QObject* parent )
+                              int accel, QObject* parent )
 : QtxAction( text, menuText, accel, parent ),
   myFrame( 0 )
 {
@@ -631,7 +631,7 @@ QtxListAction::QtxListAction( const QString& text, const QString& menuText,
   \param parent parent object
 */
 QtxListAction::QtxListAction( const QString& text, const QIcon& icon, 
-                             const QString& menuText, int accel, QObject* parent )
+                              const QString& menuText, int accel, QObject* parent )
 : QtxAction( text, icon, menuText, accel, parent ),
   myFrame( 0 )
 {
index bed55bebccb3219d47c68a457b8a4e63c09633f1..52e29f908ce0901d528635f6d85e07f0e73280ec 100644 (file)
@@ -392,7 +392,7 @@ void QtxLogoMgr::generate()
     {
       logoLab->setPixmap( (*it).pix );
 //      if ( !pix.mask().isNull() )
-//         logoLab->setMask( pix.mask() );
+//          logoLab->setMask( pix.mask() );
     }
 
     logoLab->setScaledContents( false );
index d6f6f3d11f7972467e2ede927e7fccebb733948f..b3f5c89a77540a2da700a8dca4ea7ea53fe1b53a 100755 (executable)
@@ -378,7 +378,7 @@ void QtxMRUAction::saveLinks( QtxResourceMgr* resMgr, const QString& section, co
     for ( QStringList::const_iterator it = items.begin(); it != items.end(); ++it )
     {
       if ( (*it).startsWith( itemPrefix ) )
-       resMgr->remove( section, *it );
+        resMgr->remove( section, *it );
     }
   }
 
@@ -408,8 +408,8 @@ void QtxMRUAction::saveLinks( QtxResourceMgr* resMgr, const QString& section, co
 
   int counter = 0;
   for ( QStringList::const_iterator iter = lst.begin();
-       iter != lst.end() && ( myHistoryCount < 0 || counter < myHistoryCount );
-       ++iter, counter++ )
+        iter != lst.end() && ( myHistoryCount < 0 || counter < myHistoryCount );
+        ++iter, counter++ )
     resMgr->setValue( section, itemPrefix + QString().sprintf( "%03d", counter ), *iter );
 }
 
@@ -467,9 +467,9 @@ void QtxMRUAction::updateMenu()
     {
       QString shortName = Qtx::file( myLinks[i] );
       if ( map.contains( shortName ) )
-       map[shortName]++;
+        map[shortName]++;
       else
-       map.insert( shortName, 0 );
+        map.insert( shortName, 0 );
     }
   }
 
@@ -482,7 +482,7 @@ void QtxMRUAction::updateMenu()
     case LinkAuto:
       linkName = Qtx::file( *it );
       if ( map.contains( linkName ) && map[linkName] )
-       linkName = *it;
+        linkName = *it;
       break;
     case LinkShort:
       linkName = Qtx::file( *it );
index 2611593d5ce07eabbba08077784ecf50a2c55345..93a5a231c5f139f94eb44a5ed4c041e7e5911cc9 100755 (executable)
@@ -42,14 +42,14 @@ class QTX_EXPORT QtxMRUAction : public QtxAction
 public:
   //! Items insertion policy
   typedef enum { MoveFirst,   //!< put the specified item to the beginning
-                MoveLast,    //!< put the specified item to the end
-                AddFirst,    //!< if specified item doesn't exist, add it to the beginning
-                AddLast      //!< if specified item doesn't exist, add it to the end
+                 MoveLast,    //!< put the specified item to the end
+                 AddFirst,    //!< if specified item doesn't exist, add it to the beginning
+                 AddLast      //!< if specified item doesn't exist, add it to the end
   } InsertionMode;
 
   typedef enum { LinkAuto,    //!< put the full path of link into the menu if link file names of severals link are same
-                LinkShort,   //!< put the only file name of link into the menu
-                LinkFull     //!< put the full path of link into the menu
+                 LinkShort,   //!< put the only file name of link into the menu
+                 LinkFull     //!< put the full path of link into the menu
   } LinkType;
 
 public:
index ac0053e5bf841666d21f717a541a8e019105b803..5802f6b1af88194b5dd5c4544c9b59e0c9b85ef4 100644 (file)
@@ -309,7 +309,7 @@ void QtxMainWindow::retrieveGeometry( const QString& str )
     if ( xOk )
     {
       if ( xp )
-       x = screen.width() * qMax( qMin( x, 100 ), 0 ) / 100;
+        x = screen.width() * qMax( qMin( x, 100 ), 0 ) / 100;
       x = ( xs > 0 ? x : screen.right() - x - rect.width() ) + frameGeometry().x() - geometry().x();
     }
 
@@ -320,7 +320,7 @@ void QtxMainWindow::retrieveGeometry( const QString& str )
     if ( yOk )
     {
       if ( yp )
-       y = screen.height() * qMax( qMin( y, 100 ), 0 ) / 100;
+        y = screen.height() * qMax( qMin( y, 100 ), 0 ) / 100;
       y = ( ys > 0 ? y : screen.bottom() - y - rect.height() ) + frameGeometry().y() - geometry().y();
     }
 
index 9859c9e3225c235d5ed474677fb9abe41940f11f..21f85f53bf462212ea2099caef50c3b76514743f 100644 (file)
@@ -53,7 +53,7 @@ public:
     if ( e->type() == QEvent::Leave ) {
       QToolButton* tb = qobject_cast<QToolButton*>( o );
       if ( tb )
-       tb->setDown( false );
+        tb->setDown( false );
     }
     return QObject::eventFilter( o, e );
   }
index 35c84807d80425a24cbb20f7e56af43e8b92a777..3a346ec3b22d55f1e30ed4fd9eb57fe2d8a38030 100644 (file)
@@ -2085,7 +2085,7 @@ QtxPagePrefEditItem::QtxPagePrefEditItem( const QString& title, QtxPreferenceIte
 */
 QtxPagePrefEditItem::QtxPagePrefEditItem( const int type, const QString& title,
                                           QtxPreferenceItem* parent, const QString& sect,
-                                         const QString& param )
+                                          const QString& param )
 : QtxPageNamedPrefItem( title, parent, sect, param ),
   myType( type )
 {
@@ -2618,7 +2618,7 @@ QtxPagePrefSpinItem::QtxPagePrefSpinItem( const QString& title, QtxPreferenceIte
 */
 QtxPagePrefSpinItem::QtxPagePrefSpinItem( const int type, const QString& title,
                                           QtxPreferenceItem* parent, const QString& sect,
-                                         const QString& param )
+                                          const QString& param )
 : QtxPageNamedPrefItem( title, parent, sect, param ),
   myType( type )
 {
@@ -2988,7 +2988,7 @@ void QtxPagePrefSpinItem::updateSpinBox()
   \param param resource file parameter associated with the preference item
 */
 QtxPagePrefTextItem::QtxPagePrefTextItem( QtxPreferenceItem* parent, const QString& sect,
-                                         const QString& param )
+                                          const QString& param )
 : QtxPageNamedPrefItem( QString(), parent, sect, param )
 {
   myEditor = new QTextEdit();
@@ -3102,7 +3102,7 @@ void QtxPagePrefColorItem::retrieve()
 */
 QtxPagePrefFontItem::QtxPagePrefFontItem( const int feat, const QString& title,
                                           QtxPreferenceItem* parent, const QString& sect,
-                                         const QString& param )
+                                          const QString& param )
 : QtxPageNamedPrefItem( title, parent, sect, param )
 {
   setControl( myFont = new QtxFontEdit( feat ) );
index 684d0a40dbbc4198f7070680cbcf07bfb78c2efe..e344862bd8df88742295b03f1e3e4d42f348bb84 100755 (executable)
@@ -340,7 +340,7 @@ bool QtxPathDialog::isValid()
 bool QtxPathDialog::acceptData() const
 {
   bool ok = true;
-       
+        
   QWidget* parent = (QWidget*)this;
 
   FileEntryMap::ConstIterator it;
@@ -351,7 +351,7 @@ bool QtxPathDialog::acceptData() const
     if ( entry.edit->text().isEmpty() )
     {
       QMessageBox::critical( parent, windowTitle(), tr( "File name not specified" ),
-                            QMessageBox::Ok, QMessageBox::NoButton );
+                             QMessageBox::Ok, QMessageBox::NoButton );
       ok = false;
     }
     else switch ( entry.mode )
@@ -359,44 +359,44 @@ bool QtxPathDialog::acceptData() const
     case OpenFile:
       if ( !fileInfo.exists() )
       {
-       QMessageBox::critical( parent, windowTitle(), tr( "File \"%1\" does not exist" ).arg( fileInfo.filePath() ),
-                              QMessageBox::Ok, QMessageBox::NoButton );
-       ok = false;
+        QMessageBox::critical( parent, windowTitle(), tr( "File \"%1\" does not exist" ).arg( fileInfo.filePath() ),
+                               QMessageBox::Ok, QMessageBox::NoButton );
+        ok = false;
       }
       break;
     case SaveFile:
       if ( fileInfo.exists() )
-       ok = QMessageBox::warning( parent, windowTitle(), tr( "File \"%1\" already exist. Do you want to overwrite it?" ).arg( fileInfo.filePath() ),
-                                  QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes;
+        ok = QMessageBox::warning( parent, windowTitle(), tr( "File \"%1\" already exist. Do you want to overwrite it?" ).arg( fileInfo.filePath() ),
+                                   QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes;
       break;
     case OpenDir:
       if ( !fileInfo.exists() || !fileInfo.isDir() )
       {
-       QMessageBox::critical( parent, windowTitle(), tr( "Directory \"%1\" does not exist" ).arg( fileInfo.filePath() ),
-                              QMessageBox::Ok, QMessageBox::NoButton );
-       ok = false;
+        QMessageBox::critical( parent, windowTitle(), tr( "Directory \"%1\" does not exist" ).arg( fileInfo.filePath() ),
+                               QMessageBox::Ok, QMessageBox::NoButton );
+        ok = false;
       }
       break;
     case SaveDir:
       if ( fileInfo.exists() && !fileInfo.isDir() )
       {
-       QMessageBox::critical( parent, windowTitle(), tr( "Directory \"%1\" can't be created because file with the same name exist" ).arg( fileInfo.filePath() ),
-                              QMessageBox::Ok, QMessageBox::NoButton );
-       ok = false;
+        QMessageBox::critical( parent, windowTitle(), tr( "Directory \"%1\" can't be created because file with the same name exist" ).arg( fileInfo.filePath() ),
+                               QMessageBox::Ok, QMessageBox::NoButton );
+        ok = false;
       }
       break;
     case NewDir:
       if ( fileInfo.exists() )
       {
-       if ( !fileInfo.isDir() )
-       {
-         QMessageBox::critical( parent, windowTitle(), tr( "Directory \"%1\" can't be created because file with the same name exist" ).arg( fileInfo.filePath() ),
-                                QMessageBox::Ok, QMessageBox::NoButton );
-         ok = false;
-       }
-       else if ( QDir( fileInfo.filePath() ).count() > 2 )
-         ok = QMessageBox::warning( parent, windowTitle(), tr( "Directory \"%1\" not empty. Do you want to remove all files in this directory?" ).arg( fileInfo.filePath() ),
-                                    QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes;
+        if ( !fileInfo.isDir() )
+        {
+          QMessageBox::critical( parent, windowTitle(), tr( "Directory \"%1\" can't be created because file with the same name exist" ).arg( fileInfo.filePath() ),
+                                 QMessageBox::Ok, QMessageBox::NoButton );
+          ok = false;
+        }
+        else if ( QDir( fileInfo.filePath() ).count() > 2 )
+          ok = QMessageBox::warning( parent, windowTitle(), tr( "Directory \"%1\" not empty. Do you want to remove all files in this directory?" ).arg( fileInfo.filePath() ),
+                                     QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes;
       }
       break;
     default:
@@ -461,7 +461,7 @@ void QtxPathDialog::setFileName( const int id, const QString& txt, const bool au
 {
   int mode;
   QLineEdit* le = fileEntry( id, mode );
-       
+        
   if ( le )
   {
     if ( autoExt && ( mode == OpenFile || mode == SaveFile ) )
@@ -539,7 +539,7 @@ QLineEdit* QtxPathDialog::fileEntry( const int theId, int& theMode ) const
   \return created file entry ID
 */
 int QtxPathDialog::createFileEntry( const QString& lab, const int mode, 
-                                                           const QString& filter, const int id )
+                                                            const QString& filter, const int id )
 {
   int num = id;
   if ( num == -1 )
@@ -668,7 +668,7 @@ QStringList QtxPathDialog::filterWildCards( const QString& theFilter ) const
     for ( QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it )
     {
       if ( (*it).indexOf( "." ) != -1 )
-       res.append( (*it).trimmed() );
+        res.append( (*it).trimmed() );
     }
   }
   return res;
@@ -720,7 +720,7 @@ bool QtxPathDialog::hasVisibleChildren( QWidget* wid ) const
     for ( QObjectList::const_iterator it = aChildren.begin(); it != aChildren.end() && !res; ++it )
     {
       if ( (*it)->isWidgetType() )
-       res = ((QWidget*)(*it))->isVisibleTo( wid );
+        res = ((QWidget*)(*it))->isVisibleTo( wid );
     }
   }
   return res;
index a963d9e0871eb5af1dfbb5d3206b8e3f18d30cc8..faf9335aebd435fa810fbbf686d5e49ee9b66d16 100755 (executable)
@@ -95,7 +95,7 @@ private:
   void               initialize();
   void               updateVisibility();
   QStringList        prepareFilters( const QString& ) const;
-       bool               hasVisibleChildren( QWidget* ) const;
+        bool               hasVisibleChildren( QWidget* ) const;
   QStringList        filterWildCards( const QString& ) const;
   QString            autoExtension( const QString&, const QString& = QString() ) const;
 
index e15173b896c673fd8f27751ec61e973b542fa8b8..8ba42c2645b5aeb77eb828f2f3e2d5e2c766c87a 100644 (file)
@@ -505,24 +505,24 @@ bool QtxPathListEdit::validate( const bool quietMode )
       if (found) {
         if (found != myLastSelected) {
           // it is forbidden to add directory more then once
-         if ( !quietMode )
-           QMessageBox::critical(this, 
-                                 tr("Error"),
-                                 tr("Directory already specified."), 
-                                 tr("Ok"));
-         myEdit->setFocus();
+          if ( !quietMode )
+            QMessageBox::critical(this, 
+                                  tr("Error"),
+                                  tr("Directory already specified."), 
+                                  tr("Ok"));
+          myEdit->setFocus();
           return false;
         }
       }
       else {
         if (!dir.exists()) {
-         if ( !quietMode && QMessageBox::information(this, 
-                                                     tr("Warning"),
-                                                     tr("%1\n\nThe directory doesn't exist.\nAdd directory anyway?").arg(dir.absPath()),
-                                                     tr("Yes"), tr("No"), QString(), 1, 1) == 1) {
-           myEdit->setFocus();
+          if ( !quietMode && QMessageBox::information(this, 
+                                                      tr("Warning"),
+                                                      tr("%1\n\nThe directory doesn't exist.\nAdd directory anyway?").arg(dir.absPath()),
+                                                      tr("Yes"), tr("No"), QString(), 1, 1) == 1) {
+            myEdit->setFocus();
             return false;
-         }
+          }
         }
         // append
         appendDir(myLastSelected, dir.absPath());
index 343f09314a51a73d17f477d27903fd38d0061ea0..bccd7f399ec3c9fecc2e7855a563b0ad7e1956ad 100644 (file)
@@ -51,11 +51,11 @@ bool operator<( const QVariant& v1, const QVariant& v2 )
     {
       const QList<QVariant>& aList1 = v1.toList(), aList2 = v2.toList();
       QList<QVariant>::const_iterator anIt1 = aList1.begin(), aLast1 = aList1.end(),
-       anIt2 = aList2.begin(), aLast2 = aList2.end();
+        anIt2 = aList2.begin(), aLast2 = aList2.end();
       for ( ; anIt1 != aLast1 && anIt2 != aLast2;  anIt1++, anIt2++ )
       {
-       if ( (*anIt1) != (*anIt2) )
-         return (*anIt1)<(*anIt2);
+        if ( (*anIt1) != (*anIt2) )
+          return (*anIt1)<(*anIt2);
       }
       return anIt1 == aLast1 && anIt2 != aLast2;
     }
@@ -85,7 +85,7 @@ public:
                           const ItemAttributes&, const int );
 
   virtual QString rule( const ItemAttributes&, 
-                       const QtxPopupMgr::RuleType = VisibleRule ) const;
+                        const QtxPopupMgr::RuleType = VisibleRule ) const;
 
 private:
   QtxPopupMgr*    myMgr;
@@ -189,7 +189,7 @@ int QtxPopupMgr::PopupCreator::append( const QString& tag, const bool subMenu,
   \return rule for the menu item corresponding to the rule type
 */
 QString QtxPopupMgr::PopupCreator::rule( const ItemAttributes& /*attr*/, 
-                                        const QtxPopupMgr::RuleType /*ruleType*/ ) const
+                                         const QtxPopupMgr::RuleType /*ruleType*/ ) const
 {
   return QString();
 }
@@ -288,7 +288,7 @@ void QtxPopupMgr::setSelection( QtxPopupSelection* sel )
   if ( mySelection )
     mySelection->setParent( this );
   connect( mySelection, SIGNAL( destroyed( QObject* ) ), 
-          this,        SLOT( onSelectionDestroyed( QObject* ) ) );
+           this,        SLOT( onSelectionDestroyed( QObject* ) ) );
 
   QtxActionMgr::triggerUpdate();
 }
@@ -514,18 +514,18 @@ bool QtxPopupMgr::isSatisfied( QAction* act, const RuleType ruleType ) const
       for ( int i = 0; i < mySelection->count() && !res; i++ )
       {
         QList<QVariant> c;
-       for ( QStringList::const_iterator anIt1 = specific.begin(); anIt1 != specific.end(); ++anIt1 )
+        for ( QStringList::const_iterator anIt1 = specific.begin(); anIt1 != specific.end(); ++anIt1 )
           c.append( parameter( *anIt1, i ) );
         aCorteges.insert( c, 0 );
       }
       for ( QMap<QList<QVariant>, int>::const_iterator anIt = aCorteges.begin(); anIt  != aCorteges.end(); ++anIt )
       {
-       const QList<QVariant>& aCortege = anIt.key();
-       QStringList::const_iterator anIt1 = specific.begin(), aLast1 = specific.end();
-       QList<QVariant>::const_iterator anIt2 = aCortege.begin();
-       for ( ; anIt1 != aLast1; anIt1++, anIt2++ )
-         p->setParameter( *anIt1, *anIt2 );
-       res = res || result( p );
+        const QList<QVariant>& aCortege = anIt.key();
+        QStringList::const_iterator anIt1 = specific.begin(), aLast1 = specific.end();
+        QList<QVariant>::const_iterator anIt2 = aCortege.begin();
+        for ( ; anIt1 != aLast1; anIt1++, anIt2++ )
+          p->setParameter( *anIt1, *anIt2 );
+        res = res || result( p );
       }
     }
     else
@@ -726,9 +726,9 @@ QVariant QtxPopupSelection::parameter( const QString& str ) const
     {
       QVariant v = parameter( i, par );
       if ( v.isValid() )
-       QtxEvalSetSets::add( set, v );
+        QtxEvalSetSets::add( set, v );
       else
-       return QVariant();
+        return QVariant();
     }
     return set;
   }
index a273d8bce67ab2e883e4e16a4bb5e3010b1801b4..addc1dce1267a86dff5915d624e86646724db846 100644 (file)
@@ -683,24 +683,24 @@ bool QtxResourceMgr::XmlFormat::load( const QString& fname, QMap<QString, Sectio
               secMap[section].insert( paramName, paramValue );
             }
             else
-           {
-             qDebug( "Invalid parameter element" );
+            {
+              qDebug( "Invalid parameter element" );
               res = false;
-           }
+            }
+          }
+          else
+          {
+            res = paramNode.isComment();
+            if( !res )
+              qDebug( "Node isn't element nor comment" );
           }
-         else
-         {
-           res = paramNode.isComment();
-           if( !res )
-             qDebug( "Node isn't element nor comment" );
-         }
 
           paramNode = paramNode.nextSibling();
         }
       }
       else
       {
-       qDebug( "Invalid section" );
+        qDebug( "Invalid section" );
         res = false;
       }
     }
@@ -708,7 +708,7 @@ bool QtxResourceMgr::XmlFormat::load( const QString& fname, QMap<QString, Sectio
     {
       res = sectNode.isComment(); // if it's a comment -- let it be, pass it..
       if( !res )
-       qDebug( "Node isn't element nor comment" );
+        qDebug( "Node isn't element nor comment" );
     }
 
     sectNode = sectNode.nextSibling();
@@ -870,7 +870,7 @@ QStringList QtxResourceMgr::Format::options() const
   \brief Get the value of the option with specified name.
 
   If option doesn't exist then null QString is returned.
-        
+         
   \param opt option name
   \return option value
 */
index 99f67f404c3776bbd8eebeb4b8a12b177afba7d6..e93c644add2d05bd173b8d99a04db44a360afaef 100755 (executable)
@@ -213,7 +213,7 @@ void QtxAbstractRubberBand::updateMask()
 
 
 QtxRectRubberBand::QtxRectRubberBand(QWidget* parent)
-  :QtxAbstractRubberBand( parent )     
+  :QtxAbstractRubberBand( parent )      
 {
   myPoints.resize( 4 );
   myIsClosed = true;
@@ -241,7 +241,7 @@ void QtxRectRubberBand::setStartPoint( const QPoint& thePoint )
 
 void QtxRectRubberBand::setEndPoint( const QPoint& thePoint)
 {
-  myPoints[2] = thePoint;      
+  myPoints[2] = thePoint;       
   myPoints[1].setX( thePoint.x() );
   myPoints[3].setY( thePoint.y() );
   updateMask();
index 0abf9bb8ed62fefb6c181617afd45675463c96b5..9c90581bee0084da23bf26ca0d81bf786978a7a9 100755 (executable)
@@ -70,7 +70,7 @@ public:
   void            initGeometry( const QRect& );
   void            setStartPoint( const QPoint& );
   void            setEndPoint( const QPoint& );
-       
+        
   virtual void    clearGeometry();
 };
 
index b7f9444af832e9c6e77a3b17b0d0660de487a349..c63c902d58c3054820cdae211a9fd862eddfb621 100644 (file)
 
 const char* const first_xpm[] = {
 "16 16 14 1",
-"      c None",
-".     c #111111",
-"+     c #0A0A0A",
-"@     c #161616",
-"#     c #ACACAC",
-"$     c #FC6D6E",
-"%     c #FB6364",
-"&     c #F25B5C",
-"*     c #EA5859",
-"=     c #C1494A",
-"-     c #B64545",
-";     c #AB4040",
-">     c #A03C3C",
-",     c #99393A",
+"       c None",
+".      c #111111",
+"+      c #0A0A0A",
+"@      c #161616",
+"#      c #ACACAC",
+"$      c #FC6D6E",
+"%      c #FB6364",
+"&      c #F25B5C",
+"*      c #EA5859",
+"=      c #C1494A",
+"-      c #B64545",
+";      c #AB4040",
+">      c #A03C3C",
+",      c #99393A",
 "           .    ",
 " +@+      ..#   ",
 " +$+#    .$.... ",
@@ -71,20 +71,20 @@ const char* const first_xpm[] = {
 
 const char* const last_xpm[] = {
 "16 16 14 1",
-"      c None",
-".     c #111111",
-"+     c #0A0A0A",
-"@     c #161616",
-"#     c #FC6D6E",
-"$     c #ACACAC",
-"%     c #FB6364",
-"&     c #F25B5C",
-"*     c #EA5859",
-"=     c #C1494A",
-"-     c #B64545",
-";     c #AB4040",
-">     c #A03C3C",
-",     c #99393A",
+"       c None",
+".      c #111111",
+"+      c #0A0A0A",
+"@      c #161616",
+"#      c #FC6D6E",
+"$      c #ACACAC",
+"%      c #FB6364",
+"&      c #F25B5C",
+"*      c #EA5859",
+"=      c #C1494A",
+"-      c #B64545",
+";      c #AB4040",
+">      c #A03C3C",
+",      c #99393A",
 "    .           ",
 "    ..      +@+ ",
 " ....#.     +#+$",
@@ -104,18 +104,18 @@ const char* const last_xpm[] = {
 
 const char* const prev_xpm[] = {
 "16 16 12 1",
-"      c None",
-".     c #111111",
-"+     c #ACACAC",
-"@     c #FC6D6E",
-"#     c #FB6364",
-"$     c #F25B5C",
-"%     c #EA5859",
-"&     c #C1494A",
-"*     c #B64545",
-"=     c #AB4040",
-"-     c #A03C3C",
-";     c #99393A",
+"       c None",
+".      c #111111",
+"+      c #ACACAC",
+"@      c #FC6D6E",
+"#      c #FB6364",
+"$      c #F25B5C",
+"%      c #EA5859",
+"&      c #C1494A",
+"*      c #B64545",
+"=      c #AB4040",
+"-      c #A03C3C",
+";      c #99393A",
 "        .       ",
 "       ..+      ",
 "      .@......  ",
@@ -135,18 +135,18 @@ const char* const prev_xpm[] = {
 
 const char* const next_xpm[] = {
 "16 16 12 1",
-"      c None",
-".     c #111111",
-"+     c #FC6D6E",
-"@     c #FB6364",
-"#     c #F25B5C",
-"$     c #EA5859",
-"%     c #C1494A",
-"&     c #B64545",
-"*     c #ACACAC",
-"=     c #AB4040",
-"-     c #A03C3C",
-";     c #99393A",
+"       c None",
+".      c #111111",
+"+      c #FC6D6E",
+"@      c #FB6364",
+"#      c #F25B5C",
+"$      c #EA5859",
+"%      c #C1494A",
+"&      c #B64545",
+"*      c #ACACAC",
+"=      c #AB4040",
+"-      c #A03C3C",
+";      c #99393A",
 "       .        ",
 "       ..       ",
 "  ......+.      ",
@@ -166,14 +166,14 @@ const char* const next_xpm[] = {
 
 const char* const close_xpm[] = {
 "16 16 8 1",
-"      c None",
-".     c #D73727",
-"+     c #E17765",
-"@     c #E7957F",
-"#     c #DE6F48",
-"$     c #DF7B4F",
-"%     c #FAE9E4",
-"&     c #FFFFFF",
+"       c None",
+".      c #D73727",
+"+      c #E17765",
+"@      c #E7957F",
+"#      c #DE6F48",
+"$      c #DF7B4F",
+"%      c #FAE9E4",
+"&      c #FFFFFF",
 "                ",
 "  ............  ",
 " .+@@@@@@@@@@+. ",
@@ -828,9 +828,9 @@ void QtxSearchTool::find( const QString& what, int where )
 
   QPalette p = myData->palette();
   p.setColor( QPalette::Active,
-             QPalette::Base,
-             QApplication::palette( myData ).color( QPalette::Active,
-                                                    QPalette::Base ) );
+              QPalette::Base,
+              QApplication::palette( myData ).color( QPalette::Active,
+                                                     QPalette::Base ) );
 
   bool found = true;
   if ( mySearcher && !what.isEmpty() )
@@ -1041,7 +1041,7 @@ void QtxSearchTool::updateShortcuts()
   for ( it = myShortcuts.begin(), i = 0; it != myShortcuts.end(); ++it, i++ )
   {
     (*it)->setEnabled( isEnabled() && ( i < 3 && myActivators & StandardKey ||
-                                       i > 2 && myActivators & HotKey ) );
+                                        i > 2 && myActivators & HotKey ) );
   }
 }
 
@@ -1408,8 +1408,8 @@ QModelIndexList QtxTreeViewSearcher::findItems( const QString& text, QtxSearchTo
 
   if ( myView->model() )
     return myView->model()->match( myView->model()->index( 0, myColumn ),
-                                  Qt::DisplayRole,
-                                  s, -1, fl );
+                                   Qt::DisplayRole,
+                                   s, -1, fl );
   return QModelIndexList();
 }
 
@@ -1422,8 +1422,8 @@ QModelIndexList QtxTreeViewSearcher::findItems( const QString& text, QtxSearchTo
   appropriate item
 */
 QModelIndex QtxTreeViewSearcher::findNearest( const QModelIndex& index,
-                                             const QModelIndexList& lst,
-                                             bool direction )
+                                              const QModelIndexList& lst,
+                                              bool direction )
 {
   if ( direction )
   {
@@ -1432,7 +1432,7 @@ QModelIndex QtxTreeViewSearcher::findNearest( const QModelIndex& index,
     {
       QModelIndex found = it.next();
       if ( compareIndices( found, index ) > 0 )
-       return found;
+        return found;
     }
   }
   else
@@ -1443,7 +1443,7 @@ QModelIndex QtxTreeViewSearcher::findNearest( const QModelIndex& index,
     {
       QModelIndex found = it.previous();
       if ( compareIndices( found, index ) < 0 )
-       return found;
+        return found;
     }
   }
   return QModelIndex();
@@ -1494,7 +1494,7 @@ QString QtxTreeViewSearcher::getId( const QModelIndex& index )
   and positive value otherwise
 */
 int QtxTreeViewSearcher::compareIndices( const QModelIndex& left,
-                                        const QModelIndex& right )
+                                         const QModelIndex& right )
 {
   QString leftId = getId( left );
   QString rightId = getId( right );
index f3610af520b02ef1b119ef2e8a91a58580174f53..465a42bae44f7e6df36ac4b65e083c4907c1976c 100644 (file)
@@ -266,9 +266,9 @@ void QtxSplash::setError( const QString& error, const QString& title, const int
   if ( mySplash ) {
     mySplash->setError( code );
     QMessageBox::critical( mySplash, 
-                          title.isEmpty() ? tr( "Error" ) : title,
-                          error,
-                          tr( "&OK" ) );
+                           title.isEmpty() ? tr( "Error" ) : title,
+                           error,
+                           tr( "&OK" ) );
   }
   else {
     printf( "QtxSplash::error: %s\n",error.toLatin1().constData() );
@@ -552,7 +552,7 @@ int QtxSplash::progressFlags() const
   \sa progressColors()
 */
 void QtxSplash::setProgressColors( const QColor&         startColor, 
-                                  const QColor&         endColor,
+                                   const QColor&         endColor,
                                    const Qt::Orientation orientation )
 {
   if ( !startColor.isValid() )
@@ -907,19 +907,19 @@ void QtxSplash::readSettings( QtxResourceMgr* resMgr, const QString& section )
       fl = 0;
       QStringList opts = pf.split( QRegExp( "," ), QString::SkipEmptyParts );
       for ( int i = 0; i < opts.count(); i++ ) {
-       QString opt = opts[i].trimmed().toLower();
-       if ( opt == "left" )
-         fl = fl | LeftSide;
-       else if ( opt == "right" )
-         fl = fl | RightSide;
-       else if ( opt == "top" )
-         fl = fl | TopSide;
-       else if ( opt == "bottom" )
-         fl = fl | BottomSide;
-       else if ( opt == "left_to_right" )
-         fl = fl | LeftToRight;
-       else if ( opt == "right_to_left" )
-         fl = fl | RightToLeft;
+        QString opt = opts[i].trimmed().toLower();
+        if ( opt == "left" )
+          fl = fl | LeftSide;
+        else if ( opt == "right" )
+          fl = fl | RightSide;
+        else if ( opt == "top" )
+          fl = fl | TopSide;
+        else if ( opt == "bottom" )
+          fl = fl | BottomSide;
+        else if ( opt == "left_to_right" )
+          fl = fl | LeftToRight;
+        else if ( opt == "right_to_left" )
+          fl = fl | RightToLeft;
       }
     }
     setProgressFlags( fl );
@@ -946,23 +946,23 @@ void QtxSplash::readSettings( QtxResourceMgr* resMgr, const QString& section )
       fl = 0;
       QStringList opts = al.split( QRegExp( "," ), QString::SkipEmptyParts );
       for ( int i = 0; i < opts.count(); i++ ) {
-       QString opt = opts[i].trimmed().toLower();
-       if ( opt == "left" )
-         fl = fl | Qt::AlignLeft;
-       else if ( opt == "right" )
-         fl = fl | Qt::AlignRight;
-       else if ( opt == "top" )
-         fl = fl | Qt::AlignTop;
-       else if ( opt == "bottom" )
-         fl = fl | Qt::AlignBottom;
-       else if ( opt == "hcenter" )
-         fl = fl | Qt::AlignHCenter;
-       else if ( opt == "vcenter" )
-         fl = fl | Qt::AlignVCenter;
-       else if ( opt == "justify" )
-         fl = fl | Qt::AlignJustify;
-       else if ( opt == "center" )
-         fl = fl | Qt::AlignCenter;
+        QString opt = opts[i].trimmed().toLower();
+        if ( opt == "left" )
+          fl = fl | Qt::AlignLeft;
+        else if ( opt == "right" )
+          fl = fl | Qt::AlignRight;
+        else if ( opt == "top" )
+          fl = fl | Qt::AlignTop;
+        else if ( opt == "bottom" )
+          fl = fl | Qt::AlignBottom;
+        else if ( opt == "hcenter" )
+          fl = fl | Qt::AlignHCenter;
+        else if ( opt == "vcenter" )
+          fl = fl | Qt::AlignVCenter;
+        else if ( opt == "justify" )
+          fl = fl | Qt::AlignJustify;
+        else if ( opt == "center" )
+          fl = fl | Qt::AlignCenter;
       }
     }
     setTextAlignment( fl );
@@ -978,17 +978,17 @@ void QtxSplash::readSettings( QtxResourceMgr* resMgr, const QString& section )
     setProgressColors( lgrad );
   }
   else if ( resMgr->value( resSection, "progress_color",  rgrad ) || 
-           resMgr->value( resSection, "progress_colors", rgrad ) ) {
+            resMgr->value( resSection, "progress_colors", rgrad ) ) {
     // radial gradient-colored progress bar
     setProgressColors( rgrad );
   }
   else if ( resMgr->value( resSection, "progress_color",  cgrad ) || 
-           resMgr->value( resSection, "progress_colors", cgrad ) ) {
+            resMgr->value( resSection, "progress_colors", cgrad ) ) {
     // conical gradient-colored progress bar
     setProgressColors( cgrad );
   }
   else if ( resMgr->value( resSection, "progress_color",  pc ) || 
-           resMgr->value( resSection, "progress_colors", pc ) ) {
+            resMgr->value( resSection, "progress_colors", pc ) ) {
     // one/two-colored progress bar
     QStringList colors = pc.split( "|", QString::SkipEmptyParts );
     QColor c1, c2;
@@ -1000,12 +1000,12 @@ void QtxSplash::readSettings( QtxResourceMgr* resMgr, const QString& section )
       bool bOk;
       gt = colors[2].toInt( &bOk );
       if ( bOk ) {
-       if ( gt == 0 )
-         o = Qt::Horizontal;
+        if ( gt == 0 )
+          o = Qt::Horizontal;
       }
       else {
-       if ( colors[2].toLower().startsWith( "h" ) )
-         o = Qt::Horizontal;
+        if ( colors[2].toLower().startsWith( "h" ) )
+          o = Qt::Horizontal;
       }
     }
     setProgressColors( c1, c2, o );
@@ -1046,8 +1046,8 @@ void QtxSplash::readSettings( QtxResourceMgr* resMgr, const QString& section )
   \sa message(), constantInfo(), setConstantInfo()
 */
 void QtxSplash::setMessage( const QString& msg, 
-                           int            alignment,
-                           const QColor&  color )
+                            int            alignment,
+                            const QColor&  color )
 {
   myMessage   = msg;
   myAlignment = alignment;
@@ -1219,17 +1219,17 @@ void QtxSplash::drawProgressBar( QPainter* p )
       QLinearGradient lg;
       const QLinearGradient* other = static_cast<const QLinearGradient*>( progressColors() );
       if ( checkGradient( other ) ) {
-       // gradient is defined in relative coordinates [0.0 - 1.0]
-       lg.setStart( r.left() + r.width()  * other->start().x(), 
-                    r.top()  + r.height() * other->start().y() );
-       lg.setFinalStop( r.left() + r.width()  * other->finalStop().x(), 
-                        r.top()  + r.height() * other->finalStop().y() );
+        // gradient is defined in relative coordinates [0.0 - 1.0]
+        lg.setStart( r.left() + r.width()  * other->start().x(), 
+                     r.top()  + r.height() * other->start().y() );
+        lg.setFinalStop( r.left() + r.width()  * other->finalStop().x(), 
+                         r.top()  + r.height() * other->finalStop().y() );
       }
       else {
-       // gradient is defined in absolute coordinates
-       // according to its dimensions
-       lg.setStart( r.topLeft() + other->start() );
-       lg.setFinalStop( r.topLeft() + other->finalStop() );
+        // gradient is defined in absolute coordinates
+        // according to its dimensions
+        lg.setStart( r.topLeft() + other->start() );
+        lg.setFinalStop( r.topLeft() + other->finalStop() );
       }
       
       lg.setStops( other->stops() );
@@ -1244,17 +1244,17 @@ void QtxSplash::drawProgressBar( QPainter* p )
       QRadialGradient rg;
       const QRadialGradient* other = static_cast<const QRadialGradient*>( progressColors() );
       if ( checkGradient( other ) ) {
-       // gradient is defined in relative coordinates [0.0 - 1.0]
-       rg.setCenter( r.left() + r.width()  * other->center().x(),
-                     r.top()  + r.height() * other->center().y() );
-       rg.setFocalPoint( r.left() + r.width()  * other->focalPoint().x(),
-                         r.top()  + r.height() * other->focalPoint().y() );
+        // gradient is defined in relative coordinates [0.0 - 1.0]
+        rg.setCenter( r.left() + r.width()  * other->center().x(),
+                      r.top()  + r.height() * other->center().y() );
+        rg.setFocalPoint( r.left() + r.width()  * other->focalPoint().x(),
+                          r.top()  + r.height() * other->focalPoint().y() );
       }
       else {
-       // gradient is defined in absolute coordinates
-       // according to its dimensions
-       rg.setCenter( r.topLeft() + other->center() );
-       rg.setFocalPoint( r.topLeft() + other->focalPoint() );
+        // gradient is defined in absolute coordinates
+        // according to its dimensions
+        rg.setCenter( r.topLeft() + other->center() );
+        rg.setFocalPoint( r.topLeft() + other->focalPoint() );
       }
       
       // only width is taken into account for the radius in relative mode
@@ -1272,14 +1272,14 @@ void QtxSplash::drawProgressBar( QPainter* p )
       QConicalGradient cg;
       const QConicalGradient* other = static_cast<const QConicalGradient*>( progressColors() );
       if ( checkGradient( other ) ) {
-       // gradient is defined in relative coordinates [0.0 - 1.0]
-       cg.setCenter( r.left() + r.width()  * other->center().x(),
-                     r.top()  + r.height() * other->center().y() );
+        // gradient is defined in relative coordinates [0.0 - 1.0]
+        cg.setCenter( r.left() + r.width()  * other->center().x(),
+                      r.top()  + r.height() * other->center().y() );
       }
       else {
-       // gradient is defined in absolute coordinates
-       // according to its dimensions
-       cg.setCenter( r.topLeft() + other->center() );
+        // gradient is defined in absolute coordinates
+        // according to its dimensions
+        cg.setCenter( r.topLeft() + other->center() );
       }
 
       cg.setAngle( other->angle() );
index 07475c65a6688ff89ee19d53cfcb0efde8d361ce..66431803e92d8f8d19ccf25edbefff4fee35d69f 100644 (file)
@@ -95,8 +95,8 @@ public:
   int               progressFlags() const;
   
   void              setProgressColors( const QColor&, 
-                                      const QColor& = QColor(),
-                                      const Qt::Orientation = Qt::Vertical );
+                                       const QColor& = QColor(),
+                                       const Qt::Orientation = Qt::Vertical );
   void              setProgressColors( const QGradient& );
   const QGradient*  progressColors() const;
   
@@ -126,8 +126,8 @@ public:
 
 public slots:
   void              setMessage( const QString&, 
-                               const int,
-                               const QColor& = QColor() );
+                                const int,
+                                const QColor& = QColor() );
   void              setMessage( const QString& );
   void              clear();
   
index fe2ba2ed86736dfb8091558eb8b57b433e82d500..63ab2b30afee88dbd62666f557324d447bc8c8a1 100644 (file)
@@ -154,7 +154,7 @@ bool QtxTable::eventFilter( QObject* o, QEvent* e )
 
   if ( o == myHeaderEditor && e->type() == QEvent::KeyPress && isHeaderEditing() )
   {
-         QKeyEvent* ke = (QKeyEvent*)e;
+          QKeyEvent* ke = (QKeyEvent*)e;
     if ( ke->key() == Key_Escape )
     {
       endHeaderEdit( false );
@@ -173,8 +173,8 @@ bool QtxTable::eventFilter( QObject* o, QEvent* e )
   if ( o == myHeaderEditor && e->type() == QEvent::FocusOut &&
        isHeaderEditing() && ((QFocusEvent*)e)->reason() != QFocusEvent::Popup )
   {
-               endHeaderEdit();
-               return true;
+                endHeaderEdit();
+                return true;
   }
 
   if ( e->type() == QEvent::Wheel && isHeaderEditing() )
index 6154653feafdadf3a983c29347c00961c22cc698..23c1ca52b02d8aca343d377e020deda8c66b5f52 100644 (file)
@@ -101,8 +101,8 @@ bool QtxToolBar::Watcher::eventFilter( QObject* o, QEvent* e )
   bool updVis = ( o != myCont && ( e->type() == QEvent::Show || e->type() == QEvent::ShowToParent ||
                                    e->type() == QEvent::Hide || e->type() == QEvent::HideToParent ) ) ||
                 ( o == myCont && ( e->type() == QEvent::ChildRemoved || e->type() == QEvent::Show ||
-                                  e->type() == QEvent::ShowToParent || e->type() == QEvent::ActionAdded ||
-                                  e->type() == QEvent::ActionRemoved ) );
+                                   e->type() == QEvent::ShowToParent || e->type() == QEvent::ActionAdded ||
+                                   e->type() == QEvent::ActionRemoved ) );
 
   if ( updVis )
   {
index 61007661b76411c1f33578563b0ff0b2b4804432..c05ad144954f23b99bf001d0a6d0df48550731b6 100755 (executable)
@@ -48,21 +48,21 @@ QtxToolTip::QtxToolTip( QWidget* parent )
   palette.setColor( backgroundRole(), QColor( 255, 255, 231 ) );
   setPalette( palette );
 
-       myWidgetRegion = QRect( -1, -1, -1, -1 );
+        myWidgetRegion = QRect( -1, -1, -1, -1 );
 
-       setFrameShape( QFrame::Panel );
-       setFrameShadow( QFrame::Plain );
+        setFrameShape( QFrame::Panel );
+        setFrameShadow( QFrame::Plain );
 
   parent->setMouseTracking( true );
-       parent->installEventFilter( this );
-       installEventFilter( this );
+        parent->installEventFilter( this );
+        installEventFilter( this );
 
-       mySleepTimer = new QTimer( this );
+        mySleepTimer = new QTimer( this );
         mySleepTimer->setSingleShot( true );
-       myWakeUpTimer = new QTimer( this );
+        myWakeUpTimer = new QTimer( this );
         myWakeUpTimer->setSingleShot( true );
-       connect( mySleepTimer,  SIGNAL( timeout() ), this, SLOT( onSleepTimeOut()  ) );
-       connect( myWakeUpTimer, SIGNAL( timeout() ), this, SLOT( onWakeUpTimeOut() ) );
+        connect( mySleepTimer,  SIGNAL( timeout() ), this, SLOT( onSleepTimeOut()  ) );
+        connect( myWakeUpTimer, SIGNAL( timeout() ), this, SLOT( onWakeUpTimeOut() ) );
 
   myWakeUpDelayTime = 700;
   myShowDelayTime = 5000;
@@ -80,49 +80,49 @@ QtxToolTip::~QtxToolTip()
 */
 bool QtxToolTip::eventFilter( QObject* o, QEvent* e )
 {
-       if ( ( e->type() == QEvent::Destroy ) || ( e->type() == QEvent::Close ) || ( e->type() == QEvent::Hide ) )
-       {
-               hideTip();
-       }
-       if ( e->type() == QEvent::Leave )
-       {
-               if ( isVisible() && ( o == this ) )
-                       hideTip();
-               myWakeUpTimer->stop();
-       }
-       if ( e->type() == QEvent::MouseMove )
-       {
-               QMouseEvent* me = (QMouseEvent*)e;
-               QPoint thePos = parentWidget()->mapFromGlobal( me->globalPos() );
-               if ( myWakeUpTimer->isActive() )
-               {
-                       myWakeUpTimer->stop();
-                       myWakeUpTimer->start( myWakeUpDelayTime );
-               }
-               if ( isVisible() )
-               {
-                       if ( !myWidgetRegion.contains( thePos ) )
+        if ( ( e->type() == QEvent::Destroy ) || ( e->type() == QEvent::Close ) || ( e->type() == QEvent::Hide ) )
+        {
+                hideTip();
+        }
+        if ( e->type() == QEvent::Leave )
+        {
+                if ( isVisible() && ( o == this ) )
+                        hideTip();
+                myWakeUpTimer->stop();
+        }
+        if ( e->type() == QEvent::MouseMove )
+        {
+                QMouseEvent* me = (QMouseEvent*)e;
+                QPoint thePos = parentWidget()->mapFromGlobal( me->globalPos() );
+                if ( myWakeUpTimer->isActive() )
+                {
+                        myWakeUpTimer->stop();
+                        myWakeUpTimer->start( myWakeUpDelayTime );
+                }
+                if ( isVisible() )
+                {
+                        if ( !myWidgetRegion.contains( thePos ) )
       {
-                               hideTip();
+                                hideTip();
         myWidgetRegion = QRect( -1, -1, -1, -1 );
       }
-               }
-               else
-               {
-                       if ( !myWidgetRegion.isValid() || myWidgetRegion.contains( thePos ) )
-                               myWakeUpTimer->start( myWakeUpDelayTime );
-               }
-       }
-       if ( e->type() == QEvent::KeyPress )
-       {
-               hideTip();
-       }
-       if ( o == parent() && ( e->type() == QEvent::MouseButtonPress ||
+                }
+                else
+                {
+                        if ( !myWidgetRegion.isValid() || myWidgetRegion.contains( thePos ) )
+                                myWakeUpTimer->start( myWakeUpDelayTime );
+                }
+        }
+        if ( e->type() == QEvent::KeyPress )
+        {
+                hideTip();
+        }
+        if ( o == parent() && ( e->type() == QEvent::MouseButtonPress ||
                           e->type() == QEvent::MouseButtonRelease ) )
-       {
-               hideTip();
-       }
-       return false;
+        {
+                hideTip();
+        }
+        return false;
 }
 
 /*!
@@ -133,10 +133,10 @@ bool QtxToolTip::eventFilter( QObject* o, QEvent* e )
 */
 void QtxToolTip::showTip( const QPoint& aPos, const QString& text, const QRect& aWidgetRegion )
 {
-       QFontMetrics theFM = fontMetrics();
-       int theHeight = theFM.height();
-       int theWidth = theFM.width( text ) + 2;
-       showTip( QRect( QPoint( aPos.x(), aPos.y() + 10 ), QSize( theWidth, theHeight ) ), text, aWidgetRegion );
+        QFontMetrics theFM = fontMetrics();
+        int theHeight = theFM.height();
+        int theWidth = theFM.width( text ) + 2;
+        showTip( QRect( QPoint( aPos.x(), aPos.y() + 10 ), QSize( theWidth, theHeight ) ), text, aWidgetRegion );
 }
 
 /*!
@@ -147,12 +147,12 @@ void QtxToolTip::showTip( const QPoint& aPos, const QString& text, const QRect&
 */
 void QtxToolTip::showTip( const QRect& aRegion, const QString& text, const QRect& aWidgetRegion )
 {
-       setText( text );
-       myWidgetRegion = aWidgetRegion;
-       setGeometry( aRegion );
-       if ( myShowDelayTime != 0 )
-               mySleepTimer->start( myShowDelayTime );
-       show();
+        setText( text );
+        myWidgetRegion = aWidgetRegion;
+        setGeometry( aRegion );
+        if ( myShowDelayTime != 0 )
+                mySleepTimer->start( myShowDelayTime );
+        show();
 }
 
 /*!
@@ -160,9 +160,9 @@ void QtxToolTip::showTip( const QRect& aRegion, const QString& text, const QRect
 */
 void QtxToolTip::hideTip()
 {
-       hide();
+        hide();
   myWidgetRegion = QRect( -1, -1, -1, -1 );
-       mySleepTimer->stop();
+        mySleepTimer->stop();
 }
 
 /*!
@@ -172,23 +172,23 @@ void QtxToolTip::hideTip()
 */
 void QtxToolTip::maybeTip( const QPoint& pos )
 {
-       QString text;
-       QRect textRegion, theRegion( -1, -1, -1, -1 );
-       QFont theFnt = font();
+        QString text;
+        QRect textRegion, theRegion( -1, -1, -1, -1 );
+        QFont theFnt = font();
 
     emit maybeTip( pos, text, theFnt, textRegion, theRegion );
 
     if ( theRegion.isValid() )
-       {
-               setFont( theFnt );
-               int margin = lineWidth() + indent();
-               QRect dspRegion( QPoint( textRegion.x() - margin, textRegion.y() ),
-                                        QSize( textRegion.width() + 2 * margin, textRegion.height() ) );
-               QRect tipRegion( parentWidget()->mapToGlobal( dspRegion.topLeft() ), dspRegion.size() );
-               if ( tipRegion.left() < 0 )
-                       tipRegion.translate( -1 * tipRegion.left(), 0 );
-               showTip( tipRegion, text, theRegion );
-       }
+        {
+                setFont( theFnt );
+                int margin = lineWidth() + indent();
+                QRect dspRegion( QPoint( textRegion.x() - margin, textRegion.y() ),
+                                         QSize( textRegion.width() + 2 * margin, textRegion.height() ) );
+                QRect tipRegion( parentWidget()->mapToGlobal( dspRegion.topLeft() ), dspRegion.size() );
+                if ( tipRegion.left() < 0 )
+                        tipRegion.translate( -1 * tipRegion.left(), 0 );
+                showTip( tipRegion, text, theRegion );
+        }
 }
 
 /*!
@@ -196,8 +196,8 @@ void QtxToolTip::maybeTip( const QPoint& pos )
 */
 void QtxToolTip::onSleepTimeOut()
 {
-       mySleepTimer->stop();
-       hideTip();
+        mySleepTimer->stop();
+        hideTip();
 }
 
 /*!
@@ -205,7 +205,7 @@ void QtxToolTip::onSleepTimeOut()
 */
 void QtxToolTip::onWakeUpTimeOut()
 {
-       myWakeUpTimer->stop();
+        myWakeUpTimer->stop();
   QPoint pos = QCursor::pos();
   if ( parentWidget() )
     pos = parentWidget()->mapFromGlobal( pos );
@@ -217,12 +217,12 @@ void QtxToolTip::onWakeUpTimeOut()
 */
 void QtxToolTip::mousePressEvent( QMouseEvent* e )
 {
-       hideTip();
-       QWidget* reciever = parentWidget();
-       QMouseEvent* me = new QMouseEvent( QEvent::MouseButtonPress,
-                                                                          reciever->mapFromGlobal( e->globalPos() ),
-                                                                          e->button(), e->buttons(), Qt::KeypadModifier );
-       QApplication::sendEvent( reciever, me );
+        hideTip();
+        QWidget* reciever = parentWidget();
+        QMouseEvent* me = new QMouseEvent( QEvent::MouseButtonPress,
+                                                                           reciever->mapFromGlobal( e->globalPos() ),
+                                                                           e->button(), e->buttons(), Qt::KeypadModifier );
+        QApplication::sendEvent( reciever, me );
 }
 
 /*!
@@ -230,12 +230,12 @@ void QtxToolTip::mousePressEvent( QMouseEvent* e )
 */
 void QtxToolTip::mouseDoubleClickEvent( QMouseEvent* e )
 {
-       hideTip();
-       QWidget* reciever = parentWidget();
-       QMouseEvent* me = new QMouseEvent( QEvent::MouseButtonDblClick,
-                                                                          reciever->mapFromGlobal( e->globalPos() ),
-                                                                          e->button(), e->buttons(), Qt::KeypadModifier );
-       QApplication::sendEvent( reciever, me );
+        hideTip();
+        QWidget* reciever = parentWidget();
+        QMouseEvent* me = new QMouseEvent( QEvent::MouseButtonDblClick,
+                                                                           reciever->mapFromGlobal( e->globalPos() ),
+                                                                           e->button(), e->buttons(), Qt::KeypadModifier );
+        QApplication::sendEvent( reciever, me );
 }
 
 /*!
index 1af9afe9a3e674609e1a03959433c75760f505c6..b8586b6f696329dcacb8138458520416c8d8eb21 100755 (executable)
@@ -33,20 +33,20 @@ class QTimer;
 
 class QTX_EXPORT QtxToolTip : public QLabel
 {
-       Q_OBJECT
+        Q_OBJECT
 
 public:
-       QtxToolTip( QWidget* = 0 );
-       virtual ~QtxToolTip();
+        QtxToolTip( QWidget* = 0 );
+        virtual ~QtxToolTip();
 
-       void          hideTip();
+        void          hideTip();
   
-       virtual void  showTip( const QPoint& aPos,
+        virtual void  showTip( const QPoint& aPos,
                          const QString& text, const QRect& aWidgetRegion );
-       virtual void  showTip( const QRect& aRegion,
+        virtual void  showTip( const QRect& aRegion,
                          const QString& text, const QRect& aWidgetRegion );
 
-       virtual bool  eventFilter( QObject* o, QEvent* e );
+        virtual bool  eventFilter( QObject* o, QEvent* e );
 
   void          setWakeUpDelayTime( int );
   void          setShowDelayTime( int );
@@ -58,21 +58,21 @@ signals:
   void          maybeTip( QPoint, QString&, QFont&, QRect&, QRect& );
 
 protected slots:
-       void          onSleepTimeOut();
-       void          onWakeUpTimeOut();
+        void          onSleepTimeOut();
+        void          onWakeUpTimeOut();
 
 protected:
-       virtual void  maybeTip( const QPoint& );
-       virtual void  mousePressEvent( QMouseEvent* );
-       virtual void  mouseDoubleClickEvent( QMouseEvent* );
+        virtual void  maybeTip( const QPoint& );
+        virtual void  mousePressEvent( QMouseEvent* );
+        virtual void  mouseDoubleClickEvent( QMouseEvent* );
 
   QTimer*       sleepTimer() const;
   QTimer*       wakeUpTimer() const;
 
 private:
-       QTimer*       myWakeUpTimer;
-       QTimer*       mySleepTimer;
-       QRect         myWidgetRegion;
+        QTimer*       myWakeUpTimer;
+        QTimer*       mySleepTimer;
+        QRect         myWidgetRegion;
 
   int           myShowDelayTime;
   int           myWakeUpDelayTime;
index 6e6ef8baf0ee362f6f700ccf6c061f313f68cdf8..f0ff8d0b8e1d7e93d101e9e57a40e9468498451d 100644 (file)
@@ -110,13 +110,13 @@ void QtxTreeView::Header::contextMenuEvent( QContextMenuEvent* e )
     QIcon icon;
     if ( iconData.isValid() ) {
       if ( qVariantCanConvert<QIcon>( iconData ) )
-       icon = qVariantValue<QIcon>( iconData );
+        icon = qVariantValue<QIcon>( iconData );
       else if ( qVariantCanConvert<QPixmap>( iconData ) )
-       icon = qVariantValue<QPixmap>( iconData );
+        icon = qVariantValue<QPixmap>( iconData );
     }
     if( ( !lab.isEmpty() || !icon.isNull() ) && 
-           appropriate.isValid() ? appropriate.toInt()==Qtx::Toggled : true )
-       {
+            appropriate.isValid() ? appropriate.toInt()==Qtx::Toggled : true )
+        {
       QAction* a = menu.addAction( icon, lab );
       a->setCheckable( true );
       a->setChecked( !isSectionHidden( i ) );
@@ -141,15 +141,15 @@ void QtxTreeView::Header::contextMenuEvent( QContextMenuEvent* e )
       setClickable( a->isChecked() );
       QtxTreeView* view = qobject_cast<QtxTreeView*>( parent() );
       if ( view ) {
-       view->emitSortingEnabled( a->isChecked() );
-       if ( a->isChecked() ) {
-         connect( this, SIGNAL( sectionClicked( int ) ), view, SLOT( onHeaderClicked( int ) ) );
-         view->sortByColumn( sortIndicatorSection(), sortIndicatorOrder() );
-       }
-       else {
-         disconnect( this, SIGNAL( sectionClicked( int ) ), view, SLOT( onHeaderClicked( int ) ) );
-         view->sortByColumn( 0, Qt::AscendingOrder );
-       }
+        view->emitSortingEnabled( a->isChecked() );
+        if ( a->isChecked() ) {
+          connect( this, SIGNAL( sectionClicked( int ) ), view, SLOT( onHeaderClicked( int ) ) );
+          view->sortByColumn( sortIndicatorSection(), sortIndicatorOrder() );
+        }
+        else {
+          disconnect( this, SIGNAL( sectionClicked( int ) ), view, SLOT( onHeaderClicked( int ) ) );
+          view->sortByColumn( 0, Qt::AscendingOrder );
+        }
       }
     }
   }
@@ -315,7 +315,7 @@ void QtxTreeView::onHeaderClicked( int column )
   \param deselected previous selection
 */
 void QtxTreeView::selectionChanged( const QItemSelection& selected, 
-                                   const QItemSelection& deselected )
+                                    const QItemSelection& deselected )
 {
   QTreeView::selectionChanged( selected, deselected );
   emit( selectionChanged() );
@@ -384,15 +384,15 @@ void QtxTreeView::setModel( QAbstractItemModel* m )
   QTreeView::setModel( m );
   if ( model() )
     connect( model(), SIGNAL( headerDataChanged( Qt::Orientation, int, int ) ),
-            this, SLOT( onAppropriate( Qt::Orientation, int, int ) ) );
+             this, SLOT( onAppropriate( Qt::Orientation, int, int ) ) );
 }
 
 void QtxTreeView::onAppropriate( Qt::Orientation orient, int first, int last )
 {
   if( orient==Qt::Horizontal )
     for( int i=first; i<=last; i++ )
-       {
-         int appr = model()->headerData( i, orient, Qtx::AppropriateRole ).toInt();
-         header()->setSectionHidden( i, appr==Qtx::Hidden );
-       }
+        {
+          int appr = model()->headerData( i, orient, Qtx::AppropriateRole ).toInt();
+          header()->setSectionHidden( i, appr==Qtx::Hidden );
+        }
 }
index 6529d9e2df7deb0b285521d9e9141cd42eee090b..e4fec68e3b909e4e6ef72535f3ac478e7a59e350 100644 (file)
@@ -102,7 +102,7 @@ QtxDoubleValidator::QtxDoubleValidator( QObject* parent )
   \param parent parent object
 */
 QtxDoubleValidator::QtxDoubleValidator( const double bot, const double top,
-                                       const int dec, QObject* parent )
+                                        const int dec, QObject* parent )
 : QDoubleValidator( bot, top, dec, parent )
 {
 }
index d2d517977ff91341659cb330944400bcaf73a98a..be6db8a1bc1804cc483f9a15aaf020569612ef18 100644 (file)
@@ -251,12 +251,12 @@ void QtxWorkspaceAction::cascade()
 
   ws->cascade();
 
-       int w = ws->width();
-       int h = ws->height();
+        int w = ws->width();
+        int h = ws->height();
 
-       QWidgetList winList = ws->windowList();
+        QWidgetList winList = ws->windowList();
   for ( QWidgetList::iterator it = winList.begin(); it != winList.end(); ++it )
-               (*it)->resize( int( w * 0.8 ), int( h * 0.8 ) );
+                (*it)->resize( int( w * 0.8 ), int( h * 0.8 ) );
 }
 
 /*!
index d9409bb513cb9c0272d21a5db5f37e6e52132d46..b1da1a5a8c32217c296dfbeb8189fe91b9a774be 100644 (file)
@@ -372,7 +372,7 @@ void CloseButton::paintEvent( QPaintEvent* )
 
   QPixmap pm = icon().pixmap( style()->pixelMetric( QStyle::PM_SmallIconSize ), isEnabled() ?
                               underMouse() ? QIcon::Active : QIcon::Normal
-                             : QIcon::Disabled,
+                              : QIcon::Disabled,
                               isDown() ? QIcon::On : QIcon::Off );
   style()->drawItemPixmap( &p, r, Qt::AlignCenter, pm );
 }
@@ -445,7 +445,7 @@ void QtxWorkstackSplitter::saveState( QDataStream& stream ) const
     {
       QtxWorkstackArea* area = ::qobject_cast<QtxWorkstackArea*>( wid );
       if ( area )
-             area->saveState( stream );
+              area->saveState( stream );
     }
   }
 }
@@ -964,13 +964,13 @@ void QtxWorkstackArea::customEvent( QEvent* e )
         if ( activeWidget()->focusWidget()->hasFocus() )
         {
           QFocusEvent in( QEvent::FocusIn );
-               QApplication::sendEvent( this, &in );
-             }
+                QApplication::sendEvent( this, &in );
+              }
         else
         {
           activeWidget()->focusWidget()->setFocus();
-               myBar->updateActiveState();
-             }
+                myBar->updateActiveState();
+              }
       }
     }
     break;
@@ -1912,7 +1912,7 @@ void QtxWorkstack::Split( QWidget* wid, const Qt::Orientation o, const SplitType
       {
         area->removeWidget( wid_i );
         newArea->insertWidget( wid_i );
-       wid_i->showMaximized();
+        wid_i->showMaximized();
       }
     }
     break;
@@ -1926,7 +1926,7 @@ void QtxWorkstack::Split( QWidget* wid, const Qt::Orientation o, const SplitType
       {
         area->removeWidget( *itr );
         newArea->insertWidget( *itr );
-       (*itr)->showMaximized();
+        (*itr)->showMaximized();
       }
     }
     break;
@@ -2024,7 +2024,7 @@ void QtxWorkstack::Attract( QWidget* wid1, QWidget* wid2, const bool all )
           area1->insertWidget( *itr2, wid1_ind + 1 );
         else
           area1->insertWidget( *itr2, ind );
-       (*itr2)->showMaximized();
+        (*itr2)->showMaximized();
       }
     }
     else
@@ -2907,7 +2907,7 @@ QtxWorkstackArea* QtxWorkstack::createArea( QWidget* parent ) const
   connect( area, SIGNAL( destroyed( QObject* ) ), this, SLOT( onDestroyed( QObject* ) ) );
   connect( area, SIGNAL( activated( QWidget* ) ), this, SLOT( onWindowActivated( QWidget* ) ) );
   connect( area, SIGNAL( contextMenuRequested( QWidget*, QPoint ) ),
-          this, SLOT( onContextMenuRequested( QWidget*, QPoint ) ) );
+           this, SLOT( onContextMenuRequested( QWidget*, QPoint ) ) );
   connect( area, SIGNAL( deactivated( QtxWorkstackArea* ) ), this, SLOT( onDeactivated( QtxWorkstackArea* ) ) );
 
   return area;
@@ -3095,7 +3095,7 @@ bool QtxWorkstack::restoreState( QDataStream& stream )
     {
       QtxWorkstackChild* c = *itr;
       if ( !c->widget() )
-       continue;
+        continue;
 
       map.insert( c->widget()->objectName(), c );
 
index fa1ad83c770e920bdc68913010fa8267eb6b918c..7571e18a8a19032a55477912ca7e5985b952407f 100644 (file)
@@ -59,21 +59,21 @@ class QTX_EXPORT QtxWorkstack : public QWidget
 public:
   //! Workstack actions (context menu items)
   enum { SplitVertical    = 0x01,  //!< "Split vertically" menu item
-        SplitHorizontal  = 0x02,  //!< "Split horizontally" menu item
-        Close            = 0x04,  //!< "Close" menu item
-        Rename           = 0x08,  //!< "Rename" menu item
-        All = SplitVertical | SplitHorizontal |
-              Close | Rename      //!< all menu items
+         SplitHorizontal  = 0x02,  //!< "Split horizontally" menu item
+         Close            = 0x04,  //!< "Close" menu item
+         Rename           = 0x08,  //!< "Rename" menu item
+         All = SplitVertical | SplitHorizontal |
+               Close | Rename      //!< all menu items
   };
 
   enum { VersionMarker = 0x01,
-              SplitMarker   = 0x02,
-              AreaMarker    = 0x04,
-              WidgetMarker  = 0x08
+               SplitMarker   = 0x02,
+               AreaMarker    = 0x04,
+               WidgetMarker  = 0x08
   };
 
   enum { Horizontal = 0x01,
-              Visible    = 0x02
+               Visible    = 0x02
   };
 
   //! Workstack splitting type
@@ -165,7 +165,7 @@ private:
   void                distributeSpace( QSplitter* ) const;
 
   int                 setPosition( QWidget* wid, QSplitter* split, const Qt::Orientation o,
-                                                          const int need_pos, const int splitter_pos );
+                                                           const int need_pos, const int splitter_pos );
 
 private:
   QPointer<QWidget>          myWin;        //!< active widget
@@ -265,7 +265,7 @@ protected:
 private:
   //! Custom events
   enum { ActivateWidget = QEvent::User,   //!< activate widget event
-              FocusWidget,                     //!< focus receiving widget event
+               FocusWidget,                     //!< focus receiving widget event
          MakeCurrent,
          RestoreWidget
   };
index 0686ce4a87c0ebf881e37cccf5aceb64a7ae7275..cd47695934a205bf89c774fd76f34b41b65e1966 100644 (file)
@@ -49,13 +49,13 @@ QtxWorkstackAction::QtxWorkstackAction( QtxWorkstack* ws, QObject* parent )
     insertAction( myWorkstack->action( QtxWorkstack::SplitVertical ), SplitVertical );
   else
     insertAction( new QtxAction( tr( "Split the active window on two vertical parts" ),
-                                tr( "Split vertically" ), 0, this ), SplitVertical );
+                                 tr( "Split vertically" ), 0, this ), SplitVertical );
 
   if ( myWorkstack )
     insertAction( myWorkstack->action( QtxWorkstack::SplitHorizontal ), SplitHorizontal );
   else
     insertAction( new QtxAction( tr( "Split the active window on two horizontal parts" ),
-                                tr( "Split horizontally" ), 0, this ), SplitHorizontal );
+                                 tr( "Split horizontally" ), 0, this ), SplitHorizontal );
 
   connect( this, SIGNAL( triggered( int ) ), this, SLOT( onTriggered( int ) ) );
 
index 54ebc3b49492e3821d73daaa89ac140804f72fa1..558186175e5783ff088cbbe7fbe47018d1aadb39 100644 (file)
@@ -194,15 +194,15 @@ void QxGraph_CanvasView::contentsMousePressEvent(QMouseEvent* theEvent)
       int aCursorType;
       if ( anActItem && anActItem->isResizable(myPoint,aCursorType) )
       { // resize itself only active items if it is resizable
-       anActItem->beforeResizing(aCursorType);
-       myCurrentItem = *it;
-       return;
+        anActItem->beforeResizing(aCursorType);
+        myCurrentItem = *it;
+        return;
       }
       else if ( anActItem && anActItem->isMoveable() )
       { // move itself only active items if it is moveable
-       anActItem->beforeMoving();
-       myCurrentItem = *it;
-       return;
+        anActItem->beforeMoving();
+        myCurrentItem = *it;
+        return;
       }
     }
   }
@@ -218,7 +218,7 @@ void QxGraph_CanvasView::contentsMouseMoveEvent(QMouseEvent* theEvent)
   if ( myOperation == PANVIEW )
   { // Panning
     scrollBy(myGlobalPoint.x() - aGlobalPoint.x(),
-            myGlobalPoint.y() - aGlobalPoint.y());
+             myGlobalPoint.y() - aGlobalPoint.y());
     myGlobalPoint = aGlobalPoint;
     myMovingDone = true;
     return;
@@ -282,7 +282,7 @@ void QxGraph_CanvasView::contentsMouseMoveEvent(QMouseEvent* theEvent)
       if ( anActItem ) anActItem->setTMatrix(m);
       (*it)->show();
     }
-       
+        
     myGlobalPoint = aGlobalPoint;
     myMovingDone = true;
 
@@ -303,12 +303,12 @@ void QxGraph_CanvasView::contentsMouseMoveEvent(QMouseEvent* theEvent)
     if ( myCurrentItem->x() && myCurrentItem->y() ) {
       double cx = myCurrentItem->x() - myPoint.x();
       double cy = myCurrentItem->y() - myPoint.y();
-       
+        
       if (aPoint.x()+cx < 0) aPoint.setX(-(int)cx);
       if (aPoint.y()+cy < 0) aPoint.setY(-(int)cy);
     }
     myCurrentItem->moveBy(aPoint.x() - myPoint.x(), 
-                         aPoint.y() - myPoint.y());
+                          aPoint.y() - myPoint.y());
     myMovingDone = true;
     myPoint = aPoint;
     canvas()->update();
@@ -339,53 +339,53 @@ void QxGraph_CanvasView::contentsMouseMoveEvent(QMouseEvent* theEvent)
       QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( *it );
     
       if (!isHilightPerformed && anActItem) {
-       // hilight
-       anActItem->hilight(aPoint);
-       if (anActItem != myHilightedItem) {
-         if (myHilightedItem)
-           myHilightedItem->hilight(aPoint, false);
-         myHilightedItem = anActItem;
-       }
-       isHilightPerformed = true;
-       
-       // show tooltip
-       QxGraph_ToolTip* aToolTip = new QxGraph_ToolTip(this);
-       aToolTip->maybeTip(aPoint);
+        // hilight
+        anActItem->hilight(aPoint);
+        if (anActItem != myHilightedItem) {
+          if (myHilightedItem)
+            myHilightedItem->hilight(aPoint, false);
+          myHilightedItem = anActItem;
+        }
+        isHilightPerformed = true;
+        
+        // show tooltip
+        QxGraph_ToolTip* aToolTip = new QxGraph_ToolTip(this);
+        aToolTip->maybeTip(aPoint);
       }
       
       int aCursorType;
       if ( anActItem && anActItem->isResizable(aPoint,aCursorType) ) {
-       // set resize cursor
-       QCursor resizeCursor;
-       switch (aCursorType)
-         {
-         case 1: //left
-         case 3: //right
-           resizeCursor = QCursor(Qt::SizeHorCursor);
-           break;
-         case 2: //top
-         case 4: //bottom
-           resizeCursor = QCursor(Qt::SizeVerCursor); 
-           break;
-         case 5: //left-top
-         case 7: //right-bottom
-           resizeCursor = QCursor(Qt::SizeFDiagCursor);
-           break;
-         case 6: //right-top
-         case 8: //left-bottom
-           resizeCursor = QCursor(Qt::SizeBDiagCursor); 
-           break;
-         default : 
-           resizeCursor = QCursor(Qt::ArrowCursor);
-           break;
-         }
-       setCursor(resizeCursor);
-       return;
+        // set resize cursor
+        QCursor resizeCursor;
+        switch (aCursorType)
+          {
+          case 1: //left
+          case 3: //right
+            resizeCursor = QCursor(Qt::SizeHorCursor);
+            break;
+          case 2: //top
+          case 4: //bottom
+            resizeCursor = QCursor(Qt::SizeVerCursor); 
+            break;
+          case 5: //left-top
+          case 7: //right-bottom
+            resizeCursor = QCursor(Qt::SizeFDiagCursor);
+            break;
+          case 6: //right-top
+          case 8: //left-bottom
+            resizeCursor = QCursor(Qt::SizeBDiagCursor); 
+            break;
+          default : 
+            resizeCursor = QCursor(Qt::ArrowCursor);
+            break;
+          }
+        setCursor(resizeCursor);
+        return;
       }
       else {
-       // reset old cursor
-       setCursor(QCursor(Qt::ArrowCursor));
-       return;
+        // reset old cursor
+        setCursor(QCursor(Qt::ArrowCursor));
+        return;
       }
     }
     
@@ -396,7 +396,7 @@ void QxGraph_CanvasView::contentsMouseMoveEvent(QMouseEvent* theEvent)
     }
 
     if ( cursor().shape() == Qt::SizeVerCursor || cursor().shape() == Qt::SizeHorCursor
-        || cursor().shape() == Qt::SizeBDiagCursor || cursor().shape() == Qt::SizeFDiagCursor)
+         || cursor().shape() == Qt::SizeBDiagCursor || cursor().shape() == Qt::SizeFDiagCursor)
       setCursor(QCursor(Qt::ArrowCursor));
   }
 }
@@ -530,20 +530,20 @@ void QxGraph_CanvasView::contentsMouseReleaseEvent(QMouseEvent* theEvent)
       QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( *it );
       if (!isSelectionPerformed && anActItem) 
       {
-       anActItem->select(aPoint);
-       if (anActItem != mySelectedItem) 
-       {
-         if (mySelectedItem && isSelectedItemInCanvas() &&
-             !mySelectedItem->arePartsOfOtherItem(anActItem)) mySelectedItem->select(aPoint, false);
-         mySelectedItem = anActItem;
-
-         // unhilight hilighted item if selection was performed
-         if (myHilightedItem) {
-           myHilightedItem->hilight(aPoint, false);
-           myHilightedItem = 0;
-         }
-       }
-       isSelectionPerformed = true;
+        anActItem->select(aPoint);
+        if (anActItem != mySelectedItem) 
+        {
+          if (mySelectedItem && isSelectedItemInCanvas() &&
+              !mySelectedItem->arePartsOfOtherItem(anActItem)) mySelectedItem->select(aPoint, false);
+          mySelectedItem = anActItem;
+
+          // unhilight hilighted item if selection was performed
+          if (myHilightedItem) {
+            myHilightedItem->hilight(aPoint, false);
+            myHilightedItem = 0;
+          }
+        }
+        isSelectionPerformed = true;
       }
     }
 
@@ -551,17 +551,17 @@ void QxGraph_CanvasView::contentsMouseReleaseEvent(QMouseEvent* theEvent)
     { 
       if ( mySelectedItem )
       {
-       if ( isSelectedItemInCanvas() ) mySelectedItem->select(aPoint, false);
-       mySelectedItem = 0;
+        if ( isSelectedItemInCanvas() ) mySelectedItem->select(aPoint, false);
+        mySelectedItem = 0;
       }
       
       // Background popup
       printf("Background popup\n");
       QContextMenuEvent aEvent( QContextMenuEvent::Mouse,
-                               theEvent->pos(), theEvent->globalPos(),
-                               theEvent->state() );
+                                theEvent->pos(), theEvent->globalPos(),
+                                theEvent->state() );
       if ( getViewWindow() )
-       getViewWindow()->contextPopupEvent(&aEvent); // => emit contextMenuRequested( &aEvent );
+        getViewWindow()->contextPopupEvent(&aEvent); // => emit contextMenuRequested( &aEvent );
     }
     else
     { // show context popup for the selected item
@@ -582,18 +582,18 @@ void QxGraph_CanvasView::contentsMouseReleaseEvent(QMouseEvent* theEvent)
     else
     {
       for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) {
-       QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( *it );
-       if (anActItem) 
-       {
-         anActItem->select(aPoint);
-         if (anActItem != mySelectedItem) 
-         {
-           if (mySelectedItem && isSelectedItemInCanvas() &&
-               !mySelectedItem->arePartsOfOtherItem(anActItem)) mySelectedItem->select(aPoint, false);
-           mySelectedItem = anActItem;
-         }
-         break;
-       }
+        QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( *it );
+        if (anActItem) 
+        {
+          anActItem->select(aPoint);
+          if (anActItem != mySelectedItem) 
+          {
+            if (mySelectedItem && isSelectedItemInCanvas() &&
+                !mySelectedItem->arePartsOfOtherItem(anActItem)) mySelectedItem->select(aPoint, false);
+            mySelectedItem = anActItem;
+          }
+          break;
+        }
       }
     }
   }
@@ -743,17 +743,17 @@ void QxGraph_ToolTip::maybeTip(const QPoint& theMousePos) {
     QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( *it );
     if (anActItem)
       {
-       QRect aRect;
-       QString aText = anActItem->getToolTipText(theMousePos, aRect);
-       int avX, avY;
-       QWMatrix aWM = ((QCanvasView*)parentWidget())->worldMatrix();
-       ((QCanvasView*)parentWidget())->contentsToViewport((int)(aRect.left()*aWM.m11()), 
-                                                          (int)(aRect.top()*aWM.m22()), 
-                                                          avX, avY);
-       QRect aTipRect(avX, avY, (int)(aRect.width()*aWM.m11()), (int)(aRect.height()*aWM.m22()));
-       if (!aText.isEmpty())
-         tip(aTipRect, aText);
-       return;
+        QRect aRect;
+        QString aText = anActItem->getToolTipText(theMousePos, aRect);
+        int avX, avY;
+        QWMatrix aWM = ((QCanvasView*)parentWidget())->worldMatrix();
+        ((QCanvasView*)parentWidget())->contentsToViewport((int)(aRect.left()*aWM.m11()), 
+                                                           (int)(aRect.top()*aWM.m22()), 
+                                                           avX, avY);
+        QRect aTipRect(avX, avY, (int)(aRect.width()*aWM.m11()), (int)(aRect.height()*aWM.m22()));
+        if (!aText.isEmpty())
+          tip(aTipRect, aText);
+        return;
       }
   }
 }
index 6c3a26cdc2324bc02ce1440529103a47b68ece43..20f355ee77c99844b8fcbb06df6730d903331ba2 100644 (file)
@@ -40,7 +40,7 @@ class QXGRAPH_EXPORT QxGraph_CanvasView : public QCanvasView {
 
  public:
   enum OperationType{ NOTHING, PANVIEW, ZOOMVIEW, PANGLOBAL, 
-                     WINDOWFIT, FITALLVIEW, RESETVIEW };
+                      WINDOWFIT, FITALLVIEW, RESETVIEW };
   
   QxGraph_CanvasView(QxGraph_Canvas* theCanvas, QxGraph_ViewWindow* theViewWindow);
   virtual ~QxGraph_CanvasView();
index efe4687c0b8f79fc3f350793d5a94a8280d29814..5b8fcd0cbb9387c16410a1e1223f006bab006b9c 100644 (file)
@@ -45,12 +45,12 @@ QxGraph_Prs::QxGraph_Prs(QxGraph_Canvas* theCanvas):
 QxGraph_Prs::~QxGraph_Prs()
 {
   for ( DMode2ItemList::iterator it1 = myDisplayMap.begin();
-       it1 != myDisplayMap.end();
-       it1++ )
+        it1 != myDisplayMap.end();
+        it1++ )
   {
     for ( std::list<QCanvasItem*>::iterator it2 = (*it1).second.begin();
-         it2 != (*it1).second.end();
-         it2++ )
+          it2 != (*it1).second.end();
+          it2++ )
     {
       QCanvasItem* anItem = *it2;
       if ( anItem ) delete anItem;
@@ -91,8 +91,8 @@ void QxGraph_Prs::show()
     update();
 
   for ( std::list<QCanvasItem*>::iterator it = myDisplayMap[myDMode].begin();
-       it != myDisplayMap[myDMode].end();
-       it++ )
+        it != myDisplayMap[myDMode].end();
+        it++ )
   {
     QCanvasItem* anItem = *it;
     if ( anItem )
@@ -108,17 +108,17 @@ void QxGraph_Prs::show()
 void QxGraph_Prs::hide()
 {
   for ( DMode2ItemList::iterator it1 = myDisplayMap.begin();
-       it1 != myDisplayMap.end();
-       it1++ )
+        it1 != myDisplayMap.end();
+        it1++ )
   {
     for ( std::list<QCanvasItem*>::iterator it2 = (*it1).second.begin();
-         it2 != (*it1).second.end();
-         it2++ )
+          it2 != (*it1).second.end();
+          it2++ )
     {
       QCanvasItem* anItem = *it2;
       if ( anItem )
       {
-       anItem->setCanvas( 0 );
+        anItem->setCanvas( 0 );
       }
     }
   }
index 261a48429719a702e641ed3246529e9f673e2ff9..a003c04cfdbe5182f934364c0e68edc5796e479d 100644 (file)
@@ -25,8 +25,8 @@
   Constructor
 */
 QxGraph_ViewManager::QxGraph_ViewManager( SUIT_Study* theStudy, 
-                                         SUIT_Desktop* theDesktop, 
-                                         SUIT_ViewModel* theViewModel )
+                                          SUIT_Desktop* theDesktop, 
+                                          SUIT_ViewModel* theViewModel )
   : SUIT_ViewManager( theStudy, theDesktop, theViewModel )
 {
 }
index f6f9ed8cf65a7bdc2ea29a49a3df4b582231f713..2cc7ca6891c5e3c92eef140389d0ee4bcaa52700 100644 (file)
@@ -126,42 +126,42 @@ void QxGraph_ViewWindow::createActions()
 
   // FitAll
   aAction = new QtxAction(tr("MNU_FITALL"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_FITALL" ) ),
-                         tr( "MNU_FITALL" ), 0, this);
+                          tr( "MNU_FITALL" ), 0, this);
   aAction->setStatusTip(tr("DSC_FITALL"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitAll()));
   myActionsMap[ FitAllId ] = aAction;
 
   // FitRect
   aAction = new QtxAction(tr("MNU_FITRECT"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_FITAREA" ) ),
-                         tr( "MNU_FITRECT" ), 0, this);
+                          tr( "MNU_FITRECT" ), 0, this);
   aAction->setStatusTip(tr("DSC_FITRECT"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitArea()));
   myActionsMap[ FitRectId ] = aAction;
 
   // Zoom
   aAction = new QtxAction(tr("MNU_ZOOM_VIEW"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_ZOOM" ) ),
-                         tr( "MNU_ZOOM_VIEW" ), 0, this);
+                          tr( "MNU_ZOOM_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_ZOOM_VIEW"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onViewZoom()));
   myActionsMap[ ZoomId ] = aAction;
 
   // Panning
   aAction = new QtxAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_PAN" ) ),
-                         tr( "MNU_PAN_VIEW" ), 0, this);
+                          tr( "MNU_PAN_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_PAN_VIEW"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onViewPan()));
   myActionsMap[ PanId ] = aAction;
 
   // Global Panning
   aAction = new QtxAction(tr("MNU_GLOBALPAN_VIEW"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_GLOBALPAN" ) ),
-                         tr( "MNU_GLOBALPAN_VIEW" ), 0, this);
+                          tr( "MNU_GLOBALPAN_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onViewGlobalPan()));
   myActionsMap[ GlobalPanId ] = aAction;
 
   // Reset
   aAction = new QtxAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_RESET" ) ),
-                         tr( "MNU_RESET_VIEW" ), 0, this);
+                          tr( "MNU_RESET_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_RESET_VIEW"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onViewReset()));
   myActionsMap[ ResetId ] = aAction;
index d6846a4d9d985486d31b6d2c66b2f33b6a640473..38439ca344e1d6a6227c6ddd4a177e3648484063 100644 (file)
@@ -29,8 +29,8 @@
   Constructor
 */
 QxScene_ViewManager::QxScene_ViewManager( SUIT_Study* theStudy, 
-                                         SUIT_Desktop* theDesktop, 
-                                         SUIT_ViewModel* theViewModel )
+                                          SUIT_Desktop* theDesktop, 
+                                          SUIT_ViewModel* theViewModel )
   : SUIT_ViewManager( theStudy, theDesktop, theViewModel )
 {
   DEBTRACE("QxScene_ViewManager::QxScene_ViewManager");
index 28d7d71d458afa966832fab96baf434df8d45eb2..3c15b1dc7343f37a6453e42a51bcee610341b313 100644 (file)
@@ -88,7 +88,7 @@ void QxScene_ViewWindow::createActions()
   aAction = new QtxAction( tr( "MNU_FITALL" ),
                            aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_FITALL" ) ),
                            tr( "MNU_FITALL" ),
-                          0, this);
+                           0, this);
   aAction->setStatusTip( tr( "DSC_FITALL" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewFitAll() ) );
   mgr->registerAction( aAction, FitAllId );
@@ -97,16 +97,16 @@ void QxScene_ViewWindow::createActions()
   aAction = new QtxAction( tr( "MNU_FITRECT" ),
                            aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_FITAREA" ) ),
                            tr( "MNU_FITRECT" ),
-                          0, this);
+                           0, this);
   aAction->setStatusTip( tr( "DSC_FITRECT" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewFitArea() ) );
   mgr->registerAction( aAction, FitRectId );
 
   // 2.3. Zoom
   aAction = new QtxAction( tr( "MNU_ZOOM_VIEW" ),
-                          aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_ZOOM" ) ),
+                           aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_ZOOM" ) ),
                            tr( "MNU_ZOOM_VIEW" ),
-                          0, this);
+                           0, this);
   aAction->setStatusTip( tr( "DSC_ZOOM_VIEW" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewZoom() ) );
   mgr->registerAction( aAction, ZoomId );
@@ -122,18 +122,18 @@ void QxScene_ViewWindow::createActions()
 
   // 3.1. Panning
   aAction = new QtxAction( tr( "MNU_PAN_VIEW" ),
-                          aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_PAN" ) ),
-                          tr( "MNU_PAN_VIEW" ), 
-                          0, this);
+                           aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_PAN" ) ),
+                           tr( "MNU_PAN_VIEW" ), 
+                           0, this);
   aAction->setStatusTip( tr( "DSC_PAN_VIEW" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewPan() ) );
   mgr->registerAction( aAction, PanId );
 
   // 3.2. Global Panning
   aAction = new QtxAction( tr( "MNU_GLOBALPAN_VIEW" ),
-                          aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_GLOBALPAN" ) ),
+                           aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_GLOBALPAN" ) ),
                            tr( "MNU_GLOBALPAN_VIEW" ),
-                          0, this);
+                           0, this);
   aAction->setStatusTip( tr( "DSC_GLOBALPAN_VIEW" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewGlobalPan() ) );
   mgr->registerAction( aAction, GlobalPanId );
@@ -146,9 +146,9 @@ void QxScene_ViewWindow::createActions()
 
   // reset
   aAction = new QtxAction( tr( "MNU_RESET_VIEW" ),
-                          aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_RESET" ) ),
-                          tr( "MNU_RESET_VIEW" ), 
-                          0, this);
+                           aResMgr->loadPixmap( "QxSceneViewer", tr( "ICON_QXSCENE_RESET" ) ),
+                           tr( "MNU_RESET_VIEW" ), 
+                           0, this);
   aAction->setStatusTip( tr( "DSC_RESET_VIEW" ) );
   connect( aAction, SIGNAL( triggered( bool ) ), this, SLOT( onViewReset() ) );
   mgr->registerAction( aAction, ResetId );
index 597059bded6400c33831c30d10c69b635a644f91..9a4ebba2c94d6d4ffbd40da3f206166e085b3586 100644 (file)
@@ -119,48 +119,48 @@ int main( int argc, char** argv )
     for ( int i = 1; i < argc; i ++ ) {
       QString anArg = QString( argv[i] ).trimmed();
       if ( anArg.startsWith( "-" ) ) {
-       anArg.remove( 0, 1 );
-       if ( anArg.contains( ":" ) ) {
-         QStringList vals = anArg.split( ":", QString::SkipEmptyParts );
-         QString section  = vals[ 0 ].trimmed();
-         QString param    = vals[ 1 ].trimmed();
-         if ( section.isEmpty() || param.isEmpty() ) continue;
-         resMgr->remove( section, param );
-       }
+        anArg.remove( 0, 1 );
+        if ( anArg.contains( ":" ) ) {
+          QStringList vals = anArg.split( ":", QString::SkipEmptyParts );
+          QString section  = vals[ 0 ].trimmed();
+          QString param    = vals[ 1 ].trimmed();
+          if ( section.isEmpty() || param.isEmpty() ) continue;
+          resMgr->remove( section, param );
+        }
       }
       else if ( anArg.contains( "+=" ) ) {
-       QStringList vals = anArg.split( "+=", QString::SkipEmptyParts );
-       if ( vals[ 0 ].contains( ":" ) ) {
-         QStringList vals1 = vals[ 0 ].split( ":", QString::SkipEmptyParts );
-         QString section  = vals1[ 0 ].trimmed();
-         QString param    = vals1[ 1 ].trimmed();
-         QString newValue = vals [ 1 ].trimmed();
-         QString separ    = ","; // default separator
-         if ( newValue.contains( "|" ) ) {
-           QStringList vals2 = newValue.split( "|", QString::SkipEmptyParts );
-           newValue = vals2[ 0 ].trimmed();
-           separ  = vals2[ 1 ].trimmed();
-         }
-         if ( section.isEmpty() || param.isEmpty() || newValue.isEmpty() || separ.isEmpty() ) continue;
-         QString value = resMgr->stringValue( section, param );
-         QStringList valsOld = value.split( separ, QString::SkipEmptyParts );
-         QStringList valsNew = newValue.split( separ, QString::SkipEmptyParts );
-         for ( int i = 0; i < (int)valsNew.count(); i++ )
-           if ( !valsOld.contains( valsNew[i] ) )
-             valsOld.append( valsNew[i] );
-         resMgr->setValue( section, param, valsOld.join( separ ) );
-       }
+        QStringList vals = anArg.split( "+=", QString::SkipEmptyParts );
+        if ( vals[ 0 ].contains( ":" ) ) {
+          QStringList vals1 = vals[ 0 ].split( ":", QString::SkipEmptyParts );
+          QString section  = vals1[ 0 ].trimmed();
+          QString param    = vals1[ 1 ].trimmed();
+          QString newValue = vals [ 1 ].trimmed();
+          QString separ    = ","; // default separator
+          if ( newValue.contains( "|" ) ) {
+            QStringList vals2 = newValue.split( "|", QString::SkipEmptyParts );
+            newValue = vals2[ 0 ].trimmed();
+            separ  = vals2[ 1 ].trimmed();
+          }
+          if ( section.isEmpty() || param.isEmpty() || newValue.isEmpty() || separ.isEmpty() ) continue;
+          QString value = resMgr->stringValue( section, param );
+          QStringList valsOld = value.split( separ, QString::SkipEmptyParts );
+          QStringList valsNew = newValue.split( separ, QString::SkipEmptyParts );
+          for ( int i = 0; i < (int)valsNew.count(); i++ )
+            if ( !valsOld.contains( valsNew[i] ) )
+              valsOld.append( valsNew[i] );
+          resMgr->setValue( section, param, valsOld.join( separ ) );
+        }
       }
       else if ( anArg.contains( "=" ) ) {
-       QStringList vals = anArg.split( "=", QString::SkipEmptyParts );
-       if ( vals[ 0 ].contains( ":" ) ) {
-         QStringList vals1 = vals[ 0 ].split( ":", QString::SkipEmptyParts );
-         QString section  = vals1[ 0 ].trimmed();
-         QString param    = vals1[ 1 ].trimmed();
-         QString value = vals [ 1 ].trimmed();
-         if ( section.isEmpty() || param.isEmpty() ) continue;
-         resMgr->setValue( section, param, value );
-       }
+        QStringList vals = anArg.split( "=", QString::SkipEmptyParts );
+        if ( vals[ 0 ].contains( ":" ) ) {
+          QStringList vals1 = vals[ 0 ].split( ":", QString::SkipEmptyParts );
+          QString section  = vals1[ 0 ].trimmed();
+          QString param    = vals1[ 1 ].trimmed();
+          QString value = vals [ 1 ].trimmed();
+          if ( section.isEmpty() || param.isEmpty() ) continue;
+          resMgr->setValue( section, param, value );
+        }
       }
     }
     resMgr->save();
index 5acd5a1e1bad848d726ec298d2c7c126f839bb65..9e7db3d17a9c8654bf5de31e5129cb112b923723 100755 (executable)
@@ -143,29 +143,29 @@ static SVTK_ViewWindow* GetVTKViewWindow( int toCreate = __FindOrCreate ) {
       // get active study
       LightApp_Study* aStudy = dynamic_cast<LightApp_Study*>( anApp->activeStudy() );
       if ( aStudy ) {
-       // find or create VTK view manager
-       if ( toCreate == __Create ) {
-         SVTK_ViewManager* aVM = dynamic_cast<SVTK_ViewManager*>( anApp->createViewManager( "VTKViewer" ) );
-         if ( aVM ) {
-           aVW = dynamic_cast<SVTK_ViewWindow*>( aVM->getActiveView() );
-           if ( !aVW )
-             aVW = dynamic_cast<SVTK_ViewWindow*>( aVM->createViewWindow() );
-           // VSR : When new view window is created it can be not active yet at this moment,
-           // so the following is a some workaround
-           if ( !aVW && !aVM->getViews().isEmpty() )
-             aVW = dynamic_cast<SVTK_ViewWindow*>( aVM->getViews()[0] );
-         }
-       }
-       else {
-         SVTK_ViewManager* aVM = dynamic_cast<SVTK_ViewManager*>( anApp->getViewManager( "VTKViewer", toCreate == __FindOrCreate ) );
-         if ( aVM ) {
-           aVW = dynamic_cast<SVTK_ViewWindow*>( aVM->getActiveView() );
-           // VSR : When new view window is created it can be not active yet at this moment,
-           // so the following is a some workaround
-           if ( !aVW && !aVM->getViews().isEmpty() )
-             aVW = dynamic_cast<SVTK_ViewWindow*>( aVM->getViews()[0] );
-         }
-       }
+        // find or create VTK view manager
+        if ( toCreate == __Create ) {
+          SVTK_ViewManager* aVM = dynamic_cast<SVTK_ViewManager*>( anApp->createViewManager( "VTKViewer" ) );
+          if ( aVM ) {
+            aVW = dynamic_cast<SVTK_ViewWindow*>( aVM->getActiveView() );
+            if ( !aVW )
+              aVW = dynamic_cast<SVTK_ViewWindow*>( aVM->createViewWindow() );
+            // VSR : When new view window is created it can be not active yet at this moment,
+            // so the following is a some workaround
+            if ( !aVW && !aVM->getViews().isEmpty() )
+              aVW = dynamic_cast<SVTK_ViewWindow*>( aVM->getViews()[0] );
+          }
+        }
+        else {
+          SVTK_ViewManager* aVM = dynamic_cast<SVTK_ViewManager*>( anApp->getViewManager( "VTKViewer", toCreate == __FindOrCreate ) );
+          if ( aVM ) {
+            aVW = dynamic_cast<SVTK_ViewWindow*>( aVM->getActiveView() );
+            // VSR : When new view window is created it can be not active yet at this moment,
+            // so the following is a some workaround
+            if ( !aVW && !aVM->getViews().isEmpty() )
+              aVW = dynamic_cast<SVTK_ViewWindow*>( aVM->getViews()[0] );
+          }
+        }
       }
     }
   }
@@ -340,8 +340,8 @@ extern "C" PyObject* libSalomePy_showTrihedron( PyObject* self, PyObject* args )
     virtual void Execute()
     {
       if( SVTK_ViewWindow* aVTKViewWindow = GetVTKViewWindow( __Find ) ) {
-       if ( aVTKViewWindow->isTrihedronDisplayed() != myShow )
-         aVTKViewWindow->onViewTrihedron();
+        if ( aVTKViewWindow->isTrihedronDisplayed() != myShow )
+          aVTKViewWindow->onViewTrihedron();
       }
     }
   };
@@ -373,7 +373,7 @@ extern "C" PyObject* libSalomePy_fitAll( PyObject* self, PyObject* args )
     virtual void Execute()
     {
       if( SVTK_ViewWindow* aVTKViewWindow = GetVTKViewWindow( __Find ) ) {
-       aVTKViewWindow->onFitAll();
+        aVTKViewWindow->onFitAll();
       }
     }
   };
@@ -402,23 +402,23 @@ extern "C" PyObject* libSalomePy_setView( PyObject* self, PyObject* args )
     virtual void Execute()
     {
       if( SVTK_ViewWindow* aVTKViewWindow = GetVTKViewWindow( __Find ) ) {
-       switch( myType ) {
-       case ViewFront:
-         aVTKViewWindow->onFrontView();  break;
-       case ViewBack:
-         aVTKViewWindow->onBackView();   break;
-       case ViewTop:
-         aVTKViewWindow->onTopView();    break;
-       case ViewBottom:
-         aVTKViewWindow->onBottomView(); break;
-       case ViewRight:
-         aVTKViewWindow->onRightView();  break;
-       case ViewLeft:
-         aVTKViewWindow->onLeftView();   break;
-       default:
-         PyErr_Format(PyExc_ValueError,"setView%: wrong parameter value; must be between %d and %d", ViewFront, ViewLeft );
-         break;
-       }
+        switch( myType ) {
+        case ViewFront:
+          aVTKViewWindow->onFrontView();  break;
+        case ViewBack:
+          aVTKViewWindow->onBackView();   break;
+        case ViewTop:
+          aVTKViewWindow->onTopView();    break;
+        case ViewBottom:
+          aVTKViewWindow->onBottomView(); break;
+        case ViewRight:
+          aVTKViewWindow->onRightView();  break;
+        case ViewLeft:
+          aVTKViewWindow->onLeftView();   break;
+        default:
+          PyErr_Format(PyExc_ValueError,"setView%: wrong parameter value; must be between %d and %d", ViewFront, ViewLeft );
+          break;
+        }
       }
     }
   };
@@ -452,7 +452,7 @@ extern "C" PyObject* libSalomePy_resetView( PyObject* self, PyObject* args )
     virtual void Execute()
     {
       if( SVTK_ViewWindow* aVTKViewWindow = GetVTKViewWindow( __Find ) ) {
-       aVTKViewWindow->onResetView();
+        aVTKViewWindow->onResetView();
       }
     }
   };
index 80da8eb31a42d682843e1dbcd33d5da37f84aa0c..10d777ce25873add7cc7721a289a8569c663055f 100644 (file)
@@ -122,7 +122,7 @@ QString SALOME_PYQT_Module::engineIOR() const
   {
   public:
     EngineIORReq( PyInterp_Interp*    _py_interp,
-                 SALOME_PYQT_Module* _obj )
+                  SALOME_PYQT_Module* _obj )
       : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
         myObj( _obj ) {}
 
@@ -207,8 +207,8 @@ void SALOME_PYQT_Module::onViewClosed( SUIT_ViewWindow* pview )
   \param setting preference resource name
 */
 void SALOME_PYQT_Module::preferenceChanged( const QString& module, 
-                                           const QString& section, 
-                                           const QString& setting )
+                                            const QString& section, 
+                                            const QString& setting )
 {
   SALOME_PYQT_ModuleLight::preferenceChanged(module,section,setting);
 }
index 7e8160e7edcc172293f1cadc38d7a921d72628a8..74b190935e317d44fd51828144de80b4476b0318 100644 (file)
@@ -48,8 +48,8 @@ public:
 
 public slots:
   void                       preferenceChanged( const QString&, 
-                                               const QString&, 
-                                               const QString& );
+                                                const QString&, 
+                                                const QString& );
   void                       onGUIEvent();
   void                       onActiveViewChanged( SUIT_ViewWindow* );
   void                       onViewClosed( SUIT_ViewWindow* );
index 8c278a4bc0580aeae07ac2d204463c79d60b76cb..b9e9bed8d94c2d766770b5d3a15e83052129f0a5 100644 (file)
@@ -137,19 +137,19 @@ public:
   XmlHandler( SALOME_PYQT_ModuleLight* module, const QString& fileName );
   void createActions();
   void createPopup  ( QMenu*         menu,
-                     const QString& context,
-                     const QString& parent,
-                     const QString& object );
+                      const QString& context,
+                      const QString& parent,
+                      const QString& object );
   void activateMenus( bool );
 
 protected:
   void createToolBar   ( QDomNode&   parentNode );
   void createMenu      ( QDomNode&   parentNode,
-                        const int   parentMenuId = -1,
-                        QMenu*      parentPopup = 0 );
+                         const int   parentMenuId = -1,
+                         QMenu*      parentPopup = 0 );
 
   void insertPopupItems( QDomNode&   parentNode,
-                        QMenu*      menu );
+                         QMenu*      menu );
 
 private:
   SALOME_PYQT_ModuleLight* myModule;
@@ -344,7 +344,7 @@ void SALOME_PYQT_ModuleLight::initialize( CAM_Application* app )
   {
   public:
     InitializeReq( CAM_Application*    _app,
-                  SALOME_PYQT_ModuleLight* _obj )
+                   SALOME_PYQT_ModuleLight* _obj )
       : PyInterp_Request( 0, true ), // this request should be processed synchronously (sync == true)
         myApp( _app ),
         myObj( _obj ) {}
@@ -396,7 +396,7 @@ bool SALOME_PYQT_ModuleLight::activateModule( SUIT_Study* theStudy )
   {
   public:
     ActivateReq( SUIT_Study*         _study,
-                SALOME_PYQT_ModuleLight* _obj )
+                 SALOME_PYQT_ModuleLight* _obj )
       : PyInterp_Request( 0, true ), // this request should be processed synchronously (sync == true)
         myStudy ( _study ),
         myObj   ( _obj   ) {}
@@ -426,7 +426,7 @@ bool SALOME_PYQT_ModuleLight::activateModule( SUIT_Study* theStudy )
 
   // connect preferences changing signal
   connect( getApp(), SIGNAL( preferenceChanged( const QString&, const QString&, const QString& ) ),
-          this,     SLOT(   preferenceChanged( const QString&, const QString&, const QString& ) ) );
+           this,     SLOT(   preferenceChanged( const QString&, const QString&, const QString& ) ) );
 
   // perform custom activation actions
   // CustomizeReq: request class for internal customize() operation
@@ -434,7 +434,7 @@ bool SALOME_PYQT_ModuleLight::activateModule( SUIT_Study* theStudy )
   {
   public:
     CustomizeReq( SUIT_Study*         _study,
-                 SALOME_PYQT_ModuleLight* _obj )
+                  SALOME_PYQT_ModuleLight* _obj )
       : PyInterp_Request( 0, true ), // this request should be processed synchronously (sync == true)
         myStudy ( _study ),
         myObj   ( _obj   ) {}
@@ -472,7 +472,7 @@ bool SALOME_PYQT_ModuleLight::deactivateModule( SUIT_Study* theStudy )
 
   // disconnect preferences changing signal
   disconnect( getApp(), SIGNAL( preferenceChanged( const QString&, const QString&, const QString& ) ),
-             this,     SLOT(   preferenceChanged( const QString&, const QString&, const QString& ) ) );
+              this,     SLOT(   preferenceChanged( const QString&, const QString&, const QString& ) ) );
 
   // perform internal deactivation
   // DeactivateReq: request class for internal deactivate() operation
@@ -480,8 +480,8 @@ bool SALOME_PYQT_ModuleLight::deactivateModule( SUIT_Study* theStudy )
   {
   public:
     DeactivateReq( PyInterp_Interp*    _py_interp,
-                  SUIT_Study*         _study,
-                  SALOME_PYQT_ModuleLight* _obj )
+                   SUIT_Study*         _study,
+                   SALOME_PYQT_ModuleLight* _obj )
       : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
         myStudy ( _study ),
         myObj   ( _obj   ) {}
@@ -529,8 +529,8 @@ bool SALOME_PYQT_ModuleLight::lastActivationStatus() const
   \param setting preference resource name
 */
 void SALOME_PYQT_ModuleLight::preferenceChanged( const QString& module, 
-                                           const QString& section, 
-                                           const QString& setting )
+                                            const QString& section, 
+                                            const QString& setting )
 {
   FuncMsg fmsg( "SALOME_PYQT_ModuleLight::preferenceChanged()" );
 
@@ -539,9 +539,9 @@ void SALOME_PYQT_ModuleLight::preferenceChanged( const QString& module,
   {
   public:
     Event( PyInterp_Interp*    _py_interp,
-          SALOME_PYQT_ModuleLight* _obj,
-          const QString&      _section,
-          const QString&      _setting )
+           SALOME_PYQT_ModuleLight* _obj,
+           const QString&      _section,
+           const QString&      _setting )
       : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
         myObj    ( _obj ),
         mySection( _section ),
@@ -583,7 +583,7 @@ void SALOME_PYQT_ModuleLight::studyActivated()
   {
   public:
     StudyChangedReq( SUIT_Study*         _study,
-                    SALOME_PYQT_ModuleLight* _obj )
+                     SALOME_PYQT_ModuleLight* _obj )
       : PyInterp_Request( 0, true ), // this request should be processed synchronously (sync == true)
         myStudy ( _study ),
         myObj   ( _obj   ) {}
@@ -625,8 +625,8 @@ void SALOME_PYQT_ModuleLight::onGUIEvent()
   {
   public:
     GUIEvent( PyInterp_Interp*    _py_interp,
-             SALOME_PYQT_ModuleLight* _obj,
-             int                 _id )
+              SALOME_PYQT_ModuleLight* _obj,
+              int                 _id )
       : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
         myId    ( _id  ),
         myObj   ( _obj ) {}
@@ -657,8 +657,8 @@ void SALOME_PYQT_ModuleLight::onGUIEvent()
   \param title popup menu title (not used)
 */
 void SALOME_PYQT_ModuleLight::contextMenuPopup( const QString& theContext, 
-                                          QMenu*         thePopupMenu, 
-                                          QString&       /*title*/ )
+                                           QMenu*         thePopupMenu, 
+                                           QString&       /*title*/ )
 {
   FuncMsg fmsg( "SALOME_PYQT_ModuleLight::contextMenuPopup()" );
   fmsg.message( QString( "context: %1" ).arg( theContext ) );
@@ -668,9 +668,9 @@ void SALOME_PYQT_ModuleLight::contextMenuPopup( const QString& theContext,
   {
   public:
     PopupMenuEvent( PyInterp_Interp*    _py_interp,
-                   SALOME_PYQT_ModuleLight* _obj,
-                   const QString&      _context,
-                   QMenu*        _popup )
+                    SALOME_PYQT_ModuleLight* _obj,
+                    const QString&      _context,
+                    QMenu*        _popup )
       : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
         myContext( _context ),
         myPopup  ( _popup  ),
@@ -708,7 +708,7 @@ void SALOME_PYQT_ModuleLight::createPreferences()
   {
   public:
     Event( PyInterp_Interp*    _py_interp,
-          SALOME_PYQT_ModuleLight* _obj )
+           SALOME_PYQT_ModuleLight* _obj )
       : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
         myObj    ( _obj )   {}
 
@@ -793,9 +793,9 @@ void SALOME_PYQT_ModuleLight::preferencesChanged( const QString& section, const
   {
   public:
     Event( PyInterp_Interp*    _py_interp,
-          SALOME_PYQT_ModuleLight* _obj,
-          const QString&      _section,
-          const QString&      _setting )
+           SALOME_PYQT_ModuleLight* _obj,
+           const QString&      _section,
+           const QString&      _setting )
       : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
         myObj    ( _obj ),
         mySection( _section ),
@@ -891,14 +891,14 @@ void SALOME_PYQT_ModuleLight::init( CAM_Application* app )
         PyObject* value;
         Py_ssize_t pos = 0;
         while ( PyDict_Next( res1, &pos, &key, &value ) ) {
-         // parse the return value
-         // it should be a map: {integer:integer}
-         int aKey, aValue;
-         if( key && PyInt_Check( key ) && value && PyInt_Check( value ) ) {
-           aKey   = PyInt_AsLong( key );
-           aValue = PyInt_AsLong( value );
-           myWindowsMap[ aKey ] = aValue;
-         }
+          // parse the return value
+          // it should be a map: {integer:integer}
+          int aKey, aValue;
+          if( key && PyInt_Check( key ) && value && PyInt_Check( value ) ) {
+            aKey   = PyInt_AsLong( key );
+            aValue = PyInt_AsLong( value );
+            myWindowsMap[ aKey ] = aValue;
+          }
         }
       }
     }
@@ -921,10 +921,10 @@ void SALOME_PYQT_ModuleLight::init( CAM_Application* app )
       else if ( PyList_Check( res2 ) ) {
         int size = PyList_Size( res2 );
         for ( int i = 0; i < size; i++ ) {
-         PyObject* value = PyList_GetItem( res2, i );
-         if( value && PyString_Check( value ) ) {
-           myViewMgrList.append( PyString_AsString( value ) );
-         }
+          PyObject* value = PyList_GetItem( res2, i );
+          if( value && PyString_Check( value ) ) {
+            myViewMgrList.append( PyString_AsString( value ) );
+          }
         }
       }
     }
@@ -987,7 +987,7 @@ void SALOME_PYQT_ModuleLight::activate( SUIT_Study* theStudy )
   if ( aDesk )
   {
     connect( aDesk, SIGNAL( windowActivated( SUIT_ViewWindow* ) ),
-            this,  SLOT( onActiveViewChanged( SUIT_ViewWindow* ) ) );
+             this,  SLOT( onActiveViewChanged( SUIT_ViewWindow* ) ) );
     // If a active window exists send activeViewChanged
     // If a getActiveView() in SalomePyQt available we no longer need this 
     SUIT_ViewWindow* aView = aDesk->activeWindow();
@@ -1161,11 +1161,11 @@ void SALOME_PYQT_ModuleLight::contextMenu( const QString& theContext, QMenu* the
     // call definePopup() Python module's function
     // this is obsolete function, used only for compatibility reasons
     PyObjWrapper res( PyObject_CallMethod( myModule,
-                                          (char*)"definePopup",
-                                          (char*)"sss",
-                                          theContext.toLatin1().constData(),
-                                          aObject.toLatin1().constData(),
-                                          aParent.toLatin1().constData() ) );
+                                           (char*)"definePopup",
+                                           (char*)"sss",
+                                           theContext.toLatin1().constData(),
+                                           aObject.toLatin1().constData(),
+                                           aParent.toLatin1().constData() ) );
     if( !res ) {
       PyErr_Print();
     }
@@ -1174,8 +1174,8 @@ void SALOME_PYQT_ModuleLight::contextMenu( const QString& theContext, QMenu* the
       char *co, *ob, *pa;
       if( PyArg_ParseTuple( res, "sss", &co, &ob, &pa ) ) {
         aContext = co;
-       aObject  = ob;
-       aParent  = pa;
+        aObject  = ob;
+        aParent  = pa;
       }
     }
   } // if ( IsCallOldMethods ... )
@@ -1194,10 +1194,10 @@ void SALOME_PYQT_ModuleLight::contextMenu( const QString& theContext, QMenu* the
   // then call Python module's createPopupMenu() method (for new modules)
   if ( PyObject_HasAttrString( myModule, "createPopupMenu" ) ) {
     PyObjWrapper res1( PyObject_CallMethod( myModule,
-                                           (char*)"createPopupMenu",
-                                           (char*)"Os",
-                                           sipPopup.get(),
-                                           theContext.toLatin1().constData() ) );
+                                            (char*)"createPopupMenu",
+                                            (char*)"Os",
+                                            sipPopup.get(),
+                                            theContext.toLatin1().constData() ) );
     if( !res1 ) {
       PyErr_Print();
     }
@@ -1207,12 +1207,12 @@ void SALOME_PYQT_ModuleLight::contextMenu( const QString& theContext, QMenu* the
     // call customPopup() Python module's function
     // this is obsolete function, used only for compatibility reasons
     PyObjWrapper res2( PyObject_CallMethod( myModule,
-                                           (char*)"customPopup",
-                                           (char*)"Osss",
-                                           sipPopup.get(),
-                                           aContext.toLatin1().constData(),
-                                           aObject.toLatin1().constData(),
-                                           aParent.toLatin1().constData() ) );
+                                            (char*)"customPopup",
+                                            (char*)"Osss",
+                                            sipPopup.get(),
+                                            aContext.toLatin1().constData(),
+                                            aObject.toLatin1().constData(),
+                                            aParent.toLatin1().constData() ) );
     if( !res2 ) {
       PyErr_Print();
     }
@@ -1436,10 +1436,10 @@ void SALOME_PYQT_ModuleLight::prefChanged( const QString& section, const QString
 
   if ( PyObject_HasAttrString( myModule, "preferenceChanged" ) ) {
     PyObjWrapper res( PyObject_CallMethod( myModule,
-                                          (char*)"preferenceChanged", 
-                                          (char*)"ss", 
-                                          section.toLatin1().constData(), 
-                                          setting.toLatin1().constData() ) );
+                                           (char*)"preferenceChanged", 
+                                           (char*)"ss", 
+                                           section.toLatin1().constData(), 
+                                           setting.toLatin1().constData() ) );
     if( !res ) {
       PyErr_Print();
     }
@@ -1649,8 +1649,8 @@ int SALOME_PYQT_ModuleLight::actionId( const QAction* a ) const
   \return created action
 */
 QAction* SALOME_PYQT_ModuleLight::createAction( const int id, const QString& text, const QString& icon,
-                                          const QString& menu, const QString& tip, const int key,
-                                          const bool toggle, QObject* parent )
+                                           const QString& menu, const QString& tip, const int key,
+                                           const bool toggle, QObject* parent )
 {
   QIcon anIcon = loadIcon( icon );
   QAction* a = action( id );
@@ -1666,15 +1666,15 @@ QAction* SALOME_PYQT_ModuleLight::createAction( const int id, const QString& tex
   }
   else {
     a = LightApp_Module::createAction( id, 
-                                       text, 
-                                       anIcon, 
-                                       menu, 
-                                       tip, 
-                                       key, 
-                                       parent ? parent : this, 
-                                       toggle, 
-                                       this, 
-                                       SLOT( onGUIEvent() ) );
+                                        text, 
+                                        anIcon, 
+                                        menu, 
+                                        tip, 
+                                        key, 
+                                        parent ? parent : this, 
+                                        toggle, 
+                                        this, 
+                                        SLOT( onGUIEvent() ) );
   }
   return a;
 }
@@ -1745,7 +1745,7 @@ int SALOME_PYQT_ModuleLight::addPreference( const QString& label )
 {
   return LightApp_Module::addPreference( label );
 }
-                                      
+                                       
 /*!
   \brief Add preference.
   \param label preference name
@@ -1756,9 +1756,9 @@ int SALOME_PYQT_ModuleLight::addPreference( const QString& label )
   \return preference ID
 */
 int SALOME_PYQT_ModuleLight::addPreference( const QString& label, 
-                                      const int pId, const int type,
-                                      const QString& section,
-                                      const QString& param )
+                                       const int pId, const int type,
+                                       const QString& section,
+                                       const QString& param )
 {
   return LightApp_Module::addPreference( label, pId, type, section, param );
 }
@@ -1770,7 +1770,7 @@ int SALOME_PYQT_ModuleLight::addPreference( const QString& label,
   \return property value (invalid QVariant() if property is not found)
 */
 QVariant SALOME_PYQT_ModuleLight::preferenceProperty( const int id, 
-                                                const QString& prop ) const
+                                                 const QString& prop ) const
 {
   QVariant v = LightApp_Module::preferenceProperty( id, prop );
   return v;
@@ -1783,8 +1783,8 @@ QVariant SALOME_PYQT_ModuleLight::preferenceProperty( const int id,
   \param var property value
 */
 void SALOME_PYQT_ModuleLight::setPreferenceProperty( const int id, 
-                                               const QString& prop, 
-                                               const QVariant& var )
+                                                const QString& prop, 
+                                                const QVariant& var )
 {
   LightApp_Module::setPreferenceProperty( id, prop, var );
 }
@@ -2044,7 +2044,7 @@ static int checkInt( const QString& value, const int def = -1, const int shift =
   \param fileName XML file path
 */
 SALOME_PYQT_ModuleLight::XmlHandler::XmlHandler( SALOME_PYQT_ModuleLight* module, 
-                                           const QString&      fileName )
+                                            const QString&      fileName )
 : myModule( module )
 {
   if ( fileName.isEmpty() ) 
@@ -2092,9 +2092,9 @@ void SALOME_PYQT_ModuleLight::XmlHandler::createActions()
   \param context popup menu object name
 */
 void SALOME_PYQT_ModuleLight::XmlHandler::createPopup( QMenu*         menu,
-                                                 const QString& context,
-                                                 const QString& parent,
-                                                 const QString& object )
+                                                  const QString& context,
+                                                  const QString& parent,
+                                                  const QString& object )
 {
   // get document element
   QDomElement aDocElem = myDoc.documentElement();
@@ -2110,8 +2110,8 @@ void SALOME_PYQT_ModuleLight::XmlHandler::createPopup( QMenu*         menu,
       QString prt = attribute( e, "parent-id"  );
       QString obj = attribute( e, "object-id"  );
       if ( ctx == context && prt == parent && obj == object )  {
-       insertPopupItems( n, menu );
-       break;
+        insertPopupItems( n, menu );
+        break;
       }
     }
   }
@@ -2140,8 +2140,8 @@ void SALOME_PYQT_ModuleLight::XmlHandler::activateMenus( bool enable )
   \param parentPopup parent popup menu (0 for top-level menu)
 */
 void SALOME_PYQT_ModuleLight::XmlHandler::createMenu( QDomNode& parentNode, 
-                                                const int parentMenuId, 
-                                                QMenu*    parentPopup )
+                                                 const int parentMenuId, 
+                                                 QMenu*    parentPopup )
 {
   if ( !myModule || parentNode.isNull() )
     return;
@@ -2152,70 +2152,70 @@ void SALOME_PYQT_ModuleLight::XmlHandler::createMenu( QDomNode& parentNode,
     int     pid    = checkInt( attribute( parentElement, "item-id" ) );
     int     ppos   = checkInt( attribute( parentElement, "pos-id" ) );
     int     group  = checkInt( attribute( parentElement, "group-id" ), 
-                              myModule->defaultMenuGroup() );
+                               myModule->defaultMenuGroup() );
     if ( !plabel.isEmpty() ) {
       QMenu* popup = 0;
       int menuId = -1;
       // create menu
       menuId = myModule->createMenu( plabel,         // label
-                                    parentMenuId,   // parent menu ID, -1 for top-level menu
-                                    pid,            // ID
-                                    group,          // group ID
-                                    ppos );         // position
+                                     parentMenuId,   // parent menu ID, -1 for top-level menu
+                                     pid,            // ID
+                                     group,          // group ID
+                                     ppos );         // position
       myMenuItems.append( menuId );
       QDomNode node = parentNode.firstChild();
       while ( !node.isNull() ) {
-       if ( node.isElement() ) {
-         QDomElement elem = node.toElement();
-         QString aTagName = tagName( elem );
-         if ( aTagName == "popup-item" ) {
-           int     id      = checkInt( attribute( elem, "item-id" ) );
-           int     pos     = checkInt( attribute( elem, "pos-id" ) );
-           int     group   = checkInt( attribute( elem, "group-id" ), 
-                                       myModule->defaultMenuGroup() );
-           QString label   = attribute( elem, "label-id" );
-           QString icon    = attribute( elem, "icon-id" );
-           QString tooltip = attribute( elem, "tooltip-id" );
-           QString accel   = attribute( elem, "accel-id" );
-           bool    toggle  = checkBool( attribute( elem, "toggle-id" ) );
-
-           // -1 action ID is not allowed : it means that <item-id> attribute is missed in the XML file!
-           // also check if the action with given ID is already created
-           if ( id != -1 ) {
-             // create menu action
-             QAction* action = myModule->createAction( id,                     // ID
-                                                       tooltip,                // tooltip
-                                                       icon,                   // icon
-                                                       label,                  // menu text
-                                                       tooltip,                // status-bar text
-                                                       QKeySequence( accel ),  // keyboard accelerator
-                                                       toggle );               // toogled action
-             myModule->createMenu( action,   // action
-                                   menuId,   // parent menu ID
-                                   id,       // ID (same as for createAction())
-                                   group,    // group ID
-                                   pos );    // position
-           }
-         }
-         else if ( aTagName == "submenu" ) {
-           // create sub-menu
-           createMenu( node, menuId, popup );
-         }
-         else if ( aTagName == "separator" ) {
-           // create menu separator
-           int id    = checkInt( attribute( elem, "item-id" ) ); // separator can have ID
-           int pos   = checkInt( attribute( elem, "pos-id" ) );
-           int group = checkInt( attribute( elem, "group-id" ), 
-                                 myModule->defaultMenuGroup() );
-           QAction* action = myModule->separator();
-           myModule->createMenu( action,  // separator action
-                                 menuId,  // parent menu ID
-                                 id,      // ID
-                                 group,   // group ID
-                                 pos );   // position
-         }
-       }
-       node = node.nextSibling();
+        if ( node.isElement() ) {
+          QDomElement elem = node.toElement();
+          QString aTagName = tagName( elem );
+          if ( aTagName == "popup-item" ) {
+            int     id      = checkInt( attribute( elem, "item-id" ) );
+            int     pos     = checkInt( attribute( elem, "pos-id" ) );
+            int     group   = checkInt( attribute( elem, "group-id" ), 
+                                        myModule->defaultMenuGroup() );
+            QString label   = attribute( elem, "label-id" );
+            QString icon    = attribute( elem, "icon-id" );
+            QString tooltip = attribute( elem, "tooltip-id" );
+            QString accel   = attribute( elem, "accel-id" );
+            bool    toggle  = checkBool( attribute( elem, "toggle-id" ) );
+
+            // -1 action ID is not allowed : it means that <item-id> attribute is missed in the XML file!
+            // also check if the action with given ID is already created
+            if ( id != -1 ) {
+              // create menu action
+              QAction* action = myModule->createAction( id,                     // ID
+                                                        tooltip,                // tooltip
+                                                        icon,                   // icon
+                                                        label,                  // menu text
+                                                        tooltip,                // status-bar text
+                                                        QKeySequence( accel ),  // keyboard accelerator
+                                                        toggle );               // toogled action
+              myModule->createMenu( action,   // action
+                                    menuId,   // parent menu ID
+                                    id,       // ID (same as for createAction())
+                                    group,    // group ID
+                                    pos );    // position
+            }
+          }
+          else if ( aTagName == "submenu" ) {
+            // create sub-menu
+            createMenu( node, menuId, popup );
+          }
+          else if ( aTagName == "separator" ) {
+            // create menu separator
+            int id    = checkInt( attribute( elem, "item-id" ) ); // separator can have ID
+            int pos   = checkInt( attribute( elem, "pos-id" ) );
+            int group = checkInt( attribute( elem, "group-id" ), 
+                                  myModule->defaultMenuGroup() );
+            QAction* action = myModule->separator();
+            myModule->createMenu( action,  // separator action
+                                  menuId,  // parent menu ID
+                                  id,      // ID
+                                  group,   // group ID
+                                  pos );   // position
+          }
+        }
+        node = node.nextSibling();
       }
     }
   }
@@ -2238,40 +2238,40 @@ void SALOME_PYQT_ModuleLight::XmlHandler::createToolBar( QDomNode& parentNode )
       int tbId = myModule->createTool( aLabel );
       QDomNode node = parentNode.firstChild();
       while ( !node.isNull() ) {
-       if ( node.isElement() ) {
-         QDomElement elem = node.toElement();
-         QString aTagName = tagName( elem );
-         if ( aTagName == "toolbutton-item" ) {
-           int     id      = checkInt( attribute( elem, "item-id" ) );
-           int     pos     = checkInt( attribute( elem, "pos-id" ) );
-           QString label   = attribute( elem, "label-id" );
-           QString icon    = attribute( elem, "icon-id" );
-           QString tooltip = attribute( elem, "tooltip-id" );
-           QString accel   = attribute( elem, "accel-id" );
-           bool    toggle  = checkBool( attribute( elem, "toggle-id" ) );
-
-           // -1 action ID is not allowed : it means that <item-id> attribute is missed in the XML file!
-           // also check if the action with given ID is already created
+        if ( node.isElement() ) {
+          QDomElement elem = node.toElement();
+          QString aTagName = tagName( elem );
+          if ( aTagName == "toolbutton-item" ) {
+            int     id      = checkInt( attribute( elem, "item-id" ) );
+            int     pos     = checkInt( attribute( elem, "pos-id" ) );
+            QString label   = attribute( elem, "label-id" );
+            QString icon    = attribute( elem, "icon-id" );
+            QString tooltip = attribute( elem, "tooltip-id" );
+            QString accel   = attribute( elem, "accel-id" );
+            bool    toggle  = checkBool( attribute( elem, "toggle-id" ) );
+
+            // -1 action ID is not allowed : it means that <item-id> attribute is missed in the XML file!
+            // also check if the action with given ID is already created
             if ( id != -1 ) {
-             // create toolbar action
-             QAction* action = myModule->createAction( id,                    // ID
-                                                       tooltip,               // tooltip
-                                                       icon,                  // icon
-                                                       label,                 // menu text
-                                                       tooltip,               // status-bar text
-                                                       QKeySequence( accel ), // keyboard accelerator
-                                                       toggle );              // toogled action
-             myModule->createTool( action, tbId, -1, pos );
-           }
-         }
-         else if ( aTagName == "separatorTB" || aTagName == "separator" ) {
-           // create toolbar separator
-           int pos = checkInt( attribute( elem, "pos-id" ) );
-           QAction* action = myModule->separator();
-           myModule->createTool( action, tbId, -1, pos );
-         }
-       }
-       node = node.nextSibling();
+              // create toolbar action
+              QAction* action = myModule->createAction( id,                    // ID
+                                                        tooltip,               // tooltip
+                                                        icon,                  // icon
+                                                        label,                 // menu text
+                                                        tooltip,               // status-bar text
+                                                        QKeySequence( accel ), // keyboard accelerator
+                                                        toggle );              // toogled action
+              myModule->createTool( action, tbId, -1, pos );
+            }
+          }
+          else if ( aTagName == "separatorTB" || aTagName == "separator" ) {
+            // create toolbar separator
+            int pos = checkInt( attribute( elem, "pos-id" ) );
+            QAction* action = myModule->separator();
+            myModule->createTool( action, tbId, -1, pos );
+          }
+        }
+        node = node.nextSibling();
       }
     }
   }
@@ -2295,54 +2295,54 @@ void SALOME_PYQT_ModuleLight::XmlHandler::insertPopupItems( QDomNode& parentNode
       QString aTagName = tagName( elem );
       QList<QAction*> actions = menu->actions();
       if ( aTagName == "popup-item" ) {
-       // insert a command item
-       int     id      = checkInt( attribute( elem, "item-id" ) );
-       int     pos     = checkInt( attribute( elem, "pos-id" ) );
-       QString label   = attribute( elem, "label-id" );
-       QString icon    = attribute( elem, "icon-id" );
-       QString tooltip = attribute( elem, "tooltip-id" );
-       QString accel   = attribute( elem, "accel-id" );
-       bool    toggle  = checkBool( attribute( elem, "toggle-id" ) );
-
-       // -1 action ID is not allowed : it means that <item-id> attribute is missed in the XML file!
-       // also check if the action with given ID is already created
-       if ( id != -1 ) {
-         QAction* action = myModule->createAction( id,                     // ID
-                                                   tooltip,                // tooltip
-                                                   icon,                   // icon
-                                                   label,                  // menu text
-                                                   tooltip,                // status-bar text
-                                                   QKeySequence( accel ),  // keyboard accelerator
-                                                   toggle );               // toogled action
-         QAction* before = ( pos >= 0 && pos < actions.count() ) ? actions[ pos ] : 0;
-         menu->insertAction( before, action );
-       }
+        // insert a command item
+        int     id      = checkInt( attribute( elem, "item-id" ) );
+        int     pos     = checkInt( attribute( elem, "pos-id" ) );
+        QString label   = attribute( elem, "label-id" );
+        QString icon    = attribute( elem, "icon-id" );
+        QString tooltip = attribute( elem, "tooltip-id" );
+        QString accel   = attribute( elem, "accel-id" );
+        bool    toggle  = checkBool( attribute( elem, "toggle-id" ) );
+
+        // -1 action ID is not allowed : it means that <item-id> attribute is missed in the XML file!
+        // also check if the action with given ID is already created
+        if ( id != -1 ) {
+          QAction* action = myModule->createAction( id,                     // ID
+                                                    tooltip,                // tooltip
+                                                    icon,                   // icon
+                                                    label,                  // menu text
+                                                    tooltip,                // status-bar text
+                                                    QKeySequence( accel ),  // keyboard accelerator
+                                                    toggle );               // toogled action
+          QAction* before = ( pos >= 0 && pos < actions.count() ) ? actions[ pos ] : 0;
+          menu->insertAction( before, action );
+        }
       }
       else if ( aTagName == "submenu" ) {
-       // create sub-menu
-       ////int     id    = checkInt( attribute( elem, "item-id" ) ); // not used //
-       int     pos   = checkInt( attribute( elem, "pos-id" ) );
-       QString label = attribute( elem, "label-id" );
-       QString icon  = attribute( elem, "icon-id" );
-
-       QIcon anIcon;
-       if ( !icon.isEmpty() ) {
-         QPixmap pixmap  = myModule->getApp()->resourceMgr()->loadPixmap( myModule->name(), icon );
-         if ( !pixmap.isNull() )
-           anIcon = QIcon( pixmap );
+        // create sub-menu
+        ////int     id    = checkInt( attribute( elem, "item-id" ) ); // not used //
+        int     pos   = checkInt( attribute( elem, "pos-id" ) );
+        QString label = attribute( elem, "label-id" );
+        QString icon  = attribute( elem, "icon-id" );
+
+        QIcon anIcon;
+        if ( !icon.isEmpty() ) {
+          QPixmap pixmap  = myModule->getApp()->resourceMgr()->loadPixmap( myModule->name(), icon );
+          if ( !pixmap.isNull() )
+            anIcon = QIcon( pixmap );
         }
 
-       QMenu* newPopup = menu->addMenu( anIcon, label );
-       QAction* before = ( pos >= 0 && pos < actions.count() ) ? actions[ pos ] : 0;
-       menu->insertMenu( before, newPopup );
-       insertPopupItems( node, newPopup );
+        QMenu* newPopup = menu->addMenu( anIcon, label );
+        QAction* before = ( pos >= 0 && pos < actions.count() ) ? actions[ pos ] : 0;
+        menu->insertMenu( before, newPopup );
+        insertPopupItems( node, newPopup );
       }
       else if ( aTagName == "separator" ) {
-       // create menu separator
-       int pos = checkInt( attribute( elem, "pos-id" ) );
-       QAction* action = myModule->separator();
-       QAction* before = ( pos >= 0 && pos < actions.count() ) ? actions[ pos ] : 0;
-       menu->insertAction( before, action );
+        // create menu separator
+        int pos = checkInt( attribute( elem, "pos-id" ) );
+        QAction* action = myModule->separator();
+        QAction* before = ( pos >= 0 && pos < actions.count() ) ? actions[ pos ] : 0;
+        menu->insertAction( before, action );
       }
     }
     node = node.nextSibling();
@@ -2393,7 +2393,7 @@ void SALOME_PYQT_ModuleLight::saveEvent(QStringList& theListOfFiles)
 
   if ( PyObject_HasAttrString(myModule, "saveFiles") ) {
     PyObjWrapper res( PyObject_CallMethod( myModule, (char*)"saveFiles",
-                                          (char*)"s", (*it).toLatin1().constData()));
+                                           (char*)"s", (*it).toLatin1().constData()));
     if( !res ) {
       PyErr_Print();
     }
@@ -2409,10 +2409,10 @@ void SALOME_PYQT_ModuleLight::saveEvent(QStringList& theListOfFiles)
       else if ( PyList_Check( res ) ) {
         int size = PyList_Size( res );
         for ( int i = 0; i < size; i++ ) {
-         PyObject* value = PyList_GetItem( res, i );
-         if( value && PyString_Check( value ) ) {
-           theListOfFiles.append( PyString_AsString( value ) );
-         }
+          PyObject* value = PyList_GetItem( res, i );
+          if( value && PyString_Check( value ) ) {
+            theListOfFiles.append( PyString_AsString( value ) );
+          }
         }
       }
     }
@@ -2475,7 +2475,7 @@ void SALOME_PYQT_ModuleLight::openEvent(QStringList theListOfFiles, bool &opened
 #endif
   if ( PyObject_HasAttrString(myModule , "openFiles") ) {
     PyObjWrapper res( PyObject_CallMethod( myModule, (char*)"openFiles",
-                                          (char*)"O", sipList.get()));
+                                           (char*)"O", sipList.get()));
     if( !res || !PyBool_Check( res )) {
       PyErr_Print();
       opened = false;
index 44c4a71e223e0c75e9afea7e0ac8ac1b38dab23e..6326e1df8568d25f986593e922b65ac8a325778b 100644 (file)
@@ -88,30 +88,30 @@ public:
   int                        createTool( const int, const int, const int = -1 );
   int                        createTool( const int, const QString&, const int = -1 );
   int                        createTool( QAction*, const int, 
-                                        const int = -1, const int = -1 );
+                                         const int = -1, const int = -1 );
   int                        createTool( QAction*, const QString&, 
-                                        const int = -1, const int = -1 );
+                                         const int = -1, const int = -1 );
 
   int                        createMenu( const QString&, const int, 
-                                        const int = -1, const int = -1, const int = -1 );
+                                         const int = -1, const int = -1, const int = -1 );
   int                        createMenu( const QString&, const QString&, 
-                                        const int = -1, const int = -1, const int = -1 );
+                                         const int = -1, const int = -1, const int = -1 );
   int                        createMenu( const int, const int, 
-                                        const int = -1, const int = -1 );
+                                         const int = -1, const int = -1 );
   int                        createMenu( const int, const QString&, 
-                                        const int = -1, const int = -1 );
+                                         const int = -1, const int = -1 );
   int                        createMenu( QAction*, const int, 
-                                        const int = -1, const int = -1, const int = -1 );
+                                         const int = -1, const int = -1, const int = -1 );
   int                        createMenu( QAction*, const QString&, 
-                                        const int = -1, const int = -1, const int = -1 );
+                                         const int = -1, const int = -1, const int = -1 );
 
   QAction*                   separator();
 
   QAction*                   action( const int ) const;
   int                        actionId( const QAction* ) const;
   QAction*                   createAction( const int, const QString&, const QString&, 
-                                          const QString&, const QString&, const int, 
-                                          const bool = false, QObject* = 0 );
+                                           const QString&, const QString&, const int, 
+                                           const bool = false, QObject* = 0 );
   QtxActionGroup*            createActionGroup( const int, const bool );
 
 
@@ -120,11 +120,11 @@ public:
   int                        addGlobalPreference( const QString& );
   int                        addPreference( const QString& );
   int                        addPreference( const QString&, const int, const int = LightApp_Preferences::Auto,
-                                           const QString& = QString(),
-                                           const QString& = QString() );
+                                            const QString& = QString(),
+                                            const QString& = QString() );
   QVariant                   preferenceProperty( const int, const QString& ) const;
   void                       setPreferenceProperty( const int, const QString&, 
-                                                   const QVariant& );
+                                                    const QVariant& );
 
   void                   save(QStringList& theListOfFiles);
 
@@ -133,9 +133,9 @@ public:
   /*create new SALOME_PYQT_DataObjectLight and return its entry*/
   QString                   createObject(const QString& parent);
   QString                   createObject(const QString& name, 
-                                        const QString& iconname,
-                                        const QString& tooltip,
-                                        const QString& parent);
+                                         const QString& iconname,
+                                         const QString& tooltip,
+                                         const QString& parent);
   /*Sets Name, Icon and Tool Tip for object*/
   void                      setName(const QString& obj,const QString& iconname);
   void                      setIcon(const QString& obj,const QString& name);
@@ -156,8 +156,8 @@ public slots:
   virtual bool               activateModule( SUIT_Study* );
   virtual bool               deactivateModule( SUIT_Study* );
   void                       preferenceChanged( const QString&, 
-                                               const QString&, 
-                                               const QString& );
+                                                const QString&, 
+                                                const QString& );
   void                       onGUIEvent();
 
   void                       onActiveViewChanged( SUIT_ViewWindow* );
index b6f0b19ca4f2ff91324cfdab8a64d728229e1cc3..b7efe52de8035fcac1f93623c579cea4068b83c7 100644 (file)
@@ -510,15 +510,15 @@ void SalomePyQt::updateObjBrowser( const int studyId, bool updateSelection )
       if ( SUIT_Session::session() ) {
         if ( getActiveStudy() && myStudyId <= 0 )
           myStudyId = getActiveStudy()->id();
-       if ( myStudyId > 0 ) {
+        if ( myStudyId > 0 ) {
           QList<SUIT_Application*> apps = SUIT_Session::session()->applications();
           QList<SUIT_Application*>::Iterator it;
-         for( it = apps.begin(); it != apps.end(); ++it ) {
+          for( it = apps.begin(); it != apps.end(); ++it ) {
             LightApp_Application* anApp = dynamic_cast<LightApp_Application*>( *it );
             if ( anApp && anApp->activeStudy() && anApp->activeStudy()->id() == myStudyId ) {
-             anApp->updateObjectBrowser();
-             return;
-           }
+              anApp->updateObjectBrowser();
+              return;
+            }
           }
         }
       }
@@ -560,10 +560,10 @@ void SalomePyQt::addStringSetting( const QString& name, const QString& value, bo
     virtual void Execute() {
       if ( SUIT_Session::session() ) {
         SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-       QStringList sl = myName.split( ":", QString::SkipEmptyParts );
-       QString _sec = sl.count() > 1 ? sl[ 0 ].trimmed() : QString( DEFAULT_SECTION );
-       QString _nam = sl.count() > 1 ? sl[ 1 ].trimmed() : sl.count() > 0 ? sl[ 0 ].trimmed() : QString( "" );
-       if ( !_sec.isEmpty() && !_nam.isEmpty() )
+        QStringList sl = myName.split( ":", QString::SkipEmptyParts );
+        QString _sec = sl.count() > 1 ? sl[ 0 ].trimmed() : QString( DEFAULT_SECTION );
+        QString _nam = sl.count() > 1 ? sl[ 1 ].trimmed() : sl.count() > 0 ? sl[ 0 ].trimmed() : QString( "" );
+        if ( !_sec.isEmpty() && !_nam.isEmpty() )
           resMgr->setValue( _sec, _nam, myValue );
       }
     }
@@ -599,10 +599,10 @@ void SalomePyQt::addIntSetting( const QString& name, const int value, bool autoV
     {
       if ( SUIT_Session::session() ) {
         SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-       QStringList sl = myName.split( ":", QString::SkipEmptyParts );
-       QString _sec = sl.count() > 1 ? sl[ 0 ].trimmed() : QString( DEFAULT_SECTION );
-       QString _nam = sl.count() > 1 ? sl[ 1 ].trimmed() : sl.count() > 0 ? sl[ 0 ].trimmed() : QString( "" );
-       if ( !_sec.isEmpty() && !_nam.isEmpty() )
+        QStringList sl = myName.split( ":", QString::SkipEmptyParts );
+        QString _sec = sl.count() > 1 ? sl[ 0 ].trimmed() : QString( DEFAULT_SECTION );
+        QString _nam = sl.count() > 1 ? sl[ 1 ].trimmed() : sl.count() > 0 ? sl[ 0 ].trimmed() : QString( "" );
+        if ( !_sec.isEmpty() && !_nam.isEmpty() )
           resMgr->setValue( _sec, _nam, myValue );
       }
     }
@@ -638,10 +638,10 @@ void SalomePyQt::addDoubleSetting( const QString& name, const double value, bool
     {
       if ( SUIT_Session::session() ) {
         SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-       QStringList sl = myName.split( ":", QString::SkipEmptyParts );
-       QString _sec = sl.count() > 1 ? sl[ 0 ].trimmed() : QString( DEFAULT_SECTION );
-       QString _nam = sl.count() > 1 ? sl[ 1 ].trimmed() : sl.count() > 0 ? sl[ 0 ].trimmed() : QString( "" );
-       if ( !_sec.isEmpty() && !_nam.isEmpty() )
+        QStringList sl = myName.split( ":", QString::SkipEmptyParts );
+        QString _sec = sl.count() > 1 ? sl[ 0 ].trimmed() : QString( DEFAULT_SECTION );
+        QString _nam = sl.count() > 1 ? sl[ 1 ].trimmed() : sl.count() > 0 ? sl[ 0 ].trimmed() : QString( "" );
+        if ( !_sec.isEmpty() && !_nam.isEmpty() )
           resMgr->setValue( _sec, _nam, myValue );
       }
     }
@@ -677,10 +677,10 @@ void SalomePyQt::addBoolSetting( const QString& name, const bool value, bool aut
     {
       if ( SUIT_Session::session() ) {
         SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-       QStringList sl = myName.split( ":", QString::SkipEmptyParts );
-       QString _sec = sl.count() > 1 ? sl[ 0 ].trimmed() : QString( DEFAULT_SECTION );
-       QString _nam = sl.count() > 1 ? sl[ 1 ].trimmed() : sl.count() > 0 ? sl[ 0 ].trimmed() : QString( "" );
-       if ( !_sec.isEmpty() && !_nam.isEmpty() )
+        QStringList sl = myName.split( ":", QString::SkipEmptyParts );
+        QString _sec = sl.count() > 1 ? sl[ 0 ].trimmed() : QString( DEFAULT_SECTION );
+        QString _nam = sl.count() > 1 ? sl[ 1 ].trimmed() : sl.count() > 0 ? sl[ 0 ].trimmed() : QString( "" );
+        if ( !_sec.isEmpty() && !_nam.isEmpty() )
           resMgr->setValue( _sec, _nam, myValue );
       }
     }
@@ -705,10 +705,10 @@ void SalomePyQt::removeSettings( const QString& name )
     virtual void Execute() {
       if ( SUIT_Session::session() ) {
         SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-       QStringList sl = myName.split( ":", QString::SkipEmptyParts );
-       QString _sec = sl.count() > 1 ? sl[ 0 ].trimmed() : QString( DEFAULT_SECTION );
-       QString _nam = sl.count() > 1 ? sl[ 1 ].trimmed() : sl.count() > 0 ? sl[ 0 ].trimmed() : QString( "" );
-       if ( !_sec.isEmpty() && !_nam.isEmpty() )
+        QStringList sl = myName.split( ":", QString::SkipEmptyParts );
+        QString _sec = sl.count() > 1 ? sl[ 0 ].trimmed() : QString( DEFAULT_SECTION );
+        QString _nam = sl.count() > 1 ? sl[ 1 ].trimmed() : sl.count() > 0 ? sl[ 0 ].trimmed() : QString( "" );
+        if ( !_sec.isEmpty() && !_nam.isEmpty() )
           resMgr->remove( _sec, _nam );
       }
     }
@@ -771,7 +771,7 @@ void SalomePyQt::addSetting( const QString& section, const QString& name, const
     {
       if ( SUIT_Session::session() ) {
         SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-       if ( !mySection.isEmpty() && !myName.isEmpty() )
+        if ( !mySection.isEmpty() && !myName.isEmpty() )
           resMgr->setValue( mySection, myName, myValue );
       }
     }
@@ -799,7 +799,7 @@ void SalomePyQt::addSetting( const QString& section, const QString& name, const
     {
       if ( SUIT_Session::session() ) {
         SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-       if ( !mySection.isEmpty() && !myName.isEmpty() )
+        if ( !mySection.isEmpty() && !myName.isEmpty() )
           resMgr->setValue( mySection, myName, myValue );
       }
     }
@@ -829,7 +829,7 @@ void SalomePyQt::addSetting( const QString& section, const QString& name, const
     {
       if ( SUIT_Session::session() ) {
         SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-       if ( !mySection.isEmpty() && !myName.isEmpty() )
+        if ( !mySection.isEmpty() && !myName.isEmpty() )
           resMgr->setValue( mySection, myName, myValue );
       }
     }
@@ -857,7 +857,7 @@ void SalomePyQt::addSetting( const QString& section, const QString& name, const
     {
       if ( SUIT_Session::session() ) {
         SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-       if ( !mySection.isEmpty() && !myName.isEmpty() )
+        if ( !mySection.isEmpty() && !myName.isEmpty() )
           resMgr->setValue( mySection, myName, myValue );
       }
     }
@@ -885,7 +885,7 @@ void SalomePyQt::addSetting( const QString& section, const QString& name, const
     {
       if ( SUIT_Session::session() ) {
         SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-       if ( !mySection.isEmpty() && !myName.isEmpty() )
+        if ( !mySection.isEmpty() && !myName.isEmpty() )
           resMgr->setValue( mySection, myName, myValue );
       }
     }
@@ -896,7 +896,7 @@ void SalomePyQt::addSetting( const QString& section, const QString& name, const
 /*!
   \fn int SalomePyQt::integerSetting( const QString& section, 
                                       const QString& name, 
-                                     const int def );
+                                      const int def );
   \brief Get integer setting from the application preferences.
   \param section resources file section name 
   \param name setting name
@@ -930,7 +930,7 @@ int SalomePyQt::integerSetting( const QString& section, const QString& name, con
 /*!
   \fn double SalomePyQt::doubleSetting( const QString& section, 
                                         const QString& name, 
-                                       const double def );
+                                        const double def );
   \brief Get double setting from the application preferences.
   \param section resources file section name 
   \param name setting name
@@ -964,7 +964,7 @@ double SalomePyQt::doubleSetting( const QString& section, const QString& name, c
 /*!
   \fn bool SalomePyQt::boolSetting( const QString& section, 
                                     const QString& name, 
-                                   const bool def );
+                                    const bool def );
   \brief Get boolean setting from the application preferences.
   \param section resources file section name 
   \param name setting name
@@ -998,7 +998,7 @@ bool SalomePyQt::boolSetting( const QString& section, const QString& name, const
 /*!
   \fn QString SalomePyQt::stringSetting( const QString& section, 
                                          const QString& name, 
-                                        const QString& def );
+                                         const QString& def );
   \brief Get string setting from the application preferences.
   \param section resources file section name 
   \param name setting name
@@ -1032,7 +1032,7 @@ QString SalomePyQt::stringSetting( const QString& section, const QString& name,
 /*!
   \fn QColor SalomePyQt::colorSetting( const QString& section, 
                                        const QString& name, 
-                                      const QColor def );
+                                       const QColor def );
   \brief Get color setting from the application preferences.
   \param section resources file section name 
   \param name setting name
@@ -1080,7 +1080,7 @@ void SalomePyQt::removeSetting( const QString& section, const QString& name )
     {
       if ( SUIT_Session::session() ) {
         SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-       if ( !mySection.isEmpty() && !myName.isEmpty() )
+        if ( !mySection.isEmpty() && !myName.isEmpty() )
           resMgr->remove( mySection, myName );
       }
     }
@@ -1120,10 +1120,10 @@ bool SalomePyQt::hasSetting( const QString& section, const QString& name )
 
 /*!
   \fn QString SalomePyQt::getFileName( QWidget*           parent, 
-                                      const QString&     initial, 
-                                      const QStringList& filters, 
-                                      const QString&     caption,
-                                      bool               open );
+                                       const QString&     initial, 
+                                       const QStringList& filters, 
+                                       const QString&     caption,
+                                       bool               open );
   \brief Show 'Open/Save file' dialog box for file selection 
          and return a user's choice (selected file name).
   \param parent parent widget
@@ -1146,10 +1146,10 @@ public:
   QString     myCaption;
   bool        myOpen;
   TGetFileNameEvent( QWidget*           parent, 
-                    const QString&     initial, 
-                    const QStringList& filters, 
-                    const QString&     caption,
-                    bool               open ) 
+                     const QString&     initial, 
+                     const QStringList& filters, 
+                     const QString&     caption,
+                     bool               open ) 
     : myParent ( parent ), 
       myInitial( initial ), 
       myFilters( filters ), 
@@ -1159,24 +1159,24 @@ public:
   {
     if ( LightApp_Application* anApp = getApplication() ) {
       myResult = anApp->getFileName( myOpen, myInitial, myFilters.join(";;"), 
-                                    myCaption, myParent );
+                                     myCaption, myParent );
     }
   }
 };
 QString SalomePyQt::getFileName( QWidget*           parent, 
-                                const QString&     initial, 
-                                const QStringList& filters, 
-                                const QString&     caption,
-                                bool               open )
+                                 const QString&     initial, 
+                                 const QStringList& filters, 
+                                 const QString&     caption,
+                                 bool               open )
 {
   return ProcessEvent( new TGetFileNameEvent( parent, initial, filters, caption, open ) );
 }
 
 /*!
   \fn QStringList SalomePyQt::getOpenFileNames( QWidget*           parent, 
-                                               const QString&     initial, 
-                                               const QStringList& filters, 
-                                               const QString&     caption );
+                                                const QString&     initial, 
+                                                const QStringList& filters, 
+                                                const QString&     caption );
   \brief Show 'Open files' dialog box for multiple files selection
          and return a user's choice (selected file names list).
   \param parent parent widget
@@ -1196,9 +1196,9 @@ public:
   QStringList myFilters;
   QString     myCaption;
   TGetOpenFileNamesEvent( QWidget*           parent, 
-                         const QString&     initial, 
-                         const QStringList& filters, 
-                         const QString&     caption ) 
+                          const QString&     initial, 
+                          const QStringList& filters, 
+                          const QString&     caption ) 
     : myParent ( parent ), 
       myInitial( initial ), 
       myFilters( filters ), 
@@ -1211,17 +1211,17 @@ public:
   }
 };
 QStringList SalomePyQt::getOpenFileNames( QWidget*           parent, 
-                                         const QString&     initial, 
-                                         const QStringList& filters, 
-                                         const QString&     caption )
+                                          const QString&     initial, 
+                                          const QStringList& filters, 
+                                          const QString&     caption )
 {
   return ProcessEvent( new TGetOpenFileNamesEvent( parent, initial, filters, caption ) );
 }
 
 /*!
   \fn QString SalomePyQt::getExistingDirectory( QWidget*       parent,
-                                               const QString& initial,
-                                               const QString& caption );
+                                                const QString& initial,
+                                                const QString& caption );
   \brief Show 'Get Directory' dialog box for the directory selection
          and return a user's choice (selected directory name).
   \param parent parent widget
@@ -1239,8 +1239,8 @@ public:
   QString     myInitial;
   QString     myCaption;
   TGetExistingDirectoryEvent( QWidget*           parent, 
-                             const QString&     initial, 
-                             const QString&     caption ) 
+                              const QString&     initial, 
+                              const QString&     caption ) 
     : myParent ( parent ), 
       myInitial( initial ), 
       myCaption( caption ) {}
@@ -1252,8 +1252,8 @@ public:
   }
 };
 QString SalomePyQt::getExistingDirectory( QWidget*       parent,
-                                         const QString& initial,
-                                         const QString& caption )
+                                          const QString& initial,
+                                          const QString& caption )
 {
   return ProcessEvent( new TGetExistingDirectoryEvent( parent, initial, caption ) );
 }
@@ -1278,11 +1278,11 @@ public:
   {
     if ( LightApp_Application* anApp = getApplication() ) {
       if ( !myFileName.isEmpty() ) {
-       QPixmap pixmap = anApp->resourceMgr()->loadPixmap( myModule, 
+        QPixmap pixmap = anApp->resourceMgr()->loadPixmap( myModule, 
                          QApplication::translate( myModule.toLatin1().data(), 
-                                                 myFileName.toLatin1().data() ) );
-       if ( !pixmap.isNull() )
-         myResult = QIcon( pixmap );
+                                                  myFileName.toLatin1().data() ) );
+        if ( !pixmap.isNull() )
+          myResult = QIcon( pixmap );
       }
     }
   }
@@ -1347,15 +1347,15 @@ public:
       SUIT_ViewManager* vm = anApp->activeViewManager();
       if ( vm ) { 
         SUIT_ViewWindow* vw = vm->getActiveView();
-       if ( vw ) {
+        if ( vw ) {
           QImage im = vw->dumpView();
-         if ( !im.isNull() && !myFileName.isEmpty() ) {
+          if ( !im.isNull() && !myFileName.isEmpty() ) {
             QString fmt = SUIT_Tools::extension( myFileName ).toUpper();
-           if ( fmt.isEmpty() ) fmt = QString( "BMP" ); // default format
-           if ( fmt == "JPG" )  fmt = "JPEG";
-           myResult = im.save( myFileName, fmt.toLatin1() );
+            if ( fmt.isEmpty() ) fmt = QString( "BMP" ); // default format
+            if ( fmt == "JPG" )  fmt = "JPEG";
+            myResult = im.save( myFileName, fmt.toLatin1() );
           }
-       }
+        }
       }
     }
   }
@@ -1676,11 +1676,11 @@ QAction* SalomePyQt::createSeparator()
 /*!
   \fn QAction* SalomePyQt::createAction( const int      id,
                                            const QString& menuText, 
-                                          const QString& tipText, 
-                                          const QString& statusText, 
-                                          const QString& icon,
-                                          const int      key, 
-                                          const bool     toggle )
+                                           const QString& tipText, 
+                                           const QString& statusText, 
+                                           const QString& icon,
+                                           const int      key, 
+                                           const bool     toggle )
   \brief Create an action which can be then used in the menu or toolbar.
   \param id the unique id action to be registered to
   \param menuText action text which should appear in menu
@@ -1704,7 +1704,7 @@ public:
   int     myKey;
   bool    myToggle;
   TCreateActionEvent( const int id, const QString& menuText, const QString& tipText, 
-                     const QString& statusText, const QString& icon, const int key, const bool toggle ) 
+                      const QString& statusText, const QString& icon, const int key, const bool toggle ) 
     : myResult( 0 ), myId( id ), myMenuText( menuText ), myTipText( tipText ),
       myStatusText( statusText ), myIcon( icon ), myKey( key ), myToggle( toggle ) {}
   virtual void Execute()
@@ -1715,8 +1715,8 @@ public:
   }
 };
 QAction* SalomePyQt::createAction( const int id,           const QString& menuText, 
-                                    const QString& tipText, const QString& statusText, 
-                                    const QString& icon,    const int key, const bool toggle )
+                                     const QString& tipText, const QString& statusText, 
+                                     const QString& icon,    const int key, const bool toggle )
 {
   return ProcessEvent( new TCreateActionEvent( id, menuText, tipText, statusText, icon, key, toggle ) );
 }
@@ -1855,7 +1855,7 @@ int SalomePyQt::addPreference( const QString& label )
 
 /*!
   \fn int SalomePyQt::addPreference( const QString& label, const int pId, const int type,
-                                    const QString& section, const QString& param );
+                                     const QString& section, const QString& param );
   \brief Add module-related preferences.
   \param label preferences group name
   \param pId parent preferences group id
@@ -1876,9 +1876,9 @@ public:
   QString mySection;
   QString myParam;
   TAddPrefParamEvent( const QString& label, 
-                     const int pId, const int type,
-                     const QString& section, 
-                     const QString& param )
+                      const int pId, const int type,
+                      const QString& section, 
+                      const QString& param )
     : myResult( -1 ),
       myLabel( label ), myPId( pId ), myType( type ), 
       mySection( section ), myParam ( param ) {}
@@ -1890,7 +1890,7 @@ public:
   }
 };
 int SalomePyQt::addPreference( const QString& label, const int pId, const int type,
-                              const QString& section, const QString& param )
+                               const QString& section, const QString& param )
 {
   return ProcessEvent( new TAddPrefParamEvent( label, pId, type, section, param ) );
 }
@@ -1931,8 +1931,8 @@ QVariant SalomePyQt::preferenceProperty( const int id, const QString& prop )
   \param var preferences property value
 */
 void SalomePyQt::setPreferenceProperty( const int id, 
-                                       const QString& prop,
-                                       const QVariant& var )
+                                        const QString& prop,
+                                        const QVariant& var )
 {
   class TEvent: public SALOME_Event
   {
@@ -1946,7 +1946,7 @@ void SalomePyQt::setPreferenceProperty( const int id,
     {
       SALOME_PYQT_ModuleLight* module = getActiveModule();
       if ( module )
-       module->setPreferenceProperty( myId, myProp, myVar );
+        module->setPreferenceProperty( myId, myProp, myVar );
     }
   };
   ProcessVoidEvent( new TEvent( id, prop, var) );
@@ -1964,9 +1964,9 @@ void SalomePyQt::setPreferenceProperty( const int id,
   \param var preferences property value for the index \a idx
 */
 void SalomePyQt::addPreferenceProperty( const int id, 
-                                       const QString& prop,
-                                       const int idx, 
-                                       const QVariant& var )
+                                        const QString& prop,
+                                        const int idx, 
+                                        const QVariant& var )
 {
   class TEvent: public SALOME_Event
   {
@@ -1981,30 +1981,30 @@ void SalomePyQt::addPreferenceProperty( const int id,
     {
       SALOME_PYQT_ModuleLight* module = getActiveModule();
       if ( module ) {
-       QVariant var =  module->preferenceProperty( myId, myProp );
-       if ( var.isValid() ) {
-         if ( var.type() == QVariant::StringList ) {
-           QStringList sl = var.toStringList();
-           if ( myIdx >= 0 && myIdx < sl.count() ) 
-             sl[myIdx] = myVar.toString();
-           else
-             sl.append( myVar.toString() );
-           module->setPreferenceProperty( myId, myProp, sl );
-         }
-         else if ( var.type() == QVariant::List ) {
-           QList<QVariant> vl = var.toList();
-           if ( myIdx >= 0 && myIdx < vl.count() ) 
-             vl[myIdx] = myVar;
-           else
-             vl.append( myVar );
-           module->setPreferenceProperty( myId, myProp, vl );
-         }
-       }
-       else {
-         QList<QVariant> vl;
-         vl.append( myVar );
-         module->setPreferenceProperty( myId, myProp, vl );
-       }
+        QVariant var =  module->preferenceProperty( myId, myProp );
+        if ( var.isValid() ) {
+          if ( var.type() == QVariant::StringList ) {
+            QStringList sl = var.toStringList();
+            if ( myIdx >= 0 && myIdx < sl.count() ) 
+              sl[myIdx] = myVar.toString();
+            else
+              sl.append( myVar.toString() );
+            module->setPreferenceProperty( myId, myProp, sl );
+          }
+          else if ( var.type() == QVariant::List ) {
+            QList<QVariant> vl = var.toList();
+            if ( myIdx >= 0 && myIdx < vl.count() ) 
+              vl[myIdx] = myVar;
+            else
+              vl.append( myVar );
+            module->setPreferenceProperty( myId, myProp, vl );
+          }
+        }
+        else {
+          QList<QVariant> vl;
+          vl.append( myVar );
+          module->setPreferenceProperty( myId, myProp, vl );
+        }
       }
     }
   };
@@ -2029,9 +2029,9 @@ void SalomePyQt::message( const QString& msg, bool addSeparator )
     virtual void Execute()
     {
       if ( LightApp_Application* anApp = getApplication() ) {
-       LogWindow* lw = anApp->logWindow();
-       if ( lw )
-         lw->putMessage( myMsg, myAddSep );
+        LogWindow* lw = anApp->logWindow();
+        if ( lw )
+          lw->putMessage( myMsg, myAddSep );
       }
     }
   };
@@ -2050,9 +2050,9 @@ void SalomePyQt::clearMessages()
     virtual void Execute()
     {
       if ( LightApp_Application* anApp = getApplication() ) {
-       LogWindow* lw = anApp->logWindow();
-       if ( lw )
-         lw->clear();
+        LogWindow* lw = anApp->logWindow();
+        if ( lw )
+          lw->clear();
       }
     }
   };
index 47a3a24d640904bbfa5b53c61931d17d0c109e3a..0818fe7cf5a2a95b0ded3af40b2f037c9e467094 100644 (file)
@@ -132,9 +132,9 @@ public:
 
   static QString           createObject(const QString& parent = QString(""));
   static QString           createObject(const QString& name,
-                                       const QString& iconname,
-                                       const QString& tooltip,
-                                       const QString& parent = QString(""));
+                                        const QString& iconname,
+                                        const QString& tooltip,
+                                        const QString& parent = QString(""));
 
   static void              removeObject( const QString& obj);
   static void              removeChild( const QString& obj = QString(""));
@@ -160,23 +160,23 @@ public:
   static int               createTool( QAction*, const QString&, const int = -1, const int = -1 );
 
   static int               createMenu( const QString&, const int = -1,
-                                      const int = -1, const int = -1, const int = -1 );
+                                       const int = -1, const int = -1, const int = -1 );
   static int               createMenu( const QString&, const QString& = QString(), 
-                                      const int = -1, const int = -1, const int = -1 );
+                                       const int = -1, const int = -1, const int = -1 );
   static int               createMenu( const int,      const int = -1,
-                                      const int = -1, const int = -1 );
+                                       const int = -1, const int = -1 );
   static int               createMenu( const int,      const QString& = QString(), 
-                                      const int = -1, const int = -1 );
+                                       const int = -1, const int = -1 );
   static int               createMenu( QAction*,     const int,      const int = -1, 
-                                      const int = -1, const int = -1 );
+                                       const int = -1, const int = -1 );
   static int               createMenu( QAction*,     const QString&, const int = -1, 
-                                      const int = -1, const int = -1 );
+                                       const int = -1, const int = -1 );
 
   static QAction*          createSeparator();
 
   static QAction*          createAction( const int, const QString&,
-                                        const QString& = QString(), const QString& = QString(), 
-                                        const QString& = QString(), const int = 0, const bool = false );
+                                         const QString& = QString(), const QString& = QString(), 
+                                         const QString& = QString(), const int = 0, const bool = false );
   
   static QtxActionGroup*   createActionGroup( const int, const bool = true );
 
@@ -208,15 +208,15 @@ public:
   static int               addPreference( const QString&,
                                           const int, const int = PT_Auto,
                                           const QString& = QString(),
-                                         const QString& = QString() );
+                                          const QString& = QString() );
   static QVariant          preferenceProperty( const int, const QString& );
   static void              setPreferenceProperty( const int, 
                                                   const QString&,
                                                   const QVariant& );
   static void              addPreferenceProperty( const int,
-                                                 const QString&,
-                                                 const int,
-                                                 const QVariant& );
+                                                  const QString&,
+                                                  const int,
+                                                  const QVariant& );
 
   static void              message( const QString&, bool = true );
   static void              clearMessages();
index a471eed86d24706ac8dcf2177acd7c64e4d230b0..4d212eeb336b63d535cbb473505fb4b88a7995cf 100644 (file)
@@ -169,8 +169,8 @@ void SALOMEGUI_Swig::updateObjBrowser( bool /*updateSelection*/ )
     virtual void Execute()
     {
       if ( LightApp_Application* anApp = getApplication() ) {
-       anApp->updateObjectBrowser();
-       anApp->updateActions(); //SRN: added in order to update the toolbar
+        anApp->updateObjectBrowser();
+        anApp->updateActions(); //SRN: added in order to update the toolbar
       }
     }
   };
@@ -292,19 +292,19 @@ public:
       LightApp_Study* aStudy  = dynamic_cast<LightApp_Study*>( anApp->activeStudy() ); // for sure!
       LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
       if ( aStudy && aSelMgr ) {
-       SUIT_DataOwnerPtrList aList;
-       aSelMgr->selected( aList );
-
-       for ( SUIT_DataOwnerPtrList::const_iterator itr = aList.begin(); 
-             itr != aList.end(); ++itr ) {
-         const LightApp_DataOwner* owner = 
-           dynamic_cast<const LightApp_DataOwner*>( (*itr).operator->() );
-         if( !owner )
-           continue;
-         QString entry = owner->entry();
-         if( !myResult.contains( entry ) )
-           myResult.append( entry );
-       }
+        SUIT_DataOwnerPtrList aList;
+        aSelMgr->selected( aList );
+
+        for ( SUIT_DataOwnerPtrList::const_iterator itr = aList.begin(); 
+              itr != aList.end(); ++itr ) {
+          const LightApp_DataOwner* owner = 
+            dynamic_cast<const LightApp_DataOwner*>( (*itr).operator->() );
+          if( !owner )
+            continue;
+          QString entry = owner->entry();
+          if( !myResult.contains( entry ) )
+            myResult.append( entry );
+        }
       }
     }
   }
@@ -335,13 +335,13 @@ void SALOMEGUI_Swig::AddIObject( const char* theEntry )
     virtual void Execute()
     {
       if ( LightApp_Application* anApp = getApplication() ) {
-       LightApp_Study*       aStudy  = dynamic_cast<LightApp_Study*>( anApp->activeStudy() ); // for sure!
-       LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
-       if ( aStudy && aSelMgr ) {
-         SALOME_ListIO anIOList;
-         anIOList.Append( new SALOME_InteractiveObject( myEntry.toLatin1(), "", "" ) );
-         aSelMgr->setSelectedObjects( anIOList, true );
-       }
+        LightApp_Study*       aStudy  = dynamic_cast<LightApp_Study*>( anApp->activeStudy() ); // for sure!
+        LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
+        if ( aStudy && aSelMgr ) {
+          SALOME_ListIO anIOList;
+          anIOList.Append( new SALOME_InteractiveObject( myEntry.toLatin1(), "", "" ) );
+          aSelMgr->setSelectedObjects( anIOList, true );
+        }
       }
     }
   };
@@ -362,25 +362,25 @@ void SALOMEGUI_Swig::RemoveIObject( const char* theEntry )
     virtual void Execute()
     {
       if ( LightApp_Application* anApp = getApplication() ) {
-       LightApp_Study* aStudy  = dynamic_cast<LightApp_Study*>( anApp->activeStudy() ); // for sure!
-       LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
-       if ( aStudy && aSelMgr ) {
-         SALOME_ListIO anIOList;
-         // VSR: temporary solution, until LightApp_SelectionMgr::unsetSelectedObjects() method appears
-         // Lately this should be replaced by the following:
-         // anIOList.Append( new SALOME_InteractiveObject( myEntry, "", "" ) );
-         // aSelMgr->unsetSelectedObjects( anIOList );
-         ///////////////////////////////////////////////
-         aSelMgr->selectedObjects( anIOList );
-         SALOME_ListIteratorOfListIO anIter( anIOList );
-         for( ; anIter.More(); anIter.Next() ) {
-           if ( anIter.Value()->isSame( new SALOME_InteractiveObject( myEntry.toLatin1(), "", "" ) ) ) { 
-             anIOList.Remove( anIter );
-             aSelMgr->setSelectedObjects( anIOList, true );
-             return;
-           }
-         }
-       }
+        LightApp_Study* aStudy  = dynamic_cast<LightApp_Study*>( anApp->activeStudy() ); // for sure!
+        LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
+        if ( aStudy && aSelMgr ) {
+          SALOME_ListIO anIOList;
+          // VSR: temporary solution, until LightApp_SelectionMgr::unsetSelectedObjects() method appears
+          // Lately this should be replaced by the following:
+          // anIOList.Append( new SALOME_InteractiveObject( myEntry, "", "" ) );
+          // aSelMgr->unsetSelectedObjects( anIOList );
+          ///////////////////////////////////////////////
+          aSelMgr->selectedObjects( anIOList );
+          SALOME_ListIteratorOfListIO anIter( anIOList );
+          for( ; anIter.More(); anIter.Next() ) {
+            if ( anIter.Value()->isSame( new SALOME_InteractiveObject( myEntry.toLatin1(), "", "" ) ) ) { 
+              anIOList.Remove( anIter );
+              aSelMgr->setSelectedObjects( anIOList, true );
+              return;
+            }
+          }
+        }
       }
     }
   };
@@ -399,10 +399,10 @@ void SALOMEGUI_Swig::ClearIObjects()
     virtual void Execute()
     {
       if ( LightApp_Application* anApp = getApplication() ) {
-       LightApp_Study* aStudy  = dynamic_cast<LightApp_Study*>( anApp->activeStudy() ); // for sure!
-       LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
-       if ( aStudy && aSelMgr )
-         aSelMgr->clearSelected();
+        LightApp_Study* aStudy  = dynamic_cast<LightApp_Study*>( anApp->activeStudy() ); // for sure!
+        LightApp_SelectionMgr* aSelMgr = anApp->selectionMgr(); 
+        if ( aStudy && aSelMgr )
+          aSelMgr->clearSelected();
       }
     }
   };
@@ -418,7 +418,7 @@ void SALOMEGUI_Swig::ClearIObjects()
   For the current moment implemented for OCC and VTK viewers only.
 
   \param theEntry object entry
-*/             
+*/              
 void SALOMEGUI_Swig::Display( const char* theEntry )
 {
   class TEvent: public SALOME_Event
@@ -428,12 +428,12 @@ void SALOMEGUI_Swig::Display( const char* theEntry )
     TEvent( const char* theEntry ) : myEntry( theEntry ) {}
     virtual void Execute() {
       if ( LightApp_Application* anApp = getApplication() ) {
-       SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
-       if ( window ) {
-         SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
-         if ( view )
-           view->Display( view->CreatePrs( myEntry.toLatin1() ) );
-       }
+        SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
+        if ( window ) {
+          SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
+          if ( view )
+            view->Display( view->CreatePrs( myEntry.toLatin1() ) );
+        }
       }
     }
   };
@@ -461,14 +461,14 @@ void SALOMEGUI_Swig::DisplayOnly( const char* theEntry )
     virtual void Execute()
     {
       if ( LightApp_Application* anApp = getApplication() ) {
-       SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
-       if ( window ) {
-         SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
-         if ( view ) {
-           view->EraseAll( false );
-           view->Display( view->CreatePrs( myEntry.toLatin1() ) );
-         }
-       }
+        SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
+        if ( window ) {
+          SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
+          if ( view ) {
+            view->EraseAll( false );
+            view->Display( view->CreatePrs( myEntry.toLatin1() ) );
+          }
+        }
       }
     }
   };
@@ -484,7 +484,7 @@ void SALOMEGUI_Swig::DisplayOnly( const char* theEntry )
   For the current moment implemented for OCC and VTK viewers only.
 
   \param theEntry object entry
-*/             
+*/              
 void SALOMEGUI_Swig::Erase( const char* theEntry )
 {
   class TEvent: public SALOME_Event
@@ -495,12 +495,12 @@ void SALOMEGUI_Swig::Erase( const char* theEntry )
     virtual void Execute()
     {
       if ( LightApp_Application* anApp = getApplication() ) {
-       SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
-       if ( window ) {
-         SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
-         if ( view )
-           view->Erase( view->CreatePrs( myEntry.toLatin1() ) );
-       }
+        SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
+        if ( window ) {
+          SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
+          if ( view )
+            view->Erase( view->CreatePrs( myEntry.toLatin1() ) );
+        }
       }
     }
   };
@@ -525,19 +525,19 @@ void SALOMEGUI_Swig::DisplayAll()
     virtual void Execute()
     {
       if ( LightApp_Application* anApp = getApplication() ) {
-       LightApp_Study*  study        = dynamic_cast<LightApp_Study*>( anApp->activeStudy() ); // for sure!
-       SUIT_ViewWindow*  window       = anApp->desktop()->activeWindow();
-       LightApp_Module* activeModule = dynamic_cast<LightApp_Module*>( anApp->activeModule() );
-       if ( study && window && activeModule ) {
-         SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
-         if ( view ) {
-           for ( SUIT_DataObjectIterator it( activeModule->dataModel()->root(), SUIT_DataObjectIterator::DepthLeft ); it.current(); ++it ) {
-             LightApp_DataObject* obj = dynamic_cast<LightApp_DataObject*>( it.current() );
-             if ( obj && !obj->entry().isEmpty() )
-               view->Display( view->CreatePrs( obj->entry().toLatin1() ) );
-           }
-         }
-       }
+        LightApp_Study*  study        = dynamic_cast<LightApp_Study*>( anApp->activeStudy() ); // for sure!
+        SUIT_ViewWindow*  window       = anApp->desktop()->activeWindow();
+        LightApp_Module* activeModule = dynamic_cast<LightApp_Module*>( anApp->activeModule() );
+        if ( study && window && activeModule ) {
+          SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
+          if ( view ) {
+            for ( SUIT_DataObjectIterator it( activeModule->dataModel()->root(), SUIT_DataObjectIterator::DepthLeft ); it.current(); ++it ) {
+              LightApp_DataObject* obj = dynamic_cast<LightApp_DataObject*>( it.current() );
+              if ( obj && !obj->entry().isEmpty() )
+                view->Display( view->CreatePrs( obj->entry().toLatin1() ) );
+            }
+          }
+        }
       }
     }
   };
@@ -558,12 +558,12 @@ void SALOMEGUI_Swig::EraseAll()
     virtual void Execute()
     {
       if ( LightApp_Application* anApp = getApplication() ) {
-       SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
-       if ( window ) {
-         SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
-         if ( view )
-           view->EraseAll( false );
-       }
+        SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
+        if ( window ) {
+          SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
+          if ( view )
+            view->EraseAll( false );
+        }
       }
     }
   };
@@ -593,11 +593,11 @@ public:
     if ( LightApp_Application* anApp = getApplication() ) {
       SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
       if ( window ) {
-       SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
-       if ( view ) {
-         SALOME_Prs* aPrs = view->CreatePrs( myEntry.toLatin1() );
-         myResult = !aPrs->IsNull();
-       }
+        SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
+        if ( view ) {
+          SALOME_Prs* aPrs = view->CreatePrs( myEntry.toLatin1() );
+          myResult = !aPrs->IsNull();
+        }
       }
     }
   }
@@ -619,12 +619,12 @@ void SALOMEGUI_Swig::UpdateView()
     virtual void Execute()
     {
       if ( LightApp_Application* anApp = getApplication() ) {
-       SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
-       if ( window ) {
-         SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
-         if ( view )
-           view->Repaint();
-       }
+        SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
+        if ( window ) {
+          SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
+          if ( view )
+            view->Repaint();
+        }
       }
     }
   };
@@ -643,15 +643,15 @@ void SALOMEGUI_Swig::FitAll()
     virtual void Execute()
     {
       if ( LightApp_Application* anApp = getApplication() ) {
-       SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
-       if ( window ) {
-         if ( dynamic_cast<SVTK_ViewWindow*>( window ) )
-           ( dynamic_cast<SVTK_ViewWindow*>( window ) )->onFitAll();
-         else if ( dynamic_cast<SOCC_ViewWindow*>( window ) )
-           ( dynamic_cast<SOCC_ViewWindow*>( window ) )->onFitAll();
-         else if ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )
-           ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )->onFitAll();
-       }
+        SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
+        if ( window ) {
+          if ( dynamic_cast<SVTK_ViewWindow*>( window ) )
+            ( dynamic_cast<SVTK_ViewWindow*>( window ) )->onFitAll();
+          else if ( dynamic_cast<SOCC_ViewWindow*>( window ) )
+            ( dynamic_cast<SOCC_ViewWindow*>( window ) )->onFitAll();
+          else if ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )
+            ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )->onFitAll();
+        }
       }
     }
   };
@@ -670,17 +670,17 @@ void SALOMEGUI_Swig::ResetView()
     virtual void Execute()
     {
       if ( LightApp_Application* anApp = getApplication() ) {
-       SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
-       if ( window ) {
-         if ( dynamic_cast<SVTK_ViewWindow*>( window ) )
-           (dynamic_cast<SVTK_ViewWindow*>( window ))->onResetView();
-         else if ( dynamic_cast<SOCC_ViewWindow*>( window ) )
-           (dynamic_cast<SOCC_ViewWindow*>( window ))->onResetView();
-         else if ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )
-           (dynamic_cast<SPlot2d_ViewWindow*>( window ))->onFitAll();
-         // VSR: there is no 'ResetView' functionality for Plot2d viewer,
-         // so we use 'FitAll' instead.
-       }
+        SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
+        if ( window ) {
+          if ( dynamic_cast<SVTK_ViewWindow*>( window ) )
+            (dynamic_cast<SVTK_ViewWindow*>( window ))->onResetView();
+          else if ( dynamic_cast<SOCC_ViewWindow*>( window ) )
+            (dynamic_cast<SOCC_ViewWindow*>( window ))->onResetView();
+          else if ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )
+            (dynamic_cast<SPlot2d_ViewWindow*>( window ))->onFitAll();
+          // VSR: there is no 'ResetView' functionality for Plot2d viewer,
+          // so we use 'FitAll' instead.
+        }
       }
     }
   };
@@ -716,45 +716,45 @@ static void setView( int view )
     virtual void Execute()
     {
       if ( LightApp_Application* anApp = getApplication() ) {
-       SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
-       if ( window ) {
-         if ( dynamic_cast<SVTK_ViewWindow*>( window ) ) {
-           switch( myView ) {
-           case __ViewTop:
-             (dynamic_cast<SVTK_ViewWindow*>( window ))->onTopView(); break;
-           case __ViewBottom:
-             (dynamic_cast<SVTK_ViewWindow*>( window ))->onBottomView(); break;
-           case __ViewLeft:
-             (dynamic_cast<SVTK_ViewWindow*>( window ))->onLeftView(); break;
-           case __ViewRight:
-             (dynamic_cast<SVTK_ViewWindow*>( window ))->onRightView(); break;
-           case __ViewFront:
-             (dynamic_cast<SVTK_ViewWindow*>( window ))->onFrontView(); break;
-           case __ViewBack:
-             (dynamic_cast<SVTK_ViewWindow*>( window ))->onBackView(); break;
-           default:
-             break;
-           }
-         }
-         else if ( dynamic_cast<SOCC_ViewWindow*>( window ) ) {
-           switch( myView ) {
-           case __ViewTop:
-             (dynamic_cast<SOCC_ViewWindow*>( window ))->onTopView(); break;
-           case __ViewBottom:
-             (dynamic_cast<SOCC_ViewWindow*>( window ))->onBottomView(); break;
-           case __ViewLeft:
-             (dynamic_cast<SOCC_ViewWindow*>( window ))->onLeftView(); break;
-           case __ViewRight:
-             (dynamic_cast<SOCC_ViewWindow*>( window ))->onRightView(); break;
-           case __ViewFront:
-             (dynamic_cast<SOCC_ViewWindow*>( window ))->onFrontView(); break;
-           case __ViewBack:
-             (dynamic_cast<SOCC_ViewWindow*>( window ))->onBackView(); break;
-           default:
-             break;
-           }
-         }
-       }
+        SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
+        if ( window ) {
+          if ( dynamic_cast<SVTK_ViewWindow*>( window ) ) {
+            switch( myView ) {
+            case __ViewTop:
+              (dynamic_cast<SVTK_ViewWindow*>( window ))->onTopView(); break;
+            case __ViewBottom:
+              (dynamic_cast<SVTK_ViewWindow*>( window ))->onBottomView(); break;
+            case __ViewLeft:
+              (dynamic_cast<SVTK_ViewWindow*>( window ))->onLeftView(); break;
+            case __ViewRight:
+              (dynamic_cast<SVTK_ViewWindow*>( window ))->onRightView(); break;
+            case __ViewFront:
+              (dynamic_cast<SVTK_ViewWindow*>( window ))->onFrontView(); break;
+            case __ViewBack:
+              (dynamic_cast<SVTK_ViewWindow*>( window ))->onBackView(); break;
+            default:
+              break;
+            }
+          }
+          else if ( dynamic_cast<SOCC_ViewWindow*>( window ) ) {
+            switch( myView ) {
+            case __ViewTop:
+              (dynamic_cast<SOCC_ViewWindow*>( window ))->onTopView(); break;
+            case __ViewBottom:
+              (dynamic_cast<SOCC_ViewWindow*>( window ))->onBottomView(); break;
+            case __ViewLeft:
+              (dynamic_cast<SOCC_ViewWindow*>( window ))->onLeftView(); break;
+            case __ViewRight:
+              (dynamic_cast<SOCC_ViewWindow*>( window ))->onRightView(); break;
+            case __ViewFront:
+              (dynamic_cast<SOCC_ViewWindow*>( window ))->onFrontView(); break;
+            case __ViewBack:
+              (dynamic_cast<SOCC_ViewWindow*>( window ))->onBackView(); break;
+            default:
+              break;
+            }
+          }
+        }
       }
     }
   };
index 49d9e53d2ea2d60baedfc597add1f5e9d6efc133..c7a19b522f62fe978db9494ff375d8396a38f100 100755 (executable)
@@ -386,16 +386,16 @@ void SOCC_Viewer::Display( const SALOME_OCCPrs* prs )
           bDisplayed = true;
 
           // Set visibility flag
-         // Temporarily commented to avoid awful dependecy on SALOMEDS
-         // TODO: better mechanism of storing display/erse status in a study
-         // should be provided...
-         //Handle(SALOME_InteractiveObject) anObj =
+          // Temporarily commented to avoid awful dependecy on SALOMEDS
+          // TODO: better mechanism of storing display/erse status in a study
+          // should be provided...
+          //Handle(SALOME_InteractiveObject) anObj =
           //  Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
           //if ( !anObj.IsNull() && anObj->hasEntry() )
           //{
-         //  if ( study )
-         //    ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
-         //}
+          //  if ( study )
+          //    ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
+          //}
           break;
         }
       }
@@ -508,7 +508,7 @@ void SOCC_Viewer::EraseAll( const bool forced )
   AIS_ListIteratorOfListOfInteractive anIter( aList );
   for ( ; anIter.More(); anIter.Next() ) {
     if ( isTrihedronDisplayed && anIter.Value()->DynamicType() == STANDARD_TYPE( AIS_Trihedron ) ||
-        anIter.Value()->DynamicType() == STANDARD_TYPE( OCCViewer_Trihedron ))
+         anIter.Value()->DynamicType() == STANDARD_TYPE( OCCViewer_Trihedron ))
       continue;
 
     // erase an object
@@ -521,11 +521,11 @@ void SOCC_Viewer::EraseAll( const bool forced )
     // should be provided...
     //if ( !forced ) {
     //  Handle(SALOME_InteractiveObject) anObj =
-    // Handle(SALOME_InteractiveObject)::DownCast( anIO->GetOwner() );
+    //  Handle(SALOME_InteractiveObject)::DownCast( anIO->GetOwner() );
 
     //  if ( !anObj.IsNull() && anObj->hasEntry() ) {
-    // if ( study )
-    //   ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
+    //  if ( study )
+    //    ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
     //  }
     //}
   }
index 9eb1a0398b977bc21e9c65851038fa5b4b11f29b..9c20035f5bcd8116c3d9e1bc9885f7af716b3130 100755 (executable)
@@ -41,7 +41,7 @@ public:
   virtual ~SOCC_Viewer();
 
   /* Selection management */
-  bool     highlight( const Handle(SALOME_InteractiveObject)&, bool, bool=true );
+  bool      highlight( const Handle(SALOME_InteractiveObject)&, bool, bool=true );
   bool      isInViewer( const Handle(SALOME_InteractiveObject)&, bool=false );
 
   void      setColor( const Handle(SALOME_InteractiveObject)&, const QColor&, bool=true );
index 4fdb39108531ae9aa26313d2d29dca17041c7353..71c2f2cef2134b41a9568176c136e53a863575ae 100644 (file)
@@ -30,7 +30,7 @@
 */
 SOCC_ViewWindow
 ::SOCC_ViewWindow( SUIT_Desktop* theDesktop, 
-                  OCCViewer_Viewer* theModel)
+                   OCCViewer_Viewer* theModel)
   : OCCViewer_ViewWindow( theDesktop, theModel )
 {
 }
index 10afaed7ce3984292f4aa1cb956daa46e522d64b..c102f6b542194c8913c95220ce2452a4e2dfb0eb 100644 (file)
@@ -91,7 +91,7 @@ SPlot2d_Viewer::~SPlot2d_Viewer()
   Renames curve if it is found
 */
 void SPlot2d_Viewer::rename( const Handle(SALOME_InteractiveObject)& IObject,
-                            const QString& newName, Plot2d_ViewFrame* fr ) 
+                             const QString& newName, Plot2d_ViewFrame* fr ) 
 {
   Plot2d_ViewFrame* aViewFrame = fr ? fr : getActiveViewFrame();
   if( !aViewFrame )
@@ -150,8 +150,8 @@ bool SPlot2d_Viewer::isInViewer( const Handle(SALOME_InteractiveObject)& IObject
       CurveDict::Iterator it = aCurves.begin();
       for( ; it != aCurves.end(); ++it ) {
         SPlot2d_Curve* aCurve = dynamic_cast<SPlot2d_Curve*>( it.value() );
-       if(aCurve && aCurve->hasIO() && aCurve->getTableIO()->isSame(IObject))
-         return 1;
+        if(aCurve && aCurve->hasIO() && aCurve->getTableIO()->isSame(IObject))
+          return 1;
       }
     }
   }
@@ -216,10 +216,10 @@ void SPlot2d_Viewer::Erase( const Handle(SALOME_InteractiveObject)& IObject, boo
       _PTR(SObject) aChildSO = aIter->Value();
       _PTR(SObject) refSO;
       if ( aChildSO->ReferencedObject( refSO ) && refSO )
-       aChildSO = refSO;
+        aChildSO = refSO;
       curve = getCurveByIO( new SALOME_InteractiveObject( aChildSO->GetID().c_str(), "") );
       if ( curve )
-       aViewFrame->eraseCurve( curve, update );
+        aViewFrame->eraseCurve( curve, update );
     }
   }
 */
@@ -350,7 +350,7 @@ Plot2d_ViewFrame* SPlot2d_Viewer::getActiveViewFrame()
   \param fr - viewframe
 */
 SPlot2d_Curve* SPlot2d_Viewer::getCurveByIO( const Handle(SALOME_InteractiveObject)& theIObject,
-                                            Plot2d_ViewFrame* fr )
+                                             Plot2d_ViewFrame* fr )
 {
   if ( !theIObject.IsNull() ) {
     Plot2d_ViewFrame* aViewFrame = fr ? fr : getActiveViewFrame();
@@ -359,10 +359,10 @@ SPlot2d_Curve* SPlot2d_Viewer::getCurveByIO( const Handle(SALOME_InteractiveObje
       CurveDict::Iterator it = aCurves.begin();
       for( ; it != aCurves.end(); ++it ) {
         SPlot2d_Curve* aCurve = dynamic_cast<SPlot2d_Curve*>( it.value() );
-       if(aCurve) {
-         if ( aCurve->hasIO() && aCurve->getIO()->isSame( theIObject ) )
-           return aCurve;
-       }
+        if(aCurve) {
+          if ( aCurve->hasIO() && aCurve->getIO()->isSame( theIObject ) )
+            return aCurve;
+        }
       }
     }
   }
index 2fc3491e029209c700ab003d8eada2b5b97ffcab..861deddd785a0df5a071c8af1fff8a6a1ff5ee96 100644 (file)
@@ -58,7 +58,7 @@ public:
 
   virtual   SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop);
   
-  /* display */                
+  /* display */         
   void Display( const Handle(SALOME_InteractiveObject)& IObject, bool update = true );
   void DisplayOnly( const Handle(SALOME_InteractiveObject)& IObject );
   void Erase( const Handle(SALOME_InteractiveObject)& IObject, bool update = true );
index ce235bfd92b0b372bdaed96c06a3d550c31305d7..187af80be30baa7a7a1015f13a0ca5692265c716 100644 (file)
@@ -30,7 +30,7 @@
 */
 SPlot2d_ViewWindow
 ::SPlot2d_ViewWindow( SUIT_Desktop* theDesktop, 
-                     Plot2d_Viewer* theModel)
+                      Plot2d_Viewer* theModel)
   : Plot2d_ViewWindow( theDesktop, theModel )
 {
 }
index ff0bd3e802b8501dbf8bea169cdb947958fd874b..bf761c3565875b9392b1dfcd97f0806e30dc0497 100755 (executable)
 
 #if defined ( _DEBUG ) || defined ( DEBUG )
 #include <assert.h>
-#define STD_VERIFY(x)                          (assert(x))
-#define STD_ASSERT(x)              (assert(x))
+#define STD_VERIFY(x)                           (assert(x))
+#define STD_ASSERT(x)               (assert(x))
 #else
-#define STD_VERIFY(x)                          (x)
+#define STD_VERIFY(x)                           (x)
 #define STD_ASSERT(x)
 #endif
 
index 692a270bfad083586e6fd7b73fcbe9c2a0fcf0fb..b24f79bcd11cbe626605570cb67bd39a99863652 100755 (executable)
@@ -162,8 +162,8 @@ void STD_Application::createActions()
                 Qt::CTRL+Qt::Key_O, desk, false, this, SLOT( onOpenDoc() ) );
 
   createAction( FileReopenId, tr( "TOT_DESK_FILE_REOPEN" ), QIcon(),
-               tr( "MEN_DESK_FILE_REOPEN" ), tr( "PRP_DESK_FILE_REOPEN" ),
-               0, desk, false, this, SLOT( onReopenDoc() ) );
+                tr( "MEN_DESK_FILE_REOPEN" ), tr( "PRP_DESK_FILE_REOPEN" ),
+                0, desk, false, this, SLOT( onReopenDoc() ) );
 
   createAction( FileCloseId, tr( "TOT_DESK_FILE_CLOSE" ),
                 resMgr->loadPixmap( "STD", tr( "ICON_FILE_CLOSE" ) ),
@@ -340,8 +340,8 @@ bool STD_Application::onReopenDoc()
   if ( study && study->isSaved() ) {
     // ask user for the confirmation
     if ( SUIT_MessageBox::question( desktop(), tr( "REOPEN_STUDY" ), tr( "REOPEN_QUESTION" ),
-                                   SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::No
-                                   ) == SUIT_MessageBox::No )
+                                    SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::No
+                                    ) == SUIT_MessageBox::No )
       return false;
 
     // remember study name
@@ -506,13 +506,13 @@ bool STD_Application::openAction( const int choice, const QString& aName )
       QList<SUIT_Application*> aAppList = aSession->applications();
       for ( QList<SUIT_Application*>::iterator it = aAppList.begin(); it != aAppList.end() && !aApp; ++it )
       {
-       if ( (*it)->activeStudy() && (*it)->activeStudy()->studyName() == aName )
-         aApp = *it;
+        if ( (*it)->activeStudy() && (*it)->activeStudy()->studyName() == aName )
+          aApp = *it;
       }
       if ( aApp )
-       aApp->desktop()->activateWindow();
+        aApp->desktop()->activateWindow();
       else
-       res = false;
+        res = false;
     }
     break;
   case OpenNew:
@@ -522,9 +522,9 @@ bool STD_Application::openAction( const int choice, const QString& aName )
     {
       SUIT_Application* aApp = startApplication( 0, 0 );
       if ( aApp )
-       res = aApp->useFile( aName );
+        res = aApp->useFile( aName );
       if ( !res )
-       aApp->closeApplication();
+        aApp->closeApplication();
     }
     break;
   case OpenCancel:
@@ -854,7 +854,7 @@ void STD_Application::onConnectPopupRequest( SUIT_PopupClient* client, QContextM
 
 /*!\retval QString - return file name from dialog.*/
 QString STD_Application::getFileName( bool open, const QString& initial, const QString& filters,
-                                     const QString& caption, QWidget* parent )
+                                      const QString& caption, QWidget* parent )
 {
   if ( !parent )
     parent = desktop();
@@ -876,9 +876,9 @@ QString STD_Application::getFileName( bool open, const QString& initial, const Q
         isOk = true;
       else
       {
-       int aEnd = aUsedFilter.lastIndexOf( ')' );
-       int aStart = aUsedFilter.lastIndexOf( '(', aEnd );
-       QString wcStr = aUsedFilter.mid( aStart + 1, aEnd - aStart - 1 );
+        int aEnd = aUsedFilter.lastIndexOf( ')' );
+        int aStart = aUsedFilter.lastIndexOf( '(', aEnd );
+        QString wcStr = aUsedFilter.mid( aStart + 1, aEnd - aStart - 1 );
 
         int idx = 0;
         QStringList extList;
@@ -892,23 +892,23 @@ QString STD_Application::getFileName( bool open, const QString& initial, const Q
         if ( !extList.isEmpty() && !extList.contains( SUIT_Tools::extension( aName ) ) )
           aName += QString( ".%1" ).arg( extList.first() );
 
-       if ( QFileInfo( aName ).exists() )
+        if ( QFileInfo( aName ).exists() )
         {
-         int aAnswer = SUIT_MessageBox::question( desktop(), tr( "TIT_FILE_SAVEAS" ),
-                                                  tr( "MSG_FILE_EXISTS" ).arg( aName ),
-                                                  SUIT_MessageBox::Yes | SUIT_MessageBox::No | SUIT_MessageBox::Cancel, SUIT_MessageBox::Yes );
-         if ( aAnswer == SUIT_MessageBox::Cancel )
+          int aAnswer = SUIT_MessageBox::question( desktop(), tr( "TIT_FILE_SAVEAS" ),
+                                                   tr( "MSG_FILE_EXISTS" ).arg( aName ),
+                                                   SUIT_MessageBox::Yes | SUIT_MessageBox::No | SUIT_MessageBox::Cancel, SUIT_MessageBox::Yes );
+          if ( aAnswer == SUIT_MessageBox::Cancel )
           {     // cancelled
             aName = QString();
-           isOk = true;
+            isOk = true;
           }
-         else if ( aAnswer == SUIT_MessageBox::No ) // not save to this file
-           anOldPath = aName;             // not to return to the same initial dir at each "while" step
-         else                     // overwrite the existing file
-           isOk = true;
+          else if ( aAnswer == SUIT_MessageBox::No ) // not save to this file
+            anOldPath = aName;             // not to return to the same initial dir at each "while" step
+          else                     // overwrite the existing file
+            isOk = true;
         }
-       else
-         isOk = true;
+        else
+          isOk = true;
       }
     }
     return aName;
index 08d3369180970d3620d56eab052e6e7edb9a4257..6f8fc68fb189eb0b24950d34055034dec9d0f971 100755 (executable)
@@ -88,7 +88,7 @@ public:
 
   virtual QString       getFileFilter() const { return QString(); }
   virtual QString       getFileName( bool open, const QString& initial, const QString& filters,
-                                                            const QString& caption, QWidget* parent );
+                                                             const QString& caption, QWidget* parent );
   QString               getDirectory( const QString& initial, const QString& caption, QWidget* parent );
 
   virtual void          start();
index de0dcf8802f9728a9a94518d4c836398b0450bcf..1909349da1ccec41985bd3ff11bbf8943dca5c2a 100755 (executable)
@@ -175,8 +175,8 @@ void STD_MDIDesktop::createActions()
   myWorkspaceAction = new QtxWorkspaceAction( workspace(), this );
 
   myWorkspaceAction->setMenuActions( QtxWorkspaceAction::Cascade | QtxWorkspaceAction::Tile  |
-                                    QtxWorkspaceAction::HTile   | QtxWorkspaceAction::VTile |
-                                    QtxWorkspaceAction::Windows );
+                                     QtxWorkspaceAction::HTile   | QtxWorkspaceAction::VTile |
+                                     QtxWorkspaceAction::Windows );
 
   // Cascade
   myWorkspaceAction->setIcon( QtxWorkspaceAction::Cascade,
index 4bbd251a63ebe05b9a3c09537019fa77abd522fc..80a460bdb9c5e84ad3c46f4cfc266718d2aef177 100644 (file)
@@ -62,11 +62,11 @@ myWorkstackAction( 0 )
   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
   if ( resMgr ) {
     myWorkstack->setIcon( QtxWorkstack::SplitVertical,
-                         resMgr->loadPixmap( "STD", tr( "ICON_DESK_WINDOW_VSPLIT" ) ) );
+                          resMgr->loadPixmap( "STD", tr( "ICON_DESK_WINDOW_VSPLIT" ) ) );
     myWorkstack->setIcon( QtxWorkstack::SplitHorizontal,
-                         resMgr->loadPixmap( "STD", tr( "ICON_DESK_WINDOW_HSPLIT" ) ) );
+                          resMgr->loadPixmap( "STD", tr( "ICON_DESK_WINDOW_HSPLIT" ) ) );
     myWorkstack->setIcon( QtxWorkstack::Close,
-                         resMgr->loadPixmap( "STD", tr( "ICON_FILE_CLOSE" ) ));
+                          resMgr->loadPixmap( "STD", tr( "ICON_FILE_CLOSE" ) ));
   }
 
   connect( myWorkstack, SIGNAL( windowActivated( QWidget* ) ),
@@ -138,18 +138,18 @@ void STD_TabDesktop::windowOperation( const int type )
 void STD_TabDesktop::setWindowOperations( const int first, ... )
 {
   va_list ints;
-       va_start( ints, first );
+        va_start( ints, first );
 
-       QList<int> typeList;
+        QList<int> typeList;
 
-       int cur = first;
-       while ( cur )
-       {
-         typeList.append( cur );
-               cur = va_arg( ints, int );
+        int cur = first;
+        while ( cur )
+        {
+          typeList.append( cur );
+                cur = va_arg( ints, int );
   }
 
-       setWindowOperations( typeList );
+        setWindowOperations( typeList );
 }
 
 /*!
index f7babbb3fbd0b7d0c11acec7b30edf8c49622ea7..d46df4a41e063f82fb5fac637e56a271528e0001 100644 (file)
@@ -132,10 +132,10 @@ bool SUIT_Accel::eventFilter( QObject *obj, QEvent *event )
     if ( vw ) {
       QString type = vw->getViewManager()->getViewModel()->getType();
       if ( myMap.contains( type ) ) {
-       IdActionMap idActionMap = myMap[type];
-       if ( idActionMap.contains( key ) ) {
-         return vw->onAccelAction( idActionMap[key] );
-       }
+        IdActionMap idActionMap = myMap[type];
+        if ( idActionMap.contains( key ) ) {
+          return vw->onAccelAction( idActionMap[key] );
+        }
       }
     }
   }
index f3f40ee5913cc4e1b06b83994d08b9774ad73000..a0e7dba288cf9be3142df3c3204722f543e3bc5c 100644 (file)
@@ -53,7 +53,7 @@ QtxAction* SUIT_ActionOperation::action() const
  * Create new instance of QtxAction and set.
  */
 void SUIT_ActionOperation::setAction( const QString& text, const QIcon& icon,
-                                                             const QString& menuText, QKeySequence accel,
+                                                              const QString& menuText, QKeySequence accel,
                                       QObject* parent, bool toggle )
 {
   setAction( new QtxAction( text, icon, menuText, accel, parent, toggle ) );
@@ -63,7 +63,7 @@ void SUIT_ActionOperation::setAction( const QString& text, const QIcon& icon,
  * Create new instance of QtxAction and set.
  */
 void SUIT_ActionOperation::setAction( const QString& text, const QString& menuText,
-                                                             QKeySequence accel, QObject* parent, bool toggle )
+                                                              QKeySequence accel, QObject* parent, bool toggle )
 {
   setAction( new QtxAction( text, menuText, accel, parent, toggle ) );
 }
index f4f8e895188fea7e2bb4ea17eef6fa185390497c..1dd97fc5a4ae31efa84b1f43fe89189d4a641cea 100644 (file)
@@ -35,32 +35,32 @@ class QtxAction;
 /*!Provide support QtxAction*/
 class SUIT_EXPORT SUIT_ActionOperation : public SUIT_Operation
 {
-       Q_OBJECT
+        Q_OBJECT
 
 public:
-       SUIT_ActionOperation( SUIT_Application* );
-       virtual ~SUIT_ActionOperation();
+        SUIT_ActionOperation( SUIT_Application* );
+        virtual ~SUIT_ActionOperation();
 
-       QtxAction*   action() const;
+        QtxAction*   action() const;
 
-       /** @name GUI management*/
-       //@{
-       virtual void setAction( const QString& text, const QIcon& icon, const QString& menuText,
-                                                 QKeySequence accel, QObject* parent, bool toggle = false );
+        /** @name GUI management*/
+        //@{
+        virtual void setAction( const QString& text, const QIcon& icon, const QString& menuText,
+                                                  QKeySequence accel, QObject* parent, bool toggle = false );
 
-       virtual void setAction( const QString& text, const QString& menuText,
+        virtual void setAction( const QString& text, const QString& menuText,
                           QKeySequence accel, QObject* parent, bool toggle = false );
-       virtual void setAction( QtxAction* theAction );
-       
-       bool         addTo( QWidget* theWidget );
+        virtual void setAction( QtxAction* theAction );
+        
+        bool         addTo( QWidget* theWidget );
 
-       void         setStatusTip( const QString& theTip );
-       //@}
+        void         setStatusTip( const QString& theTip );
+        //@}
 
 private:
-       QtxAction*   myAction;
+        QtxAction*   myAction;
 
-       friend class SUIT_Study;
+        friend class SUIT_Study;
 };
 
 #endif
index 98141edc52277ff0a7ef1717af2c4bec688e6ce4..37aa200b2fe9062a8f81993381217f234092f90c 100755 (executable)
@@ -101,7 +101,7 @@ public:
 
   //! Invokes application-specific "Open/Save File" dialog and returns the selected file name.
   virtual QString getFileName( bool open, const QString& initial, const QString& filters, 
-                              const QString& caption, QWidget* parent ) = 0;
+                               const QString& caption, QWidget* parent ) = 0;
 
   //! Invokes application-specific "Select Directory" dialog and returns the selected directory name.
   virtual QString getDirectory( const QString& initial, const QString& caption, QWidget* parent ) = 0;
index 715f3a6fd1df5e5e84ff6a12ca6e1c0c243106b5..6a5902937e37567ecd32be07b21182938c759cc2 100644 (file)
@@ -193,7 +193,7 @@ void SUIT_DataBrowser::getSelected( DataObjectList& lst ) const
     foreach( idx, sel ) {
       SUIT_DataObject* obj = m->object( idx );
       if ( obj )
-       lst.append( obj );
+        lst.append( obj );
     }
   }
 }
@@ -232,7 +232,7 @@ void SUIT_DataBrowser::setSelected( const DataObjectList& lst, const bool append
     foreach( obj, lst ) {
       QModelIndex index = m->index( obj );
       if ( index.isValid() )
-       indexes.append( index );
+        indexes.append( index );
     }
     select( indexes, true, append ); // if !indexes.isEmpty() ???
   }
@@ -309,13 +309,13 @@ void SUIT_DataBrowser::init( SUIT_DataObject* root )
   setModel( m );
   setItemDelegate( qobject_cast<SUIT_ProxyModel*>( model() )->delegate() );
   connect( treeView(), SIGNAL( sortingEnabled( bool ) ), 
-          model(),    SLOT( setSortingEnabled( bool ) ) );
+           model(),    SLOT( setSortingEnabled( bool ) ) );
   connect( treeView(), SIGNAL( clicked( const QModelIndex& ) ), 
-          this,       SLOT( onClicked( const QModelIndex& ) ) );
+           this,       SLOT( onClicked( const QModelIndex& ) ) );
   connect( treeView(), SIGNAL( doubleClicked( const QModelIndex& ) ), 
-          this,       SLOT( onDblClicked( const QModelIndex& ) ) );
+           this,       SLOT( onDblClicked( const QModelIndex& ) ) );
   connect( treeView(), SIGNAL( expanded( const QModelIndex& ) ), 
-          this,       SLOT( onExpanded( const QModelIndex& ) ) );
+           this,       SLOT( onExpanded( const QModelIndex& ) ) );
   myShortcut = new QShortcut( Qt::Key_F5, this, SIGNAL( requestUpdate() ), SIGNAL( requestUpdate() ) );
 
   myAutoSizeFirstColumn = true;
index 1c4fe33f2dd7458a833a264f77c7816d7c149267..9248bc3edd34d3d44a7b1a2faa49d11a5692f9aa 100755 (executable)
@@ -677,7 +677,7 @@ bool SUIT_DataObject::customSorting( const int /*id*/ ) const
   \sa customSorting()
 */
 bool SUIT_DataObject::compare( const QVariant& /*left*/, const QVariant& /*right*/,
-                              const int /*id*/ ) const
+                               const int /*id*/ ) const
 {
   return false;
 }
@@ -807,7 +807,7 @@ SUIT_DataObject::Signal::Signal()
 SUIT_DataObject::Signal::~Signal()
 {
   for ( DataObjectList::Iterator it = myDelLaterObjects.begin();
-       it != myDelLaterObjects.end(); ++it ) {
+        it != myDelLaterObjects.end(); ++it ) {
     delete *it;
   }
   myDelLaterObjects.clear();
index c60f4b6fc66e04a474f435afd695afbb2bd75f48..6a2872cb4585c37887bf889ffe0745ccf4f87e69 100755 (executable)
@@ -39,9 +39,9 @@
   filters << "Image files (*.bmp *.gif *.jpg )" << "All files (*)";
   QString fileName = SUIT_FileDlg::getFileName( desktop(), 
                                                 QString(), 
-                                               filters, 
-                                               "Dump view",
-                                               false );
+                                                filters, 
+                                                "Dump view",
+                                                false );
   if ( !fileName.isEmpty() ) {
     ... writing image to the file 
   }
@@ -51,8 +51,8 @@
   filters << "*.cpp | *.cxx | *.c++" << "*.h | *.hpp | *.hxx";
   QStringList fileNames = SUIT_FileDlg::getOpenFileName( desktop(),
                                                          QString(), 
-                                                        filters, 
-                                                        QString() );
+                                                         filters, 
+                                                         QString() );
   if ( !fileNames.isEmpty() ) {
     ... open files
   }
@@ -140,13 +140,13 @@ SUIT_FileDlg::SUIT_FileDlg( QWidget* parent, bool open, bool showQuickDir, bool
       QStringList dirList;
   
       if ( resMgr )
-       dirList = resMgr->stringValue( "FileDlg", "QuickDirList" ).split( ';', QString::SkipEmptyParts );
+        dirList = resMgr->stringValue( "FileDlg", "QuickDirList" ).split( ';', QString::SkipEmptyParts );
 
       if ( dirList.isEmpty() ) 
-       dirList << QDir::homePath();
+        dirList << QDir::homePath();
 
       for ( int i = 0; i < dirList.count(); i++ )
-       myQuickCombo->addItem( dirList[i] );
+        myQuickCombo->addItem( dirList[i] );
     }
     else {
       delete myQuickLab;    myQuickLab = 0;
@@ -293,7 +293,7 @@ QStringList SUIT_FileDlg::selectedFiles() const
       QString f = it.next();
       QFileInfo finfo( f );
       if ( !finfo.isDir() )
-       it.setValue( addExtension( f ) );
+        it.setValue( addExtension( f ) );
     }
   }
   return files;
@@ -351,7 +351,7 @@ QLineEdit* SUIT_FileDlg::lineEdit() const
     for ( int i = 0; i < editBoxes.count(); i++ ) {
       int widx = grid->indexOf( editBoxes[ i ] );
       if ( widx >= 0 )
-       idx = qMin( idx, widx );
+        idx = qMin( idx, widx );
     }
     if ( grid->itemAt( idx )  )
       ebox = qobject_cast<QLineEdit*>( grid->itemAt( idx )->widget() );
@@ -385,26 +385,26 @@ bool SUIT_FileDlg::acceptData()
     if ( txt == ".." ) {
       QDir dir = directory();
       if ( dir.cdUp() ) {
-       setDirectory( dir );
-       bool block = lineEdit()->blockSignals( true );
-       lineEdit()->setText( ".." );
-       lineEdit()->selectAll();
-       lineEdit()->setFocus( Qt::OtherFocusReason );
-       lineEdit()->blockSignals( block );
-       return false;
+        setDirectory( dir );
+        bool block = lineEdit()->blockSignals( true );
+        lineEdit()->setText( ".." );
+        lineEdit()->selectAll();
+        lineEdit()->setFocus( Qt::OtherFocusReason );
+        lineEdit()->blockSignals( block );
+        return false;
       }
     }
     else if ( fileMode() != DirectoryOnly ) {
       QStringList fs = txt.split( " ", QString::SkipEmptyParts );
       for ( int i = 0; i < fs.count(); i++ ) {
-       QString wc = fs.at( i );
-       if ( wc.startsWith( "\"" ) && wc.endsWith( "\"" ) )
-         wc = wc.mid( 1, wc.length()-2 );
-       if ( hasWildCards( wc ) ) {
-         addFilter( wc );
-         lineEdit()->clear();
-         return false;
-       }
+        QString wc = fs.at( i );
+        if ( wc.startsWith( "\"" ) && wc.endsWith( "\"" ) )
+          wc = wc.mid( 1, wc.length()-2 );
+        if ( hasWildCards( wc ) ) {
+          addFilter( wc );
+          lineEdit()->clear();
+          return false;
+        }
       }
     }
   }
@@ -421,8 +421,8 @@ bool SUIT_FileDlg::acceptData()
     {
       QString fn = files.first();
       if ( validator() ) {
-       bOk = isOpenDlg() ? validator()->canReadDir( fn, checkPermissions() ) : 
-                           validator()->canWriteDir( fn, checkPermissions() );
+        bOk = isOpenDlg() ? validator()->canReadDir( fn, checkPermissions() ) : 
+                            validator()->canWriteDir( fn, checkPermissions() );
       }
       break;
     }
@@ -431,17 +431,17 @@ bool SUIT_FileDlg::acceptData()
       QString fn = files.first();
       QFileInfo info( fn );
       if ( info.isDir() ) {
-       setDirectory( info.absoluteFilePath() );
-       if ( lineEdit() ) {
-         lineEdit()->selectAll();
-         lineEdit()->setFocus( Qt::OtherFocusReason );
-       }
-       return false;
+        setDirectory( info.absoluteFilePath() );
+        if ( lineEdit() ) {
+          lineEdit()->selectAll();
+          lineEdit()->setFocus( Qt::OtherFocusReason );
+        }
+        return false;
       }
       // validation is not required
       if ( validator() ) {
-       bOk = isOpenDlg() ? validator()->canOpen( fn, checkPermissions() ) : 
-                           validator()->canSave( fn, checkPermissions() );
+        bOk = isOpenDlg() ? validator()->canOpen( fn, checkPermissions() ) : 
+                            validator()->canSave( fn, checkPermissions() );
       }
       break;
     }
@@ -449,21 +449,21 @@ bool SUIT_FileDlg::acceptData()
   case ExistingFiles: 
     {
       for ( int i = 0; i < files.count(); ++i ) {
-       QFileInfo info( files.at( i ) );
-       if ( info.isDir() ) {
-         setDirectory( info.absoluteFilePath() );
-         if ( lineEdit() ) {
-           lineEdit()->selectAll();
-           lineEdit()->setFocus( Qt::OtherFocusReason );
-         }
-         return false;
-       }
-       if ( validator() ) {
-         bOk = isOpenDlg() ? validator()->canOpen( files.at( i ), checkPermissions() ) : 
-                             validator()->canSave( files.at( i ), checkPermissions() );
-       if ( !bOk )
-         return false;
-       }
+        QFileInfo info( files.at( i ) );
+        if ( info.isDir() ) {
+          setDirectory( info.absoluteFilePath() );
+          if ( lineEdit() ) {
+            lineEdit()->selectAll();
+            lineEdit()->setFocus( Qt::OtherFocusReason );
+          }
+          return false;
+        }
+        if ( validator() ) {
+          bOk = isOpenDlg() ? validator()->canOpen( files.at( i ), checkPermissions() ) : 
+                              validator()->canSave( files.at( i ), checkPermissions() );
+        if ( !bOk )
+          return false;
+        }
       }
       break;
     }
@@ -563,9 +563,9 @@ bool SUIT_FileDlg::processPath( const QString& path )
     QFileInfo fi( path );
     if ( fi.exists() ) {
       if ( fi.isFile() )
-       selectFile( path );
+        selectFile( path );
       else if ( fi.isDir() )
-       setDirectory( path );
+        setDirectory( path );
       return true;
     }
     QString dirPath = SUIT_Tools::dir( path, false );
@@ -652,12 +652,12 @@ void SUIT_FileDlg::addQuickDir()
     bool emptyAndHome = false;
     if ( dirList.count() > 0 ) {
       for ( int i = 0; i < dirList.count() && !found; i++ )  {
-       QDir aDir( dirList[i] );
-       if ( aDir.canonicalPath().isNull() && dirList[i] == dir.absolutePath() ||
-            !aDir.canonicalPath().isNull() && aDir.exists() && 
-            aDir.canonicalPath() == dir.canonicalPath() ) {
-         found = true;
-       }
+        QDir aDir( dirList[i] );
+        if ( aDir.canonicalPath().isNull() && dirList[i] == dir.absolutePath() ||
+             !aDir.canonicalPath().isNull() && aDir.exists() && 
+             aDir.canonicalPath() == dir.canonicalPath() ) {
+          found = true;
+        }
       }
     }
     else {
@@ -668,7 +668,7 @@ void SUIT_FileDlg::addQuickDir()
       dirList.append( dp );
       resMgr->setValue( "FileDlg", "QuickDirList", dirList.join( ";" ) );
       if ( !emptyAndHome )
-       myQuickCombo->addItem( dp );
+        myQuickCombo->addItem( dp );
     }
   }
 }
@@ -683,11 +683,11 @@ void SUIT_FileDlg::polish()
   int maxBtnWidth = 0;
 
   for ( QList<QPushButton*>::const_iterator it = buttons.begin(); 
-       it != buttons.end(); ++it )
+        it != buttons.end(); ++it )
     maxBtnWidth = qMax( maxBtnWidth, (*it)->sizeHint().width() );
 
   for ( QList<QPushButton*>::const_iterator it = buttons.begin(); 
-       it != buttons.end(); ++it ) {
+        it != buttons.end(); ++it ) {
     (*it)->setDefault( false );
     (*it)->setAutoDefault( false );
     (*it)->setFixedWidth( maxBtnWidth );
@@ -695,7 +695,7 @@ void SUIT_FileDlg::polish()
 
   QList<QListView*> views = findChildren<QListView*>();
   for ( QList<QListView*>::const_iterator it = views.begin(); 
-       it != views.end(); ++it ) {
+        it != views.end(); ++it ) {
     (*it)->setViewMode( QListView::ListMode );
   }
 }
@@ -735,8 +735,8 @@ void SUIT_FileDlg::polish()
   \sa getOpenFileNames(), getExistingDirectory()
 */
 QString SUIT_FileDlg::getFileName( QWidget* parent, const QString& initial, 
-                                  const QStringList& filters, const QString& caption, 
-                                  const bool open, const bool showQuickDir,
+                                   const QStringList& filters, const QString& caption, 
+                                   const bool open, const bool showQuickDir,
                                    SUIT_FileValidator* validator )
 {            
   SUIT_FileDlg fd( parent, open, showQuickDir, true );    
@@ -808,12 +808,12 @@ QString SUIT_FileDlg::getFileName( QWidget* parent, const QString& initial,
   \sa getOpenFileNames(), getExistingDirectory()
 */
 QString SUIT_FileDlg::getFileName( QWidget* parent, const QString& initial, 
-                                  const QString& filters, const QString& caption, 
-                                  const bool open, const bool showQuickDir,
+                                   const QString& filters, const QString& caption, 
+                                   const bool open, const bool showQuickDir,
                                    SUIT_FileValidator* validator )
 {
   return getFileName( parent, initial, filters.split( ";;", QString::SkipEmptyParts ), 
-                     caption, open, showQuickDir, validator );
+                      caption, open, showQuickDir, validator );
 }
 
 /*!
@@ -846,9 +846,9 @@ QString SUIT_FileDlg::getFileName( QWidget* parent, const QString& initial,
   \sa getFileName(), getExistingDirectory()
 */
 QStringList SUIT_FileDlg::getOpenFileNames( QWidget* parent, const QString& initial,
-                                           const QStringList& filters, const QString& caption,
-                                           const bool showQuickDir, 
-                                           SUIT_FileValidator* validator )
+                                            const QStringList& filters, const QString& caption,
+                                            const bool showQuickDir, 
+                                            SUIT_FileValidator* validator )
 {            
   SUIT_FileDlg fd( parent, true, showQuickDir, true );
 
@@ -910,12 +910,12 @@ QStringList SUIT_FileDlg::getOpenFileNames( QWidget* parent, const QString& init
   \sa getFileName(), getExistingDirectory()
 */
 QStringList SUIT_FileDlg::getOpenFileNames( QWidget* parent, const QString& initial,
-                                           const QString& filters, const QString& caption,
-                                           const bool showQuickDir,
-                                           SUIT_FileValidator* validator )
+                                            const QString& filters, const QString& caption,
+                                            const bool showQuickDir,
+                                            SUIT_FileValidator* validator )
 {
   return getOpenFileNames( parent, initial, filters.split( ";;", QString::SkipEmptyParts ), 
-                          caption, showQuickDir, validator );
+                           caption, showQuickDir, validator );
 }
 
 /*!
@@ -945,7 +945,7 @@ QStringList SUIT_FileDlg::getOpenFileNames( QWidget* parent, const QString& init
 */
 QString SUIT_FileDlg::getExistingDirectory( QWidget* parent, const QString& initial,
                                             const QString& caption, const bool showQuickDir,
-                                           SUIT_FileValidator* validator )
+                                            SUIT_FileValidator* validator )
 {
   SUIT_FileDlg fd( parent, true, showQuickDir, true );
 
index 2e0d02d99f851edfe1a5e8673522282d0e85e84a..72cfd756da1368d951bc7a2aa8f0fa6b339d3d2e 100755 (executable)
@@ -61,38 +61,38 @@ public:
   static QString      getLastVisitedDirectory();
 
   static QString      getFileName( QWidget*, 
-                                  const QString&, 
-                                  const QStringList&, 
-                                  const QString& = QString(), 
-                                  const bool = true, 
-                                  const bool = true,
+                                   const QString&, 
+                                   const QStringList&, 
+                                   const QString& = QString(), 
+                                   const bool = true, 
+                                   const bool = true,
                                    SUIT_FileValidator* = 0 );
   static QString      getFileName( QWidget*, 
-                                  const QString&, 
-                                  const QString&,
-                                  const QString& = QString(), 
-                                  const bool = true,
-                                  const bool = true,
+                                   const QString&, 
+                                   const QString&,
+                                   const QString& = QString(), 
+                                   const bool = true,
+                                   const bool = true,
                                    SUIT_FileValidator* = 0 );
 
   static QStringList  getOpenFileNames( QWidget*, 
-                                       const QString&,
-                                       const QStringList&, 
-                                       const QString& = QString(),
-                                       const bool = true, 
-                                       SUIT_FileValidator* = 0 );
+                                        const QString&,
+                                        const QStringList&, 
+                                        const QString& = QString(),
+                                        const bool = true, 
+                                        SUIT_FileValidator* = 0 );
   static QStringList  getOpenFileNames( QWidget*, 
-                                       const QString&,
-                                       const QString&, 
-                                       const QString& = QString(),
-                                       const bool = true, 
-                                       SUIT_FileValidator* = 0 );
+                                        const QString&,
+                                        const QString&, 
+                                        const QString& = QString(),
+                                        const bool = true, 
+                                        SUIT_FileValidator* = 0 );
 
   static QString      getExistingDirectory( QWidget*, 
-                                           const QString&,
+                                            const QString&,
                                             const QString& = QString(), 
-                                           const bool = true,
-                                           SUIT_FileValidator* = 0 );
+                                            const bool = true,
+                                            SUIT_FileValidator* = 0 );
 
   static QString      getLastVisitedPath();
 
index ee6c3d2ed447a45be1dd3e4bfd7872c831c6c866..f56f2286d4a786e1f2d6544507cc7dfd0478f91f 100755 (executable)
@@ -60,13 +60,13 @@ bool SUIT_FileValidator::canOpen( const QString& fileName, bool checkPermission
   if ( !QFile::exists( fileName ) ) {
     if ( parent() )
       SUIT_MessageBox::critical( parent(), QObject::tr( "ERR_ERROR" ),
-                                QObject::tr( "ERR_FILE_NOT_EXIST" ).arg( fileName ) );
+                                 QObject::tr( "ERR_FILE_NOT_EXIST" ).arg( fileName ) );
     return false;
   }
   if ( checkPermission && !QFileInfo( fileName ).isReadable() ) {
     if ( parent() )
       SUIT_MessageBox::critical( parent(), QObject::tr( "ERR_ERROR" ),
-                                QObject::tr( "ERR_OPEN_PERMISSION_DENIED" ).arg( fileName ) );
+                                 QObject::tr( "ERR_OPEN_PERMISSION_DENIED" ).arg( fileName ) );
     return false; 
   }
   return true;
@@ -91,15 +91,15 @@ bool SUIT_FileValidator::canSave( const QString& fileName, bool checkPermission
   if ( QFile::exists( fileName ) ) {
     if ( parent() )
       if ( SUIT_MessageBox::question( parent(), QObject::tr( "WRN_WARNING" ),
-                                     QObject::tr( "QUE_DOC_FILEEXISTS" ).arg( fileName ),
-                                     SUIT_MessageBox::Yes | SUIT_MessageBox::No,
-                                     SUIT_MessageBox::No ) != SUIT_MessageBox::Yes )
-       return false;
+                                      QObject::tr( "QUE_DOC_FILEEXISTS" ).arg( fileName ),
+                                      SUIT_MessageBox::Yes | SUIT_MessageBox::No,
+                                      SUIT_MessageBox::No ) != SUIT_MessageBox::Yes )
+        return false;
     
     if ( checkPermission && !QFileInfo( fileName ).isWritable() ) {
       if ( parent() ) 
-       SUIT_MessageBox::critical( myParent, QObject::tr( "ERR_ERROR" ),
-                                  QObject::tr( "ERR_PERMISSION_DENIED" ).arg( fileName ) );
+        SUIT_MessageBox::critical( myParent, QObject::tr( "ERR_ERROR" ),
+                                   QObject::tr( "ERR_PERMISSION_DENIED" ).arg( fileName ) );
       return false; 
     }
   }
@@ -107,13 +107,13 @@ bool SUIT_FileValidator::canSave( const QString& fileName, bool checkPermission
     QString dirName = SUIT_Tools::dir( fileName );
     if ( !QFile::exists( dirName ) ) {
       SUIT_MessageBox::critical( parent(), QObject::tr( "WRN_WARNING" ),
-                                QObject::tr( "ERR_DIR_NOT_EXIST" ).arg( dirName ) );
+                                 QObject::tr( "ERR_DIR_NOT_EXIST" ).arg( dirName ) );
       return false;
     }
     if ( checkPermission && !QFileInfo( dirName ).isWritable() ) {
       if ( parent() )
-       SUIT_MessageBox::critical( parent(), QObject::tr( "ERR_ERROR" ),
-                                  QObject::tr( "ERR_PERMISSION_DENIED" ).arg( fileName ) );
+        SUIT_MessageBox::critical( parent(), QObject::tr( "ERR_ERROR" ),
+                                   QObject::tr( "ERR_PERMISSION_DENIED" ).arg( fileName ) );
       return false;
     }
   }
@@ -137,19 +137,19 @@ bool SUIT_FileValidator::canReadDir( const QString& dirName, bool checkPermissio
   if ( !info.exists() ) {
     if ( parent() )
       SUIT_MessageBox::critical( parent(), QObject::tr( "ERR_ERROR" ),
-                                QObject::tr( "ERR_DIR_NOT_EXIST" ).arg( dirName ) );
+                                 QObject::tr( "ERR_DIR_NOT_EXIST" ).arg( dirName ) );
     return false;
   }
   if ( !info.isDir() ) {
     if ( parent() )
       SUIT_MessageBox::critical( parent(), QObject::tr( "ERR_ERROR" ),
-                                QObject::tr( "ERR_FILE_NOT_DIR" ).arg( dirName ) );
+                                 QObject::tr( "ERR_FILE_NOT_DIR" ).arg( dirName ) );
     return false;
   }
   if ( checkPermission && !info.isReadable() ) {
     if ( parent() )
       SUIT_MessageBox::critical( parent(), QObject::tr( "ERR_ERROR" ),
-                                QObject::tr( "ERR_DIR_READ_PERMISSION_DENIED" ).arg( dirName ) );
+                                 QObject::tr( "ERR_DIR_READ_PERMISSION_DENIED" ).arg( dirName ) );
     return false; 
   }
   return true;
@@ -172,19 +172,19 @@ bool SUIT_FileValidator::canWriteDir( const QString& dirName, bool checkPermissi
   if ( !info.exists() ) {
     if ( parent() )
       SUIT_MessageBox::critical( parent(), QObject::tr( "ERR_ERROR" ),
-                                QObject::tr( "ERR_DIR_NOT_EXIST" ).arg( dirName ) );
+                                 QObject::tr( "ERR_DIR_NOT_EXIST" ).arg( dirName ) );
     return false;
   }
   if ( !info.isDir() ) {
     if ( parent() )
       SUIT_MessageBox::critical( parent(), QObject::tr( "ERR_ERROR" ),
-                                QObject::tr( "ERR_FILE_NOT_DIR" ).arg( dirName ) );
+                                 QObject::tr( "ERR_FILE_NOT_DIR" ).arg( dirName ) );
     return false;
   }
   if ( checkPermission && !info.isWritable() ) {
     if ( parent() )
       SUIT_MessageBox::critical( parent(), QObject::tr( "ERR_ERROR" ),
-                                QObject::tr( "ERR_DIR_WRITE_PERMISSION_DENIED" ).arg( dirName ) );
+                                 QObject::tr( "ERR_DIR_WRITE_PERMISSION_DENIED" ).arg( dirName ) );
     return false; 
   }
   return true;
index 08358f5ea04cf77d38a8ded8ca675478e0d07de3..816e82ca8976f7238fedbc7a723fe024db9b11c7 100755 (executable)
@@ -108,8 +108,8 @@ SUIT_LicenseDlg::SUIT_LicenseDlg( bool firstShow, QWidget* parent, const char* n
 }
 
 /*!
-       Name: ~SUIT_LicenseDlg [public]
-       Desc: Destructor
+        Name: ~SUIT_LicenseDlg [public]
+        Desc: Destructor
 */
 
 SUIT_LicenseDlg::~SUIT_LicenseDlg()
@@ -175,20 +175,20 @@ void SUIT_LicenseDlg::onPrint()
 
     // convert text to rich text format
     QString aFormattedText = Qt::convertFromPlainText( myTextEdit->toPlainText() );
-       
+        
     QTextDocument aRichText( aFormattedText );
     aRichText.setDefaultFont( aBodyFont );
 
 
     /*QSimpleRichText aRichText( aFormattedText,
-                              aBodyFont,
-                              myTextEdit->context(),
-                              myTextEdit->styleSheet(),
-                              myTextEdit->mimeSourceFactory(),
-                              aBody.height() );
+                               aBodyFont,
+                               myTextEdit->context(),
+                               myTextEdit->styleSheet(),
+                               myTextEdit->mimeSourceFactory(),
+                               aBody.height() );
     */
     aRichText.setPageSize( QSize( aBody.width(), aRichText.pageSize().height() ) );
-       //aRichText.setWidth( &aPainter, aBody.width() );
+        //aRichText.setWidth( &aPainter, aBody.width() );
     
     QRect aView( aBody );
     
@@ -197,7 +197,7 @@ void SUIT_LicenseDlg::onPrint()
     do {
       // print page text
       aRichText.drawContents( &aPainter, aView );
-         //aRichText.draw( &aPainter, aBody.left(), aBody.top(), aView, colorGroup() );
+          //aRichText.draw( &aPainter, aBody.left(), aBody.top(), aView, colorGroup() );
       aView.translate( 0, aBody.height() );
       aPainter.translate( 0 , -aBody.height() );
       
@@ -206,10 +206,10 @@ void SUIT_LicenseDlg::onPrint()
       aPainter.setFont(aFooterFont);
       QString aFooter = QString("Page ") + QString::number(aPageIndex);
       aPainter.drawText( aView.right() - aPainter.fontMetrics().width( aFooter ),
-                        aView.bottom() + aPainter.fontMetrics().ascent() + 5, aFooter );
+                         aView.bottom() + aPainter.fontMetrics().ascent() + 5, aFooter );
       
       if ( aView.top() >= aRichText.size().height() )
-       break;
+        break;
       aPrinter.newPage();
       aPageIndex++;
     } while (true);
index 46dfe4f730160a5f9ab58f263a187e416a0424c5..cc4754efc3f54d458c47b9112d32d91aa9f1a0c1 100755 (executable)
@@ -63,8 +63,8 @@
   // show question message box with two standard buttons
   int result = SUIT_MessageBox::question(desktop(), "Error",
                                          "File already exists? Overwrite?",
-                                        SUIT_MessageBox::Yes | SUIT_MessageBox::No,
-                                        SUIT_MessageBox::No );
+                                         SUIT_MessageBox::Yes | SUIT_MessageBox::No,
+                                         SUIT_MessageBox::No );
   if ( result == SUIT_MessageBox::Yes )
     overwriteFileFunction();
 
@@ -72,7 +72,7 @@
   // default is second button and escape is third button
   int result = SUIT_MessageBox::critical(desktop(), "Hazard!",
                                          "The situation is critical! What to do?",
-                                        "Hide", "Run Away", "Stand still", 1, 2);
+                                         "Hide", "Run Away", "Stand still", 1, 2);
   switch ( result )
   {
   case 0:
@@ -89,8 +89,8 @@
   // both default and escape buttons are set to first button ("Zero")
   int result = SUIT_MessageBox::information(desktop(), "Question",
                                             "Select your favourite number",
-                                           0, 0,
-                                           "Zero", "One", "Two", "Three", "Four", "Five");
+                                            0, 0,
+                                            "Zero", "One", "Two", "Three", "Four", "Five");
   useMyFavouriteNumberSomewhere( result );
   \endcode
 */
@@ -230,7 +230,7 @@ SUIT_MessageBox::StandardButton SUIT_MessageBox::question( QWidget* parent, cons
   \return button id clicked by the user (QMessageBox::StandardButton)
 */
 int SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QString& text,
-                              const QString& button )
+                               const QString& button )
 {
   ButtonInfos lst;
   lst.append( ButtonInfo( 0, button ) );
@@ -251,7 +251,7 @@ int SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QStr
   \return button id clicked by the user (QMessageBox::StandardButton)
 */
 int SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QString& text,
-                             const QString& button )
+                              const QString& button )
 {
   ButtonInfos lst;
   lst.append( ButtonInfo( 0, button ) );
@@ -272,7 +272,7 @@ int SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QStri
   \return button id clicked by the user (QMessageBox::StandardButton)
 */
 int SUIT_MessageBox::information( QWidget* parent, const QString& title, const QString& text,
-                                 const QString& button )
+                                  const QString& button )
 {
   ButtonInfos lst;
   lst.append( ButtonInfo( 0, button ) );
@@ -298,7 +298,7 @@ int SUIT_MessageBox::information( QWidget* parent, const QString& title, const Q
   \return button id clicked by the user (QMessageBox::StandardButton)
 */
 int SUIT_MessageBox::question( QWidget* parent, const QString& title, const QString& text,
-                              const QString& button )
+                               const QString& button )
 {
   ButtonInfos lst;
   lst.append( ButtonInfo( 0, button ) );
@@ -329,15 +329,15 @@ int SUIT_MessageBox::question( QWidget* parent, const QString& title, const QStr
   \return button used button id
 */
 int SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QString& text,
-                              const QString& button1, const QString& button2,
-                              const int defaultButton, const int escapeButton )
+                               const QString& button1, const QString& button2,
+                               const int defaultButton, const int escapeButton )
 {
   ButtonInfos lst;
   int id = 0;
   lst.append( ButtonInfo( id++, button1 ) );
   lst.append( ButtonInfo( id++, button2 ) );
   return messageBox( SUIT_MessageBox::Critical, parent, title, text, lst, 
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -364,15 +364,15 @@ int SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QStr
   \return button used button id
 */
 int SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QString& text,
-                             const QString& button1, const QString& button2,
-                             const int defaultButton, const int escapeButton )
+                              const QString& button1, const QString& button2,
+                              const int defaultButton, const int escapeButton )
 {
   ButtonInfos lst;
   int id = 0;
   lst.append( ButtonInfo( id++, button1 ) );
   lst.append( ButtonInfo( id++, button2 ) );
   return messageBox( SUIT_MessageBox::Warning, parent, title, text, lst, 
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -399,15 +399,15 @@ int SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QStri
   \return button used button id
 */
 int SUIT_MessageBox::information( QWidget* parent, const QString& title, const QString& text,
-                                 const QString& button1, const QString& button2,
-                                 const int defaultButton, const int escapeButton )
+                                  const QString& button1, const QString& button2,
+                                  const int defaultButton, const int escapeButton )
 {
   ButtonInfos lst;
   int id = 0;
   lst.append( ButtonInfo( id++, button1 ) );
   lst.append( ButtonInfo( id++, button2 ) );
   return messageBox( SUIT_MessageBox::Information, parent, title, text, lst, 
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -434,15 +434,15 @@ int SUIT_MessageBox::information( QWidget* parent, const QString& title, const Q
   \return button used button id
 */
 int SUIT_MessageBox::question( QWidget* parent, const QString& title, const QString& text,
-                              const QString& button1, const QString& button2,
-                              const int defaultButton, const int escapeButton )
+                               const QString& button1, const QString& button2,
+                               const int defaultButton, const int escapeButton )
 {
   ButtonInfos lst;
   int id = 0;
   lst.append( ButtonInfo( id++, button1 ) );
   lst.append( ButtonInfo( id++, button2 ) );
   return messageBox( SUIT_MessageBox::Question, parent, title, text, lst, 
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -470,9 +470,9 @@ int SUIT_MessageBox::question( QWidget* parent, const QString& title, const QStr
   \return button used button id
 */
 int SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QString& text,
-                              const QString& button1, const QString& button2, 
-                              const QString& button3,
-                              const int defaultButton, const int escapeButton )
+                               const QString& button1, const QString& button2, 
+                               const QString& button3,
+                               const int defaultButton, const int escapeButton )
 {
   ButtonInfos lst;
   int id = 0;
@@ -480,7 +480,7 @@ int SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QStr
   lst.append( ButtonInfo( id++, button2 ) );
   lst.append( ButtonInfo( id++, button3 ) );
   return messageBox( SUIT_MessageBox::Critical, parent, title, text, lst, 
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -508,9 +508,9 @@ int SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QStr
   \return button used button id
 */
 int SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QString& text,
-                             const QString& button1, const QString& button2,
-                             const QString& button3,
-                             const int defaultButton, const int escapeButton )
+                              const QString& button1, const QString& button2,
+                              const QString& button3,
+                              const int defaultButton, const int escapeButton )
 {
   ButtonInfos lst;
   int id = 0;
@@ -518,7 +518,7 @@ int SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QStri
   lst.append( ButtonInfo( id++, button2 ) );
   lst.append( ButtonInfo( id++, button3 ) );
   return messageBox( SUIT_MessageBox::Warning, parent, title, text, lst, 
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -546,9 +546,9 @@ int SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QStri
   \return button used button id
 */
 int SUIT_MessageBox::information( QWidget* parent, const QString& title, const QString& text,
-                                 const QString& button1, const QString& button2,
-                                 const QString& button3,
-                                 const int defaultButton, const int escapeButton )
+                                  const QString& button1, const QString& button2,
+                                  const QString& button3,
+                                  const int defaultButton, const int escapeButton )
 {
   ButtonInfos lst;
   int id = 0;
@@ -556,7 +556,7 @@ int SUIT_MessageBox::information( QWidget* parent, const QString& title, const Q
   lst.append( ButtonInfo( id++, button2 ) );
   lst.append( ButtonInfo( id++, button3 ) );
   return messageBox( SUIT_MessageBox::Information, parent, title, text, lst, 
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -584,9 +584,9 @@ int SUIT_MessageBox::information( QWidget* parent, const QString& title, const Q
   \return button used button id
 */
 int SUIT_MessageBox::question( QWidget* parent, const QString& title, const QString& text,
-                              const QString& button1, const QString& button2,
-                              const QString& button3,
-                              const int defaultButton, const int escapeButton )
+                               const QString& button1, const QString& button2,
+                               const QString& button3,
+                               const int defaultButton, const int escapeButton )
 {
   ButtonInfos lst;
   int id = 0;
@@ -594,7 +594,7 @@ int SUIT_MessageBox::question( QWidget* parent, const QString& title, const QStr
   lst.append( ButtonInfo( id++, button2 ) );
   lst.append( ButtonInfo( id++, button3 ) );
   return messageBox( SUIT_MessageBox::Question, parent, title, text, lst, 
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -624,9 +624,9 @@ int SUIT_MessageBox::question( QWidget* parent, const QString& title, const QStr
   \return button used button id
 */
 int SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QString& text,
-                              const QString& button1, const QString& button2, 
-                              const QString& button3, const QString& button4,
-                              const int defaultButton, const int escapeButton )
+                               const QString& button1, const QString& button2, 
+                               const QString& button3, const QString& button4,
+                               const int defaultButton, const int escapeButton )
 {
   ButtonInfos lst;
   int id = 0;
@@ -635,7 +635,7 @@ int SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QStr
   lst.append( ButtonInfo( id++, button3 ) );
   lst.append( ButtonInfo( id++, button4 ) );
   return messageBox( SUIT_MessageBox::Critical, parent, title, text, lst, 
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -665,9 +665,9 @@ int SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QStr
   \return button used button id
 */
 int SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QString& text,
-                             const QString& button1, const QString& button2, 
-                             const QString& button3, const QString& button4,
-                             const int defaultButton, const int escapeButton )
+                              const QString& button1, const QString& button2, 
+                              const QString& button3, const QString& button4,
+                              const int defaultButton, const int escapeButton )
 {
   ButtonInfos lst;
   int id = 0;
@@ -676,7 +676,7 @@ int SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QStri
   lst.append( ButtonInfo( id++, button3 ) );
   lst.append( ButtonInfo( id++, button4 ) );
   return messageBox( SUIT_MessageBox::Warning, parent, title, text, lst, 
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -706,9 +706,9 @@ int SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QStri
   \return button used button id
 */
 int SUIT_MessageBox::information( QWidget* parent, const QString& title, const QString& text,
-                                 const QString& button1, const QString& button2, 
-                                 const QString& button3, const QString& button4,
-                                 const int defaultButton, const int escapeButton )
+                                  const QString& button1, const QString& button2, 
+                                  const QString& button3, const QString& button4,
+                                  const int defaultButton, const int escapeButton )
 {
   ButtonInfos lst;
   int id = 0;
@@ -717,7 +717,7 @@ int SUIT_MessageBox::information( QWidget* parent, const QString& title, const Q
   lst.append( ButtonInfo( id++, button3 ) );
   lst.append( ButtonInfo( id++, button4 ) );
   return messageBox( SUIT_MessageBox::Information, parent, title, text, lst, 
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -747,9 +747,9 @@ int SUIT_MessageBox::information( QWidget* parent, const QString& title, const Q
   \return button used button id
 */
 int SUIT_MessageBox::question( QWidget* parent, const QString& title, const QString& text,
-                              const QString& button1, const QString& button2, 
-                              const QString& button3, const QString& button4,
-                              const int defaultButton, const int escapeButton )
+                               const QString& button1, const QString& button2, 
+                               const QString& button3, const QString& button4,
+                               const int defaultButton, const int escapeButton )
 {
   ButtonInfos lst;
   int id = 0;
@@ -758,7 +758,7 @@ int SUIT_MessageBox::question( QWidget* parent, const QString& title, const QStr
   lst.append( ButtonInfo( id++, button3 ) );
   lst.append( ButtonInfo( id++, button4 ) );
   return messageBox( SUIT_MessageBox::Question, parent, title, text, lst, 
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -789,14 +789,14 @@ int SUIT_MessageBox::question( QWidget* parent, const QString& title, const QStr
   \return button used button id
 */
 int SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QString& text, 
-                              const int defaultButton, const int escapeButton, 
-                              char* btn, ... )
+                               const int defaultButton, const int escapeButton, 
+                               char* btn, ... )
 {
   va_list args;
   va_start( args, btn );
   return messageBox( SUIT_MessageBox::Critical, parent, title, text,
                      messageList( btn, args ),
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -827,14 +827,14 @@ int SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QStr
   \return button used button id
 */
 int SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QString& text, 
-                             const int defaultButton, const int escapeButton, 
-                             char* btn, ... )
+                              const int defaultButton, const int escapeButton, 
+                              char* btn, ... )
 {
   va_list args;
   va_start( args, btn );
   return messageBox( SUIT_MessageBox::Warning, parent, title, text,
                      messageList( btn, args ),
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -865,14 +865,14 @@ int SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QStri
   \return button used button id
 */
 int SUIT_MessageBox::information( QWidget* parent, const QString& title, const QString& text, 
-                                 const int defaultButton, const int escapeButton, 
-                                 char* btn, ... )
+                                  const int defaultButton, const int escapeButton, 
+                                  char* btn, ... )
 {
   va_list args;
   va_start( args, btn );
   return messageBox( SUIT_MessageBox::Information, parent, title, text,
                      messageList( btn, args ),
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -903,14 +903,14 @@ int SUIT_MessageBox::information( QWidget* parent, const QString& title, const Q
   \return button used button id
 */
 int SUIT_MessageBox::question( QWidget* parent, const QString& title, const QString& text, 
-                              const int defaultButton, const int escapeButton, 
-                              char* btn, ... )
+                               const int defaultButton, const int escapeButton, 
+                               char* btn, ... )
 {
   va_list args;
   va_start( args, btn );
   return messageBox( SUIT_MessageBox::Question, parent, title, text,
                      messageList( btn, args ),
-                    defaultButton, escapeButton );
+                     defaultButton, escapeButton );
 }
 
 /*!
@@ -950,10 +950,10 @@ SUIT_MessageBox::ButtonInfos SUIT_MessageBox::messageList( char* txt, va_list& a
   \return button used button id
 */
 int SUIT_MessageBox::messageBox( Icon icon, QWidget* parent, 
-                                const QString& title, const QString& text, 
-                                const ButtonInfos& lst, 
-                                const int defaultButton, 
-                                const int escapeButton )
+                                 const QString& title, const QString& text, 
+                                 const ButtonInfos& lst, 
+                                 const int defaultButton, 
+                                 const int escapeButton )
 {
   SUIT_MessageBox msgBox( icon, title, text, NoButton, parent );
 
index 6fb2e5164811aee3ecd22e46291bfcc8f9d09642..d1f8f65c035142d98187cc584c2c81a01c5da62b 100755 (executable)
@@ -53,81 +53,81 @@ public:
   
   // message boxes with one custom button
   static int            critical( QWidget* parent, const QString& title, const QString& text,
-                                 const QString& button );
+                                  const QString& button );
   static int            warning( QWidget* parent, const QString& title, const QString& text,
-                                const QString& button );
+                                 const QString& button );
   static int            information( QWidget* parent, const QString& title, const QString& text,
-                                    const QString& button );
+                                     const QString& button );
   static int            question( QWidget* parent, const QString& title, const QString& text,
-                                 const QString& button );
+                                  const QString& button );
 
   // message boxes with two custom buttons
   static int            critical( QWidget* parent, const QString& title, const QString& text,
-                                 const QString& button1, const QString& button2, 
-                                 const int defaultButton = -1, const int escapeButton = -1 );
+                                  const QString& button1, const QString& button2, 
+                                  const int defaultButton = -1, const int escapeButton = -1 );
   static int            warning( QWidget* parent, const QString& title, const QString& text,
-                                const QString& button1, const QString& button2, 
-                                const int defaultButton = -1, const int escapeButton = -1 );
+                                 const QString& button1, const QString& button2, 
+                                 const int defaultButton = -1, const int escapeButton = -1 );
   static int            information( QWidget* parent, const QString& title, const QString& text,
-                                    const QString& button1, const QString& button2, 
-                                    const int defaultButton = -1, const int escapeButton = -1 );
+                                     const QString& button1, const QString& button2, 
+                                     const int defaultButton = -1, const int escapeButton = -1 );
   static int            question( QWidget* parent, const QString& title, const QString& text,
-                                 const QString& button1, const QString& button2, 
-                                 const int defaultButton = -1, const int escapeButton = -1 );
+                                  const QString& button1, const QString& button2, 
+                                  const int defaultButton = -1, const int escapeButton = -1 );
   
   // message boxes with three custom buttons
   static int            critical( QWidget* parent, const QString& title, const QString& text,
-                                 const QString& button1, const QString& button2, const QString& button3,
-                                 const int defaultButton = -1, const int escapeButton = -1 );
+                                  const QString& button1, const QString& button2, const QString& button3,
+                                  const int defaultButton = -1, const int escapeButton = -1 );
   static int            warning( QWidget* parent, const QString& title, const QString& text,
-                                const QString& button1, const QString& button2, const QString& button3,
-                                const int defaultButton = -1, const int escapeButton = -1 );
+                                 const QString& button1, const QString& button2, const QString& button3,
+                                 const int defaultButton = -1, const int escapeButton = -1 );
   static int            information( QWidget* parent, const QString& title, const QString& text,
-                                    const QString& button1, const QString& button2, const QString& button3,
-                                    const int defaultButton = -1, const int escapeButton = -1 );
+                                     const QString& button1, const QString& button2, const QString& button3,
+                                     const int defaultButton = -1, const int escapeButton = -1 );
   static int            question( QWidget* parent, const QString& title, const QString& text,
-                                 const QString& button1, const QString& button2, const QString& button3,
-                                 const int defaultButton = -1, const int escapeButton = -1 );
+                                  const QString& button1, const QString& button2, const QString& button3,
+                                  const int defaultButton = -1, const int escapeButton = -1 );
   
   // message boxes with four custom buttons
   static int            critical( QWidget* parent, const QString& title, const QString& text,
-                                 const QString& button1, const QString& button2,
-                                 const QString& button3, const QString& button4,
-                                 const int defaultButton = -1, const int escapeButton = -1 );
+                                  const QString& button1, const QString& button2,
+                                  const QString& button3, const QString& button4,
+                                  const int defaultButton = -1, const int escapeButton = -1 );
   static int            warning( QWidget* parent, const QString& title, const QString& text,
-                                const QString& button1, const QString& button2,
-                                const QString& button3, const QString& button4,
-                                const int defaultButton = -1, const int escapeButton = -1 );
+                                 const QString& button1, const QString& button2,
+                                 const QString& button3, const QString& button4,
+                                 const int defaultButton = -1, const int escapeButton = -1 );
   static int            information( QWidget* parent, const QString& title, const QString& text,
-                                    const QString& button1, const QString& button2,
-                                    const QString& button3, const QString& button4,
-                                    const int defaultButton = -1, const int escapeButton = -1 );
+                                     const QString& button1, const QString& button2,
+                                     const QString& button3, const QString& button4,
+                                     const int defaultButton = -1, const int escapeButton = -1 );
   static int            question( QWidget* parent, const QString& title, const QString& text,
-                                 const QString& button1, const QString& button2,
-                                 const QString& button3, const QString& button4,
-                                 const int defaultButton = -1, const int escapeButton = -1 );
+                                  const QString& button1, const QString& button2,
+                                  const QString& button3, const QString& button4,
+                                  const int defaultButton = -1, const int escapeButton = -1 );
   
   // message boxes with arbitrary number of buttons
   static int            critical( QWidget* parent, const QString& title, const QString& text, 
-                                 const int defaultButton, const int escapeButton, 
-                                 char*, ... );
+                                  const int defaultButton, const int escapeButton, 
+                                  char*, ... );
   static int            warning( QWidget* parent, const QString& title, const QString& text,
-                                const int defaultButton, const int escapeButton, 
-                                char*, ... );
+                                 const int defaultButton, const int escapeButton, 
+                                 char*, ... );
   static int            information( QWidget* parent, const QString& title, const QString& text,
-                                    const int defaultButton, const int escapeButton, 
-                                    char*, ... );
+                                     const int defaultButton, const int escapeButton, 
+                                     char*, ... );
   static int            question( QWidget* parent, const QString& title, const QString& text,
-                                 const int defaultButton, const int escapeButton, 
-                                 char*, ... );
+                                  const int defaultButton, const int escapeButton, 
+                                  char*, ... );
 
 private:
   class ButtonInfo
   {
   public:
     ButtonInfo( const int id, 
-               const QString& text, 
-               const ButtonRole role = ActionRole )
+                const QString& text, 
+                const ButtonRole role = ActionRole )
       : myId( id ), myText( text ), myRole( role ) {}
     int        id()   const { return myId;   }
     QString    text() const { return myText; }
@@ -142,10 +142,10 @@ private:
 
 private:
   static int          messageBox( SUIT_MessageBox::Icon icon, QWidget* parent, 
-                                 const QString& title, const QString& text, 
-                                 const ButtonInfos& lst, 
-                                 const int defaultButton = -1, 
-                                 const int escapeButton  = -1 );
+                                  const QString& title, const QString& text, 
+                                  const ButtonInfos& lst, 
+                                  const int defaultButton = -1, 
+                                  const int escapeButton  = -1 );
   static ButtonInfos  messageList( char*, va_list& );
 };
 
index 5b8595b8c24e52c1638ab2dbe92fe179e76d94f1..0999c163891b0baa1fbf565ee5cfb2b3354621b6 100755 (executable)
@@ -153,7 +153,7 @@ void SUIT_SelectionMgr::selectionChanged( SUIT_Selector* sel )
     {
       // Temporary action(to avoid selection of the objects which don't pass the filters):
       //if ( *it != sel )
-       (*it)->setSelected( newOwners );
+        (*it)->setSelected( newOwners );
     }
   }
   myIsSelChangeEnabled = true;
index 8848a2c868d24a35207f8ea42bc3413163d38442..c2f26426725c9f256551a064ee305693dd8000db 100755 (executable)
@@ -173,7 +173,7 @@ void SUIT_Session::insertApplication( SUIT_Application* app )
   connect( app, SIGNAL( applicationClosed( SUIT_Application* ) ),
            this, SLOT( onApplicationClosed( SUIT_Application* ) ) );
   connect( app, SIGNAL( activated( SUIT_Application* ) ), 
-                this, SLOT( onApplicationActivated( SUIT_Application* ) ) );
+                 this, SLOT( onApplicationActivated( SUIT_Application* ) ) );
 }
 
 /*!
@@ -254,7 +254,7 @@ void SUIT_Session::closeSession( int mode, int flags )
     {
       SUIT_Study* study = app->activeStudy();
       if ( study->isModified() && study->isSaved() )
-             study->saveDocument();
+              study->saveDocument();
     }
     else if ( mode == DONT_SAVE )
     {
index 6a72ad284b3769a6ebbb86f8f87f318588154b7e..1fcd3476623d824bf078892726153a1ee538a450 100755 (executable)
@@ -39,10 +39,10 @@ void SUIT_Tools::trace( const char* lpszLog, const char* lpszFormat, ... )
 
   tmpPath += QString( "Salome_trace" );
 
-  FILE*        pStream;
+  FILE* pStream;
   pStream = fopen( lpszLog ? lpszLog : (const char*)tmpPath.toLatin1(), "a" );
   if ( pStream ) 
-  {    
+  {     
     va_list argptr;
     va_start( argptr, lpszFormat );
     fprintf( pStream, "- Trace %s [%d] : %s", __FILE__, __LINE__, lpszFormat );
@@ -55,7 +55,7 @@ void SUIT_Tools::trace( const char* lpszLog, const char* lpszFormat, ... )
 /*! 
     Creates a rect with TopLeft = ( min(x1,x2), min(y1,y2) )
     and BottomRight = ( TopLeft + (x2-x1)(y2-y1) )    
-*/     
+*/      
 QRect SUIT_Tools::makeRect( const int x1, const int y1, const int x2, const int y2 )
 {  
   return QRect( qMin( x1, x2 ), qMin( y1, y2 ), qAbs( x2 - x1 ), qAbs( y2 - y1 ) );
index ef5f40b0d9a8a61eeaafd77c3d6130a82a2e0699..3c32c174d1650b6e89fff1ed6b2075a2b2d7a148 100755 (executable)
@@ -90,8 +90,8 @@ private:
   \param after tree item after each this one should be inserted
 */
 SUIT_TreeModel::TreeItem::TreeItem( SUIT_DataObject*          obj, 
-                                   SUIT_TreeModel::TreeItem* parent,
-                                   SUIT_TreeModel::TreeItem* after )
+                                    SUIT_TreeModel::TreeItem* parent,
+                                    SUIT_TreeModel::TreeItem* after )
 : myParent( parent ),
   myObj( obj )
 {
@@ -123,7 +123,7 @@ SUIT_TreeModel::TreeItem::~TreeItem()
   \param after tree item after each \a child should be inserted
 */
 void SUIT_TreeModel::TreeItem::insertChild( SUIT_TreeModel::TreeItem* child, 
-                                           SUIT_TreeModel::TreeItem* after )
+                                            SUIT_TreeModel::TreeItem* after )
 {
   if ( !child )
     return;
@@ -303,8 +303,8 @@ SUIT_TreeModel::ItemPtr SUIT_TreeModel::TreeSync::nullTrg() const
   \return created item
 */
 SUIT_TreeModel::ItemPtr SUIT_TreeModel::TreeSync::createItem( const ObjPtr&  obj,
-                                                             const ItemPtr& parent, 
-                                                             const ItemPtr& after ) const
+                                                              const ItemPtr& parent, 
+                                                              const ItemPtr& after ) const
 {
   ItemPtr item = myModel ? myModel->createItem( obj, parent, after ) : 0;
 
@@ -401,21 +401,21 @@ bool SUIT_TreeModel::TreeSync::needUpdate( const ItemPtr& item ) const
 /*      update = ( item->text( 0 ) != obj->name() ) || myBrowser->needToUpdateTexts( item );
 
       if ( !update ) { 
-       // 2. check pixmap (compare serialNumber()-s)
-       QPixmap objPix = obj->icon();
-       const QPixmap* itemPix = item->pixmap( 0 );
-       update = (  objPix.isNull() && (  itemPix && !itemPix->isNull() ) ) || 
-                ( !objPix.isNull() && ( !itemPix ||  itemPix->isNull() ) ); 
-       if ( !update && !objPix.isNull() && itemPix && !itemPix->isNull() ) {
-         int aIconW = objPix.width();
-         if( aIconW > 20 ) {
-           QWMatrix aM;
-           double aScale = 20.0 / aIconW;
-           aM.scale( aScale, aScale );
-           objPix = objPix.xForm( aM );
-         }
-         update = ( objPix.serialNumber() != itemPix->serialNumber() );
-       }
+        // 2. check pixmap (compare serialNumber()-s)
+        QPixmap objPix = obj->icon();
+        const QPixmap* itemPix = item->pixmap( 0 );
+        update = (  objPix.isNull() && (  itemPix && !itemPix->isNull() ) ) || 
+                 ( !objPix.isNull() && ( !itemPix ||  itemPix->isNull() ) ); 
+        if ( !update && !objPix.isNull() && itemPix && !itemPix->isNull() ) {
+          int aIconW = objPix.width();
+          if( aIconW > 20 ) {
+            QWMatrix aM;
+            double aScale = 20.0 / aIconW;
+            aM.scale( aScale, aScale );
+            objPix = objPix.xForm( aM );
+          }
+          update = ( objPix.serialNumber() != itemPix->serialNumber() );
+        }
       }*/
     }
   }
@@ -468,9 +468,9 @@ SUIT_TreeModel::~SUIT_TreeModel()
 {
   if ( autoDeleteTree() ) {
     SUIT_DataObject::disconnect( SIGNAL( inserted( SUIT_DataObject*, SUIT_DataObject* ) ),
-                                this, SLOT( onInserted( SUIT_DataObject*, SUIT_DataObject* ) ) );
+                                 this, SLOT( onInserted( SUIT_DataObject*, SUIT_DataObject* ) ) );
     SUIT_DataObject::disconnect( SIGNAL( removed( SUIT_DataObject*, SUIT_DataObject* ) ),
-                                this, SLOT( onRemoved( SUIT_DataObject*, SUIT_DataObject* ) ) );
+                                 this, SLOT( onRemoved( SUIT_DataObject*, SUIT_DataObject* ) ) );
     delete myRoot;
   }
 
@@ -488,20 +488,20 @@ void SUIT_TreeModel::registerColumn( const int group_id, const QString& name, co
   bool found = false;
   for( int i=0, n=myColumns.size(); i<n && !found; i++ )
     if( name==myColumns[i].myName )
-       {
-         myColumns[i].myIds.insert( group_id, custom_id );
-         found = true;
-       }
+        {
+          myColumns[i].myIds.insert( group_id, custom_id );
+          found = true;
+        }
   if( !found )
   {
-       ColumnInfo inf;
-       inf.myName = name;
-       inf.myIds.insert( group_id, custom_id );
-       inf.myAppropriate = Qtx::Shown;
-       int n = myColumns.size();
-       myColumns.resize( n+1 );
-       myColumns[n] = inf;
-       reset();
+        ColumnInfo inf;
+        inf.myName = name;
+        inf.myIds.insert( group_id, custom_id );
+        inf.myAppropriate = Qtx::Shown;
+        int n = myColumns.size();
+        myColumns.resize( n+1 );
+        myColumns[n] = inf;
+        reset();
   }
 }
 
@@ -520,14 +520,14 @@ void SUIT_TreeModel::unregisterColumn( const int group_id, const QString& name )
 {
   for( int i=0, n=myColumns.size(); i<n; i++ )
     if( myColumns[i].myName==name )
-       {
-         myColumns[i].myIds.remove( group_id );
-         if( myColumns[i].myIds.isEmpty() )
-         {
-           myColumns.remove( i );
-               reset();
-         }
-         break;
+        {
+          myColumns[i].myIds.remove( group_id );
+          if( myColumns[i].myIds.isEmpty() )
+          {
+            myColumns.remove( i );
+                reset();
+          }
+          break;
     }
 }
 
@@ -541,10 +541,10 @@ void SUIT_TreeModel::setColumnIcon( const QString& name, const QPixmap& icon )
 {
   for( int i=0, n=myColumns.size(); i<n; i++ )
     if( myColumns[i].myName==name )
-       {
-         myColumns[i].myIcon = icon;
-         break;
-       }
+        {
+          myColumns[i].myIcon = icon;
+          break;
+        }
 }
 
 /*!
@@ -558,10 +558,10 @@ QPixmap SUIT_TreeModel::columnIcon( const QString& name ) const
   QPixmap res;
   for( int i=0, n=myColumns.size(); i<n; i++ )
     if( myColumns[i].myName==name )
-       {
-         res = myColumns[i].myIcon;
-         break;
-       }
+        {
+          res = myColumns[i].myIcon;
+          break;
+        }
   return res;
 }
 
@@ -603,10 +603,10 @@ Qtx::Appropriate SUIT_TreeModel::appropriate( const QString& name ) const
   Qtx::Appropriate appr = Qtx::Shown;
   for( int i=0, n=myColumns.size(); i<n; i++ )
     if( myColumns[i].myName==name )
-       {
-         appr = myColumns[i].myAppropriate;
-         break;
-       }
+        {
+          appr = myColumns[i].myAppropriate;
+          break;
+        }
   return appr;
 }
 
@@ -633,9 +633,9 @@ void SUIT_TreeModel::setRoot( SUIT_DataObject* r )
 
   if ( autoDeleteTree() ) {
     SUIT_DataObject::disconnect( SIGNAL( inserted( SUIT_DataObject*, SUIT_DataObject* ) ),
-                                this, SLOT( onInserted( SUIT_DataObject*, SUIT_DataObject* ) ) );
+                                 this, SLOT( onInserted( SUIT_DataObject*, SUIT_DataObject* ) ) );
     SUIT_DataObject::disconnect( SIGNAL( removed( SUIT_DataObject*, SUIT_DataObject* ) ),
-                                this, SLOT( onRemoved( SUIT_DataObject*, SUIT_DataObject* ) ) );
+                                 this, SLOT( onRemoved( SUIT_DataObject*, SUIT_DataObject* ) ) );
     delete myRoot;
   }
 
@@ -678,7 +678,7 @@ QVariant SUIT_TreeModel::data( const QModelIndex& index, int role ) const
   if ( obj )
   {
     switch ( role )
-       {
+        {
     case DisplayRole:
       // data object text for the specified column
       val = obj->text( id ); 
@@ -711,7 +711,7 @@ QVariant SUIT_TreeModel::data( const QModelIndex& index, int role ) const
       // data background color for the specified column
       c = obj->color( SUIT_DataObject::Background, id );
       if( !c.isValid() ) // default value
-           c = QApplication::palette().color( QPalette::Base );
+            c = QApplication::palette().color( QPalette::Base );
       c.setAlpha( 0 );
       val = c; 
       break;
@@ -719,42 +719,42 @@ QVariant SUIT_TreeModel::data( const QModelIndex& index, int role ) const
       // data foreground (text) color for the specified column
       c = obj->color( SUIT_DataObject::Foreground, id );
       if( !c.isValid() ) // default value
-           c = QApplication::palette().color( QPalette::Foreground );
+            c = QApplication::palette().color( QPalette::Foreground );
       val = c; 
       break;
     case BaseColorRole:
       // editor background color for the specified column
       c = obj->color( SUIT_DataObject::Base, id );
       if( !c.isValid() ) // default value
-           c = QApplication::palette().color( QPalette::Base );
+            c = QApplication::palette().color( QPalette::Base );
       val = c; 
       break;
     case TextColorRole:
       // editor foreground (text) color for the specified column
       c = obj->color( SUIT_DataObject::Text, id );
       if( !c.isValid() ) // default value
-           c = QApplication::palette().color( QPalette::Text );
+            c = QApplication::palette().color( QPalette::Text );
       val = c; 
       break;
     case HighlightRole:
       // adta object highlighted background color for the specified column
       c = obj->color( SUIT_DataObject::Highlight, id );
       if( !c.isValid() ) // default value
-           c = QApplication::palette().color( QPalette::Highlight );
+            c = QApplication::palette().color( QPalette::Highlight );
       val = c; 
       break;
     case HighlightedTextRole:
       // data object highlighted foreground (text) color for the specified column
       c = obj->color( SUIT_DataObject::HighlightedText, id );
       if( !c.isValid() ) // default value
-           c = QApplication::palette().color( QPalette::HighlightedText );
+            c = QApplication::palette().color( QPalette::HighlightedText );
       val = c; 
       break;
     case CheckStateRole:
       // data object checked state for the specified column
       // NOTE! three-state check is not supported currently
       if( obj->isCheckable( id ) )
-           val = obj->isOn( id ) ? Qt::Checked : Qt::Unchecked; 
+            val = obj->isOn( id ) ? Qt::Checked : Qt::Unchecked; 
       break;
     case SizeHintRole:
       // data size hint
@@ -776,7 +776,7 @@ QVariant SUIT_TreeModel::data( const QModelIndex& index, int role ) const
   \sa data()
 */
 bool SUIT_TreeModel::setData( const QModelIndex& index, 
-                             const QVariant& value, int role )
+                              const QVariant& value, int role )
 {
   if ( index.isValid() && value.isValid() ) {
     SUIT_DataObject* obj = object( index );
@@ -784,15 +784,15 @@ bool SUIT_TreeModel::setData( const QModelIndex& index,
       // NOTE! only 'check state' data is supported by default
       switch ( role ) {
       case CheckStateRole:
-       // checked state
-       if ( obj->isCheckable( index.column() ) ) {
-         obj->setOn( value.toBool(), index.column() );
-         emit( dataChanged( index, index ) );
-         return true;
-       }
-       break;
+        // checked state
+        if ( obj->isCheckable( index.column() ) ) {
+          obj->setOn( value.toBool(), index.column() );
+          emit( dataChanged( index, index ) );
+          return true;
+        }
+        break;
       default:
-       break;
+        break;
       }
     }
   }
@@ -842,7 +842,7 @@ QVariant SUIT_TreeModel::headerData( int column, Qt::Orientation orientation, in
   if ( root() && orientation == Qt::Horizontal )
   {
     switch ( role )
-       {
+        {
     case DisplayRole:
       // column title
       d = myColumns[column].myName;
@@ -870,7 +870,7 @@ QVariant SUIT_TreeModel::headerData( int column, Qt::Orientation orientation, in
   \return model index
 */
 QModelIndex SUIT_TreeModel::index( int row, int column, 
-                                  const QModelIndex& parent ) const
+                                   const QModelIndex& parent ) const
 {
   if( hasIndex( row, column, parent ) )
   {
@@ -879,7 +879,7 @@ QModelIndex SUIT_TreeModel::index( int row, int column,
     {
       TreeItem* childItem = parentItem->child( row );
       if( childItem )
-       return createIndex( row, column, childItem );
+        return createIndex( row, column, childItem );
     }
   }
   return QModelIndex();
@@ -1006,16 +1006,16 @@ void SUIT_TreeModel::setAutoUpdate( const bool on )
     return;
 
   SUIT_DataObject::disconnect( SIGNAL( inserted( SUIT_DataObject*, SUIT_DataObject* ) ),
-                              this, SLOT( onInserted( SUIT_DataObject*, SUIT_DataObject* ) ) );
+                               this, SLOT( onInserted( SUIT_DataObject*, SUIT_DataObject* ) ) );
   SUIT_DataObject::disconnect( SIGNAL( removed( SUIT_DataObject*, SUIT_DataObject* ) ),
-                              this, SLOT( onRemoved( SUIT_DataObject*, SUIT_DataObject* ) ) );
+                               this, SLOT( onRemoved( SUIT_DataObject*, SUIT_DataObject* ) ) );
   myAutoUpdate = on;
 
   if ( myAutoUpdate ) {
     SUIT_DataObject::connect( SIGNAL( inserted( SUIT_DataObject*, SUIT_DataObject* ) ),
-                             this, SLOT( onInserted( SUIT_DataObject*, SUIT_DataObject* ) ) );
+                              this, SLOT( onInserted( SUIT_DataObject*, SUIT_DataObject* ) ) );
     SUIT_DataObject::connect( SIGNAL( removed( SUIT_DataObject*, SUIT_DataObject* ) ),
-                             this, SLOT( onRemoved( SUIT_DataObject*, SUIT_DataObject* ) ) );
+                              this, SLOT( onRemoved( SUIT_DataObject*, SUIT_DataObject* ) ) );
 
     updateTree();
   }
@@ -1094,8 +1094,8 @@ void SUIT_TreeModel::updateTree( SUIT_DataObject* obj )
     return;
 
   synchronize<ObjPtr,ItemPtr,SUIT_TreeModel::TreeSync>( obj, 
-                                                       treeItem( obj ), 
-                                                       SUIT_TreeModel::TreeSync( this ) );
+                                                        treeItem( obj ), 
+                                                        SUIT_TreeModel::TreeSync( this ) );
   emit modelUpdated();
 }
 
@@ -1105,14 +1105,14 @@ void SUIT_TreeModel::updateTree( SUIT_DataObject* obj )
 void SUIT_TreeModel::initialize()
 {
   SUIT_DataObject::disconnect( SIGNAL( inserted( SUIT_DataObject*, SUIT_DataObject* ) ),
-                              this, SLOT( onInserted( SUIT_DataObject*, SUIT_DataObject* ) ) );
+                               this, SLOT( onInserted( SUIT_DataObject*, SUIT_DataObject* ) ) );
   SUIT_DataObject::disconnect( SIGNAL( removed( SUIT_DataObject*, SUIT_DataObject* ) ),
-                              this, SLOT( onRemoved( SUIT_DataObject*, SUIT_DataObject* ) ) );
+                               this, SLOT( onRemoved( SUIT_DataObject*, SUIT_DataObject* ) ) );
   if ( autoUpdate() ) {
     SUIT_DataObject::connect( SIGNAL( inserted( SUIT_DataObject*, SUIT_DataObject* ) ),
-                             this, SLOT( onInserted( SUIT_DataObject*, SUIT_DataObject* ) ) );
+                              this, SLOT( onInserted( SUIT_DataObject*, SUIT_DataObject* ) ) );
     SUIT_DataObject::connect( SIGNAL( removed( SUIT_DataObject*, SUIT_DataObject* ) ),
-                             this, SLOT( onRemoved( SUIT_DataObject*, SUIT_DataObject* ) ) );
+                              this, SLOT( onRemoved( SUIT_DataObject*, SUIT_DataObject* ) ) );
   }
 
   myItems.clear(); // ????? is it really necessary
@@ -1182,8 +1182,8 @@ SUIT_DataObject* SUIT_TreeModel::object( const SUIT_TreeModel::TreeItem* item )
   \return created tree item or 0 if item could not be created
 */
 SUIT_TreeModel::TreeItem* SUIT_TreeModel::createItem( SUIT_DataObject* obj,
-                                                     SUIT_TreeModel::TreeItem* parent, 
-                                                     SUIT_TreeModel::TreeItem* after )
+                                                      SUIT_TreeModel::TreeItem* parent, 
+                                                      SUIT_TreeModel::TreeItem* after )
 {
   if ( !obj )
     return 0;
@@ -1647,8 +1647,8 @@ SUIT_ItemDelegate::SUIT_ItemDelegate( QObject* parent )
   \param index model index being rendered
 */
 void SUIT_ItemDelegate::paint( QPainter* painter, 
-                              const QStyleOptionViewItem& option,
-                              const QModelIndex& index ) const
+                               const QStyleOptionViewItem& option,
+                               const QModelIndex& index ) const
 {
   QStyleOptionViewItem opt = option;
   if ( index.isValid() ) {
index 5c1565ce6ec11e9e171ae1e7c5779ee998b96b07..59828481ef040c0542cb1c3a67ead2e112cbbd6c 100755 (executable)
@@ -173,9 +173,9 @@ private:
   typedef struct
   {
     QString myName;
-       QMap<int,int> myIds;
-       QPixmap myIcon;
-       Qtx::Appropriate myAppropriate;
+        QMap<int,int> myIds;
+        QPixmap myIcon;
+        Qtx::Appropriate myAppropriate;
 
   } ColumnInfo;
   
@@ -247,8 +247,8 @@ public:
   SUIT_ItemDelegate( QObject* = 0 );
   
   virtual void paint( QPainter*, const QStyleOptionViewItem&,
-                     const QModelIndex& ) const;
-                     
+                      const QModelIndex& ) const;
+                      
   virtual QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const;
 };
 
index 1369fde22b819cac0aa26a16e67592e207d97492..d2916992b8f0ce116b8975f6c2ad3c9c309f60a1 100644 (file)
@@ -54,17 +54,17 @@ TrgItem synchronize( const SrcItem&, const TrgItem&, const TreeData& );
 
 template <class SrcItem, class TrgItem, class TreeData>
 QList< DiffItem<SrcItem,TrgItem> > diffSiblings( const SrcItem&, 
-                                                const TrgItem&, 
-                                                const TreeData& );
+                                                 const TrgItem&, 
+                                                 const TreeData& );
 
 template <class SrcItem, class TrgItem, class TreeData>
 TrgItem createSubTree( const SrcItem&, const TrgItem&, const TrgItem&, const TreeData& );
 
 template <class SrcItem, class TrgItem, class TreeData>
 const typename QList<TrgItem>::const_iterator findEqual( const SrcItem& it,
-                                                        const typename QList<TrgItem>::const_iterator& first,
-                                                        const typename QList<TrgItem>::const_iterator& last,
-                                                        const TreeData& td );
+                                                         const typename QList<TrgItem>::const_iterator& first,
+                                                         const typename QList<TrgItem>::const_iterator& last,
+                                                         const TreeData& td );
 
 
 //
@@ -129,24 +129,24 @@ TrgItem synchronize( const SrcItem& r1, const TrgItem& r2, const TreeData& td )
     for ( ; anIt != aLast; anIt++ ) {
       const DiffItem<SrcItem,TrgItem>& item = *anIt;
       if ( item.mySrc == td.nullSrc() ) {
-       if ( item.myTrg == td.nullTrg() )
-         qDebug( "error: both null" );
+        if ( item.myTrg == td.nullTrg() )
+          qDebug( "error: both null" );
         else
-         // delete item
-         td.deleteItemWithChildren( item.myTrg );
+          // delete item
+          td.deleteItemWithChildren( item.myTrg );
       }
       else {
-       if ( item.myTrg == td.nullTrg() ) {
-         // add item (recursively)
-         TrgItem nitem = createSubTree( item.mySrc, r2, lastItem, td );
-         if ( nitem != td.nullTrg() )
-           lastItem = nitem;
-       }
+        if ( item.myTrg == td.nullTrg() ) {
+          // add item (recursively)
+          TrgItem nitem = createSubTree( item.mySrc, r2, lastItem, td );
+          if ( nitem != td.nullTrg() )
+            lastItem = nitem;
+        }
         else {
-         // update item
-         synchronize( item.mySrc, item.myTrg, td );
-         lastItem = item.myTrg;
-       }
+          // update item
+          synchronize( item.mySrc, item.myTrg, td );
+          lastItem = item.myTrg;
+        }
       }
     }
     return r2;
@@ -177,9 +177,9 @@ TrgItem synchronize( const SrcItem& r1, const TrgItem& r2, const TreeData& td )
 */
 template <class SrcItem, class TrgItem, class TreeData>
 const typename QList<TrgItem>::const_iterator findEqual( const SrcItem& it,
-                                                        const typename QList<TrgItem>::const_iterator& first,
-                                                        const typename QList<TrgItem>::const_iterator& last,
-                                                        const TreeData& td )
+                                                         const typename QList<TrgItem>::const_iterator& first,
+                                                         const typename QList<TrgItem>::const_iterator& last,
+                                                         const TreeData& td )
 {
   typename QList<TrgItem>::const_iterator cur = first;
   for ( ; cur != last; cur++ ) {
@@ -199,7 +199,7 @@ const typename QList<TrgItem>::const_iterator findEqual( const SrcItem& it,
 */
 template <class SrcItem, class TrgItem, class TreeData>
 QList< DiffItem<SrcItem,TrgItem> > diffSiblings( const SrcItem& src, const TrgItem& trg,
-                                                const TreeData& td )
+                                                 const TreeData& td )
 {
   //if( src==td.nullSrc() || trg==td.nullTrg() )
   //  return;
@@ -219,10 +219,10 @@ QList< DiffItem<SrcItem,TrgItem> > diffSiblings( const SrcItem& src, const TrgIt
       // target is found
       // mark all items before found one as "to be deleted"
       for ( typename QList<TrgItem>::const_iterator it = cur; it != f; it++ ) {
-       DiffItem<SrcItem,TrgItem> ndiff;
-       ndiff.mySrc = td.nullSrc();
-       ndiff.myTrg = *it;        // delete item
-       d.append( ndiff );
+        DiffItem<SrcItem,TrgItem> ndiff;
+        ndiff.mySrc = td.nullSrc();
+        ndiff.myTrg = *it;        // delete item
+        d.append( ndiff );
       }
       cur = f;
       DiffItem<SrcItem,TrgItem> ndiff;
@@ -261,7 +261,7 @@ QList< DiffItem<SrcItem,TrgItem> > diffSiblings( const SrcItem& src, const TrgIt
 */
 template <class SrcItem, class TrgItem, class TreeData>
 TrgItem createSubTree( const SrcItem& src, const TrgItem& parent,
-                      const TrgItem& after, const TreeData& td )
+                       const TrgItem& after, const TreeData& td )
 {
   if ( src == td.nullSrc() )
     return td.nullTrg();
index baff2049ef9375f87d0539d085884e2a1a616caf..dbc23627d3f30fda49f6552ce07c11d030b13b1c 100755 (executable)
@@ -44,7 +44,7 @@ class SUIT_ViewManager;
  */
 class SUIT_EXPORT SUIT_ViewModel : public QObject
 {
-       Q_OBJECT
+        Q_OBJECT
 public:
   enum HotOperation { PAN, ZOOM, ROTATE, FIT_AREA };
 
@@ -64,9 +64,9 @@ public:
   virtual void      contextMenuPopup( QMenu* ) {}
 
   static void       setHotButton( HotOperation theOper, Qt::KeyboardModifier theState,
-                                 Qt::MouseButton theButton );
+                                  Qt::MouseButton theButton );
   static void       getHotButton( HotOperation theOper, Qt::KeyboardModifier& theState,
-                                 Qt::MouseButton& theButton );
+                                  Qt::MouseButton& theButton );
 
 protected:
   SUIT_ViewManager* myViewManager;
index 8c507dafdcb1c43e07657692b4f5de9d9b143bc3..e0d3df7934be275c94f845bccb831a32a7785019 100755 (executable)
@@ -184,11 +184,11 @@ bool SUIT_ViewWindow::event( QEvent* e )
       QString fileName = app->getFileName( false, QString(), filter(), tr( "TLT_DUMP_VIEW" ), 0 );
       if ( !fileName.isEmpty() )
       {
-             QString fmt = SUIT_Tools::extension( fileName ).toUpper();
-             bOk = dumpViewToFormat( im, fileName, fmt );
+              QString fmt = SUIT_Tools::extension( fileName ).toUpper();
+              bOk = dumpViewToFormat( im, fileName, fmt );
       }
       else
-             bOk = true; // cancelled
+              bOk = true; // cancelled
     }
     if ( !bOk )
       SUIT_MessageBox::critical( this, tr( "ERROR" ), tr( "ERR_CANT_DUMP_VIEW" ) );
index b534f56839283952192baea9c5593c926ab0e821..604eff9c55835ed7f13aa6f17d65d4bed7ace9e3 100644 (file)
@@ -201,9 +201,9 @@ int main( int argc, char* argv[] )
       iniFormat = true;
     else if ( !strcmp( argv[i], "--nosplash") )
       noSplash = true;
-       else if ( !strcmp( argv[i], "--uselicense" ) )
+        else if ( !strcmp( argv[i], "--uselicense" ) )
       useLicense = true;
-       else
+        else
       argList.append( QString( argv[i] ) );
   }
 
@@ -250,31 +250,31 @@ int main( int argc, char* argv[] )
     {
       if ( resMgr )
       {
-       resMgr->loadLanguage( false );
-
-       splash = QtxSplash::splash( QPixmap() );
-       splash->readSettings( resMgr );
-       if ( splash->pixmap().isNull() ) {
-         delete splash;
-         splash = 0;
-       }
-       else {
-         QString appName    = QObject::tr( "APP_NAME" ).trimmed();
-         QString appVersion = QObject::tr( "APP_VERSION" ).trimmed();
-         if ( appVersion == "APP_VERSION" )
-         {
-           if ( appName == "APP_NAME" || appName.toLower() == "salome" )
-             appVersion = salomeVersion();
-           else
-             appVersion = "";
-         }
-         splash->setOption( "%A", appName );
-         splash->setOption( "%V", QObject::tr( "ABOUT_VERSION" ).arg( appVersion ) );
-         splash->setOption( "%L", QObject::tr( "ABOUT_LICENSE" ) );
-         splash->setOption( "%C", QObject::tr( "ABOUT_COPYRIGHT" ) );
-         splash->show();
-         QApplication::instance()->processEvents();
-       }
+        resMgr->loadLanguage( false );
+
+        splash = QtxSplash::splash( QPixmap() );
+        splash->readSettings( resMgr );
+        if ( splash->pixmap().isNull() ) {
+          delete splash;
+          splash = 0;
+        }
+        else {
+          QString appName    = QObject::tr( "APP_NAME" ).trimmed();
+          QString appVersion = QObject::tr( "APP_VERSION" ).trimmed();
+          if ( appVersion == "APP_VERSION" )
+          {
+            if ( appName == "APP_NAME" || appName.toLower() == "salome" )
+              appVersion = salomeVersion();
+            else
+              appVersion = "";
+          }
+          splash->setOption( "%A", appName );
+          splash->setOption( "%V", QObject::tr( "ABOUT_VERSION" ).arg( appVersion ) );
+          splash->setOption( "%L", QObject::tr( "ABOUT_LICENSE" ) );
+          splash->setOption( "%C", QObject::tr( "ABOUT_COPYRIGHT" ) );
+          splash->show();
+          QApplication::instance()->processEvents();
+        }
       }
     }
 
@@ -300,13 +300,13 @@ int main( int argc, char* argv[] )
     {
       Style_Salome::initialize( theApp->resourceMgr() );
       if ( theApp->resourceMgr()->booleanValue( "Style", "use_salome_style", true ) )
-       Style_Salome::apply();
+        Style_Salome::apply();
 
       if ( !noExceptHandling )
         app.setHandler( aSession->handler() );
 
       if ( splash )
-       splash->finish( theApp->desktop() );
+        splash->finish( theApp->desktop() );
 
       result = app.exec();
     }
index b0c4f91675599668a61d6f237b82230ef3c2cfba..073fe0fc3327bebc0ad8ca7358eb50a0158866c9 100644 (file)
@@ -93,7 +93,7 @@ bool SUITApp_Application::notify( QObject* receiver, QEvent* e )
 */
 void SUITApp_Application::setHandler( SUIT_ExceptionHandler* hand )
 {
-       myExceptHandler = hand;
+        myExceptHandler = hand;
 }
 
 /*!
index 4921334d086484c0933d0ca54b6fcf6512ccea1e..89e7e76ab1408be0a2fc19b3a0340051c250d5e8 100644 (file)
@@ -54,8 +54,8 @@ public:
 
   virtual bool notify( QObject* receiver, QEvent* e );
 
-       SUIT_ExceptionHandler* handler() const;
-       void                   setHandler( SUIT_ExceptionHandler* );
+        SUIT_ExceptionHandler* handler() const;
+        void                   setHandler( SUIT_ExceptionHandler* );
 
 private:
   SUIT_ExceptionHandler* myExceptHandler;
index 2a08d294b278a8dd4f403fef3fee83db94a48a9d..9dd947fdcd92e42aa2765b2cbfcb73851f65948b 100755 (executable)
@@ -111,14 +111,14 @@ void SUPERVGraph_ViewFrame::createActions()
 
   // Panning
   aAction = new QtxAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "SUPERVGraph", tr( "ICON_SUPERVGraph_PAN" ) ),
-                         tr( "MNU_PAN_VIEW" ), 0, this);
+                          tr( "MNU_PAN_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_PAN_VIEW"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onViewPan()));
   myActionsMap[ PanId ] = aAction;
 
   // Reset
   aAction = new QtxAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "SUPERVGraph", tr( "ICON_SUPERVGraph_RESET" ) ),
-                         tr( "MNU_RESET_VIEW" ), 0, this);
+                          tr( "MNU_RESET_VIEW" ), 0, this);
   aAction->setStatusTip(tr("DSC_RESET_VIEW"));
   connect(aAction, SIGNAL(activated()), this, SLOT(onViewReset()));
   myActionsMap[ ResetId ] = aAction;
@@ -308,7 +308,7 @@ void SUPERVGraph_ViewFrame::onAdjustTrihedron()
   \param name - new name
 */
 void SUPERVGraph_ViewFrame::rename( const Handle(SALOME_InteractiveObject)& IObject, 
-                                   QString newName )
+                                    QString newName )
 {
 //  MESSAGE ( "SUPERVGraph_ViewFrame::rename" )
 }
@@ -329,7 +329,7 @@ void SUPERVGraph_ViewFrame::unHighlightAll()
   \param update - update current viewer
 */
 void SUPERVGraph_ViewFrame::highlight( const Handle(SALOME_InteractiveObject)& IObject, 
-                                      bool highlight, bool immediatly ) 
+                                       bool highlight, bool immediatly ) 
 {
 //  MESSAGE ( "SUPERVGraph_ViewFrame::highlight" )
 }
index 8f5dc645cef71bd668a9d1bbd8912ee780ad479b..2bbf9d8d76b1e6d0e8f85c647059d4b842f294a5 100755 (executable)
@@ -79,17 +79,17 @@ class SUPERVGRAPH_EXPORT SUPERVGraph_ViewFrame : public SUIT_ViewWindow {
   
   /*  interactive object management */
   void                           highlight( const Handle(SALOME_InteractiveObject)& IObject, 
-                                           bool highlight, bool immediatly = true );
+                                            bool highlight, bool immediatly = true );
   void                           unHighlightAll();
   void                           rename( const Handle(SALOME_InteractiveObject)& IObject,
-                                        QString newName );
+                                         QString newName );
   bool                           isInViewer( const Handle(SALOME_InteractiveObject)& IObject );
   bool                           isVisible( const Handle(SALOME_InteractiveObject)& IObject );
   
   /* selection */
   Handle(SALOME_InteractiveObject) FindIObject(const char* Entry) { Handle(SALOME_InteractiveObject) o; return o; };
 
-  /* display */                
+  /* display */         
   void           Display(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly = true){};
   void           DisplayOnly(const Handle(SALOME_InteractiveObject)& IObject){};
   void           Erase(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly = true){};
index cf50f7e26ee262e43e4206053e5d8cddc17cde16..980eaa1379209e2ff046d0d861215ff8c18c1776 100644 (file)
@@ -29,8 +29,8 @@ int SUPERVGraph_ViewManager::myMaxId = 0;
   Constructor
 */
 SUPERVGraph_ViewManager::SUPERVGraph_ViewManager( SUIT_Study* theStudy, 
-                                                 SUIT_Desktop* theDesktop, 
-                                                 SUIT_ViewModel* theViewModel )
+                                                  SUIT_Desktop* theDesktop, 
+                                                  SUIT_ViewModel* theViewModel )
   : SUIT_ViewManager( theStudy, theDesktop, theViewModel )
 {
   myId = ++myMaxId;
index 07f52de151e73c61f0e725437420587718a4168e..b85f7c26f27be5214d88839eee425c7ce486b045 100644 (file)
@@ -81,8 +81,8 @@ namespace
 {
   int
   GetEdgeId(SALOME_Actor* theActor,
-           vtkPicker* thePicker, 
-           int theObjId)
+            vtkPicker* thePicker, 
+            int theObjId)
   {
     int anEdgeId = 0;
     if (vtkCell* aPickedCell = theActor->GetElemCell(theObjId)) {
@@ -90,15 +90,15 @@ namespace
       thePicker->GetPickPosition(aPickPosition);
       vtkFloatingPointType aMinDist = 1000000.0, aDist = 0;
       for (int i = 0, iEnd = aPickedCell->GetNumberOfEdges(); i < iEnd; i++){
-       if(vtkLine* aLine = vtkLine::SafeDownCast(aPickedCell->GetEdge(i))){
-         int subId;  
-         vtkFloatingPointType pcoords[3], closestPoint[3], weights[3];
-         aLine->EvaluatePosition(aPickPosition,closestPoint,subId,pcoords,aDist,weights);
-         if (aDist < aMinDist) {
-           aMinDist = aDist;
-           anEdgeId = -1 - i;
-         }
-       }
+        if(vtkLine* aLine = vtkLine::SafeDownCast(aPickedCell->GetEdge(i))){
+          int subId;  
+          vtkFloatingPointType pcoords[3], closestPoint[3], weights[3];
+          aLine->EvaluatePosition(aPickPosition,closestPoint,subId,pcoords,aDist,weights);
+          if (aDist < aMinDist) {
+            aMinDist = aDist;
+            anEdgeId = -1 - i;
+          }
+        }
       }
     }
     return anEdgeId;
@@ -107,8 +107,8 @@ namespace
   inline
   bool
   CheckDimensionId(Selection_Mode theMode, 
-                  SALOME_Actor *theActor, 
-                  vtkIdType theObjId)
+                   SALOME_Actor *theActor, 
+                   vtkIdType theObjId)
   {
     switch(theMode){
     case CellSelection:
@@ -202,8 +202,8 @@ SALOME_Actor
 
   QColor aForegroundColor = aResourceMgr->colorValue( "VTKViewer", "group_names_text_color", Qt::white );
   myNameActor->SetForegroundColor(aForegroundColor.redF(),
-                                 aForegroundColor.greenF(),
-                                 aForegroundColor.blueF());
+                                  aForegroundColor.greenF(),
+                                  aForegroundColor.blueF());
 
   vtkFloatingPointType aGroupNamesTransparency = 0.5;
   aGroupNamesTransparency = aResourceMgr->doubleValue( "VTKViewer", "group_names_transparency", aGroupNamesTransparency );
@@ -257,7 +257,7 @@ void
 SALOME_Actor
 ::setName(const char* theName)
 {
-  if(hasIO())  
+  if(hasIO())   
     myIO->setName(theName);
   myNameActor->SetText(theName);
   Superclass::setName(theName);
@@ -348,8 +348,8 @@ SALOME_Actor
 void
 SALOME_Actor
 ::SetPosition(vtkFloatingPointType _arg1, 
-             vtkFloatingPointType _arg2, 
-             vtkFloatingPointType _arg3)
+              vtkFloatingPointType _arg2, 
+              vtkFloatingPointType _arg3)
 {
   Superclass::SetPosition(_arg1,_arg2,_arg3);
 
@@ -430,20 +430,20 @@ SALOME_Actor
       mySelector->GetIndex( getIO(), aMapIndex );
       switch( mySelectionMode ){
       case NodeSelection:
-       myHighlightActor->GetProperty()->SetRepresentationToPoints();
-       myHighlightActor->MapPoints( this, aMapIndex );
-       break;
+        myHighlightActor->GetProperty()->SetRepresentationToPoints();
+        myHighlightActor->MapPoints( this, aMapIndex );
+        break;
       case EdgeOfCellSelection:
-       myHighlightActor->GetProperty()->SetRepresentationToWireframe();
-       myHighlightActor->MapEdge( this, aMapIndex );
-       break;
+        myHighlightActor->GetProperty()->SetRepresentationToWireframe();
+        myHighlightActor->MapEdge( this, aMapIndex );
+        break;
       case CellSelection:
       case EdgeSelection:
       case FaceSelection:
       case VolumeSelection:
-       myHighlightActor->GetProperty()->SetRepresentationToSurface();
-       myHighlightActor->MapCells( this, aMapIndex );
-       break;
+        myHighlightActor->GetProperty()->SetRepresentationToSurface();
+        myHighlightActor->MapCells( this, aMapIndex );
+        break;
       }
       myHighlightActor->SetVisibility( GetVisibility() && theIsHighlight );
     }
@@ -474,8 +474,8 @@ SALOME_Actor
 bool
 SALOME_Actor
 ::PreHighlight(vtkInteractorStyle *theInteractorStyle, 
-              SVTK_SelectionEvent* theSelectionEvent,
-              bool theIsHighlight)
+               SVTK_SelectionEvent* theSelectionEvent,
+               bool theIsHighlight)
 {
   if ( !GetPickable() )
     return false;
@@ -499,8 +499,8 @@ SALOME_Actor
     theActors->InitTraversal();
     while( vtkActor *ac = theActors->GetNextActor() )
       if( SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( ac ) )
-       if( anActor->hasIO() && myIO->isSame( anActor->getIO() ) )
-         anActor->SetPreSelected( false );
+        if( anActor->hasIO() && myIO->isSame( anActor->getIO() ) )
+          anActor->SetPreSelected( false );
 
   }else{
     switch(aSelectionMode) {
@@ -511,21 +511,21 @@ SALOME_Actor
       
       int aVtkId = myPointPicker->GetPointId();
       if( aVtkId >= 0 && mySelector->IsValid( this, aVtkId, true ) ) {
-       int anObjId = GetNodeObjId( aVtkId );
-       myIsPreselected = (anObjId >= 0);
-       if(myIsPreselected){
-         const TColStd_IndexedMapOfInteger& aMapIndex = myPreHighlightActor->GetMapIndex();
-         int anExtent = aMapIndex.Extent();
-         anIsChanged |= (anExtent == 0 || anExtent > 0 && anObjId != aMapIndex(1));
-         if(anIsChanged){
-           TColStd_IndexedMapOfInteger aMapIndex;
-           aMapIndex.Add( anObjId );
-           
-           myPreHighlightActor->GetProperty()->SetRepresentationToPoints();
-           myPreHighlightActor->MapPoints( this, aMapIndex );
-         }
-         myPreHighlightActor->SetVisibility( true );
-       }
+        int anObjId = GetNodeObjId( aVtkId );
+        myIsPreselected = (anObjId >= 0);
+        if(myIsPreselected){
+          const TColStd_IndexedMapOfInteger& aMapIndex = myPreHighlightActor->GetMapIndex();
+          int anExtent = aMapIndex.Extent();
+          anIsChanged |= (anExtent == 0 || anExtent > 0 && anObjId != aMapIndex(1));
+          if(anIsChanged){
+            TColStd_IndexedMapOfInteger aMapIndex;
+            aMapIndex.Add( anObjId );
+            
+            myPreHighlightActor->GetProperty()->SetRepresentationToPoints();
+            myPreHighlightActor->MapPoints( this, aMapIndex );
+          }
+          myPreHighlightActor->SetVisibility( true );
+        }
       }
       break;
     }
@@ -539,23 +539,23 @@ SALOME_Actor
       
       int aVtkId = myCellPicker->GetCellId();
       if ( aVtkId >= 0 && mySelector->IsValid( this, aVtkId ) && hasIO() ) {
-       int anObjId = GetElemObjId (aVtkId );
-       if ( anObjId >= 0 ) {
-         myIsPreselected = CheckDimensionId(aSelectionMode,this,anObjId);
-         if(myIsPreselected){
-           const TColStd_IndexedMapOfInteger& aMapIndex = myPreHighlightActor->GetMapIndex();
-           int anExtent = aMapIndex.Extent();
-           anIsChanged |= (anExtent == 0 || anExtent > 0 && anObjId != aMapIndex(1));
-           if(anIsChanged){
-             TColStd_IndexedMapOfInteger aMapIndex;
-             aMapIndex.Add( anObjId );
-             
-             myPreHighlightActor->GetProperty()->SetRepresentationToSurface();
-             myPreHighlightActor->MapCells( this, aMapIndex );
-           }
-           myPreHighlightActor->SetVisibility( true );
-         }
-       }
+        int anObjId = GetElemObjId (aVtkId );
+        if ( anObjId >= 0 ) {
+          myIsPreselected = CheckDimensionId(aSelectionMode,this,anObjId);
+          if(myIsPreselected){
+            const TColStd_IndexedMapOfInteger& aMapIndex = myPreHighlightActor->GetMapIndex();
+            int anExtent = aMapIndex.Extent();
+            anIsChanged |= (anExtent == 0 || anExtent > 0 && anObjId != aMapIndex(1));
+            if(anIsChanged){
+              TColStd_IndexedMapOfInteger aMapIndex;
+              aMapIndex.Add( anObjId );
+              
+              myPreHighlightActor->GetProperty()->SetRepresentationToSurface();
+              myPreHighlightActor->MapCells( this, aMapIndex );
+            }
+            myPreHighlightActor->SetVisibility( true );
+          }
+        }
       }
       break;
     }
@@ -566,43 +566,43 @@ SALOME_Actor
       
       int aVtkId = myCellPicker->GetCellId();
       if ( aVtkId >= 0 && mySelector->IsValid( this, aVtkId )) {
-       int anObjId = GetElemObjId( aVtkId );
-       if ( anObjId >= 0 ) {
-         int anEdgeId = GetEdgeId(this,myCellPicker.GetPointer(),anObjId);
-         myIsPreselected = anEdgeId < 0;
-         if(myIsPreselected){
-           const TColStd_IndexedMapOfInteger& aMapIndex = myPreHighlightActor->GetMapIndex();
-           int anExtent = aMapIndex.Extent();
-           anIsChanged |= (anExtent == 0 || anExtent == 1);
-           anIsChanged |= (anExtent == 2 && (anObjId != aMapIndex(1) || anEdgeId != aMapIndex(2)));
-           if(anIsChanged){
-             TColStd_IndexedMapOfInteger aMapIndex;
-             aMapIndex.Add( anObjId );
-             aMapIndex.Add( anEdgeId );
-
-             myPreHighlightActor->GetProperty()->SetRepresentationToWireframe();
-             myPreHighlightActor->MapEdge( this, aMapIndex );
-           }
-           myPreHighlightActor->SetVisibility( true );
-         }
-       }
+        int anObjId = GetElemObjId( aVtkId );
+        if ( anObjId >= 0 ) {
+          int anEdgeId = GetEdgeId(this,myCellPicker.GetPointer(),anObjId);
+          myIsPreselected = anEdgeId < 0;
+          if(myIsPreselected){
+            const TColStd_IndexedMapOfInteger& aMapIndex = myPreHighlightActor->GetMapIndex();
+            int anExtent = aMapIndex.Extent();
+            anIsChanged |= (anExtent == 0 || anExtent == 1);
+            anIsChanged |= (anExtent == 2 && (anObjId != aMapIndex(1) || anEdgeId != aMapIndex(2)));
+            if(anIsChanged){
+              TColStd_IndexedMapOfInteger aMapIndex;
+              aMapIndex.Add( anObjId );
+              aMapIndex.Add( anEdgeId );
+
+              myPreHighlightActor->GetProperty()->SetRepresentationToWireframe();
+              myPreHighlightActor->MapEdge( this, aMapIndex );
+            }
+            myPreHighlightActor->SetVisibility( true );
+          }
+        }
       }
       break;
     }
     case ActorSelection : 
     {
       if( !mySelector->IsSelected( myIO ) ) {
-       SetPreSelected( true );
-
-       VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
-       vtkActorCollection* theActors = aCopy.GetActors();
-       theActors->InitTraversal();
-       while( vtkActor *anAct = theActors->GetNextActor() ) {
-         if( anAct != this )
-           if( SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( anAct ) )
-             if( anActor->hasIO() && myIO->isSame( anActor->getIO() ) )
-               anActor->SetPreSelected( true );
-       }
+        SetPreSelected( true );
+
+        VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
+        vtkActorCollection* theActors = aCopy.GetActors();
+        theActors->InitTraversal();
+        while( vtkActor *anAct = theActors->GetNextActor() ) {
+          if( anAct != this )
+            if( SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( anAct ) )
+              if( anActor->hasIO() && myIO->isSame( anActor->getIO() ) )
+                anActor->SetPreSelected( true );
+        }
       }
     }
     default:
@@ -622,8 +622,8 @@ SALOME_Actor
 bool
 SALOME_Actor
 ::Highlight(vtkInteractorStyle *theInteractorStyle, 
-           SVTK_SelectionEvent* theSelectionEvent,
-           bool theIsHighlight)
+            SVTK_SelectionEvent* theSelectionEvent,
+            bool theIsHighlight)
 {
   if ( !GetPickable() || !mySelector )
     return false;
@@ -654,11 +654,11 @@ SALOME_Actor
 
       int aVtkId = myPointPicker->GetPointId();
       if( aVtkId >= 0 && mySelector->IsValid( this, aVtkId, true ) ) {
-       int anObjId = GetNodeObjId( aVtkId );
-       if( anObjId >= 0 ) {
-         mySelector->AddOrRemoveIndex( myIO, anObjId, anIsShift );
-         mySelector->AddIObject( this );
-       }
+        int anObjId = GetNodeObjId( aVtkId );
+        if( anObjId >= 0 ) {
+          mySelector->AddOrRemoveIndex( myIO, anObjId, anIsShift );
+          mySelector->AddIObject( this );
+        }
       }
       break;
     }
@@ -672,13 +672,13 @@ SALOME_Actor
     
       int aVtkId = myCellPicker->GetCellId();
       if( aVtkId >= 0 && mySelector->IsValid( this, aVtkId ) ) {
-       int anObjId = GetElemObjId( aVtkId );
-       if( anObjId >= 0 ) {
-         if ( CheckDimensionId(aSelectionMode,this,anObjId) ) {
-           mySelector->AddOrRemoveIndex( myIO, anObjId, anIsShift );
-           mySelector->AddIObject( this );
-         }
-       }
+        int anObjId = GetElemObjId( aVtkId );
+        if( anObjId >= 0 ) {
+          if ( CheckDimensionId(aSelectionMode,this,anObjId) ) {
+            mySelector->AddOrRemoveIndex( myIO, anObjId, anIsShift );
+            mySelector->AddIObject( this );
+          }
+        }
       }
       break;
     }
@@ -689,24 +689,24 @@ SALOME_Actor
     
       int aVtkId = myCellPicker->GetCellId();
       if( aVtkId >= 0 && mySelector->IsValid( this, aVtkId ) ) {
-       int anObjId = GetElemObjId( aVtkId );
-       if( anObjId >= 0 ) {
-         int anEdgeId = GetEdgeId(this,myCellPicker.GetPointer(),anObjId);
-         if( anEdgeId < 0 ) {
-           mySelector->AddOrRemoveIndex( myIO, anObjId, false );
-           mySelector->AddOrRemoveIndex( myIO, anEdgeId, true );
-           mySelector->AddIObject( this );
-         } 
-       }
+        int anObjId = GetElemObjId( aVtkId );
+        if( anObjId >= 0 ) {
+          int anEdgeId = GetEdgeId(this,myCellPicker.GetPointer(),anObjId);
+          if( anEdgeId < 0 ) {
+            mySelector->AddOrRemoveIndex( myIO, anObjId, false );
+            mySelector->AddOrRemoveIndex( myIO, anEdgeId, true );
+            mySelector->AddIObject( this );
+          
+        }
       }
       break;
     }
     case ActorSelection : 
     {
       if( mySelector->IsSelected( myIO ) && anIsShift )
-       mySelector->RemoveIObject( this );
+        mySelector->RemoveIObject( this );
       else {
-       mySelector->AddIObject( this );
+        mySelector->AddIObject( this );
       }
       break;
     }
@@ -735,24 +735,24 @@ SALOME_Actor
       SVTK_RectPicker::TVectorIdsMap::const_iterator aMapIter = aVectorIdsMap.find(this);
       TColStd_MapOfInteger anIndexes;
       if(aMapIter != aVectorIdsMap.end()){
-       const SVTK_RectPicker::TVectorIds& aVectorIds = aMapIter->second;
-       vtkIdType anEnd = aVectorIds.size();
-       for(vtkIdType anId = 0; anId < anEnd; anId++ ) {
-         int aPointId = aVectorIds[anId];
-         if( aPointId >= 0 && mySelector->IsValid( this, aPointId, true ) ) {
-           int anObjId = GetNodeObjId( aPointId );
-           anIndexes.Add( anObjId );
-         }
-       }
+        const SVTK_RectPicker::TVectorIds& aVectorIds = aMapIter->second;
+        vtkIdType anEnd = aVectorIds.size();
+        for(vtkIdType anId = 0; anId < anEnd; anId++ ) {
+          int aPointId = aVectorIds[anId];
+          if( aPointId >= 0 && mySelector->IsValid( this, aPointId, true ) ) {
+            int anObjId = GetNodeObjId( aPointId );
+            anIndexes.Add( anObjId );
+          }
+        }
       }
       
       if( !anIndexes.IsEmpty() ) {
-       mySelector->AddOrRemoveIndex( myIO, anIndexes, anIsShift );
-       mySelector->AddIObject( this );
-       anIndexes.Clear();
+        mySelector->AddOrRemoveIndex( myIO, anIndexes, anIsShift );
+        mySelector->AddIObject( this );
+        anIndexes.Clear();
       }
       else
-       mySelector->RemoveIObject( this );
+        mySelector->RemoveIObject( this );
 
       break;
     }
@@ -763,22 +763,22 @@ SALOME_Actor
 
       bool anIsPicked = true;
       for( int i = 0; i <= 1; i++ ) {
-       for( int j = 2; j <= 3; j++ ) {
-         for( int k = 4; k <= 5; k++ ) {
-           aRenderer->SetWorldPoint( aBounds[ i ], aBounds[ j ], aBounds[ k ], 1.0 );
-           aRenderer->WorldToDisplay();
-           aRenderer->GetDisplayPoint( aPnt );
-
-           if( aPnt[0] < x1 || aPnt[0] > x2 || aPnt[1] < y1 || aPnt[1] > y2 ) {
-             anIsPicked = false;
-             break;
-           }
-         }
-       }
+        for( int j = 2; j <= 3; j++ ) {
+          for( int k = 4; k <= 5; k++ ) {
+            aRenderer->SetWorldPoint( aBounds[ i ], aBounds[ j ], aBounds[ k ], 1.0 );
+            aRenderer->WorldToDisplay();
+            aRenderer->GetDisplayPoint( aPnt );
+
+            if( aPnt[0] < x1 || aPnt[0] > x2 || aPnt[1] < y1 || aPnt[1] > y2 ) {
+              anIsPicked = false;
+              break;
+            }
+          }
+        }
       }
 
       if( anIsPicked )
-       mySelector->AddIObject(this);
+        mySelector->AddIObject(this);
 
       break;
     }
@@ -794,27 +794,27 @@ SALOME_Actor
       SVTK_RectPicker::TVectorIdsMap::const_iterator aMapIter = aVectorIdsMap.find(this);
       TColStd_MapOfInteger anIndexes;
       if(aMapIter != aVectorIdsMap.end()){
-       const SVTK_RectPicker::TVectorIds& aVectorIds = aMapIter->second;
-       vtkIdType anEnd = aVectorIds.size();
-       for(vtkIdType anId = 0; anId < anEnd; anId++ ) {
-         int aCellId = aVectorIds[anId];
-         if ( !mySelector->IsValid( this, aCellId ) )
-           continue;
-
-         int anObjId = GetElemObjId( aCellId );
-         if( anObjId != -1 )
-           if ( CheckDimensionId(aSelectionMode,this,anObjId) ) {
-             anIndexes.Add(anObjId);
-           }
-       }
+        const SVTK_RectPicker::TVectorIds& aVectorIds = aMapIter->second;
+        vtkIdType anEnd = aVectorIds.size();
+        for(vtkIdType anId = 0; anId < anEnd; anId++ ) {
+          int aCellId = aVectorIds[anId];
+          if ( !mySelector->IsValid( this, aCellId ) )
+            continue;
+
+          int anObjId = GetElemObjId( aCellId );
+          if( anObjId != -1 )
+            if ( CheckDimensionId(aSelectionMode,this,anObjId) ) {
+              anIndexes.Add(anObjId);
+            }
+        }
       }
       if( !anIndexes.IsEmpty() ) {
-       mySelector->AddOrRemoveIndex( myIO, anIndexes, anIsShift );
-       mySelector->AddIObject( this );
-       anIndexes.Clear();
+        mySelector->AddOrRemoveIndex( myIO, anIndexes, anIsShift );
+        mySelector->AddIObject( this );
+        anIndexes.Clear();
       }
       else
-       mySelector->RemoveIObject( this );
+        mySelector->RemoveIObject( this );
     }
     default:
       break;
@@ -901,17 +901,17 @@ SALOME_Actor
     {
       if( SALOME_Actor* anActor = dynamic_cast<SALOME_Actor*>( aCollection->GetItemAsObject( anIndex ) ) )
       {
-       if( anActor->IsDisplayNameActor() )
-       {
-         anActor->SetNameActorOffset( anOffset );
-         if( anActor->GetVisibility() )
-         {
-           int aSize[2];
-           anActor->GetNameActorSize( aRenderer, aSize );
-           anOffset[0] = anOffset[0] + aSize[0];
-           anOffset[1] = anOffset[1] + aSize[1];
-         }
-       }
+        if( anActor->IsDisplayNameActor() )
+        {
+          anActor->SetNameActorOffset( anOffset );
+          if( anActor->GetVisibility() )
+          {
+            int aSize[2];
+            anActor->GetNameActorSize( aRenderer, aSize );
+            anOffset[0] = anOffset[0] + aSize[0];
+            anOffset[1] = anOffset[1] + aSize[1];
+          }
+        }
       }
     }
   }
index 1f458732d921a491f830775878a5cb7e5f730ab9..a9081a208563f4a64bf6fc0716d00c5cbe7c040e 100644 (file)
@@ -106,8 +106,8 @@ class SVTK_EXPORT SALOME_Actor : public VTKViewer_Actor
   virtual
   void
   SetPosition(vtkFloatingPointType _arg1, 
-             vtkFloatingPointType _arg2, 
-             vtkFloatingPointType _arg3);
+              vtkFloatingPointType _arg2, 
+              vtkFloatingPointType _arg3);
 
   //! Apply additional position
   virtual
@@ -172,15 +172,15 @@ class SVTK_EXPORT SALOME_Actor : public VTKViewer_Actor
   virtual
   bool
   PreHighlight(vtkInteractorStyle* theInteractorStyle, 
-              SVTK_SelectionEvent* theSelectionEvent,
-              bool theIsHighlight);
+               SVTK_SelectionEvent* theSelectionEvent,
+               bool theIsHighlight);
 
   //! To process highlight (called from #SVTK_InteractorStyle)
   virtual 
   bool
   Highlight(vtkInteractorStyle* theInteractorStyle, 
-           SVTK_SelectionEvent* theSelectionEvent,
-           bool theIsHighlight);
+            SVTK_SelectionEvent* theSelectionEvent,
+            bool theIsHighlight);
 
   //----------------------------------------------------------------------------
   //! To get flag of displaying of name actor
index 220b8e450456c810d39061f0ef037bc90a579102..81577cba92931db54fa0743b26029e3fece1369a 100644 (file)
@@ -112,7 +112,7 @@ SVTK_Actor
 void
 SVTK_Actor
 ::MapCells(SALOME_Actor* theMapActor,
-          const TColStd_IndexedMapOfInteger& theMapIndex)
+           const TColStd_IndexedMapOfInteger& theMapIndex)
 {
   myUnstructuredGrid->Initialize();
   myUnstructuredGrid->Allocate();
@@ -139,7 +139,7 @@ SVTK_Actor
 void 
 SVTK_Actor
 ::MapPoints(SALOME_Actor* theMapActor,
-           const TColStd_IndexedMapOfInteger& theMapIndex)
+            const TColStd_IndexedMapOfInteger& theMapIndex)
 {
   myUnstructuredGrid->Initialize();
   myUnstructuredGrid->Allocate();
@@ -150,10 +150,10 @@ SVTK_Actor
     for(vtkIdType i = 0; i < aNbOfParts; i++){
       int aPartId = theMapIndex( i+1 );
       if(vtkFloatingPointType* aCoord = theMapActor->GetNodeCoord(aPartId)){
-       aPoints->SetPoint(i,aCoord);
-       // Change the type from int to vtkIdType in order to avoid compilation errors while using VTK
-       // from ParaView-3.4.0 compiled on 64-bit Debian platform with VTK_USE_64BIT_IDS = ON
-       myUnstructuredGrid->InsertNextCell(VTK_VERTEX,(vtkIdType) 1,&i);
+        aPoints->SetPoint(i,aCoord);
+        // Change the type from int to vtkIdType in order to avoid compilation errors while using VTK
+        // from ParaView-3.4.0 compiled on 64-bit Debian platform with VTK_USE_64BIT_IDS = ON
+        myUnstructuredGrid->InsertNextCell(VTK_VERTEX,(vtkIdType) 1,&i);
       }
     }
     myUnstructuredGrid->SetPoints(aPoints);
@@ -168,7 +168,7 @@ SVTK_Actor
 void
 SVTK_Actor
 ::MapEdge(SALOME_Actor* theMapActor,
-         const TColStd_IndexedMapOfInteger& theMapIndex)
+          const TColStd_IndexedMapOfInteger& theMapIndex)
 {
   myUnstructuredGrid->Initialize();
   myUnstructuredGrid->Allocate();
@@ -183,14 +183,14 @@ SVTK_Actor
 
     if(aCellId > 0){
       if(vtkCell* aCell = theMapActor->GetElemCell(aCellId)){
-       if(anEdgeId < 0){
-         anEdgeId = -anEdgeId - 1;
-         int aNbOfEdges = aCell->GetNumberOfEdges();
-         if(0 <= anEdgeId || anEdgeId < aNbOfEdges){
-           if(vtkCell* anEdge = aCell->GetEdge(anEdgeId))
-             myUnstructuredGrid->InsertNextCell(VTK_LINE,anEdge->GetPointIds());
-         }
-       }
+        if(anEdgeId < 0){
+          anEdgeId = -anEdgeId - 1;
+          int aNbOfEdges = aCell->GetNumberOfEdges();
+          if(0 <= anEdgeId || anEdgeId < aNbOfEdges){
+            if(vtkCell* anEdge = aCell->GetEdge(anEdgeId))
+              myUnstructuredGrid->InsertNextCell(VTK_LINE,anEdge->GetPointIds());
+          }
+        }
       }
     }
   }
index eda8e2e3a558d3e3a787f3e15ef3ee0834dff75b..164e10a2b0338ea42a89c429af487254f8daf6bb 100644 (file)
@@ -63,17 +63,17 @@ public:
   //! Allow to recostruct selected cells from source SALOME_Actor and map of subindexes
   void
   MapCells(SALOME_Actor* theMapActor, 
-          const TColStd_IndexedMapOfInteger& theMapIndex);
+           const TColStd_IndexedMapOfInteger& theMapIndex);
 
   //! Allow to recostruct selected points from source SALOME_Actor and map of subindexes
   void 
   MapPoints(SALOME_Actor* theMapActor, 
-           const TColStd_IndexedMapOfInteger& theMapIndex);
+            const TColStd_IndexedMapOfInteger& theMapIndex);
 
   //! Allow to recostruct selected edges from source SALOME_Actor and map of subindexes
   void 
   MapEdge(SALOME_Actor* theMapActor, 
-         const TColStd_IndexedMapOfInteger& theMapIndex);
+          const TColStd_IndexedMapOfInteger& theMapIndex);
 
   const TColStd_IndexedMapOfInteger&
   GetMapIndex() const;
index 51c1e956e14bb3b6e329c88fa69f11a739967183..2a02bdd9995caf11021794331cbec63bc6c75354 100644 (file)
@@ -194,10 +194,10 @@ int SVTK_CubeAxesActor2D::RenderOverlay(vtkViewport *viewport)
 }
 
 static void ChangeValues(vtkFloatingPointType* aArray1,
-                        vtkFloatingPointType* aArray2,
-                        vtkFloatingPointType *aRange1,
-                        vtkFloatingPointType* aRange2,
-                        bool theY)
+                         vtkFloatingPointType* aArray2,
+                         vtkFloatingPointType *aRange1,
+                         vtkFloatingPointType* aRange2,
+                         bool theY)
 {
   vtkFloatingPointType tmp=-1000;
   if (!theY){
@@ -220,14 +220,14 @@ static void ChangeValues(vtkFloatingPointType* aArray1,
 }
 
 static void ChangeArrays(vtkFloatingPointType* xCoords,
-                        vtkFloatingPointType* yCoords,
-                        vtkFloatingPointType* zCoords,
-                        vtkFloatingPointType* xRange,
-                        vtkFloatingPointType* yRange,
-                        vtkFloatingPointType* zRange,
-                        const int xAxes,
-                        const int yAxes, 
-                        const int zAxes)
+                         vtkFloatingPointType* yCoords,
+                         vtkFloatingPointType* zCoords,
+                         vtkFloatingPointType* xRange,
+                         vtkFloatingPointType* yRange,
+                         vtkFloatingPointType* zRange,
+                         const int xAxes,
+                         const int yAxes, 
+                         const int zAxes)
 {
   if ( xAxes == 0 && yAxes == 2 && zAxes == 1)
     ChangeValues(yCoords,zCoords,yRange,zRange,true);
@@ -417,8 +417,8 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
   // if xAxes=0 yAxes=1 zAxes=2 - good situation
   if (!(xAxes == 0 && yAxes == 1 && zAxes == 2))
     ChangeArrays(xCoords,yCoords,zCoords,
-                xRange,yRange,zRange,
-                xAxes,yAxes,zAxes);
+                 xRange,yRange,zRange,
+                 xAxes,yAxes,zAxes);
 
   double aTScale[3];
   if(m_Transform.GetPointer() != NULL)
index bcf79ef490095880823d580bedf851d6c14c2cd7..03c821dc75a092d17920f4d821e78d53260dcdf8 100644 (file)
@@ -213,10 +213,10 @@ void SVTK_CubeAxesDlg::AxisWidget::SetName(const QString& theName)
 }
 
 void SVTK_CubeAxesDlg::AxisWidget::SetNameFont(const QColor& theColor,
-                                              const int theFont,
-                                              const bool theIsBold,
-                                              const bool theIsItalic,
-                                              const bool theIsShadow)
+                                               const int theFont,
+                                               const bool theIsBold,
+                                               const bool theIsItalic,
+                                               const bool theIsShadow)
 {
   myNameFont->SetData(theColor, theFont, theIsBold, theIsItalic, theIsShadow);
 }
@@ -375,11 +375,11 @@ bool SVTK_CubeAxesDlg::AxisWidget::Apply(vtkAxisActor2D* theActor)
   Constructor
 */
 SVTK_CubeAxesDlg::SVTK_CubeAxesDlg(QtxAction* theAction,
-                                  SVTK_ViewWindow* theParent,
-                                  const char* theName):
+                                   SVTK_ViewWindow* theParent,
+                                   const char* theName):
   SVTK_DialogBase(theAction,
-                 theParent, 
-                 theName),
+                  theParent, 
+                  theName),
   myMainWindow(theParent)
 {
   setWindowTitle(tr("CAPTION"));
index e481d0b49466280b0024dab8e2827e6c9ce724d2..9247771a6c69d008e5a66e97618c7b485ac2120f 100644 (file)
@@ -52,8 +52,8 @@ class SVTK_CubeAxesDlg : public SVTK_DialogBase
 
 public:
                   SVTK_CubeAxesDlg(QtxAction* theAction,
-                                  SVTK_ViewWindow* theParent,
-                                  const char* theName);
+                                   SVTK_ViewWindow* theParent,
+                                   const char* theName);
   virtual         ~SVTK_CubeAxesDlg();
 
   void            Update();
index 30e5e8678aadb4bce107f678924b88a944b2b4c8..a3ce7ecefb7943d8a22ac3919a23110d90268135 100644 (file)
@@ -66,7 +66,7 @@ SVTK_DeviceActor
 
   myIsResolveCoincidentTopology = true;
   vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor,
-                                                                myPolygonOffsetUnits);
+                                                                 myPolygonOffsetUnits);
 
   myMapper = vtkDataSetMapper::New();
 
@@ -266,7 +266,7 @@ SVTK_DeviceActor
     int numPts = aDataSet->GetNumberOfPoints();
     //It's impossible to use to apply "shrink" for "empty" dataset
     if (numCells < 1 || numPts < 1)
-           return;
+            return;
     myShrinkFilter->SetInput( aDataSet );
     myPassFilter[ 1 ]->SetInput( myShrinkFilter->GetOutput() );
     myIsShrunk = true;
@@ -400,9 +400,9 @@ SVTK_DeviceActor
 void
 SVTK_DeviceActor
 ::GetFeatureEdgesFlags(bool& theIsFeatureEdges,
-                      bool& theIsBoundaryEdges,
-                      bool& theIsManifoldEdges,
-                      bool& theIsNonManifoldEdges)
+                       bool& theIsBoundaryEdges,
+                       bool& theIsManifoldEdges,
+                       bool& theIsNonManifoldEdges)
 {
   theIsFeatureEdges = myFeatureEdges->GetFeatureEdges();
   theIsBoundaryEdges = myFeatureEdges->GetBoundaryEdges();
@@ -420,9 +420,9 @@ SVTK_DeviceActor
 void
 SVTK_DeviceActor
 ::SetFeatureEdgesFlags(bool theIsFeatureEdges,
-                      bool theIsBoundaryEdges,
-                      bool theIsManifoldEdges,
-                      bool theIsNonManifoldEdges)
+                       bool theIsBoundaryEdges,
+                       bool theIsManifoldEdges,
+                       bool theIsNonManifoldEdges)
 {
   myFeatureEdges->SetFeatureEdges(theIsFeatureEdges);
   myFeatureEdges->SetBoundaryEdges(theIsBoundaryEdges);
@@ -616,7 +616,7 @@ SVTK_DeviceActor
     
     vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
     vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor,
-                                                                  myPolygonOffsetUnits);
+                                                                   myPolygonOffsetUnits);
     Superclass::Render(ren,m);
     
     vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
@@ -633,7 +633,7 @@ SVTK_DeviceActor
 void
 SVTK_DeviceActor
 ::SetPolygonOffsetParameters(vtkFloatingPointType factor, 
-                            vtkFloatingPointType units)
+                             vtkFloatingPointType units)
 {
   myPolygonOffsetFactor = factor;
   myPolygonOffsetUnits = units;
@@ -646,7 +646,7 @@ SVTK_DeviceActor
 void
 SVTK_DeviceActor
 ::GetPolygonOffsetParameters(vtkFloatingPointType& factor, 
-                            vtkFloatingPointType& units)
+                             vtkFloatingPointType& units)
 {
   factor = myPolygonOffsetFactor;
   units = myPolygonOffsetUnits;
index 18c8cee97775294390be83b3e8d1aa9b1fb4abbc..4b7f106c71df45776defeee63602c6b6ed2994b2 100644 (file)
@@ -177,15 +177,15 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor
   virtual
   void
   GetFeatureEdgesFlags(bool& theIsFeatureEdges,
-                      bool& theIsBoundaryEdges,
-                      bool& theIsManifoldEdges,
-                      bool& theIsNonManifoldEdges);
+                       bool& theIsBoundaryEdges,
+                       bool& theIsManifoldEdges,
+                       bool& theIsNonManifoldEdges);
   virtual
   void
   SetFeatureEdgesFlags(bool theIsFeatureEdges,
-                      bool theIsBoundaryEdges,
-                      bool theIsManifoldEdges,
-                      bool theIsNonManifoldEdges);
+                       bool theIsBoundaryEdges,
+                       bool theIsManifoldEdges,
+                       bool theIsNonManifoldEdges);
 
   virtual
   bool
@@ -260,9 +260,9 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor
   vtkFloatingPointType myPolygonOffsetUnits;
 
   void SetPolygonOffsetParameters(vtkFloatingPointType factor, 
-                                 vtkFloatingPointType units);
+                                  vtkFloatingPointType units);
   void GetPolygonOffsetParameters(vtkFloatingPointType& factor, 
-                                 vtkFloatingPointType& units);
+                                  vtkFloatingPointType& units);
 
   SVTK_DeviceActor();
   ~SVTK_DeviceActor();
index faf49c9628343218ba7350507b6de663c64f336d..33f0560d2a0290d0e27f471b5eb6809bae7edfcc 100644 (file)
 */
 SVTK_DialogBase
 ::SVTK_DialogBase(QtxAction* theAction,
-                 QWidget* theParent,
-                 const char* theName, 
-                 bool theModal, 
-                 Qt::WindowFlags theWFalgs):
+                  QWidget* theParent,
+                  const char* theName, 
+                  bool theModal, 
+                  Qt::WindowFlags theWFalgs):
   QDialog(theParent, 
-         theWFalgs | Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
+          theWFalgs | Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
   myAction(theAction)
 {
   setObjectName(theName);
index 815f8ddf3108a53279e5ca789cab2d285ba10d6a..aef47cd33446cd3a743b163688e6b5867665c2a8 100644 (file)
@@ -40,10 +40,10 @@ class SVTK_EXPORT SVTK_DialogBase : public QDialog
 
 public:
   SVTK_DialogBase(QtxAction* theAction,
-                 QWidget* theParent,
-                 const char* theName = "", 
-                 bool theModal = FALSE, 
-                 Qt::WindowFlags theWFalgs = 0);
+                  QWidget* theParent,
+                  const char* theName = "", 
+                  bool theModal = FALSE, 
+                  Qt::WindowFlags theWFalgs = 0);
 
   ~SVTK_DialogBase();
 
index 679b8257e18f1a8dfb86391746e92da72dc04717..e29ab2b276ccb258419fc3997a439014ead76702 100644 (file)
@@ -116,10 +116,10 @@ void SVTK_FontWidget::SetData( const QColor& theColor,
 }
 
 void SVTK_FontWidget::GetData( QColor& theColor,
-                              int& theFamily,
-                              bool& theBold,
-                              bool& theItalic,
-                              bool& theShadow ) const
+                               int& theFamily,
+                               bool& theBold,
+                               bool& theItalic,
+                               bool& theShadow ) const
 {
   theColor = GetColor();
 
index 1d5eb76ff0030be6f7611eab1adcdc25ba503837..2a3e1f052aa0badab464dc2b30735c8ddd98040b 100755 (executable)
@@ -38,10 +38,10 @@ static int MYDEBUG = 0;
 //----------------------------------------------------------------------------
 SVTK_ImageWriter
 ::SVTK_ImageWriter(QSemaphore* theSemaphore,
-                  vtkImageData* theImageData,
-                  const std::string& theName,
-                  int theProgressive,
-                  int theQuality):
+                   vtkImageData* theImageData,
+                   const std::string& theName,
+                   int theProgressive,
+                   int theQuality):
   mySemaphore(theSemaphore),
   myImageData(theImageData),
   myName(theName),
@@ -98,9 +98,9 @@ SVTK_ImageWriter
   myImageData->Delete();
 
   if(MYDEBUG) cout<<"SVTK_ImageWriter::run "<<
-               "- this = "<<this<<
-               //"; total = "<<mySemaphore->total()<<
-               "; available = "<<mySemaphore->available()<<endl;
+                "- this = "<<this<<
+                //"; total = "<<mySemaphore->total()<<
+                "; available = "<<mySemaphore->available()<<endl;
   mySemaphore->release();
 }
 
index a3d16b81028d977ce68286048c26be45322aab69..5fb465368583b1bde97f7574d57604d70f9b2631 100755 (executable)
@@ -32,10 +32,10 @@ class SVTK_ImageWriter : public QThread
 {
 public:
   SVTK_ImageWriter(QSemaphore* theSemaphore,
-                  vtkImageData* theImageData,
-                  const std::string& theName,
-                  int theProgressive,
-                  int theQuality);
+                   vtkImageData* theImageData,
+                   const std::string& theName,
+                   int theProgressive,
+                   int theQuality);
 
   ~SVTK_ImageWriter();
 
index 0983a6a55cf1bd8cea7b48ce3a4f3bf7b8afb251..ddea670b7530d59ea15b58f14f763b8e0dab80f0 100755 (executable)
@@ -43,8 +43,8 @@ SVTK_ImageWriterMgr
   mySemaphore = new QSemaphore(aMax);
   mySemaphore->acquire( aMax );
   if(MYDEBUG) cout<<"SVTK_ImageWriterMgr::SVTK_ImageWriterMgr "<<
-               //"- total = "<<mySemaphore->total()<<
-               "; available = "<<mySemaphore->available()<<endl;
+                //"- total = "<<mySemaphore->total()<<
+                "; available = "<<mySemaphore->available()<<endl;
 }
 
 
@@ -61,16 +61,16 @@ SVTK_ImageWriterMgr
 void
 SVTK_ImageWriterMgr
 ::StartImageWriter(vtkImageData *theImageData,
-                  const std::string& theName,
-                  const int theProgressive,
-                  const int theQuality)
+                   const std::string& theName,
+                   const int theProgressive,
+                   const int theQuality)
 {
   SVTK_ImageWriter *anImageWriter = 
     new SVTK_ImageWriter(mySemaphore,
-                        theImageData,
-                        theName,
-                        theProgressive,
-                        theQuality);
+                         theImageData,
+                         theName,
+                         theProgressive,
+                         theQuality);
   myThreads.push_back(anImageWriter);
 
   anImageWriter->start();
@@ -84,8 +84,8 @@ SVTK_ImageWriterMgr
 ::Stop()
 {
   if(MYDEBUG) cout<<"SVTK_ImageWriterMgr::Stop "<<
-               //"- total = "<<mySemaphore->total()<<
-               "; available = "<<mySemaphore->available()<<endl;
+                //"- total = "<<mySemaphore->total()<<
+                "; available = "<<mySemaphore->available()<<endl;
   if(MYDEBUG) cout<<"SVTK_ImageWriterMgr::Stop - *mySemaphore += "<<myThreads.size()<<endl;
   mySemaphore->acquire( myThreads.size() );
 
index 0167f7246d291e6cef8f86bcb038ff009cf8b482..601f709d285ae36d69697d911171503cd579ab47 100755 (executable)
@@ -38,9 +38,9 @@ class SVTK_ImageWriterMgr
   
   void
   StartImageWriter(vtkImageData *theImageData,
-                  const std::string& theName,
-                  const int theProgressive,
-                  const int theQuality);
+                   const std::string& theName,
+                   const int theProgressive,
+                   const int theQuality);
 
   void
   Stop();
index 54d91bc721a0318e9a1a002886b5bad398ca254a..050386f959438474af3e288b17ec55366d1af728 100644 (file)
@@ -69,8 +69,8 @@ using namespace std;
 namespace
 {
   inline void GetEventPosition(vtkRenderWindowInteractor* theInteractor,
-                              int& theX, 
-                              int& theY)
+                               int& theX, 
+                               int& theY)
   {
     theInteractor->GetEventPosition(theX,theY);
     theY = theInteractor->GetSize()[1] - theY - 1;
@@ -253,8 +253,8 @@ void SVTK_InteractorStyle::RotateXY(int dx, int dy)
   double ryf = double(dy) * aDeltaElevation * this->MotionFactor;
   vtkMatrix4x4* aMatrix = cam->GetViewTransformMatrix();
   const double anAxis[3] = {-aMatrix->GetElement(0,0), // mkr : 27.11.2006 : PAL14011 - Strange behaviour in rotation in VTK Viewer.
-                           -aMatrix->GetElement(0,1), 
-                           -aMatrix->GetElement(0,2)};
+                            -aMatrix->GetElement(0,1), 
+                            -aMatrix->GetElement(0,2)};
   
   aTransform->RotateWXYZ(ryf, anAxis);
             
@@ -306,9 +306,9 @@ void SVTK_InteractorStyle::SpinXY(int x, int y, int oldX, int oldY)
     return;
 
   double newAngle = atan2((double)(y - GetCurrentRenderer()->GetCenter()[1]),
-                         (double)(x - GetCurrentRenderer()->GetCenter()[0]));
+                          (double)(x - GetCurrentRenderer()->GetCenter()[0]));
   double oldAngle = atan2((double)(oldY -GetCurrentRenderer()->GetCenter()[1]),
-                         (double)(oldX - GetCurrentRenderer()->GetCenter()[0]));
+                          (double)(oldX - GetCurrentRenderer()->GetCenter()[0]));
   
   newAngle *= this->RadianToDegree;
   oldAngle *= this->RadianToDegree;
@@ -338,8 +338,8 @@ void SVTK_InteractorStyle::OnMouseMove()
   int x, y;
   GetEventPosition( this->Interactor, x, y );
   this->OnMouseMove( this->Interactor->GetControlKey(),
-                    this->Interactor->GetShiftKey(),
-                    x, y );
+                     this->Interactor->GetShiftKey(),
+                     x, y );
 }
 
 /*!
@@ -350,8 +350,8 @@ void SVTK_InteractorStyle::OnLeftButtonDown()
   int x, y;
   GetEventPosition( this->Interactor, x, y );
   this->OnLeftButtonDown( this->Interactor->GetControlKey(),
-                         this->Interactor->GetShiftKey(),
-                         x, y );
+                          this->Interactor->GetShiftKey(),
+                          x, y );
 }
 
 /*!
@@ -362,8 +362,8 @@ void SVTK_InteractorStyle::OnLeftButtonUp()
   int x, y;
   GetEventPosition( this->Interactor, x, y );
   this->OnLeftButtonUp( this->Interactor->GetControlKey(),
-                       this->Interactor->GetShiftKey(),
-                       x, y );
+                        this->Interactor->GetShiftKey(),
+                        x, y );
 }
 
 /*!
@@ -374,8 +374,8 @@ void SVTK_InteractorStyle::OnMiddleButtonDown()
   int x, y;
   GetEventPosition( this->Interactor, x, y );
   this->OnMiddleButtonDown( this->Interactor->GetControlKey(),
-                           this->Interactor->GetShiftKey(),
-                           x, y );
+                            this->Interactor->GetShiftKey(),
+                            x, y );
 }
 
 /*!
@@ -386,8 +386,8 @@ void SVTK_InteractorStyle::OnMiddleButtonUp()
   int x, y;
   GetEventPosition( this->Interactor, x, y );
   this->OnMiddleButtonUp( this->Interactor->GetControlKey(),
-                         this->Interactor->GetShiftKey(),
-                         x, y );
+                          this->Interactor->GetShiftKey(),
+                          x, y );
 }
 
 /*!
@@ -398,8 +398,8 @@ void SVTK_InteractorStyle::OnRightButtonDown()
   int x, y;
   GetEventPosition( this->Interactor, x, y );
   this->OnRightButtonDown( this->Interactor->GetControlKey(),
-                          this->Interactor->GetShiftKey(),
-                          x, y );
+                           this->Interactor->GetShiftKey(),
+                           x, y );
 }
 
 /*!
@@ -410,16 +410,16 @@ void SVTK_InteractorStyle::OnRightButtonUp()
   int x, y;
   GetEventPosition( this->Interactor, x, y );
   this->OnRightButtonUp( this->Interactor->GetControlKey(),
-                        this->Interactor->GetShiftKey(),
-                        x, y );
+                         this->Interactor->GetShiftKey(),
+                         x, y );
 }
 
 /*!
   To handle mouse move event
 */
 void SVTK_InteractorStyle::OnMouseMove(int vtkNotUsed(ctrl), 
-                                      int shift,
-                                      int x, int y) 
+                                       int shift,
+                                       int x, int y) 
 {
   myShiftState = shift;
   if (State != VTK_INTERACTOR_STYLE_CAMERA_NONE)
@@ -432,7 +432,7 @@ void SVTK_InteractorStyle::OnMouseMove(int vtkNotUsed(ctrl),
   To handle left mouse button down event (reimplemented from vtkInteractorStyle)
 */
 void SVTK_InteractorStyle::OnLeftButtonDown(int ctrl, int shift, 
-                                           int x, int y) 
+                                            int x, int y) 
 {
   this->FindPokedRenderer(x, y);
   if(GetCurrentRenderer() == NULL)
@@ -451,7 +451,7 @@ void SVTK_InteractorStyle::OnLeftButtonDown(int ctrl, int shift,
     if (ctrl)
       startOperation(VTK_INTERACTOR_STYLE_CAMERA_ZOOM);
     else if ( myCurrRotationPointType == SVTK::StartPointSelection ||
-             myCurrFocalPointType == SVTK::StartFocalPointSelection )
+              myCurrFocalPointType == SVTK::StartFocalPointSelection )
     {
       SVTK_SelectionEvent* aSelectionEvent = GetSelectionEventFlipY();
 
@@ -459,60 +459,60 @@ void SVTK_InteractorStyle::OnLeftButtonDown(int ctrl, int shift,
       
       if ( anActor )
       {
-       myPointPicker->Pick( aSelectionEvent->myX,
-                            aSelectionEvent->myY, 
-                            0.0, 
-                            GetCurrentRenderer() );
-       int aVtkId = myPointPicker->GetPointId();
-       if ( aVtkId >= 0 )
-       {
-         int anObjId = anActor->GetNodeObjId( aVtkId );
-         vtkFloatingPointType* aCoords = anActor->GetNodeCoord(anObjId);
-         
-         if (myCurrRotationPointType == SVTK::StartPointSelection) {
-           myCurrRotationPointType = SVTK::SetRotateSelected;
-         
-           // invoke event for update coordinates in SVTK_SetRotationPointDlg
-           InvokeEvent(SVTK::RotationPointChanged,(void*)aCoords);
-         }
-         else if (myCurrFocalPointType == SVTK::StartFocalPointSelection) {
-           myCurrFocalPointType = SVTK::SetFocalPointSelected;
-         
-           // invoke event for update coordinates in SVTK_ViewParameterDlg
-           InvokeEvent(SVTK::FocalPointChanged,(void*)aCoords);
-         }
-       }
-       else
-       {
-         if (myCurrRotationPointType == SVTK::StartPointSelection) {
-           // invoke event with no data (for SVTK_SetRotationPointDlg)
-           InvokeEvent(SVTK::RotationPointChanged,0);
-           myCurrRotationPointType = myPrevRotationPointType;
-         }
-         else if (myCurrFocalPointType == SVTK::StartFocalPointSelection) {
-           // invoke event with no data (for SVTK_ViewParameterDlg)
-           InvokeEvent(SVTK::FocalPointChanged,0);
-           myCurrFocalPointType = myPrevFocalPointType;
-         }
-       }
+        myPointPicker->Pick( aSelectionEvent->myX,
+                             aSelectionEvent->myY, 
+                             0.0, 
+                             GetCurrentRenderer() );
+        int aVtkId = myPointPicker->GetPointId();
+        if ( aVtkId >= 0 )
+        {
+          int anObjId = anActor->GetNodeObjId( aVtkId );
+          vtkFloatingPointType* aCoords = anActor->GetNodeCoord(anObjId);
+          
+          if (myCurrRotationPointType == SVTK::StartPointSelection) {
+            myCurrRotationPointType = SVTK::SetRotateSelected;
+          
+            // invoke event for update coordinates in SVTK_SetRotationPointDlg
+            InvokeEvent(SVTK::RotationPointChanged,(void*)aCoords);
+          }
+          else if (myCurrFocalPointType == SVTK::StartFocalPointSelection) {
+            myCurrFocalPointType = SVTK::SetFocalPointSelected;
+          
+            // invoke event for update coordinates in SVTK_ViewParameterDlg
+            InvokeEvent(SVTK::FocalPointChanged,(void*)aCoords);
+          }
+        }
+        else
+        {
+          if (myCurrRotationPointType == SVTK::StartPointSelection) {
+            // invoke event with no data (for SVTK_SetRotationPointDlg)
+            InvokeEvent(SVTK::RotationPointChanged,0);
+            myCurrRotationPointType = myPrevRotationPointType;
+          }
+          else if (myCurrFocalPointType == SVTK::StartFocalPointSelection) {
+            // invoke event with no data (for SVTK_ViewParameterDlg)
+            InvokeEvent(SVTK::FocalPointChanged,0);
+            myCurrFocalPointType = myPrevFocalPointType;
+          }
+        }
       }
       else
       {
-       if (myCurrRotationPointType == SVTK::StartPointSelection) {
-         // invoke event with no data (for SVTK_SetRotationPointDlg)
-         InvokeEvent(SVTK::RotationPointChanged,0);
-         myCurrRotationPointType = myPrevRotationPointType;
-       }
-       else if (myCurrFocalPointType == SVTK::StartFocalPointSelection) {
-         // invoke event with no data (for SVTK_ViewParameterDlg)
-         InvokeEvent(SVTK::FocalPointChanged,0);
-         myCurrFocalPointType = myPrevFocalPointType;
-       }
+        if (myCurrRotationPointType == SVTK::StartPointSelection) {
+          // invoke event with no data (for SVTK_SetRotationPointDlg)
+          InvokeEvent(SVTK::RotationPointChanged,0);
+          myCurrRotationPointType = myPrevRotationPointType;
+        }
+        else if (myCurrFocalPointType == SVTK::StartFocalPointSelection) {
+          // invoke event with no data (for SVTK_ViewParameterDlg)
+          InvokeEvent(SVTK::FocalPointChanged,0);
+          myCurrFocalPointType = myPrevFocalPointType;
+        }
       }
     
       myHighlightSelectionPointActor->SetVisibility( false );
       if(GetCurrentRenderer() != NULL)
-       GetCurrentRenderer()->RemoveActor( myHighlightSelectionPointActor.GetPointer() );
+        GetCurrentRenderer()->RemoveActor( myHighlightSelectionPointActor.GetPointer() );
 
       GetRenderWidget()->setCursor(myDefCursor); 
     }
@@ -527,9 +527,9 @@ void SVTK_InteractorStyle::OnLeftButtonDown(int ctrl, int shift,
   To handle left mouse button up event (reimplemented from vtkInteractorStyle)
 */
 void SVTK_InteractorStyle::OnLeftButtonUp(int vtkNotUsed(ctrl),
-                                         int shift, 
-                                         int vtkNotUsed(x),
-                                         int vtkNotUsed(y))
+                                          int shift, 
+                                          int vtkNotUsed(x),
+                                          int vtkNotUsed(y))
 {
   myShiftState = shift;
   // finishing current viewer operation
@@ -543,8 +543,8 @@ void SVTK_InteractorStyle::OnLeftButtonUp(int vtkNotUsed(ctrl),
   To handle middle mouse button down event (reimplemented from vtkInteractorStyle)
 */
 void SVTK_InteractorStyle::OnMiddleButtonDown(int ctrl,
-                                             int shift, 
-                                             int x, int y) 
+                                              int shift, 
+                                              int x, int y) 
 {
   this->FindPokedRenderer(x, y);
   if(GetCurrentRenderer() == NULL)
@@ -571,9 +571,9 @@ void SVTK_InteractorStyle::OnMiddleButtonDown(int ctrl,
   To handle middle mouse button up event (reimplemented from vtkInteractorStyle)
 */
 void SVTK_InteractorStyle::OnMiddleButtonUp(int vtkNotUsed(ctrl),
-                                           int shift, 
-                                           int vtkNotUsed(x),
-                                           int vtkNotUsed(y))
+                                            int shift, 
+                                            int vtkNotUsed(x),
+                                            int vtkNotUsed(y))
 {
   myShiftState = shift;
   // finishing current viewer operation
@@ -588,8 +588,8 @@ void SVTK_InteractorStyle::OnMiddleButtonUp(int vtkNotUsed(ctrl),
   To handle right mouse button down event (reimplemented from vtkInteractorStyle)
 */
 void SVTK_InteractorStyle::OnRightButtonDown(int ctrl,
-                                            int shift, 
-                                            int x, int y) 
+                                             int shift, 
+                                             int x, int y) 
 {
   this->FindPokedRenderer(x, y);
   if(GetCurrentRenderer() == NULL)
@@ -615,9 +615,9 @@ void SVTK_InteractorStyle::OnRightButtonDown(int ctrl,
   To handle right mouse button up event (reimplemented from vtkInteractorStyle)
 */
 void SVTK_InteractorStyle::OnRightButtonUp(int vtkNotUsed(ctrl),
-                                          int shift, 
-                                          int vtkNotUsed(x),
-                                          int vtkNotUsed(y))
+                                           int shift, 
+                                           int vtkNotUsed(x),
+                                           int vtkNotUsed(y))
 {
   myShiftState = shift;
   // finishing current viewer operation
@@ -776,8 +776,8 @@ void SVTK_InteractorStyle::startPointSelection()
     vtkFloatingPointType aColor[3];
     GetCurrentRenderer()->GetBackground( aColor );
     myHighlightSelectionPointActor->GetProperty()->SetColor(1. - aColor[0],
-                                                           1. - aColor[1],
-                                                           1. - aColor[2]);
+                                                            1. - aColor[1],
+                                                            1. - aColor[2]);
   }
 
   setCursor(VTK_INTERACTOR_STYLE_CAMERA_NONE);
@@ -795,8 +795,8 @@ void SVTK_InteractorStyle::startFocalPointSelection()
     vtkFloatingPointType aColor[3];
     GetCurrentRenderer()->GetBackground( aColor );
     myHighlightSelectionPointActor->GetProperty()->SetColor(1. - aColor[0],
-                                                           1. - aColor[1],
-                                                           1. - aColor[2]);
+                                                            1. - aColor[1],
+                                                            1. - aColor[2]);
   }
 
   setCursor(VTK_INTERACTOR_STYLE_CAMERA_NONE);
@@ -859,9 +859,9 @@ void SVTK_InteractorStyle::startGlobalPan()
   Fits viewer contents to rect
 */
 void SVTK_InteractorStyle::fitRect(const int left, 
-                                  const int top, 
-                                  const int right, 
-                                  const int bottom)
+                                   const int top, 
+                                   const int right, 
+                                   const int bottom)
 {
   if (GetCurrentRenderer() == NULL) 
     return;
@@ -957,10 +957,10 @@ void SVTK_InteractorStyle::setCursor(const int operation)
     case VTK_INTERACTOR_STYLE_CAMERA_NONE:
     default:
       if ( myCurrRotationPointType == SVTK::StartPointSelection ||
-          myCurrFocalPointType == SVTK::StartFocalPointSelection )
-       GetRenderWidget()->setCursor(myHandCursor);
+           myCurrFocalPointType == SVTK::StartFocalPointSelection )
+        GetRenderWidget()->setCursor(myHandCursor);
       else
-       GetRenderWidget()->setCursor(myDefCursor); 
+        GetRenderWidget()->setCursor(myDefCursor); 
       myCursorState = false;
       break;
   }
@@ -1030,56 +1030,56 @@ void SVTK_InteractorStyle::onFinishOperation()
       }
       else {
         if (myPoint == myOtherPoint)
-         {
-           // process point selection
-           this->FindPokedRenderer(aSelectionEvent->myX, aSelectionEvent->myY);
-           Interactor->StartPickCallback();
-           
-           SALOME_Actor* anActor = GetSelector()->Pick(aSelectionEvent, GetCurrentRenderer());
-
-           aSelectionEvent->myIsRectangle = false;
-
-           if(!myShiftState)
-             GetSelector()->ClearIObjects();
-
-           if(anActor)
-             {
-               anActor->Highlight( this, aSelectionEvent, true );
-             }
-           else
-             {
-               if(myLastHighlitedActor.GetPointer() && myLastHighlitedActor.GetPointer() != anActor)
-                 myLastHighlitedActor->Highlight( this, aSelectionEvent, false );
-             }
-           myLastHighlitedActor = anActor;
-         } 
-       else 
-         {
-           //processing rectangle selection
-           Interactor->StartPickCallback();
-           GetSelector()->StartPickCallback();
-           aSelectionEvent->myIsRectangle = true;
-
-           if(!myShiftState)
-             GetSelector()->ClearIObjects();
-
-           VTK::ActorCollectionCopy aCopy(GetCurrentRenderer()->GetActors());
-           vtkActorCollection* aListActors = aCopy.GetActors();
-           aListActors->InitTraversal();
-           while(vtkActor* aActor = aListActors->GetNextActor())
-             {
-               if(aActor->GetVisibility())
-                 {
-                   if(SALOME_Actor* aSActor = SALOME_Actor::SafeDownCast(aActor))
-                     {
-                       if(aSActor->hasIO())
-                         aSActor->Highlight( this, aSelectionEvent, true );
-                     }
-                 }
-             }
-         }
-       Interactor->EndPickCallback();
-       GetSelector()->EndPickCallback();
+          {
+            // process point selection
+            this->FindPokedRenderer(aSelectionEvent->myX, aSelectionEvent->myY);
+            Interactor->StartPickCallback();
+            
+            SALOME_Actor* anActor = GetSelector()->Pick(aSelectionEvent, GetCurrentRenderer());
+
+            aSelectionEvent->myIsRectangle = false;
+
+            if(!myShiftState)
+              GetSelector()->ClearIObjects();
+
+            if(anActor)
+              {
+                anActor->Highlight( this, aSelectionEvent, true );
+              }
+            else
+              {
+                if(myLastHighlitedActor.GetPointer() && myLastHighlitedActor.GetPointer() != anActor)
+                  myLastHighlitedActor->Highlight( this, aSelectionEvent, false );
+              }
+            myLastHighlitedActor = anActor;
+          
+        else 
+          {
+            //processing rectangle selection
+            Interactor->StartPickCallback();
+            GetSelector()->StartPickCallback();
+            aSelectionEvent->myIsRectangle = true;
+
+            if(!myShiftState)
+              GetSelector()->ClearIObjects();
+
+            VTK::ActorCollectionCopy aCopy(GetCurrentRenderer()->GetActors());
+            vtkActorCollection* aListActors = aCopy.GetActors();
+            aListActors->InitTraversal();
+            while(vtkActor* aActor = aListActors->GetNextActor())
+              {
+                if(aActor->GetVisibility())
+                  {
+                    if(SALOME_Actor* aSActor = SALOME_Actor::SafeDownCast(aActor))
+                      {
+                        if(aSActor->hasIO())
+                          aSActor->Highlight( this, aSelectionEvent, true );
+                      }
+                  }
+              }
+          }
+        Interactor->EndPickCallback();
+        GetSelector()->EndPickCallback();
       } 
     } 
     break;
@@ -1178,14 +1178,14 @@ void SVTK_InteractorStyle::onCursorMove(QPoint mousePos)
       myPointPicker->Pick( aSelectionEvent->myX, aSelectionEvent->myY, 0.0, GetCurrentRenderer() );
       int aVtkId = myPointPicker->GetPointId();
       if ( aVtkId >= 0 ) {
-       int anObjId = anActor->GetNodeObjId( aVtkId );
+        int anObjId = anActor->GetNodeObjId( aVtkId );
 
-       TColStd_IndexedMapOfInteger aMapIndex;
-       aMapIndex.Add( anObjId );
-       myHighlightSelectionPointActor->MapPoints( anActor, aMapIndex );
+        TColStd_IndexedMapOfInteger aMapIndex;
+        aMapIndex.Add( anObjId );
+        myHighlightSelectionPointActor->MapPoints( anActor, aMapIndex );
 
-       myHighlightSelectionPointActor->SetVisibility( true );
-       anIsChanged = true;
+        myHighlightSelectionPointActor->SetVisibility( true );
+        anIsChanged = true;
       }
     }
   }
@@ -1241,13 +1241,13 @@ void SVTK_InteractorStyle::TranslateView(int toX, int toY, int fromX, int fromY)
   cam->GetFocalPoint(viewFocus);
 
   this->ComputeWorldToDisplay(viewFocus[0], viewFocus[1],
-                             viewFocus[2], viewFocus);
+                              viewFocus[2], viewFocus);
   focalDepth = viewFocus[2];
 
   this->ComputeDisplayToWorld(double(toX), double(toY),
-                             focalDepth, newPickPoint);
+                              focalDepth, newPickPoint);
   this->ComputeDisplayToWorld(double(fromX),double(fromY),
-                             focalDepth, oldPickPoint);
+                              focalDepth, oldPickPoint);
   
   // camera motion is reversed
   motionVector[0] = oldPickPoint[0] - newPickPoint[0];
@@ -1257,11 +1257,11 @@ void SVTK_InteractorStyle::TranslateView(int toX, int toY, int fromX, int fromY)
   cam->GetFocalPoint(viewFocus);
   cam->GetPosition(viewPoint);
   cam->SetFocalPoint(motionVector[0] + viewFocus[0],
-                    motionVector[1] + viewFocus[1],
-                    motionVector[2] + viewFocus[2]);
+                     motionVector[1] + viewFocus[1],
+                     motionVector[2] + viewFocus[2]);
   cam->SetPosition(motionVector[0] + viewPoint[0],
-                  motionVector[1] + viewPoint[1],
-                  motionVector[2] + viewPoint[2]);
+                   motionVector[1] + viewPoint[1],
+                   motionVector[2] + viewPoint[2]);
 }
 
 void SVTK_InteractorStyle::IncrementalPan( const int incrX, const int incrY )
@@ -1343,19 +1343,19 @@ void SVTK_InteractorStyle::OnTimer()
     {
       if ( !myBBFirstCheck )
       {
-       if ( fabs(aCurrBBCenter[0]-myBBCenter[0]) > 1e-38 ||
-            fabs(aCurrBBCenter[1]-myBBCenter[1]) > 1e-38 ||
-            fabs(aCurrBBCenter[2]-myBBCenter[2]) > 1e-38 ) {
-         // bounding box was changed => send SVTK::RotationPointChanged event
-         // invoke event for update coordinates in SVTK_SetRotationPointDlg
-         InvokeEvent(SVTK::BBCenterChanged,(void*)aCurrBBCenter);
-         for ( int i =0; i < 3; i++) myBBCenter[i] = aCurrBBCenter[i];
-       }
+        if ( fabs(aCurrBBCenter[0]-myBBCenter[0]) > 1e-38 ||
+             fabs(aCurrBBCenter[1]-myBBCenter[1]) > 1e-38 ||
+             fabs(aCurrBBCenter[2]-myBBCenter[2]) > 1e-38 ) {
+          // bounding box was changed => send SVTK::RotationPointChanged event
+          // invoke event for update coordinates in SVTK_SetRotationPointDlg
+          InvokeEvent(SVTK::BBCenterChanged,(void*)aCurrBBCenter);
+          for ( int i =0; i < 3; i++) myBBCenter[i] = aCurrBBCenter[i];
+        }
       }
       else 
       {
-       for ( int i =0; i < 3; i++) myBBCenter[i] = aCurrBBCenter[i];
-       myBBFirstCheck = false;
+        for ( int i =0; i < 3; i++) myBBCenter[i] = aCurrBBCenter[i];
+        myBBFirstCheck = false;
       }
     }
   }
@@ -1432,9 +1432,9 @@ void SVTK_InteractorStyle::endDrawRect()
   Main process event method (reimplemented from #vtkInteractorStyle)
 */
 void SVTK_InteractorStyle::ProcessEvents( vtkObject* object,
-                                         unsigned long event,
-                                         void* clientData, 
-                                         void* callData )
+                                          unsigned long event,
+                                          void* clientData, 
+                                          void* callData )
 {
   if ( clientData ) {
     vtkObject* anObject = reinterpret_cast<vtkObject*>( clientData );
@@ -1445,140 +1445,140 @@ void SVTK_InteractorStyle::ProcessEvents( vtkObject* object,
     if ( self ) {
       switch ( event ) {
       case SVTK::SpaceMouseMoveEvent : 
-       self->onSpaceMouseMove( (double*)callData ); 
-       return;
+        self->onSpaceMouseMove( (double*)callData ); 
+        return;
       case SVTK::SpaceMouseButtonEvent : 
-       self->onSpaceMouseButton( *((int*)callData) ); 
-       return;
+        self->onSpaceMouseButton( *((int*)callData) ); 
+        return;
       case SVTK::PanLeftEvent: 
-       self->IncrementalPan(-aSpeedIncrement, 0);
-       return;
+        self->IncrementalPan(-aSpeedIncrement, 0);
+        return;
       case SVTK::PanRightEvent:
-       self->IncrementalPan(aSpeedIncrement, 0);
-       return;
+        self->IncrementalPan(aSpeedIncrement, 0);
+        return;
       case SVTK::PanUpEvent:
-       self->IncrementalPan(0, aSpeedIncrement);
-       return;
+        self->IncrementalPan(0, aSpeedIncrement);
+        return;
       case SVTK::PanDownEvent:
-       self->IncrementalPan(0, -aSpeedIncrement);
-       return;
+        self->IncrementalPan(0, -aSpeedIncrement);
+        return;
       case SVTK::ZoomInEvent:
-       self->IncrementalZoom(aSpeedIncrement);
-       return;
+        self->IncrementalZoom(aSpeedIncrement);
+        return;
       case SVTK::ZoomOutEvent:
-       self->IncrementalZoom(-aSpeedIncrement);
-       return;
+        self->IncrementalZoom(-aSpeedIncrement);
+        return;
       case SVTK::RotateLeftEvent: 
-       self->IncrementalRotate(-aSpeedIncrement, 0);
-       return;
+        self->IncrementalRotate(-aSpeedIncrement, 0);
+        return;
       case SVTK::RotateRightEvent:
-       self->IncrementalRotate(aSpeedIncrement, 0);
-       return;
+        self->IncrementalRotate(aSpeedIncrement, 0);
+        return;
       case SVTK::RotateUpEvent:
-       self->IncrementalRotate(0, -aSpeedIncrement);
-       return;
+        self->IncrementalRotate(0, -aSpeedIncrement);
+        return;
       case SVTK::RotateDownEvent:
-       self->IncrementalRotate(0, aSpeedIncrement);
-       return;
+        self->IncrementalRotate(0, aSpeedIncrement);
+        return;
       case SVTK::PlusSpeedIncrementEvent:
-       self->ControllerIncrement()->Increase();
-       return;
+        self->ControllerIncrement()->Increase();
+        return;
       case SVTK::MinusSpeedIncrementEvent:
-       self->ControllerIncrement()->Decrease();
-       return;
+        self->ControllerIncrement()->Decrease();
+        return;
       case SVTK::SetSpeedIncrementEvent:
-       self->ControllerIncrement()->SetStartValue(*((int*)callData));
-       return;
+        self->ControllerIncrement()->SetStartValue(*((int*)callData));
+        return;
 
       case SVTK::SetSMDecreaseSpeedEvent:
-       self->mySMDecreaseSpeedBtn = *((int*)callData);
-       return;
+        self->mySMDecreaseSpeedBtn = *((int*)callData);
+        return;
       case SVTK::SetSMIncreaseSpeedEvent:
-       self->mySMIncreaseSpeedBtn = *((int*)callData);
-       return;
+        self->mySMIncreaseSpeedBtn = *((int*)callData);
+        return;
       case SVTK::SetSMDominantCombinedSwitchEvent:
-       self->mySMDominantCombinedSwitchBtn = *((int*)callData);
-       return;
+        self->mySMDominantCombinedSwitchBtn = *((int*)callData);
+        return;
 
       case SVTK::StartZoom:
-       self->startZoom();
-       return;
+        self->startZoom();
+        return;
       case SVTK::StartPan:
-       self->startPan();
-       return;
+        self->startPan();
+        return;
       case SVTK::StartRotate:
-       self->startRotate();
-       return;
+        self->startRotate();
+        return;
       case SVTK::StartGlobalPan:
-       self->startGlobalPan();
-       return;
+        self->startGlobalPan();
+        return;
       case SVTK::StartFitArea:
-       self->startFitArea();
-       return;
+        self->startFitArea();
+        return;
 
       case SVTK::SetRotateGravity:
-       if ( self->myCurrRotationPointType == SVTK::StartPointSelection )
-       {
-         self->myHighlightSelectionPointActor->SetVisibility( false );
-         if( self->GetCurrentRenderer() != NULL )
-           self->GetCurrentRenderer()->RemoveActor( self->myHighlightSelectionPointActor.GetPointer() );
-         self->GetRenderWidget()->setCursor(self->myDefCursor); 
-       }
-       self->myPrevRotationPointType = self->myCurrRotationPointType;
-       self->myCurrRotationPointType = SVTK::SetRotateGravity;
-       if ( ComputeBBCenter(self->GetCurrentRenderer(),aCenter) ) 
-         // invoke event for update coordinates in SVTK_SetRotationPointDlg
-         self->InvokeEvent(SVTK::BBCenterChanged,(void*)aCenter);
-       return;
+        if ( self->myCurrRotationPointType == SVTK::StartPointSelection )
+        {
+          self->myHighlightSelectionPointActor->SetVisibility( false );
+          if( self->GetCurrentRenderer() != NULL )
+            self->GetCurrentRenderer()->RemoveActor( self->myHighlightSelectionPointActor.GetPointer() );
+          self->GetRenderWidget()->setCursor(self->myDefCursor); 
+        }
+        self->myPrevRotationPointType = self->myCurrRotationPointType;
+        self->myCurrRotationPointType = SVTK::SetRotateGravity;
+        if ( ComputeBBCenter(self->GetCurrentRenderer(),aCenter) ) 
+          // invoke event for update coordinates in SVTK_SetRotationPointDlg
+          self->InvokeEvent(SVTK::BBCenterChanged,(void*)aCenter);
+        return;
       case SVTK::StartPointSelection:
-       self->startPointSelection();
-       return;
+        self->startPointSelection();
+        return;
 
       case SVTK::ChangeRotationPoint:
-       if ( self->myCurrRotationPointType == SVTK::StartPointSelection )
-       {
-         self->myHighlightSelectionPointActor->SetVisibility( false );
-         if( self->GetCurrentRenderer() != NULL )
-           self->GetCurrentRenderer()->RemoveActor( self->myHighlightSelectionPointActor.GetPointer() );
-         self->GetRenderWidget()->setCursor(self->myDefCursor); 
-       }
-       self->myPrevRotationPointType = self->myCurrRotationPointType;
-       self->myCurrRotationPointType = SVTK::SetRotateSelected;
-       aSelectedPoint = (vtkFloatingPointType*)callData;
-       self->myRotationPointX = aSelectedPoint[0];
-       self->myRotationPointY = aSelectedPoint[1];
-       self->myRotationPointZ = aSelectedPoint[2];
-       return;
+        if ( self->myCurrRotationPointType == SVTK::StartPointSelection )
+        {
+          self->myHighlightSelectionPointActor->SetVisibility( false );
+          if( self->GetCurrentRenderer() != NULL )
+            self->GetCurrentRenderer()->RemoveActor( self->myHighlightSelectionPointActor.GetPointer() );
+          self->GetRenderWidget()->setCursor(self->myDefCursor); 
+        }
+        self->myPrevRotationPointType = self->myCurrRotationPointType;
+        self->myCurrRotationPointType = SVTK::SetRotateSelected;
+        aSelectedPoint = (vtkFloatingPointType*)callData;
+        self->myRotationPointX = aSelectedPoint[0];
+        self->myRotationPointY = aSelectedPoint[1];
+        self->myRotationPointZ = aSelectedPoint[2];
+        return;
 
       case SVTK::SetFocalPointGravity:
-       if ( self->myCurrFocalPointType == SVTK::StartPointSelection )
-       {
-         self->myHighlightSelectionPointActor->SetVisibility( false );
-         if( self->GetCurrentRenderer() != NULL )
-           self->GetCurrentRenderer()->RemoveActor( self->myHighlightSelectionPointActor.GetPointer() );
-         self->GetRenderWidget()->setCursor(self->myDefCursor); 
-       }
-       self->myCurrFocalPointType = SVTK::SetFocalPointGravity;
-       if ( ComputeBBCenter(self->GetCurrentRenderer(),aCenter) ) {
-         // invoke event for update coordinates in SVTK_ViewParameterDlg
-         self->InvokeEvent(SVTK::FocalPointChanged,(void*)aCenter);
-       }
-       return;
+        if ( self->myCurrFocalPointType == SVTK::StartPointSelection )
+        {
+          self->myHighlightSelectionPointActor->SetVisibility( false );
+          if( self->GetCurrentRenderer() != NULL )
+            self->GetCurrentRenderer()->RemoveActor( self->myHighlightSelectionPointActor.GetPointer() );
+          self->GetRenderWidget()->setCursor(self->myDefCursor); 
+        }
+        self->myCurrFocalPointType = SVTK::SetFocalPointGravity;
+        if ( ComputeBBCenter(self->GetCurrentRenderer(),aCenter) ) {
+          // invoke event for update coordinates in SVTK_ViewParameterDlg
+          self->InvokeEvent(SVTK::FocalPointChanged,(void*)aCenter);
+        }
+        return;
       case SVTK::StartFocalPointSelection:
-       self->startFocalPointSelection();
-       return;
+        self->startFocalPointSelection();
+        return;
 
       case SVTK::SetFocalPointSelected:
-       if ( self->myCurrFocalPointType == SVTK::StartFocalPointSelection )
-       {
-         self->myHighlightSelectionPointActor->SetVisibility( false );
-         if( self->GetCurrentRenderer() != NULL )
-           self->GetCurrentRenderer()->RemoveActor( self->myHighlightSelectionPointActor.GetPointer() );
-         self->GetRenderWidget()->setCursor(self->myDefCursor); 
-       }
-       self->myPrevFocalPointType = self->myCurrFocalPointType;
-       self->myCurrFocalPointType = SVTK::SetFocalPointSelected;
-       return;
+        if ( self->myCurrFocalPointType == SVTK::StartFocalPointSelection )
+        {
+          self->myHighlightSelectionPointActor->SetVisibility( false );
+          if( self->GetCurrentRenderer() != NULL )
+            self->GetCurrentRenderer()->RemoveActor( self->myHighlightSelectionPointActor.GetPointer() );
+          self->GetRenderWidget()->setCursor(self->myDefCursor); 
+        }
+        self->myPrevFocalPointType = self->myCurrFocalPointType;
+        self->myCurrFocalPointType = SVTK::SetFocalPointSelected;
+        return;
       }
     }
   }
index 9053b430d34518836a77335d2e971f15bbd4778b..50def5acf0eccc325e08b0b560c75f0042f254b6 100644 (file)
@@ -264,9 +264,9 @@ class SVTK_EXPORT SVTK_InteractorStyle: public vtkInteractorStyle
   static 
   void
   ProcessEvents(vtkObject* object, 
-               unsigned long event,
-               void* clientData, 
-               void* callData );
+                unsigned long event,
+                void* clientData, 
+                void* callData );
 
   float MotionFactor;
   float RadianToDegree;                 // constant: for conv from deg to rad
index 2ffedddfeaed14f4cdff08218305af29bba9d254..a3fd9bbf35175383d394bc063c1e2fa48c90477b 100644 (file)
@@ -53,7 +53,7 @@ SVTK_KeyFreeInteractorStyle::~SVTK_KeyFreeInteractorStyle()
 
 //----------------------------------------------------------------------------
 void SVTK_KeyFreeInteractorStyle::OnLeftButtonDown(int ctrl, int shift, 
-                                                  int x, int y) 
+                                                   int x, int y) 
 {
   myIsLeftButtonDown = true;
 
@@ -78,10 +78,10 @@ void SVTK_KeyFreeInteractorStyle::OnLeftButtonDown(int ctrl, int shift,
   else {
     if (!(ctrl||shift)){
       if (myIsMidButtonDown){
-       startOperation(VTK_INTERACTOR_STYLE_CAMERA_ZOOM);
+        startOperation(VTK_INTERACTOR_STYLE_CAMERA_ZOOM);
       }
       else{
-       startOperation(VTK_INTERACTOR_STYLE_CAMERA_ROTATE);
+        startOperation(VTK_INTERACTOR_STYLE_CAMERA_ROTATE);
       }
     }
   }
@@ -90,8 +90,8 @@ void SVTK_KeyFreeInteractorStyle::OnLeftButtonDown(int ctrl, int shift,
 
 //----------------------------------------------------------------------------
 void SVTK_KeyFreeInteractorStyle::OnMiddleButtonDown(int ctrl,
-                                                    int shift, 
-                                                    int x, int y) 
+                                                     int shift, 
+                                                     int x, int y) 
 {
   myIsMidButtonDown = true;
 
@@ -116,10 +116,10 @@ void SVTK_KeyFreeInteractorStyle::OnMiddleButtonDown(int ctrl,
   else {
     if (!(ctrl||shift)){
       if ( myIsLeftButtonDown ){
-       startOperation(VTK_INTERACTOR_STYLE_CAMERA_ZOOM);
+        startOperation(VTK_INTERACTOR_STYLE_CAMERA_ZOOM);
       }
       else{
-       startOperation(VTK_INTERACTOR_STYLE_CAMERA_PAN);
+        startOperation(VTK_INTERACTOR_STYLE_CAMERA_PAN);
       }
     }
   }
index 9596001ca7c00c0c7f3c72c0c0fa49bfde4f874d..527fe110c87e5716807eba0e6b90eafe8af834d5 100644 (file)
@@ -44,11 +44,11 @@ using namespace std;
 */
 SVTK_NonIsometricDlg
 ::SVTK_NonIsometricDlg(QtxAction* theAction,
-                      SVTK_ViewWindow* theParent,
-                      const char* theName):
+                       SVTK_ViewWindow* theParent,
+                       const char* theName):
   SVTK_DialogBase(theAction,
-                 theParent, 
-                 theName),
+                  theParent, 
+                  theName),
   m_MainWindow(theParent)
 {
   setWindowTitle(tr("DLG_TITLE"));
index 7958fc24adf27721bff6a9fa4061b3eb010ce70d..5effaed4904b8240515cd611b430ab349c226a70 100644 (file)
@@ -44,8 +44,8 @@ class SVTK_NonIsometricDlg : public SVTK_DialogBase
 
 public:
   SVTK_NonIsometricDlg(QtxAction* theAction,
-                      SVTK_ViewWindow* theParent,
-                      const char* theName);
+                       SVTK_ViewWindow* theParent,
+                       const char* theName);
 
   ~SVTK_NonIsometricDlg();
 
index 52b08a14d7edc17ba6ca778fe52b7fbceed004a2..a837c27b5d25118abe96cba62a9b9271e07b809b 100755 (executable)
@@ -60,8 +60,8 @@ namespace
   inline
   void
   GetNameJPEG(const std::string& thePreffix,  
-             const int theIndex,
-             std::string& theName)
+              const int theIndex,
+              std::string& theName)
   {
     using namespace std;
     ostringstream aStream;
@@ -241,16 +241,16 @@ SVTK_Recorder
 void
 SVTK_Recorder
 ::ProcessEvents(vtkObject* vtkNotUsed(theObject), 
-               unsigned long theEvent,
-               void* theClientData, 
-               void* vtkNotUsed(theCallData))
+                unsigned long theEvent,
+                void* theClientData, 
+                void* vtkNotUsed(theCallData))
 {
   if(vtkObject* anObj = reinterpret_cast<vtkObject*>(theClientData)){ 
     if(SVTK_Recorder* aSelf = dynamic_cast<SVTK_Recorder*>(anObj)){
       if(theEvent==vtkCommand::EndEvent){
-       if(aSelf->State() == SVTK_Recorder::SVTK_Recorder_Record){
-         aSelf->DoRecord();
-       }
+        if(aSelf->State() == SVTK_Recorder::SVTK_Recorder_Record){
+          aSelf->DoRecord();
+        }
       }
     }
   }
@@ -322,7 +322,7 @@ SVTK_Recorder
 inline 
 int
 GetFrameIndex(double theStartTime,
-             double theFPS)
+              double theFPS)
 {
   double aTimeNow = vtkTimerLog::GetCurrentTime();
   double aDelta = aTimeNow - theStartTime;
@@ -350,8 +350,8 @@ SVTK_Recorder
       myFrameIndexes.back() = abs(myFrameIndexes.back());
       double aPauseTime = fabs((double)(aFrameIndex - myFrameIndex - 1)) / myNbFPS;
       if(MYDEBUG) 
-       cout<<"SVTK_Recorder::DoRecord - aFrameIndex = "<<aFrameIndex<<
-         "; aPauseTime = "<<aPauseTime<<endl;
+        cout<<"SVTK_Recorder::DoRecord - aFrameIndex = "<<aFrameIndex<<
+          "; aPauseTime = "<<aPauseTime<<endl;
       myTimeStart += aPauseTime;
     }
 
@@ -399,8 +399,8 @@ SVTK_Recorder
   anImageData->UpdateInformation();
   int *anExtent = anImageData->GetWholeExtent();
   anImageData->SetUpdateExtent(anExtent[0], anExtent[1],
-                              anExtent[2], anExtent[3],
-                              0,0);
+                               anExtent[2], anExtent[3],
+                               0,0);
   anImageData->UpdateData();
 }
 
@@ -434,7 +434,7 @@ SVTK_Recorder
       GetNameJPEG(myName,anIndex,anCurrentName);
       aStream<<"ln -s "<< anInitialName<<" "<<anCurrentName<<";";
       if(anIndex + 1 < aFinishIndex)
-       aStream<<" \\";
+        aStream<<" \\";
       aStream<<endl;
     }
     std::string aString(aStream.str());
index 436974787be8fda7d22ec9955d446ff5a41e6ff1..f0e96b43e6c6980b9dbc05602b4b116e2d5e765b 100755 (executable)
@@ -120,9 +120,9 @@ protected :
   static
   void
   ProcessEvents(vtkObject* theObject, 
-               unsigned long theEvent,
-               void* theClientData, 
-               void* theCallData);
+                unsigned long theEvent,
+                void* theClientData, 
+                void* theCallData);
 
 protected :
   int myState;
index 3f76101faeb47731005864818ce2e008a8e660a8..8c59d15d5b4643e12de6d4dd45a9acad46fb2527 100644 (file)
@@ -156,15 +156,15 @@ void SVTK_RecorderDlg::onHelp()
   if (app)
     app->onHelpContextModule(app->activeModule() ? app->moduleName(app->activeModule()->moduleName()) : QString(""), aHelpFileName);
   else {
-               QString platform;
+                QString platform;
 #ifdef WIN32
-               platform = "winapplication";
+                platform = "winapplication";
 #else
-               platform = "application";
+                platform = "application";
 #endif
     SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
-                            QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
+                             QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
   }
   */
 }
@@ -176,7 +176,7 @@ bool SVTK_RecorderDlg::onBrowseFile()
   aFilter.append( tr( "FLT_ALL_FILES" ) );
 
   QString aFileName = SUIT_FileDlg::getFileName( this, getenv( "HOME" ), aFilter,
-                                                tr( "FILE_NAME" ), false );
+                                                 tr( "FILE_NAME" ), false );
 
   if( aFileName.isNull() )
     return false;
index 1030e3db388b46e1a629e305cee3aced9dcdea19..43fc897e80d762d6233f5e8b68c3aad4bb1343ec 100644 (file)
@@ -64,11 +64,11 @@ namespace
   inline
   int
   Check(float* theZPtr,
-       int theSelection[4],
-       vtkFloatingPointType theTolerance,
-       vtkFloatingPointType theDZ,
-       int theDX,
-       int theDY)
+        int theSelection[4],
+        vtkFloatingPointType theTolerance,
+        vtkFloatingPointType theDZ,
+        int theDX,
+        int theDY)
   {
     int aRet = 0;
     vtkFloatingPointType aZ = -1.0;
@@ -80,7 +80,7 @@ namespace
       // the selection window.
       aZ = GetZ(theZPtr,theSelection,theDX,theDY);
       if(aZ > theTolerance && aZ < 1.0 - theTolerance){
-       aRet = fabs(aZ - theDZ) <= theTolerance;
+        aRet = fabs(aZ - theDZ) <= theTolerance;
       }
     }
 
@@ -92,11 +92,11 @@ namespace
   //----------------------------------------------------------------------------
   void
   SelectVisiblePoints(int theSelection[4],
-                     vtkRenderer *theRenderer,
-                     vtkDataSet *theInput,
-                     SVTK_RectPicker::TVectorIds& theVisibleIds,
-                     SVTK_RectPicker::TVectorIds& theInVisibleIds,
-                     vtkFloatingPointType theTolerance)
+                      vtkRenderer *theRenderer,
+                      vtkDataSet *theInput,
+                      SVTK_RectPicker::TVectorIds& theVisibleIds,
+                      SVTK_RectPicker::TVectorIds& theInVisibleIds,
+                      vtkFloatingPointType theTolerance)
   {
     theVisibleIds.clear();
     theInVisibleIds.clear();
@@ -115,7 +115,7 @@ namespace
     // and handle the transformation ourselves.
     vtkMatrix4x4 *aMatrix = vtkMatrix4x4::New();
     aMatrix->DeepCopy( theRenderer->GetActiveCamera()->
-                      GetCompositePerspectiveTransformMatrix( theRenderer->GetTiledAspectRatio(), 0, 1 ) );
+                       GetCompositePerspectiveTransformMatrix( theRenderer->GetTiledAspectRatio(), 0, 1 ) );
 
     // We grab the z-buffer for the selection region all at once and probe the resulting array.
     float *aZPtr = theRenderer->GetRenderWindow()->
@@ -132,7 +132,7 @@ namespace
     for(int iY = theSelection[1]; iY <= theSelection[3];  iY++){
       //cout<<iY<<"\t";
       for(int iX = theSelection[0]; iX <= theSelection[2];  iX++){
-       //cout<<std::setprecision(4)<<GetZ(aZPtr,theSelection,iX,iY)<<"\t";
+        //cout<<std::setprecision(4)<<GetZ(aZPtr,theSelection,iX,iY)<<"\t";
       }
       //cout<<endl;
     }
@@ -145,10 +145,10 @@ namespace
       vtkFloatingPointType aView[4];
       aMatrix->MultiplyPoint(aX,aView);
       if(aView[3] == 0.0)
-       continue;
+        continue;
       theRenderer->SetViewPoint(aView[0]/aView[3], 
-                               aView[1]/aView[3],
-                               aView[2]/aView[3]);
+                                aView[1]/aView[3],
+                                aView[2]/aView[3]);
       theRenderer->ViewToDisplay();
 
       vtkFloatingPointType aDX[3];
@@ -158,52 +158,52 @@ namespace
       if(aDX[0] >= theSelection[0] && aDX[0] <= theSelection[2] &&
          aDX[1] >= theSelection[1] && aDX[1] <= theSelection[3])
       {
-       //cout<<"aPntId "<<aPntId<<"; aDX = {"<<aDX[0]<<", "<<aDX[1]<<", "<<aDX[2]<<"}\n";
-       int aDX0 = int(aDX[0]);
-       int aDX1 = int(aDX[1]);
-
-       int aRet = Check(aZPtr,theSelection,theTolerance,aDX[2],aDX0,aDX1);
-       if(aRet > 0)
-         goto ADD_VISIBLE;
-       if(aRet < 0)
-         goto ADD_INVISIBLE;
-
-       static int aMaxRadius = 5;
-       for(int aRadius = 1; aRadius < aMaxRadius; aRadius++){
-         int aStartDX[2] = {aDX0 - aRadius, aDX1 - aRadius};
-         for(int i = 0; i <= aRadius; i++){
-           int aRet = Check(aZPtr,theSelection,theTolerance,aDX[2],aStartDX[0]++,aStartDX[1]);
-           if(aRet > 0)
-             goto ADD_VISIBLE;
-           if(aRet < 0)
-             goto ADD_INVISIBLE;
-         }
-         for(int i = 0; i <= aRadius; i++){
-           int aRet = Check(aZPtr,theSelection,theTolerance,aDX[2],aStartDX[0],aStartDX[1]++);
-           if(aRet > 0)
-             goto ADD_VISIBLE;
-           if(aRet < 0)
-             goto ADD_INVISIBLE;
-         }
-         for(int i = 0; i <= aRadius; i++){
-           int aRet = Check(aZPtr,theSelection,theTolerance,aDX[2],aStartDX[0]--,aStartDX[1]);
-           if(aRet > 0)
-             goto ADD_VISIBLE;
-           if(aRet < 0)
-             goto ADD_INVISIBLE;
-         }
-         for(int i = 0; i <= aRadius; i++){
-           int aRet = Check(aZPtr,theSelection,theTolerance,aDX[2],aStartDX[0],aStartDX[1]--);
-           if(aRet > 0)
-             goto ADD_VISIBLE;
-           if(aRet < 0)
-             goto ADD_INVISIBLE;
-         }
-       }
-       if(false)
-         ADD_VISIBLE : theVisibleIds.push_back(aPntId);
-       if(false)
-         ADD_INVISIBLE : theInVisibleIds.push_back(aPntId);
+        //cout<<"aPntId "<<aPntId<<"; aDX = {"<<aDX[0]<<", "<<aDX[1]<<", "<<aDX[2]<<"}\n";
+        int aDX0 = int(aDX[0]);
+        int aDX1 = int(aDX[1]);
+
+        int aRet = Check(aZPtr,theSelection,theTolerance,aDX[2],aDX0,aDX1);
+        if(aRet > 0)
+          goto ADD_VISIBLE;
+        if(aRet < 0)
+          goto ADD_INVISIBLE;
+
+        static int aMaxRadius = 5;
+        for(int aRadius = 1; aRadius < aMaxRadius; aRadius++){
+          int aStartDX[2] = {aDX0 - aRadius, aDX1 - aRadius};
+          for(int i = 0; i <= aRadius; i++){
+            int aRet = Check(aZPtr,theSelection,theTolerance,aDX[2],aStartDX[0]++,aStartDX[1]);
+            if(aRet > 0)
+              goto ADD_VISIBLE;
+            if(aRet < 0)
+              goto ADD_INVISIBLE;
+          }
+          for(int i = 0; i <= aRadius; i++){
+            int aRet = Check(aZPtr,theSelection,theTolerance,aDX[2],aStartDX[0],aStartDX[1]++);
+            if(aRet > 0)
+              goto ADD_VISIBLE;
+            if(aRet < 0)
+              goto ADD_INVISIBLE;
+          }
+          for(int i = 0; i <= aRadius; i++){
+            int aRet = Check(aZPtr,theSelection,theTolerance,aDX[2],aStartDX[0]--,aStartDX[1]);
+            if(aRet > 0)
+              goto ADD_VISIBLE;
+            if(aRet < 0)
+              goto ADD_INVISIBLE;
+          }
+          for(int i = 0; i <= aRadius; i++){
+            int aRet = Check(aZPtr,theSelection,theTolerance,aDX[2],aStartDX[0],aStartDX[1]--);
+            if(aRet > 0)
+              goto ADD_VISIBLE;
+            if(aRet < 0)
+              goto ADD_INVISIBLE;
+          }
+        }
+        if(false)
+          ADD_VISIBLE : theVisibleIds.push_back(aPntId);
+        if(false)
+          ADD_INVISIBLE : theInVisibleIds.push_back(aPntId);
       }
     }//for all points
 
@@ -218,7 +218,7 @@ namespace
   inline
   void
   GetCenter(const vtkFloatingPointType theBounds[6],
-           vtkFloatingPointType theCenter[3])
+            vtkFloatingPointType theCenter[3])
   {
     theCenter[0] = (theBounds[1] + theBounds[0]) / 2.0;
     theCenter[1] = (theBounds[3] + theBounds[2]) / 2.0;
@@ -227,10 +227,10 @@ namespace
 
   void
   SelectVisibleCells(int theSelection[4],
-                    vtkRenderer *theRenderer,
-                    vtkDataSet *theInput,
-                    SVTK_RectPicker::TVectorIds& theVectorIds,
-                    vtkFloatingPointType theTolerance)
+                     vtkRenderer *theRenderer,
+                     vtkDataSet *theInput,
+                     SVTK_RectPicker::TVectorIds& theVectorIds,
+                     vtkFloatingPointType theTolerance)
   {
     theVectorIds.clear();
 
@@ -243,11 +243,11 @@ namespace
     SVTK_RectPicker::TVectorIds aVisiblePntIds;
     SVTK_RectPicker::TVectorIds anInVisiblePntIds;
     SelectVisiblePoints(theSelection,
-                       theRenderer,
-                       theInput,
-                       aVisiblePntIds,
-                       anInVisiblePntIds,
-                       theTolerance);
+                        theRenderer,
+                        theInput,
+                        aVisiblePntIds,
+                        anInVisiblePntIds,
+                        theTolerance);
 
     typedef std::set<vtkIdType> TIdsSet;
     TIdsSet aVisibleIds(aVisiblePntIds.begin(),aVisiblePntIds.end());
@@ -260,7 +260,7 @@ namespace
     // and handle the transformation ourselves.
     vtkMatrix4x4 *aMatrix = vtkMatrix4x4::New();
     aMatrix->DeepCopy(theRenderer->GetActiveCamera()->
-                     GetCompositePerspectiveTransformMatrix( theRenderer->GetTiledAspectRatio(), 0, 1 ) );
+                      GetCompositePerspectiveTransformMatrix( theRenderer->GetTiledAspectRatio(), 0, 1 ) );
 
     for(vtkIdType aCellId = 0; aCellId < aNumCells; aCellId++){
       vtkCell* aCell = theInput->GetCell(aCellId);
@@ -276,11 +276,11 @@ namespace
       aMatrix->MultiplyPoint(aX,aView);
 
       if(aView[3] == 0.0)
-       continue;
+        continue;
 
       theRenderer->SetViewPoint(aView[0]/aView[3], 
-                               aView[1]/aView[3],
-                               aView[2]/aView[3]);
+                                aView[1]/aView[3],
+                                aView[2]/aView[3]);
       theRenderer->ViewToDisplay();
 
       vtkFloatingPointType aDX[3];
@@ -291,19 +291,19 @@ namespace
          aDX[1] >= theSelection[1] && aDX[1] <= theSelection[3])
       {
 
-       //cout<<"aCellId = "<<aCellId<<": ";
-       vtkIdType aNumPts = aCell->GetNumberOfPoints();
-       bool anIsVisible = true;
-       for(vtkIdType anId = 0; anId < aNumPts; anId++){
-         vtkIdType aPntId = aCell->GetPointId(anId);
-         //cout<<aPntId<<"; ";
-         anIsVisible = aVisibleIds.find(aPntId) != aVisibleIds.end();
-         if(!anIsVisible)
-           break;
-       }
-       //cout<<"\t"<<anIsVisible<<"\n";
-       if(anIsVisible)
-         theVectorIds.push_back(aCellId);
+        //cout<<"aCellId = "<<aCellId<<": ";
+        vtkIdType aNumPts = aCell->GetNumberOfPoints();
+        bool anIsVisible = true;
+        for(vtkIdType anId = 0; anId < aNumPts; anId++){
+          vtkIdType aPntId = aCell->GetPointId(anId);
+          //cout<<aPntId<<"; ";
+          anIsVisible = aVisibleIds.find(aPntId) != aVisibleIds.end();
+          if(!anIsVisible)
+            break;
+        }
+        //cout<<"\t"<<anIsVisible<<"\n";
+        if(anIsVisible)
+          theVectorIds.push_back(aCellId);
       }
     }//for all parts
   }
@@ -311,10 +311,10 @@ namespace
   //----------------------------------------------------------------------------
   void
   CalculatePickPosition(vtkRenderer *theRenderer,
-                       vtkFloatingPointType theSelectionX, 
-                       vtkFloatingPointType theSelectionY, 
-                       vtkFloatingPointType theSelectionZ,
-                       vtkFloatingPointType thePickPosition[3])
+                        vtkFloatingPointType theSelectionX, 
+                        vtkFloatingPointType theSelectionY, 
+                        vtkFloatingPointType theSelectionZ,
+                        vtkFloatingPointType thePickPosition[3])
   {
     // Convert the selection point into world coordinates.
     //
@@ -323,7 +323,7 @@ namespace
     vtkFloatingPointType* aWorldCoords = theRenderer->GetWorldPoint();
     if ( aWorldCoords[3] != 0.0 ) {
       for (int i=0; i < 3; i++) {
-       thePickPosition[i] = aWorldCoords[i] / aWorldCoords[3];
+        thePickPosition[i] = aWorldCoords[i] / aWorldCoords[3];
       }
     }
   }
@@ -359,8 +359,8 @@ SVTK_RectPicker
        vtkRenderer *theRenderer)
 {
   return Pick(theSelection[0], theSelection[1], theSelection[2], 
-             theSelection2[0], theSelection2[1], theSelection2[2],
-             theRenderer);
+              theSelection2[0], theSelection2[1], theSelection2[2],
+              theRenderer);
 }
 
 int 
@@ -400,10 +400,10 @@ SVTK_RectPicker
   // Convert the selection point into world coordinates.
   //
   CalculatePickPosition(theRenderer,
-                       theSelectionX,
-                       theSelectionY,
-                       aSelectionZ,
-                       this->PickPosition);
+                        theSelectionX,
+                        theSelectionY,
+                        aSelectionZ,
+                        this->PickPosition);
 
   this->SelectionPoint2[0] = theSelectionX2;
   this->SelectionPoint2[1] = theSelectionY2;
@@ -412,10 +412,10 @@ SVTK_RectPicker
   // Convert the selection point into world coordinates.
   //
   CalculatePickPosition(theRenderer,
-                       theSelectionX2,
-                       theSelectionY2,
-                       aSelectionZ,
-                       this->PickPosition2);
+                        theSelectionX2,
+                        theSelectionY2,
+                        aSelectionZ,
+                        this->PickPosition2);
 
   // Invoke start pick method if defined
   this->InvokeEvent(vtkCommand::StartPickEvent,NULL);
@@ -436,41 +436,41 @@ SVTK_RectPicker
       vtkProp *aPropCandidate = aPath->GetLastNode()->GetProp();
       if ( aPropCandidate->GetPickable() && aPropCandidate->GetVisibility() ) {
         anIsPickable = true;
-       anActor = vtkActor::SafeDownCast(aPropCandidate);
-       if ( anActor ) {
+        anActor = vtkActor::SafeDownCast(aPropCandidate);
+        if ( anActor ) {
           aMapper = anActor->GetMapper();
           if ( anActor->GetProperty()->GetOpacity() <= 0.0 )
-           anIsPickable = false;
-       }
+            anIsPickable = false;
+        }
       }
       if ( anIsPickable  &&  aMapper && aMapper->GetInput()) {
-       int aSelectionPoint[4] = {int(theSelectionX),
-                                 int(theSelectionY),
-                                 int(theSelectionX2),
-                                 int(theSelectionY2)};
-       if ( this->PickPoints ) {
-         TVectorIds& aVisibleIds = myPointIdsMap[anActor];
-         TVectorIds anInVisibleIds;
-         SelectVisiblePoints(aSelectionPoint,
-                             theRenderer,
-                             aMapper->GetInput(),
-                             aVisibleIds,
-                             anInVisibleIds,
-                             this->Tolerance);
-         if ( aVisibleIds.empty() ) {
-           myPointIdsMap.erase(myPointIdsMap.find(anActor));
-         }
-       } else {
-         TVectorIds& aVectorIds = myCellIdsMap[anActor];
-         SelectVisibleCells(aSelectionPoint,
-                            theRenderer,
-                            aMapper->GetInput(),
-                            aVectorIds,
-                            this->Tolerance);
-         if ( aVectorIds.empty() ) {
-           myCellIdsMap.erase(myCellIdsMap.find(anActor));
-         }
-       }
+        int aSelectionPoint[4] = {int(theSelectionX),
+                                  int(theSelectionY),
+                                  int(theSelectionX2),
+                                  int(theSelectionY2)};
+        if ( this->PickPoints ) {
+          TVectorIds& aVisibleIds = myPointIdsMap[anActor];
+          TVectorIds anInVisibleIds;
+          SelectVisiblePoints(aSelectionPoint,
+                              theRenderer,
+                              aMapper->GetInput(),
+                              aVisibleIds,
+                              anInVisibleIds,
+                              this->Tolerance);
+          if ( aVisibleIds.empty() ) {
+            myPointIdsMap.erase(myPointIdsMap.find(anActor));
+          }
+        } else {
+          TVectorIds& aVectorIds = myCellIdsMap[anActor];
+          SelectVisibleCells(aSelectionPoint,
+                             theRenderer,
+                             aMapper->GetInput(),
+                             aVectorIds,
+                             this->Tolerance);
+          if ( aVectorIds.empty() ) {
+            myCellIdsMap.erase(myCellIdsMap.find(anActor));
+          }
+        }
       }
     }
   }
index 01cc85cecba910728e1cb7f8aec26ac6be7f727a..aa77c4d1841e6c4de180e717ae6516b917b29ac4 100644 (file)
@@ -67,7 +67,7 @@ static bool FOCUS_UNDER_MOUSE = false;
 */
 QVTK_RenderWindowInteractor
 ::QVTK_RenderWindowInteractor(QWidget* theParent, 
-                             const char* theName):
+                              const char* theName):
   QWidget(theParent),
   myRenderWindow(vtkRenderWindow::New())
 {
@@ -221,13 +221,13 @@ QVTK_RenderWindowInteractor
       aRenderers->InitTraversal();
       double aCoeff = 1.0;
       if(vtkRenderer *aRenderer = aRenderers->GetNextItem()) {
-       vtkCamera *aCamera = aRenderer->GetActiveCamera();
-       double aScale = aCamera->GetParallelScale();
-       if((aWidth - width())*(aHeight - height()) > 0)
-         aCoeff = sqrt(double(aWidth)/double(width())*double(height())/double(aHeight));
-       else
-         aCoeff = double(aWidth)/double(width());
-       aCamera->SetParallelScale(aScale*aCoeff);
+        vtkCamera *aCamera = aRenderer->GetActiveCamera();
+        double aScale = aCamera->GetParallelScale();
+        if((aWidth - width())*(aHeight - height()) > 0)
+          aCoeff = sqrt(double(aWidth)/double(width())*double(height())/double(aHeight));
+        else
+          aCoeff = double(aWidth)/double(width());
+        aCamera->SetParallelScale(aScale*aCoeff);
       }
     }
   }
@@ -253,9 +253,9 @@ QVTK_RenderWindowInteractor
 ::mouseMoveEvent( QMouseEvent* event ) 
 {
   GetDevice()->SetEventInformationFlipY(event->x(), 
-                                       event->y(),
-                                       event->modifiers() & Qt::ControlModifier,
-                                       event->modifiers() & Qt::ShiftModifier);
+                                        event->y(),
+                                        event->modifiers() & Qt::ControlModifier,
+                                        event->modifiers() & Qt::ShiftModifier);
   GetDevice()->MouseMoveEvent();
 }
 
@@ -268,9 +268,9 @@ QVTK_RenderWindowInteractor
 ::mousePressEvent( QMouseEvent* event ) 
 {
   GetDevice()->SetEventInformationFlipY(event->x(), 
-                                       event->y(),
-                                       event->modifiers() & Qt::ControlModifier,
-                                       event->modifiers() & Qt::ShiftModifier);
+                                        event->y(),
+                                        event->modifiers() & Qt::ControlModifier,
+                                        event->modifiers() & Qt::ShiftModifier);
   if( event->button() & Qt::LeftButton )
     GetDevice()->LeftButtonPressEvent();
   else if( event->button() & Qt::MidButton )
@@ -288,9 +288,9 @@ QVTK_RenderWindowInteractor
 ::mouseReleaseEvent( QMouseEvent *event )
 {
   GetDevice()->SetEventInformationFlipY(event->x(), 
-                                       event->y(),
-                                       event->modifiers() & Qt::ControlModifier,
-                                       event->modifiers() & Qt::ShiftModifier);
+                                        event->y(),
+                                        event->modifiers() & Qt::ControlModifier,
+                                        event->modifiers() & Qt::ShiftModifier);
 
   if( event->button() & Qt::LeftButton )
     GetDevice()->LeftButtonReleaseEvent();
@@ -330,8 +330,8 @@ QVTK_RenderWindowInteractor
 ::keyPressEvent( QKeyEvent* event ) 
 {
   GetDevice()->SetKeyEventInformation(event->modifiers() & Qt::ControlModifier,
-                                     event->modifiers() & Qt::ShiftModifier,
-                                     event->key());
+                                      event->modifiers() & Qt::ShiftModifier,
+                                      event->key());
   GetDevice()->KeyPressEvent();
   GetDevice()->CharEvent();
 }
@@ -344,8 +344,8 @@ QVTK_RenderWindowInteractor
 ::keyReleaseEvent( QKeyEvent * event ) 
 {
   GetDevice()->SetKeyEventInformation(event->modifiers() & Qt::ControlModifier,
-                                     event->modifiers() & Qt::ShiftModifier,
-                                     event->key());
+                                      event->modifiers() & Qt::ShiftModifier,
+                                      event->key());
   GetDevice()->KeyReleaseEvent();
 }
 
@@ -448,13 +448,13 @@ QVTK_RenderWindowInteractor
       switch ( type )
       {
       case SVTK_SpaceMouse::SpaceMouseMove:
-             GetDevice()->InvokeEvent( SVTK::SpaceMouseMoveEvent, anEvent.data );
-             break;
+              GetDevice()->InvokeEvent( SVTK::SpaceMouseMoveEvent, anEvent.data );
+              break;
       case SVTK_SpaceMouse::SpaceButtonPress:
-             GetDevice()->InvokeEvent( SVTK::SpaceMouseButtonEvent, &anEvent.button );
-             break;
+              GetDevice()->InvokeEvent( SVTK::SpaceMouseButtonEvent, &anEvent.button );
+              break;
       case SVTK_SpaceMouse::SpaceButtonRelease:
-             break;
+              break;
       }
       return true; // stop handling the event
     }
@@ -470,7 +470,7 @@ QVTK_RenderWindowInteractor
 */
 SVTK_RenderWindowInteractor
 ::SVTK_RenderWindowInteractor(QWidget* theParent, 
-                              const char* theName):
+                               const char* theName):
   QVTK_RenderWindowInteractor(theParent,theName),
   myEventCallbackCommand(vtkCallbackCommand::New())
 {
@@ -488,8 +488,8 @@ SVTK_RenderWindowInteractor
 void
 SVTK_RenderWindowInteractor
 ::Initialize(vtkGenericRenderWindowInteractor* theDevice,
-            SVTK_Renderer* theRenderer,
-            SVTK_Selector* theSelector)
+             SVTK_Renderer* theRenderer,
+             SVTK_Selector* theSelector)
 {
   QVTK_RenderWindowInteractor::Initialize(theDevice);
   SetRenderer(theRenderer);
@@ -630,8 +630,8 @@ SVTK_RenderWindowInteractor
 
   if(mySelector.GetPointer())
     mySelector->AddObserver(vtkCommand::EndPickEvent, 
-                           myEventCallbackCommand.GetPointer(), 
-                           myPriority);
+                            myEventCallbackCommand.GetPointer(), 
+                            myPriority);
 }
 
 /*!
@@ -640,9 +640,9 @@ SVTK_RenderWindowInteractor
 void 
 SVTK_RenderWindowInteractor
 ::ProcessEvents(vtkObject* vtkNotUsed(theObject), 
-               unsigned long theEvent,
-               void* theClientData, 
-               void* vtkNotUsed(theCallData))
+                unsigned long theEvent,
+                void* theClientData, 
+                void* vtkNotUsed(theCallData))
 {
   SVTK_RenderWindowInteractor* self = reinterpret_cast<SVTK_RenderWindowInteractor*>(theClientData);
 
index 5f014cf13a567361aa4f73ab19791f8e4676c0bd..b4aabaedcc1cb5e250486dbed4df490c35b4d1a7 100644 (file)
@@ -68,7 +68,7 @@ class SVTK_EXPORT QVTK_RenderWindowInteractor: public QWidget
 
  public:
   QVTK_RenderWindowInteractor(QWidget* theParent, 
-                             const char* theName);
+                              const char* theName);
 
   ~QVTK_RenderWindowInteractor();
 
@@ -149,7 +149,7 @@ class SVTK_EXPORT SVTK_RenderWindowInteractor: public QVTK_RenderWindowInteracto
 
  public:
   SVTK_RenderWindowInteractor(QWidget* theParent, 
-                             const char* theName);
+                              const char* theName);
 
   ~SVTK_RenderWindowInteractor();
 
@@ -157,8 +157,8 @@ class SVTK_EXPORT SVTK_RenderWindowInteractor: public QVTK_RenderWindowInteracto
   virtual
   void
   Initialize(vtkGenericRenderWindowInteractor* theDevice,
-            SVTK_Renderer* theRenderer,
-            SVTK_Selector* theSelector);
+             SVTK_Renderer* theRenderer,
+             SVTK_Selector* theSelector);
 
   //----------------------------------------------------------------------------
   //! To get corresponding SVTK_Renderer instance
@@ -238,9 +238,9 @@ class SVTK_EXPORT SVTK_RenderWindowInteractor: public QVTK_RenderWindowInteracto
   static
   void
   ProcessEvents(vtkObject* theObject, 
-               unsigned long theEvent,
-               void* theClientData, 
-               void* theCallData);
+                unsigned long theEvent,
+                void* theClientData, 
+                void* theCallData);
 
   // Used to process VTK events
   vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
index d1c7e82e17964bd07829c581946c2620f8810a71..c070dec6c677ef9123f40ec10fc7bdbb49fe51b2 100644 (file)
@@ -144,14 +144,14 @@ SVTK_Renderer
   myEventCallbackCommand->SetClientData(this);
   myEventCallbackCommand->SetCallback(SVTK_Renderer::ProcessEvents);
   GetDevice()->AddObserver(vtkCommand::ConfigureEvent,
-                          myEventCallbackCommand.GetPointer(), 
-                          myPriority);
+                           myEventCallbackCommand.GetPointer(), 
+                           myPriority);
   GetDevice()->AddObserver(vtkCommand::ResetCameraEvent,
-                          myEventCallbackCommand.GetPointer(), 
-                          myPriority);
+                           myEventCallbackCommand.GetPointer(), 
+                           myPriority);
   GetDevice()->AddObserver(vtkCommand::ResetCameraClippingRangeEvent,
-                          myEventCallbackCommand.GetPointer(), 
-                          myPriority);
+                           myEventCallbackCommand.GetPointer(), 
+                           myPriority);
 }
 
 /*!
@@ -188,9 +188,9 @@ SVTK_Renderer
 void 
 SVTK_Renderer
 ::ProcessEvents(vtkObject* vtkNotUsed(theObject), 
-               unsigned long theEvent,
-               void* theClientData, 
-               void* vtkNotUsed(theCallData))
+                unsigned long theEvent,
+                void* theClientData, 
+                void* vtkNotUsed(theCallData))
 {
   SVTK_Renderer* self = reinterpret_cast<SVTK_Renderer*>(theClientData);
 
@@ -223,7 +223,7 @@ SVTK_Renderer
 void 
 SVTK_Renderer
 ::Initialize(vtkRenderWindowInteractor* theInteractor,
-            SVTK_Selector* theSelector)
+             SVTK_Selector* theSelector)
 {
   myInteractor = theInteractor;
   mySelector = theSelector;
@@ -321,7 +321,7 @@ SVTK_Renderer
   while(vtkActor* anAct = anActors->GetNextActor())
     if(SALOME_Actor* anActor = dynamic_cast<SALOME_Actor*>(anAct))
       if(anActor->isHighlighted() && !anActor->IsInfinitive())
-       anActor->highlight(true);
+        anActor->highlight(true);
 }
 
 /*!
@@ -330,9 +330,9 @@ SVTK_Renderer
 void
 SVTK_Renderer
 ::SetSelectionProp(const double& theRed, 
-                  const double& theGreen, 
-                  const double& theBlue, 
-                  const int& theWidth) 
+                   const double& theGreen, 
+                   const double& theBlue, 
+                   const int& theWidth) 
 {
   myHighlightProperty->SetColor( theRed, theGreen, theBlue );
   myHighlightProperty->SetLineWidth( theWidth );
@@ -345,9 +345,9 @@ SVTK_Renderer
 void
 SVTK_Renderer
 ::SetPreselectionProp(const double& theRed, 
-                     const double& theGreen, 
-                     const double& theBlue, 
-                     const int& theWidth) 
+                      const double& theGreen, 
+                      const double& theBlue, 
+                      const int& theWidth) 
 {
   myPreHighlightProperty->SetColor( theRed, theGreen, theBlue );
   myPreHighlightProperty->SetLineWidth( theWidth );
@@ -360,8 +360,8 @@ SVTK_Renderer
 void
 SVTK_Renderer
 ::SetSelectionTolerance(const double& theTolNodes, 
-                       const double& theTolCell,
-                       const double& theTolObjects)
+                        const double& theTolCell,
+                        const double& theTolObjects)
 {
   myPointPicker->SetTolerance( theTolNodes );
   myCellPicker->SetTolerance( theTolCell );
@@ -414,8 +414,8 @@ SVTK_Renderer
     vtkFloatingPointType aSize = myTrihedron->GetSize();
     if ( IsTrihedronRelative() )
       {
-       ComputeTrihedronSize(GetDevice(),aSize,aSize,myTrihedronSize);
-       myTrihedron->SetSize(aSize);
+        ComputeTrihedronSize(GetDevice(),aSize,aSize,myTrihedronSize);
+        myTrihedron->SetSize(aSize);
       }
     else
       myTrihedron->SetSize( myTrihedronSize );
@@ -426,17 +426,17 @@ SVTK_Renderer
     anActors->InitTraversal();
     while(vtkActor* anAct = anActors->GetNextActor()){
       if(SALOME_Actor* anActor = dynamic_cast<SALOME_Actor*>(anAct)){
-       if(anActor->IsResizable())
-         anActor->SetSize(0.5*aSize);
+        if(anActor->IsResizable())
+          anActor->SetSize(0.5*aSize);
         if(anActor->GetVisibility() && !anActor->IsInfinitive()){
-         vtkFloatingPointType *aBounds = anActor->GetBounds();
+          vtkFloatingPointType *aBounds = anActor->GetBounds();
           if(CheckBndBox(aBounds))
-           for(int i = 0; i < 5; i = i + 2){
-             if(aBounds[i] < aNewBndBox[i]) 
-               aNewBndBox[i] = aBounds[i];
-             if(aBounds[i+1] > aNewBndBox[i+1]) 
-               aNewBndBox[i+1] = aBounds[i+1];
-           }
+            for(int i = 0; i < 5; i = i + 2){
+              if(aBounds[i] < aNewBndBox[i]) 
+                aNewBndBox[i] = aBounds[i];
+              if(aBounds[i+1] > aNewBndBox[i+1]) 
+                aNewBndBox[i+1] = aBounds[i+1];
+            }
         }
       }
     }
index 2d53e263f22d040bde73c0d64c47ffec7e58f28a..b434996dfc48a894c2b5e6ba8ca611f8a80d165e 100644 (file)
@@ -77,7 +77,7 @@ class SVTK_EXPORT SVTK_Renderer : public vtkObject
   virtual
   void 
   Initialize(vtkRenderWindowInteractor* theInteractor,
-            SVTK_Selector* theSelector);
+             SVTK_Selector* theSelector);
 
   //----------------------------------------------------------------------------
   //! Publishes pointed actor into the renderer
@@ -107,22 +107,22 @@ class SVTK_EXPORT SVTK_Renderer : public vtkObject
   //! Applies color and size (PointSize and LineWidth) of primitives in selection mode
   void
   SetSelectionProp(const double& theRed = 1, 
-                  const double& theGreen = 1,
-                  const double& theBlue = 0, 
-                  const int& theWidth = 5);
+                   const double& theGreen = 1,
+                   const double& theBlue = 0, 
+                   const int& theWidth = 5);
 
   //! Applies color and size (PointSize and LineWidth) of primitives in preselection mode
   void
   SetPreselectionProp(const double& theRed = 0, 
-                     const double& theGreen = 1,
-                     const double& theBlue = 1, 
-                     const int& theWidth = 5);
+                      const double& theGreen = 1,
+                      const double& theBlue = 1, 
+                      const int& theWidth = 5);
 
   //! Setup requested tolerance for the picking
   void
   SetSelectionTolerance(const double& theTolNodes = 0.025, 
-                       const double& theTolCell = 0.001,
-                       const double& theTolObjects = 0.025);
+                        const double& theTolCell = 0.001,
+                        const double& theTolObjects = 0.025);
 
   //----------------------------------------------------------------------------
   //! Adjust all intenal actors (trihedron and graduated rules) to the scene
index d6d3bfc509b3159ed3f34a81279288dc2c1403d4..9ffd5ee7753509e1b74fd45c5460c3f9c7bd035c 100644 (file)
@@ -128,40 +128,40 @@ public:
   virtual
   void 
   GetIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-           TColStd_IndexedMapOfInteger& theIndex ) = 0;
-       
+            TColStd_IndexedMapOfInteger& theIndex ) = 0;
+        
   //! Change indices of subselection for given #SALOME_InteractiveObject
   virtual
   bool 
   AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-                   const TColStd_IndexedMapOfInteger& theIndices, 
-                   bool theIsModeShift) = 0;
+                    const TColStd_IndexedMapOfInteger& theIndices, 
+                    bool theIsModeShift) = 0;
 
   //! Change indexes of subslection for given #SALOME_InteractiveObject
   virtual
   bool 
   AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-                   const TColStd_MapOfInteger& theIndices, 
-                   bool theIsModeShift) = 0;
+                    const TColStd_MapOfInteger& theIndices, 
+                    bool theIsModeShift) = 0;
 
   //! Change index of subslection for given #SALOME_InteractiveObject
   virtual
   bool
   AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-                   int theIndex, 
-                   bool theIsModeShift) = 0;
+                    int theIndex, 
+                    bool theIsModeShift) = 0;
 
   //! Change index of subslection for given #SALOME_InteractiveObject
   virtual
   void 
   RemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-              int theIndex) = 0;
+               int theIndex) = 0;
 
   //! Check, if the given index is present in subselection 
   virtual
   bool 
   IsIndexSelected(const Handle(SALOME_InteractiveObject)& theIO, 
-                 int theIndex) const = 0;
+                  int theIndex) const = 0;
 
   //! Clear subselection
   virtual
@@ -195,8 +195,8 @@ public:
   virtual
   bool
   IsValid(SALOME_Actor* theActor,
-         const int theId,
-         const bool theIsNode = false) const = 0;
+          const int theId,
+          const bool theIsNode = false) const = 0;
   
   //----------------------------------------------------------------------------
   virtual
index bbb513c772d63b5b7fbe0974a9ae40f84b83be14..bed2189f0f36f2a1ca85db6c4c18d765ec0d8c1c 100644 (file)
@@ -107,31 +107,31 @@ public:
   virtual
   void 
   GetIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-           TColStd_IndexedMapOfInteger& theIndex );
-       
+            TColStd_IndexedMapOfInteger& theIndex );
+        
   virtual
   bool 
   AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-                   const TColStd_IndexedMapOfInteger& theIndices, 
-                   bool theIsModeShift);
+                    const TColStd_IndexedMapOfInteger& theIndices, 
+                    bool theIsModeShift);
   virtual
   bool 
   AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-                   const TColStd_MapOfInteger& theIndices, 
-                   bool theIsModeShift);
+                    const TColStd_MapOfInteger& theIndices, 
+                    bool theIsModeShift);
   virtual
   bool
   AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-                   int theIndex, 
-                   bool theIsModeShift);
+                    int theIndex, 
+                    bool theIsModeShift);
   virtual
   void 
   RemoveIndex( const Handle(SALOME_InteractiveObject)& theIO, 
-              int theIndex);
+               int theIndex);
   virtual
   bool 
   IsIndexSelected(const Handle(SALOME_InteractiveObject)& theIO, 
-                 int theIndex) const;
+                  int theIndex) const;
   virtual
   void 
   ClearIndex();
@@ -156,8 +156,8 @@ public:
   virtual
   bool
   IsValid(SALOME_Actor* theActor,
-         const TFilterID theId,
-         const bool theIsNode = false) const;
+          const TFilterID theId,
+          const bool theIsNode = false) const;
   
   //----------------------------------------------------------------------------
   virtual
@@ -184,7 +184,7 @@ private:
   {
     bool 
     operator()(const Handle(SALOME_InteractiveObject)& theRightIO,
-              const Handle(SALOME_InteractiveObject)& theLeftIO) const
+               const Handle(SALOME_InteractiveObject)& theLeftIO) const
     {
       return strcmp(theRightIO->getEntry(),theLeftIO->getEntry()) < 0;
     }
index f7d2fafd3426c6306f84cd9b5457504621d7e07e..d8048856af289546f256ee9fce423e7562af97d9 100755 (executable)
@@ -52,11 +52,11 @@ using namespace std;
 */
 SVTK_SetRotationPointDlg
 ::SVTK_SetRotationPointDlg(QtxAction* theAction,
-                          SVTK_ViewWindow* theParent,
-                          const char* theName):
+                           SVTK_ViewWindow* theParent,
+                           const char* theName):
   SVTK_DialogBase(theAction,
-                 theParent, 
-                 theName),
+                  theParent, 
+                  theName),
   myMainWindow(theParent),
   myPriority(0.0),
   myEventCallbackCommand(vtkCallbackCommand::New()),
@@ -209,9 +209,9 @@ SVTK_SetRotationPointDlg
 void 
 SVTK_SetRotationPointDlg
 ::ProcessEvents(vtkObject* vtkNotUsed(theObject), 
-               unsigned long theEvent,
-               void* theClientData, 
-               void* theCallData)
+                unsigned long theEvent,
+                void* theClientData, 
+                void* theCallData)
 {
   SVTK_SetRotationPointDlg* self = reinterpret_cast<SVTK_SetRotationPointDlg*>(theClientData);
   vtkFloatingPointType* aCoord = (vtkFloatingPointType*)theCallData;
@@ -219,14 +219,14 @@ SVTK_SetRotationPointDlg
   switch ( theEvent ) {
   case SVTK::BBCenterChanged:
     if ( self->myIsBBCenter->isChecked()
-        ||
-        IsBBEmpty(self->myMainWindow->getRenderer()) )
+         ||
+         IsBBEmpty(self->myMainWindow->getRenderer()) )
     {
       if ( aCoord )
       {
-       self->myX->setText( QString::number(aCoord[0]) );
-       self->myY->setText( QString::number(aCoord[1]) );
-       self->myZ->setText( QString::number(aCoord[2]) );
+        self->myX->setText( QString::number(aCoord[0]) );
+        self->myY->setText( QString::number(aCoord[1]) );
+        self->myZ->setText( QString::number(aCoord[2]) );
       }
     }
     break;
@@ -310,12 +310,12 @@ SVTK_SetRotationPointDlg
 {
   if ( !myIsBBCenter->isChecked() ) {
     if ( mySelectPoint->isChecked()
-        &&
-        ( myX->hasFocus() || myY->hasFocus() || myZ->hasFocus() ) )
+         &&
+         ( myX->hasFocus() || myY->hasFocus() || myZ->hasFocus() ) )
       mySelectPoint->toggle();
     vtkFloatingPointType aCenter[3] = {myX->text().toDouble(), 
-                                      myY->text().toDouble(), 
-                                      myZ->text().toDouble()};
+                                       myY->text().toDouble(), 
+                                       myZ->text().toDouble()};
     myMainWindow->activateSetRotationSelected((void*)aCenter);
   }
   else
index c1611cbf581ae01d3f5058d12e08b565c3462633..85101344865895040fb2bbeaa7f0f408243543d0 100755 (executable)
@@ -53,8 +53,8 @@ class SVTK_EXPORT SVTK_SetRotationPointDlg : public SVTK_DialogBase
 
 public:
   SVTK_SetRotationPointDlg(QtxAction* theAction,
-                          SVTK_ViewWindow* theParent,
-                          const char* theName);
+                           SVTK_ViewWindow* theParent,
+                           const char* theName);
 
   ~SVTK_SetRotationPointDlg();
   
index c8a99ee07691fcad1cc2605040ea90406cc83a83..649e33989752cc9472a01ca9a17349a4ed7d2e95 100644 (file)
@@ -120,8 +120,8 @@ int SVTK_SpaceMouse::setWindow( Display *display, Window window )
 
   PropReturn = NULL;
   XGetWindowProperty( display, root, XCommandEvent, 0,1, 0,
-                     AnyPropertyType, &type, &format, &NItems,
-                     &BytesReturn, &PropReturn );
+                      AnyPropertyType, &type, &format, &NItems,
+                      &BytesReturn, &PropReturn );
 
   win = InputFocus;
   if ( PropReturn != NULL ) {
@@ -172,7 +172,7 @@ int SVTK_SpaceMouse::close(Display *display)
   Custom event handler
 */
 int SVTK_SpaceMouse::translateEvent( Display* display, XEvent* xEvent, MoveEvent* spaceMouseEvent,
-                   double scale, double rScale )
+                    double scale, double rScale )
 {
   if ( !spaceMouseOn )
     return 0;
@@ -181,17 +181,17 @@ int SVTK_SpaceMouse::translateEvent( Display* display, XEvent* xEvent, MoveEvent
     if ( xEvent->xclient.message_type == XMotionEvent ) {
       spaceMouseEvent->type = SpaceMouseMove;
       spaceMouseEvent->data[ x ] =
-       xEvent->xclient.data.s[2] * scale;
+        xEvent->xclient.data.s[2] * scale;
       spaceMouseEvent->data[ y ] =
-       xEvent->xclient.data.s[3] * scale;
+        xEvent->xclient.data.s[3] * scale;
       spaceMouseEvent->data[ z ] =
-       xEvent->xclient.data.s[4] * scale;
+        xEvent->xclient.data.s[4] * scale;
       spaceMouseEvent->data[ a ] =
-       xEvent->xclient.data.s[5] * rScale;
+        xEvent->xclient.data.s[5] * rScale;
       spaceMouseEvent->data[ b ] =
-       xEvent->xclient.data.s[6] * rScale;
+        xEvent->xclient.data.s[6] * rScale;
       spaceMouseEvent->data[ c ] =
-       xEvent->xclient.data.s[7] * rScale;
+        xEvent->xclient.data.s[7] * rScale;
       spaceMouseEvent->period = xEvent->xclient.data.s[8];
       return 1;
     }
index 65f337b33e65a4176a08ffbc8f4ba67edc613499..f1a5ed8a9c1e03573c25c599c38994dca09f82d3 100644 (file)
@@ -54,10 +54,10 @@ SVTK_Trihedron
     if(aProp->GetVisibility())
       if(SALOME_Actor* anActor = SALOME_Actor::SafeDownCast(aProp)) {
         if(!anActor->IsInfinitive()) 
-         aCount++;
+          aCount++;
       }
       else if ( !OwnActor( aProp ) ) {
-       aCount++;
+        aCount++;
       }
   }
   return aCount;
index 783b4a495092395f24644a65108258d82987f861..ae1329ca9450b1b14f73ba907ebd259555cf12c1 100644 (file)
@@ -65,10 +65,10 @@ namespace
     if(vtkRenderer *aRenderer = theRWInteractor->getRenderer()){
       vtkFloatingPointType aLastRenderTimeInSeconds = aRenderer->GetLastRenderTimeInSeconds();
       if(aLastRenderTimeInSeconds > FLOAT_TOLERANCE){
-       std::ostringstream aStr;
-       vtkFloatingPointType aFPS = 1.0 / aLastRenderTimeInSeconds;
-       aStr<<aFPS;
-       return QString(aStr.str().c_str());
+        std::ostringstream aStr;
+        vtkFloatingPointType aFPS = 1.0 / aLastRenderTimeInSeconds;
+        aStr<<aFPS;
+        return QString(aStr.str().c_str());
       }
     }
     return "Inf";
@@ -90,9 +90,9 @@ namespace
     operator()(vtkActor* theActor)
     {
       if(theActor->GetVisibility()){
-       myVTKMultiplier += theActor->GetAllocatedRenderTime();
-       if(dynamic_cast<SALOME_Actor*>(theActor))
-         mySALOMEMultiplier += theActor->GetAllocatedRenderTime();
+        myVTKMultiplier += theActor->GetAllocatedRenderTime();
+        if(dynamic_cast<SALOME_Actor*>(theActor))
+          mySALOMEMultiplier += theActor->GetAllocatedRenderTime();
       }
     }
   };
@@ -102,17 +102,17 @@ namespace
   inline
   vtkFloatingPointType 
   AdjustUpdateRate(SVTK_RenderWindowInteractor* theRWInteractor,
-                  vtkFloatingPointType theUpdateRate)
+                   vtkFloatingPointType theUpdateRate)
   {
     if(vtkRenderer *aRenderer = theRWInteractor->getRenderer()){
       VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
       if(vtkActorCollection *anActorCollection = aCopy.GetActors()){
-       TRenderTimeMultiplier aMultiplier;
-       using namespace VTK;
-       aMultiplier = ForEach<vtkActor>(anActorCollection,
-                                       aMultiplier);
-       if(aMultiplier.mySALOMEMultiplier > FLOAT_TOLERANCE)
-         theUpdateRate *= aMultiplier.mySALOMEMultiplier / aMultiplier.myVTKMultiplier;
+        TRenderTimeMultiplier aMultiplier;
+        using namespace VTK;
+        aMultiplier = ForEach<vtkActor>(anActorCollection,
+                                        aMultiplier);
+        if(aMultiplier.mySALOMEMultiplier > FLOAT_TOLERANCE)
+          theUpdateRate *= aMultiplier.mySALOMEMultiplier / aMultiplier.myVTKMultiplier;
       }
     }
     return theUpdateRate;
@@ -131,11 +131,11 @@ namespace
     operator()(SALOME_Actor* theActor)
     {
       if(theActor->GetVisibility()){
-       if(vtkMapper *aMapper = theActor->GetMapper()){
-         if(vtkDataSet *aDataSet = aMapper->GetInput()){
-           myCounter += aDataSet->GetNumberOfCells();
-         }
-       }
+        if(vtkMapper *aMapper = theActor->GetMapper()){
+          if(vtkDataSet *aDataSet = aMapper->GetInput()){
+            myCounter += aDataSet->GetNumberOfCells();
+          }
+        }
       }
     }
   };
@@ -149,11 +149,11 @@ namespace
     if(vtkRenderer *aRenderer = theRWInteractor->getRenderer()){
       VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
       if(vtkActorCollection *anActorCollection = aCopy.GetActors()){
-       TCellsCounter aCounter;
-       using namespace VTK;
-       aCounter = ForEach<SALOME_Actor>(anActorCollection,
-                                        aCounter);
-       return QString::number(aCounter.myCounter);
+        TCellsCounter aCounter;
+        using namespace VTK;
+        aCounter = ForEach<SALOME_Actor>(anActorCollection,
+                                         aCounter);
+        return QString::number(aCounter.myCounter);
       }
     }
     
@@ -166,11 +166,11 @@ namespace
 */
 SVTK_UpdateRateDlg
 ::SVTK_UpdateRateDlg(QtxAction* theAction,
-                    SVTK_ViewWindow* theParent,
-                    const char* theName):
+                     SVTK_ViewWindow* theParent,
+                     const char* theName):
   SVTK_DialogBase(theAction,
-                 theParent, 
-                 theName),
+                  theParent, 
+                  theName),
   myPriority(0.0),
   myEventCallbackCommand(vtkCallbackCommand::New()),
   myRWInteractor(theParent->GetInteractor()),
@@ -295,8 +295,8 @@ SVTK_UpdateRateDlg
   myEventCallbackCommand->SetCallback(SVTK_UpdateRateDlg::ProcessEvents);
   vtkRenderer *aRenderer = myRWInteractor->getRenderer();
   aRenderer->AddObserver(vtkCommand::EndEvent,
-                        myEventCallbackCommand.GetPointer(), 
-                        myPriority);
+                         myEventCallbackCommand.GetPointer(), 
+                         myPriority);
 }
 
 /*!
@@ -314,9 +314,9 @@ SVTK_UpdateRateDlg
 void 
 SVTK_UpdateRateDlg
 ::ProcessEvents(vtkObject* vtkNotUsed(theObject), 
-               unsigned long theEvent,
-               void* theClientData, 
-               void* vtkNotUsed(theCallData))
+                unsigned long theEvent,
+                void* theClientData, 
+                void* vtkNotUsed(theCallData))
 {
   SVTK_UpdateRateDlg* self = reinterpret_cast<SVTK_UpdateRateDlg*>(theClientData);
 
index 1357b6434c5f901068ee26f8b40ee4f4944d3b66..ff2beced5ba92e13af1da1ce60d132fc99c11a82 100644 (file)
@@ -51,8 +51,8 @@ class SVTK_UpdateRateDlg : public SVTK_DialogBase
 
 public:
   SVTK_UpdateRateDlg(QtxAction* theAction,
-                    SVTK_ViewWindow* theParent,
-                    const char* theName);
+                     SVTK_ViewWindow* theParent,
+                     const char* theName);
 
   ~SVTK_UpdateRateDlg();
 
index 7f3bf8a64fc857a9d06bed315854efb76eff45a1..3535892b04e1c3a70607d6d8b05618be91db3ee1 100644 (file)
@@ -125,8 +125,8 @@ public:
   //! To highlight a VTK presentation with the same #SALOME_InteractiveObject
   void
   highlight(const Handle(SALOME_InteractiveObject)& IObject, 
-           bool highlight, 
-           bool immediatly = true);
+            bool highlight, 
+            bool immediatly = true);
 
   //! To unhighlight all VTK presentations
   void
@@ -146,7 +146,7 @@ public:
 
   void
   rename(const Handle(SALOME_InteractiveObject)& IObject, 
-        const QString& newName);
+         const QString& newName);
   
   //----------------------------------------------------------------------------
   // Displaymode management
@@ -161,7 +161,7 @@ public:
   //! Switch representation wireframe/shading
   void
   SetDisplayMode(const Handle(SALOME_InteractiveObject)& IObject, 
-                int theMode);
+                 int theMode);
 
   //! Change all actors to wireframe
   void 
@@ -182,7 +182,7 @@ public:
   //! Change transparency
   void
   SetTransparency(const Handle(SALOME_InteractiveObject)& theIObject,
-                 float trans);
+                  float trans);
 
   //! Get current transparency
   float 
@@ -191,7 +191,7 @@ public:
   //! Change color
   void
   SetColor(const Handle(SALOME_InteractiveObject)& theIObject,
-          const QColor& theColor);
+           const QColor& theColor);
 
   //! Get current color
   QColor
@@ -214,15 +214,15 @@ public:
   //! To erase VTK presentation with defined #SALOME_InteractiveObject
   void
   Erase(const Handle(SALOME_InteractiveObject)& IObject, 
-       bool immediatly = true);
+        bool immediatly = true);
   void
   Remove(const Handle(SALOME_InteractiveObject)& IObject, 
-        bool immediatly = true);
+         bool immediatly = true);
 
   //! To display VTK presentation with defined #SALOME_InteractiveObject
   void
   Display(const Handle(SALOME_InteractiveObject)& IObject, 
-         bool immediatly = true);
+          bool immediatly = true);
 
   //! To display VTK presentation with defined #SALOME_InteractiveObject and erase all anothers
   void
@@ -231,38 +231,38 @@ public:
   //! To display the VTK presentation
   void
   Display(SALOME_Actor* SActor, 
-         bool immediatly = true);
+          bool immediatly = true);
 
   //! To erase the VTK presentation
   void
   Erase(SALOME_Actor* SActor, 
-       bool immediatly = true);
+        bool immediatly = true);
 
   //! To remove the VTK presentation
   void
   Remove(SALOME_Actor* SActor, 
-        bool updateViewer = true);
+         bool updateViewer = true);
 
   //----------------------------------------------------------------------------
   //! Redirect the request to #SVTK_Renderer::SetPreselectionProp
   void
   SetSelectionProp(const double& theRed = 1, 
-                  const double& theGreen = 1,
-                  const double& theBlue = 0, 
-                  const int& theWidth = 5);
+                   const double& theGreen = 1,
+                   const double& theBlue = 0, 
+                   const int& theWidth = 5);
 
   //! Redirect the request to #SVTK_Renderer::SetPreselectionProp
   void
   SetPreselectionProp(const double& theRed = 0, 
-                     const double& theGreen = 1,
-                     const double& theBlue = 1, 
-                     const int& theWidth = 5);
+                      const double& theGreen = 1,
+                      const double& theBlue = 1, 
+                      const int& theWidth = 5);
 
   //! Redirect the request to #SVTK_Renderer::SetPreselectionProp
   void
   SetSelectionTolerance(const double& theTolNodes = 0.025, 
-                       const double& theTolCell = 0.001,
-                       const double& theTolObjects = 0.025);
+                        const double& theTolCell = 0.001,
+                        const double& theTolObjects = 0.025);
 
  protected:  
   int myDisplayMode;
index d772b6d91605d2f94f84673c54f6c3f4dccd787a..3a8f22654a1c194674953107b9d105d1dcaa97fc 100644 (file)
@@ -111,7 +111,7 @@ void SVTK_Viewer::setBackgroundColor( const QColor& theColor )
   for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
     if(SUIT_ViewWindow* aViewWindow = aViews.at(i)){
       if(TViewWindow* aView = dynamic_cast<TViewWindow*>(aViewWindow)){
-       aView->setBackgroundColor(theColor);
+        aView->setBackgroundColor(theColor);
       }
     }
   }
@@ -135,9 +135,9 @@ SUIT_ViewWindow* SVTK_Viewer::createView( SUIT_Desktop* theDesktop )
   aViewWindow->SetSpacemouseButtons( spacemouseBtn(1), spacemouseBtn(2), spacemouseBtn(3) );
 
   connect(aViewWindow, SIGNAL( actorAdded(VTKViewer_Actor*) ), 
-         this,  SLOT(onActorAdded(VTKViewer_Actor*)));
+          this,  SLOT(onActorAdded(VTKViewer_Actor*)));
   connect(aViewWindow, SIGNAL( actorRemoved(VTKViewer_Actor*) ), 
-         this,  SLOT(onActorRemoved(VTKViewer_Actor*)));
+          this,  SLOT(onActorRemoved(VTKViewer_Actor*)));
 
   return aViewWindow;
 }
@@ -173,7 +173,7 @@ void SVTK_Viewer::setTrihedronSize( const vtkFloatingPointType theSize, const bo
     for ( uint i = 0; i < aViews.count(); i++ )
     {
       if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
-             aView->SetTrihedronSize( theSize, theRelative );
+              aView->SetTrihedronSize( theSize, theRelative );
     }
   }
 }
@@ -201,8 +201,8 @@ void SVTK_Viewer::setProjectionMode( const int theMode )
       QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
       for ( uint i = 0; i < aViews.count(); i++ )
       {
-       if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
-         aView->SetProjectionMode( theMode );
+        if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
+          aView->SetProjectionMode( theMode );
       }
     }
   }
@@ -229,7 +229,7 @@ void SVTK_Viewer::setInteractionStyle( const int theStyle )
     for ( uint i = 0; i < aViews.count(); i++ )
     {
       if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
-       aView->SetInteractionStyle( theStyle );
+        aView->SetInteractionStyle( theStyle );
     }
   }
 }
@@ -265,7 +265,7 @@ void SVTK_Viewer::setIncrementalSpeed( const int theValue, const int theMode )
     for ( uint i = 0; i < aViews.count(); i++ )
     {
       if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
-       aView->SetIncrementalSpeed( theValue, theMode );
+        aView->SetIncrementalSpeed( theValue, theMode );
     }
   }
 }
@@ -296,7 +296,7 @@ void SVTK_Viewer::setSpacemouseButtons( const int theBtn1, const int theBtn2, co
     for ( uint i = 0; i < aViews.count(); i++ )
     {
       if ( TViewWindow* aView = dynamic_cast<TViewWindow*>(aViews.at( i )) )
-       aView->SetSpacemouseButtons( theBtn1, theBtn2, theBtn3 );
+        aView->SetSpacemouseButtons( theBtn1, theBtn2, theBtn3 );
     }
   }
 }
@@ -418,31 +418,31 @@ void SVTK_Viewer::Display( const SALOME_VTKPrs* prs )
       // _PTR(Study) aStudy(getStudyDS());
       anActorCollection->InitTraversal();
       while(vtkActor* anActor = anActorCollection->GetNextActor()){
-       if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){
-         if(!anAct->ShouldBeDisplayed())
-           continue;
-         // Set visibility flag
+        if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){
+          if(!anAct->ShouldBeDisplayed())
+            continue;
+          // Set visibility flag
           // Temporarily commented to avoid awful dependecy on SALOMEDS
           // TODO: better mechanism of storing display/erse status in a study
           // should be provided...
-         //Handle(SALOME_InteractiveObject) anObj = anAct->getIO();
-         //if(!anObj.IsNull() && anObj->hasEntry() && aStudy){
-         //  ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),true,this);
-         //}
-         // just display the object
-         QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
-         for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
-           if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i))){
-             if(SVTK_View* aView = aViewWindow->getView()){
-               aView->Display(anAct,false);
-               if(anAct->IsSetCamera()){
-                 vtkRenderer* aRenderer = aView->getRenderer();
-                 anAct->SetCamera( aRenderer->GetActiveCamera() );
-               }
-             }
-           }
-         }
-       }
+          //Handle(SALOME_InteractiveObject) anObj = anAct->getIO();
+          //if(!anObj.IsNull() && anObj->hasEntry() && aStudy){
+          //  ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),true,this);
+          //}
+          // just display the object
+          QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
+          for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
+            if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i))){
+              if(SVTK_View* aView = aViewWindow->getView()){
+                aView->Display(anAct,false);
+                if(anAct->IsSetCamera()){
+                  vtkRenderer* aRenderer = aView->getRenderer();
+                  anAct->SetCamera( aRenderer->GetActiveCamera() );
+                }
+              }
+            }
+          }
+        }
       }
     }
   }
@@ -467,26 +467,26 @@ void SVTK_Viewer::Erase( const SALOME_VTKPrs* prs, const bool forced )
       //_PTR(Study) aStudy(getStudyDS());
       anActorCollection->InitTraversal();
       while(vtkActor* anActor = anActorCollection->GetNextActor())
-       if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){
-         // Set visibility flag
+        if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){
+          // Set visibility flag
           // Temporarily commented to avoid awful dependecy on SALOMEDS
           // TODO: better mechanism of storing display/erse status in a study
           // should be provided...
-         //Handle(SALOME_InteractiveObject) anObj = anAct->getIO();
-         //if(!anObj.IsNull() && anObj->hasEntry() && aStudy){
-         //  ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),false,this);
-         //}
-         // just display the object
-         QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
-         for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
-           if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i)))
-             if(SVTK_View* aView = aViewWindow->getView())
-               if ( forced )
-                 aView->Remove(anAct,false);
-               else
-                 aView->Erase(anAct,forced);
-         }
-       }
+          //Handle(SALOME_InteractiveObject) anObj = anAct->getIO();
+          //if(!anObj.IsNull() && anObj->hasEntry() && aStudy){
+          //  ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),false,this);
+          //}
+          // just display the object
+          QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
+          for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
+            if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i)))
+              if(SVTK_View* aView = aViewWindow->getView())
+                if ( forced )
+                  aView->Remove(anAct,false);
+                else
+                  aView->Erase(anAct,forced);
+          }
+        }
     }
   }
 }
@@ -505,34 +505,34 @@ void SVTK_Viewer::EraseAll( const bool forced )
   for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
     if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i)))
       if(SVTK_View* aView = aViewWindow->getView()){
-       vtkRenderer* aRenderer =  aView->getRenderer();
-       VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
-       vtkActorCollection* anActorCollection = aCopy.GetActors();
-       anActorCollection->InitTraversal();
-       while(vtkActor* anActor = anActorCollection->GetNextActor()){
-         if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){
-           // Set visibility flag
+        vtkRenderer* aRenderer =  aView->getRenderer();
+        VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
+        vtkActorCollection* anActorCollection = aCopy.GetActors();
+        anActorCollection->InitTraversal();
+        while(vtkActor* anActor = anActorCollection->GetNextActor()){
+          if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){
+            // Set visibility flag
             // Temporarily commented to avoid awful dependecy on SALOMEDS
             // TODO: better mechanism of storing display/erse status in a study
             // should be provided...
-           //Handle(SALOME_InteractiveObject) anObj = anAct->getIO();
-           //if(!anObj.IsNull() && anObj->hasEntry() && aStudy)
-           //  ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),false,this);
-           if(forced)
-             aRenderer->RemoveActor(anAct);
-           else{
-             // just erase actor
-             anAct->SetVisibility( false );
-             // erase dependent actors
-             vtkActorCollection* aCollection = vtkActorCollection::New();
-             anAct->GetChildActors( aCollection );
-             aCollection->InitTraversal();
-             while(vtkActor* aSubAct = aCollection->GetNextActor())
-               aSubAct->SetVisibility( false );
-             aCollection->Delete();
-           }
-         }
-       }
+            //Handle(SALOME_InteractiveObject) anObj = anAct->getIO();
+            //if(!anObj.IsNull() && anObj->hasEntry() && aStudy)
+            //  ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),false,this);
+            if(forced)
+              aRenderer->RemoveActor(anAct);
+            else{
+              // just erase actor
+              anAct->SetVisibility( false );
+              // erase dependent actors
+              vtkActorCollection* aCollection = vtkActorCollection::New();
+              anAct->GetChildActors( aCollection );
+              aCollection->InitTraversal();
+              while(vtkActor* aSubAct = aCollection->GetNextActor())
+                aSubAct->SetVisibility( false );
+              aCollection->Delete();
+            }
+          }
+        }
       }
   }
   Repaint();
@@ -548,17 +548,17 @@ SALOME_Prs* SVTK_Viewer::CreatePrs( const char* entry )
   if ( entry ) {
     if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(getViewManager()->getActiveView()))
       if(SVTK_View* aView = aViewWindow->getView()){
-       vtkRenderer* aRenderer =  aView->getRenderer();
-       VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
-       vtkActorCollection* theActors = aCopy.GetActors();
-       theActors->InitTraversal();
-       vtkActor* ac;
-       while( ( ac = theActors->GetNextActor() ) ) {
-         SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( ac );
-         if ( anActor && anActor->hasIO() && !strcmp( anActor->getIO()->getEntry(), entry ) ) {
-           prs->AddObject( ac );
-         }
-       }
+        vtkRenderer* aRenderer =  aView->getRenderer();
+        VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
+        vtkActorCollection* theActors = aCopy.GetActors();
+        theActors->InitTraversal();
+        vtkActor* ac;
+        while( ( ac = theActors->GetNextActor() ) ) {
+          SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( ac );
+          if ( anActor && anActor->hasIO() && !strcmp( anActor->getIO()->getEntry(), entry ) ) {
+            prs->AddObject( ac );
+          }
+        }
       }
   }
   return prs;
@@ -607,7 +607,7 @@ void SVTK_Viewer::Repaint()
   for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)
     if(TViewWindow* aViewWindow = dynamic_cast<TViewWindow*>(aViews.at(i)))
       if(SVTK_View* aView = aViewWindow->getView())
-       aView->Repaint();
+        aView->Repaint();
 }
  
 
index b4c4cabd9f1ae95c681d6de6bd49a64e1f083a5c..8962fd29afb679d662e6c6977f80f4e07fc294b8 100755 (executable)
@@ -56,8 +56,8 @@ using namespace std;
   Constructor
 */
 SVTK_ViewParameterDlg::SVTK_ViewParameterDlg(QtxAction* theAction,
-                                            SVTK_ViewWindow* theParent,
-                                            const char* theName):
+                                             SVTK_ViewWindow* theParent,
+                                             const char* theName):
   SVTK_DialogBase(theAction, theParent, theName),
   myMainWindow(theParent),
   myPriority(0.0),
@@ -415,9 +415,9 @@ void SVTK_ViewParameterDlg::addObserver()
   Processes events
 */
 void SVTK_ViewParameterDlg::ProcessEvents(vtkObject* vtkNotUsed(theObject), 
-                                         unsigned long theEvent,
-                                         void* theClientData, 
-                                         void* theCallData)
+                                          unsigned long theEvent,
+                                          void* theClientData, 
+                                          void* theCallData)
 {
   SVTK_ViewParameterDlg* self = reinterpret_cast<SVTK_ViewParameterDlg*>(theClientData);
   vtkFloatingPointType* aCoord;
@@ -566,8 +566,8 @@ void SVTK_ViewParameterDlg::onFocalCoordChanged()
 
   vtkCamera* aCamera = myRWInteractor->getRenderer()->GetActiveCamera();
   aCamera->SetFocalPoint(myFocalX->text().toDouble(),
-                        myFocalY->text().toDouble(),
-                        myFocalZ->text().toDouble());
+                         myFocalY->text().toDouble(),
+                         myFocalZ->text().toDouble());
 
   aCamera->OrthogonalizeViewUp();
   myRWInteractor->getRenderer()->ResetCameraClippingRange();
@@ -586,8 +586,8 @@ void SVTK_ViewParameterDlg::onCameraCoordChanged()
 
   vtkCamera* aCamera = myRWInteractor->getRenderer()->GetActiveCamera();
   aCamera->SetPosition(myCameraX->text().toDouble(),
-                      myCameraY->text().toDouble(),
-                      myCameraZ->text().toDouble());
+                       myCameraY->text().toDouble(),
+                       myCameraZ->text().toDouble());
 
   aCamera->OrthogonalizeViewUp();
   myRWInteractor->getRenderer()->ResetCameraClippingRange();
@@ -618,8 +618,8 @@ void SVTK_ViewParameterDlg::onViewDirectionChanged()
 
   vtkCamera* aCamera = myRWInteractor->getRenderer()->GetActiveCamera();
   aCamera->SetViewUp(myViewDirX->text().toDouble(),
-                    myViewDirY->text().toDouble(),
-                    myViewDirZ->text().toDouble());
+                     myViewDirY->text().toDouble(),
+                     myViewDirZ->text().toDouble());
 
   // update view
   myRWInteractor->GetDevice()->CreateTimer(VTKI_TIMER_FIRST);
@@ -716,7 +716,7 @@ void SVTK_ViewParameterDlg::updateCoordinates()
     // recompute focal point
     if (computePoint(pos, dir, dist, pnt)) {
       if (mySelectPoint->isChecked())
-       mySelectPoint->toggle();
+        mySelectPoint->toggle();
       myBusy = true;
       myFocalX->setText(QString::number(pnt[0]));
       myFocalY->setText(QString::number(pnt[1]));
@@ -728,9 +728,9 @@ void SVTK_ViewParameterDlg::updateCoordinates()
 }
 
 bool SVTK_ViewParameterDlg::computePoint(const double start[3], 
-                                        const double dir[3], 
-                                        const double dist, 
-                                        double result[3])
+                                         const double dir[3], 
+                                         const double dist, 
+                                         double result[3])
 {
   double d = sqrt(dir[0]*dir[0]+dir[1]*dir[1]+dir[2]*dir[2]);
   if ( d < 0.0002 ) return false;
index 3a6f3e8b03ff72e4c30fed3b524a2173a53aa88f..8fac8ce35d939f4fc996e1c462fdee393b7e0044 100755 (executable)
@@ -55,8 +55,8 @@ class SVTK_EXPORT SVTK_ViewParameterDlg : public SVTK_DialogBase
 
 public:
   SVTK_ViewParameterDlg(QtxAction* theAction,
-                       SVTK_ViewWindow* theParent,
-                       const char* theName);
+                        SVTK_ViewWindow* theParent,
+                        const char* theName);
 
   ~SVTK_ViewParameterDlg();
   
@@ -106,7 +106,7 @@ protected:
 
   void setEnabled(QFrame* theWidget, const bool theState);
   bool computePoint(const double start[3], const double dir[3], 
-                   const double dist, double result[3]);
+                    const double dist, double result[3]);
   void updateProjection();
   void updateCoordinates();
 
index 3a07a757c419e2d18e6c14cbdbe119cef6c4ffd1..c3c0b20b7dd9a6daae9867b5133bf1c40901b681 100755 (executable)
@@ -139,8 +139,8 @@ class SVTK_EXPORT SVTK_ViewWindow : public SUIT_ViewWindow
   /*  interactive object management */
   //! Redirect the request to #SVTK_View::highlight (to support old code)
   virtual void highlight(const Handle(SALOME_InteractiveObject)& theIO, 
-                        bool theIsHighlight = true, 
-                        bool theIsUpdate = true);
+                         bool theIsHighlight = true, 
+                         bool theIsUpdate = true);
 
   //! Redirect the request to #SVTK_View::unHighlightAll (to support old code)
   virtual void unHighlightAll();
@@ -155,18 +155,18 @@ class SVTK_EXPORT SVTK_ViewWindow : public SUIT_ViewWindow
   //----------------------------------------------------------------------------
   Handle(SALOME_InteractiveObject) FindIObject(const char* theEntry);
   
-  /* display */                
+  /* display */         
   //----------------------------------------------------------------------------
   //! Redirect the request to #SVTK_View::Display (to support old code)
   virtual void Display(const Handle(SALOME_InteractiveObject)& theIObject,
-                      bool theImmediatly = true);
+                       bool theImmediatly = true);
 
   //! Redirect the request to #SVTK_View::DisplayOnly (to support old code)
   virtual void DisplayOnly(const Handle(SALOME_InteractiveObject)& theIObject);
 
   //! Redirect the request to #SVTK_View::Erase (to support old code)
   virtual void Erase(const Handle(SALOME_InteractiveObject)& theIObject,
-                    bool theImmediatly = true);
+                     bool theImmediatly = true);
 
   //! Redirect the request to #SVTK_View::DisplayAll (to support old code)
   virtual void DisplayAll();
@@ -186,11 +186,11 @@ class SVTK_EXPORT SVTK_ViewWindow : public SUIT_ViewWindow
 
   //! Redirect the request to #SVTK_Renderer::AddActor
   virtual void AddActor(VTKViewer_Actor* theActor,
-                       bool theIsUpdate = false);
+                        bool theIsUpdate = false);
 
   //! Redirect the request to #SVTK_Renderer::RemoveActor
   virtual void RemoveActor(VTKViewer_Actor* theActor,
-                          bool theIsUpdate = false);
+                           bool theIsUpdate = false);
 
   //----------------------------------------------------------------------------
   //! Redirect the request to #SVTK_Renderer::AdjustActors
@@ -222,20 +222,20 @@ class SVTK_EXPORT SVTK_ViewWindow : public SUIT_ViewWindow
 
   //! Redirect the request to #SVTK_Renderer::SetSelectionProp
   virtual void SetSelectionProp(const double& theRed = 1, 
-                               const double& theGreen = 1,
-                               const double& theBlue = 0, 
-                               const int& theWidth = 5);
+                                const double& theGreen = 1,
+                                const double& theBlue = 0, 
+                                const int& theWidth = 5);
 
   //! Redirect the request to #SVTK_Renderer::SetPreselectionProp
   virtual void SetPreselectionProp(const double& theRed = 0, 
-                                  const double& theGreen = 1,
-                                  const double& theBlue = 1, 
-                                  const int& theWidth = 5);
+                                   const double& theGreen = 1,
+                                   const double& theBlue = 1, 
+                                   const int& theWidth = 5);
 
   //! Redirect the request to #SVTK_Renderer::SetSelectionTolerance
   virtual void SetSelectionTolerance(const double& theTolNodes = 0.025, 
-                                    const double& theTolCell = 0.001,
-                                    const double& theTolObjects = 0.025);
+                                     const double& theTolCell = 0.001,
+                                     const double& theTolObjects = 0.025);
 
   //! Methods to save/restore visual parameters of a view (pan, zoom, etc.)
   virtual QString getVisualParameters();
@@ -343,7 +343,7 @@ protected slots:
 
 protected:
   virtual void Initialize(SVTK_View* theView,
-                         SVTK_ViewModelBase* theModel);
+                          SVTK_ViewModelBase* theModel);
 
   void doSetVisualParameters( const QString& );
   void SetEventDispatcher(vtkObject* theDispatcher);
@@ -360,11 +360,11 @@ protected:
   void createActions(SUIT_ResourceMgr* theResourceMgr);
 
   enum { DumpId, FitAllId, FitRectId, ZoomId, PanId, GlobalPanId, 
-        ChangeRotationPointId, RotationId,
+         ChangeRotationPointId, RotationId,
          FrontId, BackId, TopId, BottomId, LeftId, RightId, ResetId, 
-        ViewTrihedronId, NonIsometric, GraduatedAxes, UpdateRate,
-        ParallelModeId, ProjectionModeId, ViewParametersId, SwitchInteractionStyleId,
-        StartRecordingId, PlayRecordingId, PauseRecordingId, StopRecordingId };
+         ViewTrihedronId, NonIsometric, GraduatedAxes, UpdateRate,
+         ParallelModeId, ProjectionModeId, ViewParametersId, SwitchInteractionStyleId,
+         StartRecordingId, PlayRecordingId, PauseRecordingId, StopRecordingId };
 
 
   SVTK_View* myView;
index 0888b43ee50d2e99e05486e96f6237bee22488c6..573f9e3745633b5ac1738ad2441c084ad57dda56 100644 (file)
@@ -150,7 +150,7 @@ SalomeApp_Application::SalomeApp_Application()
   : LightApp_Application()
 {
   connect( desktop(), SIGNAL( message( const QString& ) ),
-          this,      SLOT( onDesktopMessage( const QString& ) ) );
+           this,      SLOT( onDesktopMessage( const QString& ) ) );
   setNoteBook(0);
 }
 
@@ -180,7 +180,7 @@ void SalomeApp_Application::start()
     for (int i = 1; i < qApp->argc(); i++) {
       QRegExp rxs ("--study-hdf=(.+)");
       if ( rxs.indexIn( QString(qApp->argv()[i]) ) >= 0 && rxs.capturedTexts().count() > 1 ) {
-       QString file = rxs.capturedTexts()[1];
+        QString file = rxs.capturedTexts()[1];
         QFileInfo fi ( file );
         QString extension = fi.suffix().toLower();
         if ( extension == "hdf" && fi.exists() )
@@ -204,12 +204,12 @@ void SalomeApp_Application::start()
     if ( pyfiles.count() > 0 && activeStudy() ) {
       SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( activeStudy() );
       if ( appStudy ) {
-       _PTR(Study) aStudy = appStudy->studyDS();
-       if ( !aStudy->GetProperties()->IsLocked() ) {
+        _PTR(Study) aStudy = appStudy->studyDS();
+        if ( !aStudy->GetProperties()->IsLocked() ) {
           for (uint j = 0; j < pyfiles.count(); j++ ) {
             QFileInfo fi ( pyfiles[j] );
-           PyConsole_Console* pyConsole = pythonConsole();
-           if ( pyConsole ) {
+            PyConsole_Console* pyConsole = pythonConsole();
+            if ( pyConsole ) {
               QString extension = fi.suffix().toLower();
               if ( fi.exists() ) {
                 // execute python script
@@ -219,13 +219,13 @@ void SalomeApp_Application::start()
               else {
                 // import python module
                 QString command = QString( "import %1" ).arg( pyfiles[j] );
-               if ( extension == "py" )
-                 command = QString( "import %1" ).arg( fi.completeBaseName() );
+                if ( extension == "py" )
+                  command = QString( "import %1" ).arg( fi.completeBaseName() );
                 pyConsole->exec( command );
               }
             }
           }
-       }
+        }
       }
     }
   }
@@ -241,13 +241,13 @@ void SalomeApp_Application::createActions()
   //! Save GUI state
   // "Save GUI State" command is moved to VISU module
   //  createAction( SaveGUIStateId, tr( "TOT_DESK_FILE_SAVE_GUI_STATE" ), QIcon(),
-  //           tr( "MEN_DESK_FILE_SAVE_GUI_STATE" ), tr( "PRP_DESK_FILE_SAVE_GUI_STATE" ),
-  //           0, desk, false, this, SLOT( onSaveGUIState() ) );
+  //            tr( "MEN_DESK_FILE_SAVE_GUI_STATE" ), tr( "PRP_DESK_FILE_SAVE_GUI_STATE" ),
+  //            0, desk, false, this, SLOT( onSaveGUIState() ) );
 
   //! Dump study
   createAction( DumpStudyId, tr( "TOT_DESK_FILE_DUMP_STUDY" ), QIcon(),
-               tr( "MEN_DESK_FILE_DUMP_STUDY" ), tr( "PRP_DESK_FILE_DUMP_STUDY" ),
-               Qt::CTRL+Qt::Key_D, desk, false, this, SLOT( onDumpStudy() ) );
+                tr( "MEN_DESK_FILE_DUMP_STUDY" ), tr( "PRP_DESK_FILE_DUMP_STUDY" ),
+                Qt::CTRL+Qt::Key_D, desk, false, this, SLOT( onDumpStudy() ) );
 
   //! NoteBook
   createAction(NoteBookId, tr( "TOT_DESK_FILE_NOTEBOOK" ), QIcon(),
@@ -256,29 +256,29 @@ void SalomeApp_Application::createActions()
 
   //! Load script
   createAction( LoadScriptId, tr( "TOT_DESK_FILE_LOAD_SCRIPT" ), QIcon(),
-               tr( "MEN_DESK_FILE_LOAD_SCRIPT" ), tr( "PRP_DESK_FILE_LOAD_SCRIPT" ),
-               Qt::CTRL+Qt::Key_T, desk, false, this, SLOT( onLoadScript() ) );
+                tr( "MEN_DESK_FILE_LOAD_SCRIPT" ), tr( "PRP_DESK_FILE_LOAD_SCRIPT" ),
+                Qt::CTRL+Qt::Key_T, desk, false, this, SLOT( onLoadScript() ) );
 
   //! Properties
   createAction( PropertiesId, tr( "TOT_DESK_PROPERTIES" ), QIcon(),
-               tr( "MEN_DESK_PROPERTIES" ), tr( "PRP_DESK_PROPERTIES" ),
-               Qt::CTRL+Qt::Key_P, desk, false, this, SLOT( onProperties() ) );
+                tr( "MEN_DESK_PROPERTIES" ), tr( "PRP_DESK_PROPERTIES" ),
+                Qt::CTRL+Qt::Key_P, desk, false, this, SLOT( onProperties() ) );
 
   //! Catalog Generator
   createAction( CatalogGenId, tr( "TOT_DESK_CATALOG_GENERATOR" ),  QIcon(),
-               tr( "MEN_DESK_CATALOG_GENERATOR" ), tr( "PRP_DESK_CATALOG_GENERATOR" ),
-               Qt::SHIFT+Qt::Key_G, desk, false, this, SLOT( onCatalogGen() ) );
+                tr( "MEN_DESK_CATALOG_GENERATOR" ), tr( "PRP_DESK_CATALOG_GENERATOR" ),
+                Qt::SHIFT+Qt::Key_G, desk, false, this, SLOT( onCatalogGen() ) );
 
   //! Registry Display
   createAction( RegDisplayId, tr( "TOT_DESK_REGISTRY_DISPLAY" ),  QIcon(),
-               tr( "MEN_DESK_REGISTRY_DISPLAY" ), tr( "PRP_DESK_REGISTRY_DISPLAY" ),
-               /*Qt::SHIFT+Qt::Key_D*/0, desk, false, this, SLOT( onRegDisplay() ) );
+                tr( "MEN_DESK_REGISTRY_DISPLAY" ), tr( "PRP_DESK_REGISTRY_DISPLAY" ),
+                /*Qt::SHIFT+Qt::Key_D*/0, desk, false, this, SLOT( onRegDisplay() ) );
 
   //SRN: BugID IPAL9021, add an action "Load"
   createAction( FileLoadId, tr( "TOT_DESK_FILE_LOAD" ),
                 resourceMgr()->loadPixmap( "STD", tr( "ICON_FILE_OPEN" ) ),
-               tr( "MEN_DESK_FILE_LOAD" ), tr( "PRP_DESK_FILE_LOAD" ),
-               Qt::CTRL+Qt::Key_L, desk, false, this, SLOT( onLoadDoc() ) );
+                tr( "MEN_DESK_FILE_LOAD" ), tr( "PRP_DESK_FILE_LOAD" ),
+                Qt::CTRL+Qt::Key_L, desk, false, this, SLOT( onLoadDoc() ) );
   //SRN: BugID IPAL9021: End
 
 
@@ -342,9 +342,9 @@ void SalomeApp_Application::onLoadDoc()
      while ( it.hasNext() && !isAlreadyOpen ) {
        SUIT_Application* aApp = it.next();
        if( !aApp || !aApp->activeStudy() )
-        continue;
+         continue;
        if ( aApp->activeStudy()->studyName() == studyName )
-        isAlreadyOpen = true;
+         isAlreadyOpen = true;
      }
 
      if ( !isAlreadyOpen )
@@ -383,7 +383,7 @@ bool SalomeApp_Application::onLoadDoc( const QString& aName )
     bool isAlreadyOpen = false;
     SalomeApp_Application* aApp = 0;
     for ( QList<SUIT_Application*>::iterator it = aAppList.begin();
-         it != aAppList.end() && !isAlreadyOpen; ++it ) {
+          it != aAppList.end() && !isAlreadyOpen; ++it ) {
       aApp = dynamic_cast<SalomeApp_Application*>( *it );
       if ( aApp && aApp->activeStudy()->studyName() == aName )
         isAlreadyOpen = true;
@@ -419,8 +419,8 @@ void SalomeApp_Application::onCopy()
     {
       _PTR(SObject) so = stdDS->FindObjectID(it.Value()->getEntry());
       try {
-       studyMgr()->Copy(so);
-       onSelectionChanged();
+        studyMgr()->Copy(so);
+        onSelectionChanged();
       }
       catch(...) {
       }
@@ -442,8 +442,8 @@ void SalomeApp_Application::onPaste()
 
   if ( stdDS->GetProperties()->IsLocked() ) {
     SUIT_MessageBox::warning( desktop(),
-                             QObject::tr("WRN_WARNING"),
-                             QObject::tr("WRN_STUDY_LOCKED") );
+                              QObject::tr("WRN_WARNING"),
+                              QObject::tr("WRN_STUDY_LOCKED") );
     return;
   }
 
@@ -452,9 +452,9 @@ void SalomeApp_Application::onPaste()
     {
       _PTR(SObject) so = stdDS->FindObjectID(it.Value()->getEntry());
       try {
-       studyMgr()->Paste(so);
-       updateObjectBrowser( true );
-       updateActions(); //SRN: BugID IPAL9377, case 3
+        studyMgr()->Paste(so);
+        updateObjectBrowser( true );
+        updateActions(); //SRN: BugID IPAL9377, case 3
       }
       catch(...) {
       }
@@ -478,10 +478,10 @@ void SalomeApp_Application::onCloseDoc( bool ask )
     _PTR(Study) stdDS = study->studyDS();
     if(stdDS && stdDS->IsStudyLocked()) {
       if ( SUIT_MessageBox::question( desktop(),
-                                     QObject::tr( "WRN_WARNING" ),
-                                     QObject::tr( "CLOSE_LOCKED_STUDY" ),
-                                     SUIT_MessageBox::Yes | SUIT_MessageBox::No,
-                                     SUIT_MessageBox::No) == SUIT_MessageBox::No ) return;
+                                      QObject::tr( "WRN_WARNING" ),
+                                      QObject::tr( "CLOSE_LOCKED_STUDY" ),
+                                      SUIT_MessageBox::Yes | SUIT_MessageBox::No,
+                                      SUIT_MessageBox::No) == SUIT_MessageBox::No ) return;
 
     }
   }
@@ -544,10 +544,10 @@ void SalomeApp_Application::onDeleteInvalidReferences()
     {
       _PTR(SObject) aSObject = aStudyDS->FindObjectID( it.Value()->getEntry() ), aRefObj = aSObject;
       while( aRefObj && aRefObj->ReferencedObject( anObj ) )
-       aRefObj = anObj;
+        aRefObj = anObj;
 
       if( aRefObj && aRefObj!=aSObject && QString( aRefObj->GetName().c_str() ).isEmpty() )
-        aStudyBuilder->RemoveReference( aSObject );
+         aStudyBuilder->RemoveReference( aSObject );
     }
   updateObjectBrowser();
 }
@@ -672,8 +672,8 @@ bool DumpStudyFileValidator::canSave(const QString& file, bool permissions)
   QFileInfo fi( file );
   if ( !QRegExp( "[A-Za-z_][A-Za-z0-9_]*" ).exactMatch( fi.completeBaseName() ) ) {
     SUIT_MessageBox::critical( parent(),
-                              QObject::tr("WRN_WARNING"),
-                              QObject::tr("WRN_FILE_NAME_BAD") );
+                               QObject::tr("WRN_WARNING"),
+                               QObject::tr("WRN_FILE_NAME_BAD") );
     return false;
   }
   return SUIT_FileValidator::canSave( file, permissions);
@@ -705,24 +705,24 @@ void SalomeApp_Application::onDumpStudy( )
     if ( !aFileName.isEmpty() ) {
       QFileInfo aFileInfo(aFileName);
       if( aFileInfo.isDir() ) // IPAL19257
-       return;
+        return;
 
       int savePoint;
       _PTR(AttributeParameter) ap;
       _PTR(IParameters) ip = ClientFactory::getIParameters(ap);
       if(ip->isDumpPython(appStudy->studyDS())) ip->setDumpPython(appStudy->studyDS()); //Unset DumpPython flag.
       if ( toSaveGUI ) { //SRN: Store a visual state of the study at the save point for DumpStudy method
-       ip->setDumpPython(appStudy->studyDS());
-       savePoint = SalomeApp_VisualState( this ).storeState(); //SRN: create a temporary save point
+        ip->setDumpPython(appStudy->studyDS());
+        savePoint = SalomeApp_VisualState( this ).storeState(); //SRN: create a temporary save point
       }
       bool res = aStudy->DumpStudy( aFileInfo.absolutePath().toStdString(),
-                                   aFileInfo.baseName().toStdString(), toPublish);
+                                    aFileInfo.baseName().toStdString(), toPublish);
       if ( toSaveGUI )
-       appStudy->removeSavePoint(savePoint); //SRN: remove the created temporary save point.
+        appStudy->removeSavePoint(savePoint); //SRN: remove the created temporary save point.
       if ( !res )
-       SUIT_MessageBox::warning( desktop(),
-                                 QObject::tr("WRN_WARNING"),
-                                 tr("WRN_DUMP_STUDY_FAILED") );
+        SUIT_MessageBox::warning( desktop(),
+                                  QObject::tr("WRN_WARNING"),
+                                  tr("WRN_DUMP_STUDY_FAILED") );
     }
   }
 }
@@ -755,8 +755,8 @@ void SalomeApp_Application::onLoadScript( )
 
   if ( aStudy->GetProperties()->IsLocked() ) {
     SUIT_MessageBox::warning( desktop(),
-                             QObject::tr("WRN_WARNING"),
-                             QObject::tr("WRN_STUDY_LOCKED") );
+                              QObject::tr("WRN_WARNING"),
+                              QObject::tr("WRN_STUDY_LOCKED") );
     return;
   }
 
@@ -855,9 +855,9 @@ QWidget* SalomeApp_Application::createWindow( const int flag )
 
       // temporary commented
       /*
-       ob->setWidthMode( autoSize ? QListView::Maximum : QListView::Manual );
-       ob->listView()->setColumnWidthMode( 0, autoSizeFirst ? QListView::Maximum : QListView::Manual );
-       ob->resize( desktop()->width()/3, ob->height() );
+        ob->setWidthMode( autoSize ? QListView::Maximum : QListView::Manual );
+        ob->listView()->setColumnWidthMode( 0, autoSizeFirst ? QListView::Maximum : QListView::Manual );
+        ob->resize( desktop()->width()/3, ob->height() );
       */
     }
   }
@@ -912,11 +912,11 @@ void SalomeApp_Application::updateDesktopTitle() {
       if ( study ) {
         _PTR(Study) stdDS = study->studyDS();
         if(stdDS) {
-         if ( stdDS->GetProperties()->IsLocked() ) {
-           aTitle += QString( " - [%1 (%2)]").arg( sName ).arg( tr( "STUDY_LOCKED" ) );
-         } else {
-           aTitle += QString( " - [%1]" ).arg( sName );
-         }
+          if ( stdDS->GetProperties()->IsLocked() ) {
+            aTitle += QString( " - [%1 (%2)]").arg( sName ).arg( tr( "STUDY_LOCKED" ) );
+          } else {
+            aTitle += QString( " - [%1]" ).arg( sName );
+          }
         }
       }
     }
@@ -929,7 +929,7 @@ int SalomeApp_Application::closeChoice( const QString& docName )
 {
   int answer = SUIT_MessageBox::question( desktop(), tr( "APPCLOSE_CAPTION" ), tr( "APPCLOSE_DESCRIPTION" ).arg( docName ),
                                           tr ("APPCLOSE_SAVE"), tr ("APPCLOSE_CLOSE"),
-                                         tr ("APPCLOSE_UNLOAD"), tr ("APPCLOSE_CANCEL"), 0 );
+                                          tr ("APPCLOSE_UNLOAD"), tr ("APPCLOSE_CANCEL"), 0 );
 
   int res = CloseCancel;
   if ( answer == 0 )
@@ -985,11 +985,11 @@ int SalomeApp_Application::openChoice( const QString& aName )
     if ( exist )
     {
       int answer = SUIT_MessageBox::question( desktop(), tr( "WRN_WARNING" ), tr( "QUE_DOC_ALREADYEXIST" ).arg( aName ),
-                                             SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::No );
+                                              SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::No );
       if ( answer == SUIT_MessageBox::Yes )
-       choice = OpenRefresh;
+        choice = OpenRefresh;
       else
-       choice = OpenCancel;
+        choice = OpenCancel;
     }
   }
 
@@ -1007,8 +1007,8 @@ bool SalomeApp_Application::openAction( const int aChoice, const QString& aName
       _PTR(Study) aStudy = studyMgr()->GetStudyByName( aName.toStdString() );
       if ( aStudy )
       {
-       studyMgr()->Close( aStudy );
-       choice = OpenNew;
+        studyMgr()->Close( aStudy );
+        choice = OpenNew;
       }
     }
   default:
@@ -1161,10 +1161,10 @@ void SalomeApp_Application::contextMenuPopup( const QString& type, QMenu* thePop
     {
       _PTR(SObject) aSObject = aStudyDS->FindObjectID( it.Value()->getEntry() ), aRefObj = aSObject;
       while( aRefObj && aRefObj->ReferencedObject( anObj ) )
-       aRefObj = anObj;
+        aRefObj = anObj;
 
       if( aRefObj && aRefObj!=aSObject && QString( aRefObj->GetName().c_str() ).isEmpty() )
-       isInvalidRefs = true;
+        isInvalidRefs = true;
     }
 
   // Add "Delete reference" item to popup
@@ -1210,17 +1210,17 @@ void SalomeApp_Application::updateObjectBrowser( const bool updateModels )
     {
       for ( _PTR(SComponentIterator) it ( stdDS->NewComponentIterator() ); it->More(); it->Next() )
       {
-       _PTR(SComponent) aComponent ( it->Value() );
+        _PTR(SComponent) aComponent ( it->Value() );
 
-       if ( aComponent->ComponentDataType() == "Interface Applicative" )
-         continue; // skip the magic "Interface Applicative" component
+        if ( aComponent->ComponentDataType() == "Interface Applicative" )
+          continue; // skip the magic "Interface Applicative" component
 
-       if ( !objectBrowser() )
-         getWindow( WT_ObjectBrowser );
-       const bool isAutoUpdate = objectBrowser()->autoUpdate();
-       objectBrowser()->setAutoUpdate( false );
-       SalomeApp_DataModel::synchronize( aComponent, study );
-       objectBrowser()->setAutoUpdate( isAutoUpdate );
+        if ( !objectBrowser() )
+          getWindow( WT_ObjectBrowser );
+        const bool isAutoUpdate = objectBrowser()->autoUpdate();
+        objectBrowser()->setAutoUpdate( false );
+        SalomeApp_DataModel::synchronize( aComponent, study );
+        objectBrowser()->setAutoUpdate( isAutoUpdate );
       }
     }
   }
@@ -1272,7 +1272,7 @@ void SalomeApp_Application::onDblClick( SUIT_DataObject* theObj )
       
       QModelIndexList aSelectedIndexes = ob->selectedIndexes();
       if ( !aSelectedIndexes.isEmpty() )
-       ob->treeView()->scrollTo( aSelectedIndexes.first() );
+        ob->treeView()->scrollTo( aSelectedIndexes.first() );
     }
   }
 }
index 1548ff23b8ef3b91691c20ae49911314ff142620..85bc1e1604c7782af31015496bcfb53e6b73809c 100644 (file)
@@ -102,8 +102,8 @@ bool SalomeApp_DataModelSync::isCorrect( const kerPtr& so ) const
   \param prepend - SUIT object must be added to start of children list
 */
 suitPtr SalomeApp_DataModelSync::createItem( const kerPtr& so,
-                                            const suitPtr& parent,
-                                            const suitPtr& after ) const
+                                             const suitPtr& parent,
+                                             const suitPtr& after ) const
 {
   if( !isCorrect( so ) )
     return 0;
@@ -150,7 +150,7 @@ bool SalomeApp_DataModelSync::isEqual( const kerPtr& p, const suitPtr& q ) const
   _PTR( SComponent ) aComp( p );
   bool res = ( !p && !q ) ||
              ( lobj && !sobj && aComp ) ||
-            ( sobj && isCorrect( p ) && p->GetID().c_str()==sobj->entry() );
+             ( sobj && isCorrect( p ) && p->GetID().c_str()==sobj->entry() );
   return res;
 }
 
@@ -306,8 +306,8 @@ void SalomeApp_DataModel::update( LightApp_DataObject*, LightApp_Study* study )
       studyRoot = dynamic_cast<LightApp_RootObject*>( aSStudy->root() );
       QString anId = getRootEntry( aSStudy );
       if ( !anId.isEmpty() ){ // if nothing is published in the study for this module -> do nothing
-       _PTR(Study) aStudy ( aSStudy->studyDS() );
-       sobj = aStudy->FindComponentID( std::string( anId.toLatin1() ) );
+        _PTR(Study) aStudy ( aSStudy->studyDS() );
+        sobj = aStudy->FindComponentID( std::string( anId.toLatin1() ) );
       }
     }
   }
index 6db6c32ca460b10978a5221eb584384962df6911..dbc07fe6673095a61729b9baafa199015b7eb8ef 100644 (file)
@@ -60,7 +60,7 @@ SalomeApp_DataObject::SalomeApp_DataObject( SUIT_DataObject* parent )
   \param parent parent data object
 */
 SalomeApp_DataObject::SalomeApp_DataObject( const _PTR(SObject)& sobj, 
-                                           SUIT_DataObject* parent )
+                                            SUIT_DataObject* parent )
 : CAM_DataObject( parent ),
   LightApp_DataObject( parent )
 {
@@ -136,7 +136,7 @@ QString SalomeApp_DataObject::text( const int id ) const
 #endif
       txt = value( object() );
       if ( txt.isEmpty() )
-       txt = value( referencedObject() );
+        txt = value( referencedObject() );
     break;
   case IORId:
     txt = ior( referencedObject() );
@@ -165,20 +165,20 @@ QPixmap SalomeApp_DataObject::icon( const int id ) const
     if ( myObject && myObject->FindAttribute( anAttr, "AttributePixMap" ) ){
       _PTR(AttributePixMap) aPixAttr ( anAttr );
       if ( aPixAttr->HasPixMap() ) {
-       QString componentType = componentDataType();
-       QString pixmapID      = aPixAttr->GetPixMap().c_str();
-       // select a plugin within a component
-       QStringList plugin_pixmap = pixmapID.split( "::", QString::KeepEmptyParts );
-       if ( plugin_pixmap.size() == 2 ) {
-         componentType = plugin_pixmap.front();
-         pixmapID      = plugin_pixmap.back();
-       }
-       QString pixmapName = QObject::tr( pixmapID.toLatin1().constData() );
-       LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>( root() );
-       if ( aRoot && aRoot->study() ) {
-         SUIT_ResourceMgr* mgr = aRoot->study()->application()->resourceMgr();
-         return mgr->loadPixmap( componentType, pixmapName, false ); 
-       }
+        QString componentType = componentDataType();
+        QString pixmapID      = aPixAttr->GetPixMap().c_str();
+        // select a plugin within a component
+        QStringList plugin_pixmap = pixmapID.split( "::", QString::KeepEmptyParts );
+        if ( plugin_pixmap.size() == 2 ) {
+          componentType = plugin_pixmap.front();
+          pixmapID      = plugin_pixmap.back();
+        }
+        QString pixmapName = QObject::tr( pixmapID.toLatin1().constData() );
+        LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>( root() );
+        if ( aRoot && aRoot->study() ) {
+          SUIT_ResourceMgr* mgr = aRoot->study()->application()->resourceMgr();
+          return mgr->loadPixmap( componentType, pixmapName, false ); 
+        }
       }
     }
   }
@@ -203,16 +203,16 @@ QColor SalomeApp_DataObject::color( const ColorRole role, const int id ) const
     // text color (not selected item)
     if ( isReference() ) {
       if ( !(QString(referencedObject()->GetName().c_str()).isEmpty()) )
-       c = QColor( 255, 0, 0 );      // valid reference (red)
+        c = QColor( 255, 0, 0 );      // valid reference (red)
       else
-       c = QColor( 200, 200, 200 );  // invalid reference (grayed)
+        c = QColor( 200, 200, 200 );  // invalid reference (grayed)
     }
     else if ( myObject ) {
       // get color atrtribute value
       _PTR(GenericAttribute) anAttr;
       if ( myObject->FindAttribute( anAttr, "AttributeTextColor" ) ) {
-       _PTR(AttributeTextColor) aColAttr = anAttr;
-       c = QColor( (int)aColAttr->TextColor().R, (int)aColAttr->TextColor().G, (int)aColAttr->TextColor().B );
+        _PTR(AttributeTextColor) aColAttr = anAttr;
+        c = QColor( (int)aColAttr->TextColor().R, (int)aColAttr->TextColor().G, (int)aColAttr->TextColor().B );
       }
     }
     break;
@@ -220,18 +220,18 @@ QColor SalomeApp_DataObject::color( const ColorRole role, const int id ) const
     // background color for the highlighted item
     if ( isReference() ) {
       if ( !(QString(referencedObject()->GetName().c_str()).isEmpty()) )
-       c = QColor( 255, 0, 0 );      // valid reference (red)
+        c = QColor( 255, 0, 0 );      // valid reference (red)
       else
-       c = QColor( 200, 200, 200 );  // invalid reference (grayed)
+        c = QColor( 200, 200, 200 );  // invalid reference (grayed)
     }
     else if ( myObject ) {
       // get color atrtribute value
       _PTR(GenericAttribute) anAttr;
       if( myObject->FindAttribute ( anAttr, "AttributeTextHighlightColor") ) {
         _PTR(AttributeTextHighlightColor) aHighColAttr = anAttr;
-       c = QColor( (int)(aHighColAttr->TextHighlightColor().R), 
-                   (int)(aHighColAttr->TextHighlightColor().G), 
-                   (int)(aHighColAttr->TextHighlightColor().B));
+        c = QColor( (int)(aHighColAttr->TextHighlightColor().R), 
+                    (int)(aHighColAttr->TextHighlightColor().G), 
+                    (int)(aHighColAttr->TextHighlightColor().B));
       }
     }
     break;
@@ -273,9 +273,9 @@ QString SalomeApp_DataObject::toolTip( const int /*id*/ ) const
         app->lcc()->FindComponent(params, componentDataType().toLatin1().constData() );
       
       if ( !CORBA::is_nil(aComponent) && aComponent->hasObjectInfo() ) {
-       LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>( root() );
-       if ( aRoot && aRoot->study() )
-         return QString( (CORBA::String_var)aComponent->getObjectInfo( aRoot->study()->id(), entry().toLatin1().constData()) );
+        LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>( root() );
+        if ( aRoot && aRoot->study() )
+          return QString( (CORBA::String_var)aComponent->getObjectInfo( aRoot->study()->id(), entry().toLatin1().constData()) );
       }
     }
   }
@@ -440,8 +440,8 @@ QString SalomeApp_DataObject::ior( const _PTR(SObject)& obj ) const
       _PTR(AttributeIOR) iorAttr = attr;
       if ( iorAttr )
       {
-       std::string str = iorAttr->Value();
-       txt = QString( str.c_str() );
+        std::string str = iorAttr->Value();
+        txt = QString( str.c_str() );
       }
     }
   }
@@ -491,28 +491,28 @@ QString SalomeApp_DataObject::value( const _PTR(SObject)& obj ) const
       {
         _PTR(Study) studyDS( aStudy->studyDS() );
 
-       bool ok = false;
-       QStringList aSectionList = aStrings.split( "|" );
-       if ( !aSectionList.isEmpty() )
-       {
-         QString aLastSection = aSectionList.last();
-         QStringList aStringList = aLastSection.split( ":" );
-         if ( !aStringList.isEmpty() )
-         {
-           ok = true;
-           for ( int i = 0, n = aStringList.size(); i < n; i++ )
-           {
-             QString aStr = aStringList[i];
-             if ( studyDS->IsVariable( aStr.toStdString() ) )
-               val.append( aStr + ", " );
-           }
-
-           if ( !val.isEmpty() )
-             val.remove( val.length() - 2, 2 );
-         }
-       }
-       if( !ok )
-         val = aStrings;
+        bool ok = false;
+        QStringList aSectionList = aStrings.split( "|" );
+        if ( !aSectionList.isEmpty() )
+        {
+          QString aLastSection = aSectionList.last();
+          QStringList aStringList = aLastSection.split( ":" );
+          if ( !aStringList.isEmpty() )
+          {
+            ok = true;
+            for ( int i = 0, n = aStringList.size(); i < n; i++ )
+            {
+              QString aStr = aStringList[i];
+              if ( studyDS->IsVariable( aStr.toStdString() ) )
+                val.append( aStr + ", " );
+            }
+
+            if ( !val.isEmpty() )
+              val.remove( val.length() - 2, 2 );
+          }
+        }
+        if( !ok )
+          val = aStrings;
       }
     }
   }
@@ -581,7 +581,7 @@ SalomeApp_ModuleObject::SalomeApp_ModuleObject( SUIT_DataObject* parent )
   \param parent parent data object
 */
 SalomeApp_ModuleObject::SalomeApp_ModuleObject( const _PTR(SObject)& sobj, 
-                                               SUIT_DataObject* parent )
+                                                SUIT_DataObject* parent )
 : CAM_DataObject( parent ),
   LightApp_DataObject( parent ),
   SalomeApp_DataObject( sobj, parent ),
@@ -596,8 +596,8 @@ SalomeApp_ModuleObject::SalomeApp_ModuleObject( const _PTR(SObject)& sobj,
   \param parent parent data object
 */
 SalomeApp_ModuleObject::SalomeApp_ModuleObject( CAM_DataModel* dm, 
-                                               const _PTR(SObject)& sobj, 
-                                               SUIT_DataObject* parent )
+                                                const _PTR(SObject)& sobj, 
+                                                SUIT_DataObject* parent )
 : CAM_DataObject( parent ),
   LightApp_DataObject( parent ),
   SalomeApp_DataObject( sobj, parent ),
@@ -744,8 +744,8 @@ QString SalomeApp_RootObject::toolTip( const int id ) const
   \param study study
 */
 SalomeApp_SavePointObject::SalomeApp_SavePointObject( SUIT_DataObject* parent, 
-                                                     const int id, 
-                                                     SalomeApp_Study* study )
+                                                      const int id, 
+                                                      SalomeApp_Study* study )
 : LightApp_DataObject( parent ), 
   CAM_DataObject( parent ),
   myId( id ),
index c784b6a260d2084d7f109ca3326b2f60dddcda4d..f83897839832d876c939867e6b6f3c6b6c8e8ce6 100644 (file)
@@ -116,16 +116,16 @@ SalomeApp_DoubleSpinBox::~SalomeApp_DoubleSpinBox()
 void SalomeApp_DoubleSpinBox::connectSignalsAndSlots()
 {
   connect( this, SIGNAL( editingFinished() ),
-          this, SLOT( onEditingFinished() ) );
+           this, SLOT( onEditingFinished() ) );
 
   connect( this, SIGNAL( valueChanged( const QString& ) ),
-          this, SLOT( onTextChanged( const QString& ) ) );
+           this, SLOT( onTextChanged( const QString& ) ) );
 
   connect( lineEdit(), SIGNAL( textChanged( const QString& ) ),
-          this, SLOT( onTextChanged( const QString& ) ) );
+           this, SLOT( onTextChanged( const QString& ) ) );
 
   connect( lineEdit(), SIGNAL( textChanged( const QString& )),
-          this, SIGNAL( textChanged( const QString& ) ) );
+           this, SIGNAL( textChanged( const QString& ) ) );
 }
 
 /*!
@@ -204,11 +204,11 @@ bool SalomeApp_DoubleSpinBox::isValid( QString& msg, bool toCorrect )
     if( toCorrect )
     {
       if( aState == Incompatible )
-       msg += tr( "ERR_INCOMPATIBLE_TYPE" ).arg( text() ) + "\n";
+        msg += tr( "ERR_INCOMPATIBLE_TYPE" ).arg( text() ) + "\n";
       else if( aState == NoVariable )
-       msg += tr( "ERR_NO_VARIABLE" ).arg( text() ) + "\n";
+        msg += tr( "ERR_NO_VARIABLE" ).arg( text() ) + "\n";
       else if( aState == Invalid )
-       msg += tr( "ERR_INVALID_VALUE" ) + "\n";
+        msg += tr( "ERR_INVALID_VALUE" ) + "\n";
 
       setText( myCorrectValue );
     }
@@ -325,29 +325,29 @@ SalomeApp_DoubleSpinBox::SearchState SalomeApp_DoubleSpinBox::findVariable( cons
       std::string aName = name.toStdString();
       if( studyDS->IsVariable( aName ) )
       {
-       if( studyDS->IsReal( aName ) || studyDS->IsInteger( aName ) || studyDS->IsString( aName ) )
-       {
-         if( studyDS->IsString( aName ) )
-           {
-             PyConsole_Console* pyConsole = app->pythonConsole();
-             PyConsole_Interp* pyInterp = pyConsole->getInterp();
-             PyLockWrapper aLock = pyInterp->GetLockWrapper();
-             std::string command;
-             command  = "import salome_notebook ; ";
-             command += "salome_notebook.notebook.setAsReal(\"";
-             command += aName;
-             command += "\")";
-             bool aResult;
-             aResult = pyInterp->run(command.c_str());
-             if(aResult)
-               {
-                 return IncorrectType;
-               }
-           }
-         value = studyDS->GetReal( aName );
-         return Found;
-       }
-       return IncorrectType;
+        if( studyDS->IsReal( aName ) || studyDS->IsInteger( aName ) || studyDS->IsString( aName ) )
+        {
+          if( studyDS->IsString( aName ) )
+            {
+              PyConsole_Console* pyConsole = app->pythonConsole();
+              PyConsole_Interp* pyInterp = pyConsole->getInterp();
+              PyLockWrapper aLock = pyInterp->GetLockWrapper();
+              std::string command;
+              command  = "import salome_notebook ; ";
+              command += "salome_notebook.notebook.setAsReal(\"";
+              command += aName;
+              command += "\")";
+              bool aResult;
+              aResult = pyInterp->run(command.c_str());
+              if(aResult)
+                {
+                  return IncorrectType;
+                }
+            }
+          value = studyDS->GetReal( aName );
+          return Found;
+        }
+        return IncorrectType;
       }
     }
   }
index 27427d2e68d48b83bc94b26ce9ec2c929e56b6d8..76625adc9c7c12da3e7279678a76f6fc196dd070 100644 (file)
@@ -86,16 +86,16 @@ SalomeApp_IntSpinBox::~SalomeApp_IntSpinBox()
 void SalomeApp_IntSpinBox::connectSignalsAndSlots()
 {
   connect( this, SIGNAL( editingFinished() ),
-          this, SLOT( onEditingFinished() ) );
+           this, SLOT( onEditingFinished() ) );
 
   connect( this, SIGNAL( valueChanged( const QString& ) ),
-          this, SLOT( onTextChanged( const QString& ) ) );
+           this, SLOT( onTextChanged( const QString& ) ) );
 
   connect( lineEdit(), SIGNAL( textChanged( const QString& ) ),
-          this, SLOT( onTextChanged( const QString& ) ) );
+           this, SLOT( onTextChanged( const QString& ) ) );
 
   connect( lineEdit(), SIGNAL( textChanged( const QString& )),
-          this, SIGNAL( textChanged( const QString& ) ) );
+           this, SIGNAL( textChanged( const QString& ) ) );
 }
 
 /*!
@@ -174,11 +174,11 @@ bool SalomeApp_IntSpinBox::isValid( QString& msg, bool toCorrect )
     if( toCorrect )
     {
       if( aState == Incompatible )
-       msg += tr( "ERR_INCOMPATIBLE_TYPE" ).arg( text() ) + "\n";
+        msg += tr( "ERR_INCOMPATIBLE_TYPE" ).arg( text() ) + "\n";
       else if( aState == NoVariable )
-       msg += tr( "ERR_NO_VARIABLE" ).arg( text() ) + "\n";
+        msg += tr( "ERR_NO_VARIABLE" ).arg( text() ) + "\n";
       else if( aState == Invalid )
-       msg += tr( "ERR_INVALID_VALUE" ) + "\n";
+        msg += tr( "ERR_INVALID_VALUE" ) + "\n";
 
       setText( myCorrectValue );
     }
@@ -233,7 +233,7 @@ SalomeApp_IntSpinBox::State SalomeApp_IntSpinBox::isValid( const QString& text,
     {
       text.toDouble( &ok );
       if( ok )
-       return Invalid;
+        return Invalid;
       return NoVariable;
     }
   }
@@ -283,29 +283,29 @@ SalomeApp_IntSpinBox::SearchState SalomeApp_IntSpinBox::findVariable( const QStr
       std::string aName = name.toStdString();
       if( studyDS->IsVariable( aName ) )
       {
-       if( studyDS->IsInteger( aName ) || studyDS->IsString( aName ) )
-       {
-         if( studyDS->IsString( aName ) )
-           {
-             PyConsole_Console* pyConsole = app->pythonConsole();
-             PyConsole_Interp* pyInterp = pyConsole->getInterp();
-             PyLockWrapper aLock = pyInterp->GetLockWrapper();
-             std::string command;
-             command  = "import salome_notebook ; ";
-             command += "salome_notebook.notebook.setAsInteger(\"";
-             command += aName;
-             command += "\")";
-             bool aResult;
-             aResult = pyInterp->run(command.c_str());
-             if(aResult)
-               {
-                 return IncorrectType;
-               }
-           }
-         value = studyDS->GetInteger( aName );
-         return Found;
-       }
-       return IncorrectType;
+        if( studyDS->IsInteger( aName ) || studyDS->IsString( aName ) )
+        {
+          if( studyDS->IsString( aName ) )
+            {
+              PyConsole_Console* pyConsole = app->pythonConsole();
+              PyConsole_Interp* pyInterp = pyConsole->getInterp();
+              PyLockWrapper aLock = pyInterp->GetLockWrapper();
+              std::string command;
+              command  = "import salome_notebook ; ";
+              command += "salome_notebook.notebook.setAsInteger(\"";
+              command += aName;
+              command += "\")";
+              bool aResult;
+              aResult = pyInterp->run(command.c_str());
+              if(aResult)
+                {
+                  return IncorrectType;
+                }
+            }
+          value = studyDS->GetInteger( aName );
+          return Found;
+        }
+        return IncorrectType;
       }
     }
   }
index b86831fa17bc7f33f48d6b993d3ed6e171292416..b6d2b51384473f04b1df5e257c7fc14f92d8a962 100644 (file)
@@ -89,9 +89,9 @@ SalomeApp_ListView::SalomeApp_ListView( QWidget* parent )
   viewport()->installEventFilter(this);
 
   connect(this, SIGNAL(itemSelectionChanged()),
-         this, SLOT(onSelectionChanged()));
+          this, SLOT(onSelectionChanged()));
   connect(header(), SIGNAL(sizeChange(int, int, int)),
-         this,     SLOT(onHeaderSizeChange(int, int, int)));
+          this,     SLOT(onHeaderSizeChange(int, int, int)));
 }
 
 /*!
@@ -330,10 +330,10 @@ UpdateType SalomeApp_ListView::finishEditing(bool ok)
     if (ok) {
       aNeedsUpdate = myEditedItem->finishEditing(myEdit);
       if (aNeedsUpdate == utCancel) {
-       // something to do here on Cancel...
+        // something to do here on Cancel...
       }
       else {
-       // something to do here on OK...
+        // something to do here on OK...
       }
       // updating contents
       switch (aNeedsUpdate) {
@@ -385,9 +385,9 @@ UpdateType SalomeApp_ListView::finishEditing(bool ok)
   \retval valid rect in success
 */
 QRect SalomeApp_ListView::tip(QPoint aPos,
-                             QString& aText,
-                             QRect& dspRect,
-                             QFont& dspFnt) const
+                              QString& aText,
+                              QRect& dspRect,
+                              QFont& dspFnt) const
 {
   QRect result( -1, -1, -1, -1 );
   SalomeApp_ListViewItem* aItem = (SalomeApp_ListViewItem*)itemAt( aPos );
@@ -396,15 +396,15 @@ QRect SalomeApp_ListView::tip(QPoint aPos,
       QRect aItemRect = aItem->itemRect(i);
       QRect aTextRect = aItem->textRect(i);
       if ( !aItem->text(i).isEmpty() &&
-          ( aItemRect.width()  > header()->sectionSize(i) ||
-            aTextRect.left()   < 0 ||
+           ( aItemRect.width()  > header()->sectionSize(i) ||
+             aTextRect.left()   < 0 ||
              aTextRect.top()    < 0 ||
              aTextRect.right()  > viewport()->width() ||
              aTextRect.bottom() > viewport()->height() ) ) {
         // calculating tip data
         aText   = aItem->tipText();
-       dspRect = aItem->tipRect();
-       dspFnt  = font();
+        dspRect = aItem->tipRect();
+        dspFnt  = font();
         if (dspRect.isValid()) {
           result  = QRect(QPoint(0, aItemRect.top()),
                           QSize(viewport()->width(), aItemRect.height()));
@@ -428,7 +428,7 @@ QTreeWidgetItem( parent )
   Constructor
 */
 SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView*     parent,
-                                              SalomeApp_ListViewItem* after) :
+                                               SalomeApp_ListViewItem* after) :
 QTreeWidgetItem( parent, after )
 {
   init();
@@ -438,8 +438,8 @@ QTreeWidgetItem( parent, after )
   Constructor
 */
 SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView*     parent,
-                                              const QStringList&    theStrings,
-                                              const bool        theEditable) :
+                                               const QStringList&    theStrings,
+                                               const bool        theEditable) :
 QTreeWidgetItem(parent, theStrings)
 {
   init();
@@ -450,8 +450,8 @@ QTreeWidgetItem(parent, theStrings)
   Constructor
 */
 SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListViewItem* parent,
-                                              const QStringList&    theString,
-                                              const bool        theEditable) :
+                                               const QStringList&    theString,
+                                               const bool        theEditable) :
 QTreeWidgetItem(parent, theString)
 {
   init();
@@ -462,9 +462,9 @@ QTreeWidgetItem(parent, theString)
   Constructor
 */
 SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListViewItem* parent,
-                                              SalomeApp_ListViewItem* after,
-                                              const QString&    theName,
-                                              const bool        theEditable) :
+                                               SalomeApp_ListViewItem* after,
+                                               const QString&    theName,
+                                               const bool        theEditable) :
 QTreeWidgetItem(parent, after)
 {
   setData(0,Qt::DisplayRole,QVariant(theName));
@@ -476,9 +476,9 @@ QTreeWidgetItem(parent, after)
   Constructor
 */
 SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView*     parent,
-                                              SalomeApp_ListViewItem* after,
-                                              const QString&    theName,
-                                              const bool        theEditable) :
+                                               SalomeApp_ListViewItem* after,
+                                               const QString&    theName,
+                                               const bool        theEditable) :
 QTreeWidgetItem(parent, after)
 {
   setData(0,Qt::DisplayRole,QVariant(theName));
@@ -490,10 +490,10 @@ QTreeWidgetItem(parent, after)
   Constructor
 */
 SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListViewItem* parent,
-                                              SalomeApp_ListViewItem* after,
-                                              const QString&    theName,
-                                              const QString&    theValue,
-                                              const bool        theEditable) :
+                                               SalomeApp_ListViewItem* after,
+                                               const QString&    theName,
+                                               const QString&    theValue,
+                                               const bool        theEditable) :
 QTreeWidgetItem(parent, after)
 {
   setData(0,Qt::DisplayRole,QVariant(theName));
@@ -506,10 +506,10 @@ QTreeWidgetItem(parent, after)
   Constructor
 */
 SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView*     parent,
-                                              SalomeApp_ListViewItem* after,
-                                              const QString&    theName,
-                                              const QString&    theValue,
-                                              const bool        theEditable) :
+                                               SalomeApp_ListViewItem* after,
+                                               const QString&    theName,
+                                               const QString&    theValue,
+                                               const bool        theEditable) :
 QTreeWidgetItem(parent, after)
 {
   setData(0,Qt::DisplayRole,QVariant(theName));
@@ -767,9 +767,9 @@ SalomeApp_EntityEdit* SalomeApp_ListViewItem::startEditing()
       return 0;
     aWidget = new SalomeApp_EntityEdit(aListView->viewport(),
                                  anEditType,
-                                aValueType,
-                                aButtons & SalomeApp_EntityEdit::btApply,
-                                aButtons & SalomeApp_EntityEdit::btCancel);
+                                 aValueType,
+                                 aButtons & SalomeApp_EntityEdit::btApply,
+                                 aButtons & SalomeApp_EntityEdit::btCancel);
     computeEditGeometry(this, aWidget);
 
     fillWidgetWithValues(aWidget);
@@ -966,7 +966,7 @@ int SalomeApp_ComboBox::findItem(const QString& theText)
   Adds item in combo box
 */
 void SalomeApp_ComboBox::insertItem(const QString& theValue,
-                                   int            theIndex)
+                                    int            theIndex)
 {
   if (duplicatesEnabled() || findItem(theValue) < 0)
     QComboBox::insertItem(theIndex, theValue);
@@ -1046,10 +1046,10 @@ void SalomeApp_ComboBox::insertList(const TColStd_ListOfReal& theList)
   Constructor
 */
 SalomeApp_EntityEdit::SalomeApp_EntityEdit(QWidget* parent,
-                              int      controlType,
-                              int      valueType,
-                              bool     butApply,
-                              bool     butCancel) :
+                               int      controlType,
+                               int      valueType,
+                               bool     butApply,
+                               bool     butCancel) :
 QWidget(parent),
 myEdit(0),
 myCombo(0),
@@ -1185,8 +1185,8 @@ void SalomeApp_EntityEdit::setText(const QString& theText)
   Adds item in combo box, sets it current if theSetCurrent is true
 */
 void SalomeApp_EntityEdit::insertItem(const QString& theValue,
-                               bool           theSetCurrent,
-                               int            theOrder)
+                                bool           theSetCurrent,
+                                int            theOrder)
 {
   if (myCombo) {
     int aIndexAt = -1;
@@ -1208,7 +1208,7 @@ void SalomeApp_EntityEdit::insertItem(const QString& theValue,
   Adds items in combo box, sets item theCurrent as current
 */
 void SalomeApp_EntityEdit::insertList(const QStringList& theList,
-                               const int          theCurrent)
+                                const int          theCurrent)
 {
   if (myCombo)
     myCombo->insertList(theList);
@@ -1220,7 +1220,7 @@ void SalomeApp_EntityEdit::insertList(const QStringList& theList,
   Adds item in combo box, sets it current if theSetCurrent is true
 */
 void SalomeApp_EntityEdit::insertItem(const int theValue,
-                               bool      theSetCurrent)
+                                bool      theSetCurrent)
 {
   if (myCombo) {
     myCombo->insertItem(theValue);
@@ -1233,7 +1233,7 @@ void SalomeApp_EntityEdit::insertItem(const int theValue,
   Adds items in combo box, sets item theCurrent as current
 */
 void SalomeApp_EntityEdit::insertList(const TColStd_ListOfInteger& theList,
-                               const int                    theCurrent)
+                                const int                    theCurrent)
 {
   if (myCombo)
     myCombo->insertList(theList);
@@ -1251,7 +1251,7 @@ void SalomeApp_EntityEdit::insertList(const TColStd_ListOfInteger& theList,
   Adds item in combo box, sets it current if theSetCurrent is true
 */
 void SalomeApp_EntityEdit::insertItem(const double theValue,
-                               bool         theSetCurrent)
+                                bool         theSetCurrent)
 {
   if (myCombo) {
     myCombo->insertItem(theValue);
@@ -1264,7 +1264,7 @@ void SalomeApp_EntityEdit::insertItem(const double theValue,
   Adds items in combo box, sets item theCurrent as current
 */
 void SalomeApp_EntityEdit::insertList(const TColStd_ListOfReal& theList,
-                               const int                 theCurrent)
+                                const int                 theCurrent)
 {
   if (myCombo)
     myCombo->insertList(theList);
index 8e1521a6d5ee0a41bfca2a7de9a92c862e60a847..ea418cad6ca0ec7c4ca0a8ecdb1c8e92ae66ba8f 100644 (file)
@@ -186,10 +186,10 @@ public:
 
 public:
   SalomeApp_EntityEdit( QWidget* parent, 
-                       int      controlType = etLineEdit, 
-                       int      valueType   = vtString,
-                       bool     butApply    = false, 
-                       bool     butCancel   = false);
+                        int      controlType = etLineEdit, 
+                        int      valueType   = vtString,
+                        bool     butApply    = false, 
+                        bool     butCancel   = false);
   ~SalomeApp_EntityEdit();
 
   void finishEditing();
@@ -197,18 +197,18 @@ public:
   QString getText();
   void setText(const QString& theText );
   void insertItem( const QString& theValue, 
-                  bool           theSetCurrent = false,
-                  int            theOrder = atBottom );
+                   bool           theSetCurrent = false,
+                   int            theOrder = atBottom );
   void insertList( const QStringList& theList, 
-                  const int          theCurrent = -1 );
+                   const int          theCurrent = -1 );
   void insertItem( const int theValue, 
-                  bool  theSetCurrent = false );
+                   bool  theSetCurrent = false );
   void insertList( const TColStd_ListOfInteger& theList, 
-                  const int                    theCurrent = -1 );
+                   const int                    theCurrent = -1 );
   void insertItem( const double theValue, 
-                  bool         theSetCurrent = false );
+                   bool         theSetCurrent = false );
   void insertList( const TColStd_ListOfReal& theList, 
-                  const int                 theCurrent = -1 );
+                   const int                 theCurrent = -1 );
   QWidget* getControl();
   void setFocus();
   void setValidator(const QValidator*);
@@ -241,31 +241,31 @@ class SalomeApp_ListViewItem : public QTreeWidgetItem
 public:
   SalomeApp_ListViewItem( SalomeApp_ListView* );
   SalomeApp_ListViewItem( SalomeApp_ListView*, 
-                         SalomeApp_ListViewItem* );
+                          SalomeApp_ListViewItem* );
   SalomeApp_ListViewItem( SalomeApp_ListView*,
-                         const QStringList&,
-                         const bool = false );
+                          const QStringList&,
+                          const bool = false );
   SalomeApp_ListViewItem( SalomeApp_ListViewItem*,
-                         const QStringList&,
-                         const bool = false );
+                          const QStringList&,
+                          const bool = false );
   SalomeApp_ListViewItem( SalomeApp_ListView*,
-                         SalomeApp_ListViewItem*,
-                         const QString&,
-                         const bool = false );
+                          SalomeApp_ListViewItem*,
+                          const QString&,
+                          const bool = false );
   SalomeApp_ListViewItem( SalomeApp_ListViewItem*,
-                         SalomeApp_ListViewItem*,
-                         const QString&,
-                         const bool = false);
+                          SalomeApp_ListViewItem*,
+                          const QString&,
+                          const bool = false);
   SalomeApp_ListViewItem( SalomeApp_ListView*,
-                         SalomeApp_ListViewItem*,
-                         const QString& theName,
-                         const QString& theValue, 
-                         const bool = false);
+                          SalomeApp_ListViewItem*,
+                          const QString& theName,
+                          const QString& theValue, 
+                          const bool = false);
   SalomeApp_ListViewItem( SalomeApp_ListViewItem*,
-                         SalomeApp_ListViewItem*,
-                         const QString&,
-                         const QString&, 
-                         const bool = false);
+                          SalomeApp_ListViewItem*,
+                          const QString&,
+                          const QString&, 
+                          const bool = false);
   ~SalomeApp_ListViewItem();
 
   QString            fullName();
index d338c68306453da6c09d6ef3e828517b567f3076..a94089ac855f7621044ad93b9835945f55d34653 100644 (file)
@@ -74,7 +74,7 @@ SalomeApp_LoadStudiesDlg::SalomeApp_LoadStudiesDlg( QWidget* parent, const QStri
   myList = new QListWidget( this );
   myList->setMinimumSize( MIN_LISTBOX_WIDTH, MIN_LISTBOX_HEIGHT );
   myList->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, 
-                                              QSizePolicy::Expanding ) );
+                                               QSizePolicy::Expanding ) );
   myList->setSelectionMode( QAbstractItemView::SingleSelection );
 
   topLayout->addWidget( lab );
@@ -84,9 +84,9 @@ SalomeApp_LoadStudiesDlg::SalomeApp_LoadStudiesDlg( QWidget* parent, const QStri
   connect( myButtonOk,   SIGNAL( clicked() ), this, SLOT( accept() ) );
   connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
   connect( myList,       SIGNAL( itemDoubleClicked( QListWidgetItem* ) ),
-                                             this, SLOT( accept() ) );
+                                              this, SLOT( accept() ) );
   connect( myList,       SIGNAL( itemSelectionChanged() ),
-                                             this, SLOT( updateState() ) );
+                                              this, SLOT( updateState() ) );
   myList->addItems( studies );
 
   updateState();
index 5bfa0adfae0e15a9547cfd6068596766bb0f0a76..e7b54c83ad1d36e4439d2d81e28eddedf5635c16 100644 (file)
@@ -96,26 +96,26 @@ void SalomeApp_Module::extractContainers( const SALOME_ListIO& source, SALOME_Li
       _PTR(SObject) SO = study->studyDS()->FindObjectID( obj->getEntry() );
       if( SO && QString( SO->GetID().c_str() ) == SO->GetFatherComponent()->GetID().c_str() )
       { //component is selected
-       _PTR(SComponent) SC( SO->GetFatherComponent() );
-       _PTR(ChildIterator) anIter ( study->studyDS()->NewChildIterator( SC ) );
-       anIter->InitEx( true );
-       while( anIter->More() )
-       {
-         _PTR(SObject) valSO ( anIter->Value() );
-         _PTR(SObject) refSO;
-         if( !valSO->ReferencedObject( refSO ) )
-         {
-           QString id = valSO->GetID().c_str(),
-                   comp = SC->ComponentDataType().c_str(),
-                   val = valSO->GetName().c_str();
-
-           Handle( SALOME_InteractiveObject ) new_obj =
-             new SALOME_InteractiveObject( id.toLatin1(), comp.toLatin1(), val.toLatin1() );
-           dest.Append( new_obj );
-         }
-         anIter->Next();
-       }
-       continue;
+        _PTR(SComponent) SC( SO->GetFatherComponent() );
+        _PTR(ChildIterator) anIter ( study->studyDS()->NewChildIterator( SC ) );
+        anIter->InitEx( true );
+        while( anIter->More() )
+        {
+          _PTR(SObject) valSO ( anIter->Value() );
+          _PTR(SObject) refSO;
+          if( !valSO->ReferencedObject( refSO ) )
+          {
+            QString id = valSO->GetID().c_str(),
+                    comp = SC->ComponentDataType().c_str(),
+                    val = valSO->GetName().c_str();
+
+            Handle( SALOME_InteractiveObject ) new_obj =
+              new SALOME_InteractiveObject( id.toLatin1(), comp.toLatin1(), val.toLatin1() );
+            dest.Append( new_obj );
+          }
+          anIter->Next();
+        }
+        continue;
       }
     }
     dest.Append( obj );
index 347d6a77161a9c85906212cbd596f2b53fc15f4e..e4e4934b9d8353c0c3779bf00ce0eb77953952c4 100644 (file)
@@ -368,8 +368,8 @@ void NoteBook_Table::Init(_PTR(Study) theStudy)
       NoteBook_TableRow* aRow = myRows[ i ];
       if( aRow )
       {
-       delete aRow;
-       aRow = 0;
+        delete aRow;
+        aRow = 0;
       }
     }
     myRows.clear();
@@ -384,7 +384,7 @@ void NoteBook_Table::Init(_PTR(Study) theStudy)
   vector<string> aVariables = theStudy->GetVariableNames();
   for(int iVar = 0; iVar < aVariables.size(); iVar++ ) {
     AddRow(QString(aVariables[iVar].c_str()),
-          Variable2String(aVariables[iVar],theStudy));
+           Variable2String(aVariables[iVar],theStudy));
   }
 
   //Add empty row
@@ -535,51 +535,51 @@ void NoteBook_Table::onItemChanged(QTableWidgetItem* theItem)
       QString aMsg;
 
       if(aCurrentColumn == NAME_COLUMN) {
-       int anIndex = aRow->GetIndex();
-       if( myVariableMap.contains( anIndex ) )
-       {
-         const NoteBoox_Variable& aVariable = myVariableMap[ anIndex ];
-         if( !aVariable.Name.isEmpty() && myStudy->IsVariableUsed( string( aVariable.Name.toLatin1().constData() ) ) )
-         {
-           if( QMessageBox::warning( parentWidget(), tr( "WARNING" ),
-                                     tr( "RENAME_VARIABLE_IS_USED" ).arg( aVariable.Name ),
-                                     QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No )
-           {
-             bool isBlocked = blockSignals( true );
-             aRow->SetName( aVariable.Name );
-             blockSignals( isBlocked );
-             return;
-           }
-         }
-       }
+        int anIndex = aRow->GetIndex();
+        if( myVariableMap.contains( anIndex ) )
+        {
+          const NoteBoox_Variable& aVariable = myVariableMap[ anIndex ];
+          if( !aVariable.Name.isEmpty() && myStudy->IsVariableUsed( string( aVariable.Name.toLatin1().constData() ) ) )
+          {
+            if( QMessageBox::warning( parentWidget(), tr( "WARNING" ),
+                                      tr( "RENAME_VARIABLE_IS_USED" ).arg( aVariable.Name ),
+                                      QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No )
+            {
+              bool isBlocked = blockSignals( true );
+              aRow->SetName( aVariable.Name );
+              blockSignals( isBlocked );
+              return;
+            }
+          }
+        }
       }
 
       //Case then varible name changed. 
       if(aCurrentColumn == NAME_COLUMN) {
         if(!aRow->CheckName()) {
-         IsCorrect = false;
-         aMsg = tr( "VARNAME_INCORRECT" ).arg(aRow->GetName());
-       }
+          IsCorrect = false;
+          aMsg = tr( "VARNAME_INCORRECT" ).arg(aRow->GetName());
+        }
         else if(!IsUniqueName(aRow)) {
-         IsCorrect = false;
+          IsCorrect = false;
           aMsg = tr( "VARNAME_EXISTS" ).arg(aRow->GetName());
-       }
-       else
-         IsVariableComplited = aRow->CheckValue();
+        }
+        else
+          IsVariableComplited = aRow->CheckValue();
       }
       
       //Case then varible value changed. 
       else if(aCurrentColumn == VALUE_COLUMN){
         if(!aRow->CheckValue()) {
-         IsCorrect = false;
-         aMsg = tr( "VARVALUE_INCORRECT" ).arg(aRow->GetName());
-       }
-       else
-         IsVariableComplited = aRow->CheckName() && IsUniqueName(aRow);
+          IsCorrect = false;
+          aMsg = tr( "VARVALUE_INCORRECT" ).arg(aRow->GetName());
+        }
+        else
+          IsVariableComplited = aRow->CheckName() && IsUniqueName(aRow);
       }
 
       if(!IsCorrect && !aMsg.isEmpty())
-       SUIT_MessageBox::warning( parentWidget(), tr( "WARNING" ), aMsg );
+        SUIT_MessageBox::warning( parentWidget(), tr( "WARNING" ), aMsg );
 
       bool isBlocked = blockSignals( true );
       theItem->setForeground( QBrush( IsCorrect ? Qt::black : Qt::red ) );
@@ -588,19 +588,19 @@ void NoteBook_Table::onItemChanged(QTableWidgetItem* theItem)
       int anIndex = aRow->GetIndex();
       if( myVariableMap.contains( anIndex ) )
       {
-       NoteBoox_Variable& aVariable = myVariableMap[ anIndex ];
-       if( aVariable.Name.compare( aRow->GetName() ) != 0 ||
-           aVariable.Value.compare( aRow->GetValue() ) != 0 )
-       {
-         aVariable.Name = aRow->GetName();
-         aVariable.Value = aRow->GetValue();
-       }
-       else
-         isModified = false;
+        NoteBoox_Variable& aVariable = myVariableMap[ anIndex ];
+        if( aVariable.Name.compare( aRow->GetName() ) != 0 ||
+            aVariable.Value.compare( aRow->GetValue() ) != 0 )
+        {
+          aVariable.Name = aRow->GetName();
+          aVariable.Value = aRow->GetValue();
+        }
+        else
+          isModified = false;
       }
 
       if(IsCorrect && IsVariableComplited && IsLastRow(aRow))
-       AddEmptyRow();
+        AddEmptyRow();
     }
 
     if( !myIsModified )
@@ -648,22 +648,22 @@ void NoteBook_Table::RemoveSelected()
       else {
         int nRow = row(aSelectedItems[i]);
 
-       if( myStudy->IsVariableUsed( string( aRow->GetName().toLatin1().constData() ) ) )
-       {
-         if( QMessageBox::warning( parentWidget(), tr( "WARNING" ),
-                                   tr( "REMOVE_VARIABLE_IS_USED" ).arg( aRow->GetName() ),
-                                   QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No )
-         {
-           isProcessItemChangedSignal = true;
-           return;
-         }
-       }
-
-       int index = aRow->GetIndex();
+        if( myStudy->IsVariableUsed( string( aRow->GetName().toLatin1().constData() ) ) )
+        {
+          if( QMessageBox::warning( parentWidget(), tr( "WARNING" ),
+                                    tr( "REMOVE_VARIABLE_IS_USED" ).arg( aRow->GetName() ),
+                                    QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No )
+          {
+            isProcessItemChangedSignal = true;
+            return;
+          }
+        }
+
+        int index = aRow->GetIndex();
         QString aVarName = aRow->GetName();
-       myRemovedRows.append( index );
-       if( myVariableMap.contains( index ) )
-         myVariableMap.remove( index );
+        myRemovedRows.append( index );
+        if( myVariableMap.contains( index ) )
+          myVariableMap.remove( index );
         removeRow(nRow);
         myRows.removeAt(nRow);
         if(myStudy->IsVariable(aVarName.toLatin1().constData()))
@@ -899,28 +899,28 @@ void SalomeApp_NoteBookDlg::onApply()
     {
       if( aVariableMapRef.contains( anIndex ) )
       {
-       const NoteBoox_Variable& aVariableRef = aVariableMapRef[ anIndex ];
-       QString aNameRef = aVariableRef.Name;
-       QString aValueRef = aVariableRef.Value;
-
-       if( !aNameRef.isEmpty() && !aValueRef.isEmpty() && aNameRef != aName )
-       {
-         myStudy->RenameVariable( string( aNameRef.toLatin1().constData() ),
-                                  string( aName.toLatin1().constData() ) );
-       }
+        const NoteBoox_Variable& aVariableRef = aVariableMapRef[ anIndex ];
+        QString aNameRef = aVariableRef.Name;
+        QString aValueRef = aVariableRef.Value;
+
+        if( !aNameRef.isEmpty() && !aValueRef.isEmpty() && aNameRef != aName )
+        {
+          myStudy->RenameVariable( string( aNameRef.toLatin1().constData() ),
+                                   string( aName.toLatin1().constData() ) );
+        }
       }
 
       if( NoteBook_TableRow::IsIntegerValue(aValue,&anIVal) )
-       myStudy->SetInteger(string(aName.toLatin1().constData()),anIVal);
+        myStudy->SetInteger(string(aName.toLatin1().constData()),anIVal);
 
       else if( NoteBook_TableRow::IsRealValue(aValue,&aDVal) )
-       myStudy->SetReal(string(aName.toLatin1().constData()),aDVal);
+        myStudy->SetReal(string(aName.toLatin1().constData()),aDVal);
     
       else if( NoteBook_TableRow::IsBooleanValue(aValue,&aBVal) )
-       myStudy->SetBoolean(string(aName.toLatin1().constData()),aBVal);
+        myStudy->SetBoolean(string(aName.toLatin1().constData()),aBVal);
     
       else if( NoteBook_TableRow::IsValidStringValue(aValue) )
-       myStudy->SetString(string(aName.toLatin1().constData()),aValue.toStdString());
+        myStudy->SetString(string(aName.toLatin1().constData()),aValue.toStdString());
     }
   }
   myTable->ResetMaps();
@@ -941,13 +941,13 @@ void SalomeApp_NoteBookDlg::onCancel()
   if( myTable->IsModified() )
   {
     int answer = QMessageBox::question( this, tr( "CLOSE_CAPTION" ), tr( "CLOSE_DESCRIPTION" ),
-                                       QMessageBox::Yes, QMessageBox::No, QMessageBox::Cancel );
+                                        QMessageBox::Yes, QMessageBox::No, QMessageBox::Cancel );
     switch( answer )
     {
       case QMessageBox::Yes    : onOK(); return;
       case QMessageBox::No     : break;
       case QMessageBox::Cancel : return;
-      default :        break;
+      default : break;
     }
   }
   reject();
@@ -1086,7 +1086,7 @@ void SalomeApp_NoteBookDlg::clearStudy()
   int aY = y();
 
   // Disconnect dialog from application desktop in case if:
-  // 1) Application is not the first application in the session        
+  // 1) Application is not the first application in the session 
   // 2) Application is the first application in session but not the only.
   bool changeDesktop = ((anIndex > 0) || (anIndex == 0 && aList.count() > 1));
 
index 2f1e815cc70ccdc52237aafbf4f6715eca91e76d..93709477c5b0be479d9bc67fa6d8cfb408da6158 100644 (file)
@@ -94,7 +94,7 @@ class SALOMEAPP_EXPORT NoteBook_Table : public QTableWidget
 
   void Init(_PTR(Study) theStudy);
   static QString Variable2String(const std::string& theVarName,
-                                _PTR(Study) theStudy);
+                                 _PTR(Study) theStudy);
 
   bool IsValid() const;
 
index 1c040af7df600b53178b3e251aa82c75a704c05b..4b18f8a6c04853cc125adf858ebca23bfb344874 100644 (file)
@@ -213,7 +213,7 @@ bool SalomeApp_Study::saveDocumentAs( const QString& theFileName )
       listOfFiles.clear();
       aModel->saveAs( theFileName, this, listOfFiles );
       if ( !listOfFiles.isEmpty() )
-       saveModuleData(aModel->module()->name(), listOfFiles);
+        saveModuleData(aModel->module()->name(), listOfFiles);
     }
   }
 
@@ -255,7 +255,7 @@ bool SalomeApp_Study::saveDocument()
       listOfFiles.clear();
       aModel->save(listOfFiles);
       if ( !listOfFiles.isEmpty() ) 
-       saveModuleData(aModel->module()->name(), listOfFiles);
+        saveModuleData(aModel->module()->name(), listOfFiles);
     }
   }
 
@@ -523,7 +523,7 @@ QString SalomeApp_Study::newStudyName() const
     curName = prefix.arg( i );
     for ( j = 0 ; j < n; j++ ){
       if ( !strcmp( studies[j].c_str(), curName.toLatin1() ) )
-       break;
+        break;
     }
     if ( j == n )
       newName = curName;
index ee81e8ee159e8088995c5ab94eafd337ba46f72c..9f8467c3bfd637091a02b1663a1d1bfe3f05b5ed 100644 (file)
@@ -54,19 +54,19 @@ class SalomeApp_PropItem : public SalomeApp_ListViewItem
 public:
   /*! constructor  */
   SalomeApp_PropItem(SalomeApp_ListView* parent,
-                    const QString       theName,
-                    const bool          theEditable,
-                    const int           theUserType) :
+                     const QString       theName,
+                     const bool          theEditable,
+                     const int           theUserType) :
   SalomeApp_ListViewItem( parent, QStringList(theName), theEditable )
   {
     setUserType(theUserType);
   }
   /*! constructor */
   SalomeApp_PropItem(SalomeApp_ListView*     parent,
-                    SalomeApp_ListViewItem* after,
-                    const QString     theName,
-                    const bool        theEditable,
-                    const int         theUserType) :
+                     SalomeApp_ListViewItem* after,
+                     const QString     theName,
+                     const bool        theEditable,
+                     const int         theUserType) :
   SalomeApp_ListViewItem( parent, after, theName, theEditable )
   {
     setUserType(theUserType);
@@ -85,46 +85,46 @@ public:
     //  }
     case SalomeApp_StudyPropertiesDlg::prpLockedId:
       {
-       list << SalomeApp_StudyPropertiesDlg::tr( "PRP_NO" ) << SalomeApp_StudyPropertiesDlg::tr( "PRP_YES" );
-       theWidget->insertList(list, getValue() == SalomeApp_StudyPropertiesDlg::tr( "PRP_NO" ) ? 0 : 1 );
-       break;
+        list << SalomeApp_StudyPropertiesDlg::tr( "PRP_NO" ) << SalomeApp_StudyPropertiesDlg::tr( "PRP_YES" );
+        theWidget->insertList(list, getValue() == SalomeApp_StudyPropertiesDlg::tr( "PRP_NO" ) ? 0 : 1 );
+        break;
       }
     case SalomeApp_StudyPropertiesDlg::prpModificationsId:
       {
-       SalomeApp_Study* study =
+        SalomeApp_Study* study =
           dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
-       if (study) {
-         _PTR(Study) studyDoc = study->studyDS();
-         _PTR(AttributeStudyProperties) propAttr;
-         if ( studyDoc ) {
-           propAttr = studyDoc->GetProperties();
-           if ( propAttr ) {
-             std::vector<std::string> aUsers;
-             std::vector<int>  aMins, aHours, aDays, aMonths, aYears;
-             propAttr->GetModificationsList(aUsers, aMins, aHours, aDays, aMonths, aYears, false);
-             int aCnt = aUsers.size();
-             for ( int i = 0; i < aCnt; i++ ) {
-               QString val;
-               val.sprintf("%2.2d/%2.2d/%2d %2.2d:%2.2d",
-                           aDays  [i],
-                           aMonths[i],
-                           aYears [i],
-                           aHours [i],
-                           aMins  [i]);
-               val = val + " : " + QString( aUsers[i].c_str() );
-               list.prepend(val);
-             }
-             theWidget->setDuplicatesEnabled(true);
-             theWidget->insertList(list);
-           }
-         }
-       }
-       break;
+        if (study) {
+          _PTR(Study) studyDoc = study->studyDS();
+          _PTR(AttributeStudyProperties) propAttr;
+          if ( studyDoc ) {
+            propAttr = studyDoc->GetProperties();
+            if ( propAttr ) {
+              std::vector<std::string> aUsers;
+              std::vector<int>  aMins, aHours, aDays, aMonths, aYears;
+              propAttr->GetModificationsList(aUsers, aMins, aHours, aDays, aMonths, aYears, false);
+              int aCnt = aUsers.size();
+              for ( int i = 0; i < aCnt; i++ ) {
+                QString val;
+                val.sprintf("%2.2d/%2.2d/%2d %2.2d:%2.2d",
+                            aDays  [i],
+                            aMonths[i],
+                            aYears [i],
+                            aHours [i],
+                            aMins  [i]);
+                val = val + " : " + QString( aUsers[i].c_str() );
+                list.prepend(val);
+              }
+              theWidget->setDuplicatesEnabled(true);
+              theWidget->insertList(list);
+            }
+          }
+        }
+        break;
       }
     default:
       {
-       SalomeApp_ListViewItem::fillWidgetWithValues(theWidget);
-       break;
+        SalomeApp_ListViewItem::fillWidgetWithValues(theWidget);
+        break;
       }
     }
   }
@@ -261,11 +261,11 @@ void SalomeApp_StudyPropertiesDlg::initData()
     if (aLast >= 0) {
       QString val;
       val.sprintf("%2.2d/%2.2d/%2d %2.2d:%2.2d",
-                 aDays  [aLast],
-                 aMonths[aLast],
-                 aYears [aLast],
-                 aHours [aLast],
-                 aMins  [aLast]);
+                  aDays  [aLast],
+                  aMonths[aLast],
+                  aYears [aLast],
+                  aHours [aLast],
+                  aMins  [aLast]);
       val = val + " : " + QString(aUsers[aUsers.size()-1].c_str());
       item->setValue(val);
     }
@@ -296,24 +296,24 @@ void SalomeApp_StudyPropertiesDlg::onOK()
       QTreeWidgetItemIterator it( myPropList );
       // iterate through all items of the listview
       while (*it) {
-       SalomeApp_PropItem* item = (SalomeApp_PropItem*)(*it);
-       switch (item->getUserType()) {
-       case prpAuthorId:
+        SalomeApp_PropItem* item = (SalomeApp_PropItem*)(*it);
+        switch (item->getUserType()) {
+        case prpAuthorId:
           if (QString(propAttr->GetUserName().c_str()) != item->getValue().trimmed()) {
             if (!propAttr->IsLocked()) {
               propAttr->SetUserName(item->getValue().trimmed().toStdString());
               myChanged = true;
             } else {
               SUIT_MessageBox::warning(SUIT_Session::session()->activeApplication()->desktop(),
-                                      QObject::tr("WRN_WARNING"),
-                                      QObject::tr("WRN_STUDY_LOCKED") );
+                                       QObject::tr("WRN_WARNING"),
+                                       QObject::tr("WRN_STUDY_LOCKED") );
             }
           }
-         break;
+          break;
         //case prpModeId:
-       //  propAttr->SetCreationMode(item->getValue().trimmed().latin1());
-       //  break;
-       case prpLockedId:
+        //  propAttr->SetCreationMode(item->getValue().trimmed().latin1());
+        //  break;
+        case prpLockedId:
           {
             bool bLocked = item->getValue().compare(tr("PRP_YES")) == 0;
             if (propAttr->IsLocked() != bLocked) {
@@ -321,11 +321,11 @@ void SalomeApp_StudyPropertiesDlg::onOK()
               myChanged = true;
             }
           }
-         break;
-       default:
-         break;
-       }
-       ++it;
+          break;
+        default:
+          break;
+        }
+        ++it;
       }
     }
     accept();
@@ -346,25 +346,25 @@ bool SalomeApp_StudyPropertiesDlg::propChanged()
       SalomeApp_PropItem* item = (SalomeApp_PropItem*)(*it);
       switch (item->getUserType()) {
       case prpAuthorId:
-       if ( QString( propAttr->GetUserName().c_str() ) != item->getValue().trimmed() ) {
-         return true;
-       }
-       break;
+        if ( QString( propAttr->GetUserName().c_str() ) != item->getValue().trimmed() ) {
+          return true;
+        }
+        break;
       //case prpModeId:
       //  if ( QString( propAttr->GetCreationMode().c_str() ) != item->getValue().trimmed() ) {
       //    return true;
       //  }
       //  break;
       case prpLockedId:
-       {
-         bool bLocked = item->getValue().compare( tr( "PRP_YES" ) ) == 0;
-         if ( propAttr->IsLocked() != bLocked ) {
-           return true;
-         }
-         break;
-       }
+        {
+          bool bLocked = item->getValue().compare( tr( "PRP_YES" ) ) == 0;
+          if ( propAttr->IsLocked() != bLocked ) {
+            return true;
+          }
+          break;
+        }
       default:
-       break;
+        break;
       }
       ++it;
     }
index eeb12e91ff4f7fa1d04d871af3ccbffb61388ef9..80f6a963933d74d8b42363b03c651f3c34e9a111 100644 (file)
 */
 Quantity_Color SalomeApp_Tools::color( const QColor& c )
 {
-       Quantity_Color aColor;
-       if ( c.isValid() )
-               aColor = Quantity_Color( c.red() / 255., c.green() / 255., c.blue() / 255., Quantity_TOC_RGB );
-       return aColor;
+        Quantity_Color aColor;
+        if ( c.isValid() )
+                aColor = Quantity_Color( c.red() / 255., c.green() / 255., c.blue() / 255., Quantity_TOC_RGB );
+        return aColor;
 }
 
 /*!
@@ -48,7 +48,7 @@ Quantity_Color SalomeApp_Tools::color( const QColor& c )
 */
 QColor SalomeApp_Tools::color( const Quantity_Color& c )
 {
-       return QColor( (int)( c.Red() * 255 ), (int)( c.Green() * 255 ), (int)( c.Blue() * 255 ) );
+        return QColor( (int)( c.Red() * 255 ), (int)( c.Green() * 255 ), (int)( c.Blue() * 255 ) );
 }
 
 /*!
@@ -63,32 +63,32 @@ QString SalomeApp_Tools::ExceptionToString( const SALOME::SALOME_Exception& S_ex
   case SALOME::COMM:
   case SALOME::INTERNAL_ERROR:
     {
-           message = QString( S_ex.details.text );
-           QString source( S_ex.details.sourceFile );
-           QString line;
-           line.setNum( S_ex.details.lineNumber );
-           message = message + " \n" + source + " : " + line;
+            message = QString( S_ex.details.text );
+            QString source( S_ex.details.sourceFile );
+            QString line;
+            line.setNum( S_ex.details.lineNumber );
+            message = message + " \n" + source + " : " + line;
       break;
     }
   case SALOME::BAD_PARAM:
     {
-           message = QString( S_ex.details.text );
+            message = QString( S_ex.details.text );
 #ifdef _DEBUG_
-           QString source( S_ex.details.sourceFile );
-           QString line;
-           line.setNum( S_ex.details.lineNumber );
-           message = message + " \n" + source + " : " + line;
+            QString source( S_ex.details.sourceFile );
+            QString line;
+            line.setNum( S_ex.details.lineNumber );
+            message = message + " \n" + source + " : " + line;
 #endif
-           break;
+            break;
     }
   default:
     {
-           message = QString( "SALOME CORBA Exception Type invalid" );
-           QString source( S_ex.details.sourceFile );
-           QString line;
-           line.setNum( S_ex.details.lineNumber );
-           message = message + " \n" + source + " : " + line;
-           break;
+            message = QString( "SALOME CORBA Exception Type invalid" );
+            QString source( S_ex.details.sourceFile );
+            QString line;
+            line.setNum( S_ex.details.lineNumber );
+            message = message + " \n" + source + " : " + line;
+            break;
     }
   }
   return message;
@@ -112,7 +112,7 @@ void SalomeApp_Tools::QtCatchCorbaException( const SALOME::SALOME_Exception& S_e
   case SALOME::BAD_PARAM:
     error = false;
     title = QObject::tr( "Engine Warning" );
-         break;
+          break;
   default:
     title = QObject::tr( "Internal SALOME Error" );
     break;
@@ -120,9 +120,9 @@ void SalomeApp_Tools::QtCatchCorbaException( const SALOME::SALOME_Exception& S_e
 
   if ( error )
     SUIT_MessageBox::critical( SUIT_Session::session()->activeApplication()->desktop(),
-                              title, message );
+                               title, message );
   else
     SUIT_MessageBox::warning( SUIT_Session::session()->activeApplication()->desktop(),
-                             title, message );
+                              title, message );
 
 }
index 9e603dcadbdf62365bd5750abc53db1871398dd2..f792c5432ec0aee6cd6a17e67842cbb0f1b28247 100644 (file)
@@ -55,11 +55,11 @@ bool SalomeApp_TypeFilter::isOk( const SUIT_DataOwner* sOwner ) const
       
       _PTR(SObject) aSObj( aStudy->FindObjectID( entry.toStdString() ) );
       if (aSObj)
-       {
-         _PTR(SComponent) aComponent(aSObj->GetFatherComponent());
-         if ( aComponent && (aComponent->ComponentDataType() == myKind.toStdString()) )
-           return true;
-       }
+        {
+          _PTR(SComponent) aComponent(aSObj->GetFatherComponent());
+          if ( aComponent && (aComponent->ComponentDataType() == myKind.toStdString()) )
+            return true;
+        }
     }
 
   return false;
index 4edce501eb189ed4fce1aebaa1ebbf9a93aec194..6b27a16ae8395004bc36937078a6cf3ef72654cc 100644 (file)
@@ -240,11 +240,11 @@ void SalomeApp_VisualState::restoreState(int savePoint)
     {
       viewWin = views[i];
       if ( !viewWin )
-       continue;
+        continue;
 
       // wait untill the window is really shown.  This step fixes MANY bugs..
       //      while ( !vm->isVisible() )
-      //       qApp->processEvents();
+      //        qApp->processEvents();
 
       viewWin->setWindowTitle( ip->getValue( viewerEntry, j ).c_str() );
 
@@ -279,8 +279,8 @@ void SalomeApp_VisualState::restoreState(int savePoint)
     {
       if ( !viewersParameters.contains( views[i] ) )
       {
-       viewersParameters[ views[i] ] = views[i]->getVisualParameters();
-       //      printf ( "store VP for viewWin \"%s\": %s\n", views[i]->name(), views[i]->getVisualParameters().toLatin1().constData() );
+        viewersParameters[ views[i] ] = views[i]->getVisualParameters();
+        //      printf ( "store VP for viewWin \"%s\": %s\n", views[i]->name(), views[i]->getVisualParameters().toLatin1().constData() );
       }
     }
   }
@@ -331,7 +331,7 @@ void SalomeApp_VisualState::restoreState(int savePoint)
   //    QPtrVector<SUIT_ViewWindow> views = it.current()->getViews();
   //    for ( int i = 0; i < view_count; i++ )  {
   //      if ( activeViewName == views[i]->name() )
-  //   views[i]->setFocus();
+  //    views[i]->setFocus();
   //    }
   //  }
 }
index a4f881c698ffa390d5c23c8fe6a0f2c37b2b4e1d..d56edde6eb2982b4f6d610f12c4b45b3cf0bca54 100755 (executable)
@@ -180,7 +180,7 @@ public:
       if ( myExtAppVersion == "APP_VERSION" ) {
         if ( myExtAppName != "SalomeApp" )
           myExtAppVersion = "";
-       else myExtAppVersion = salomeVersion();
+        else myExtAppVersion = salomeVersion();
       }
     }
   }
@@ -201,23 +201,23 @@ protected:
       
       QString fname = QFileInfo( _fname ).fileName();
       if( exp.exactMatch( fname ) ) {
-       QStringList vers = exp.cap( 1 ).split( ".", QString::SkipEmptyParts );
-       int major=0, minor=0;
-       major = vers[0].toInt();
-       minor = vers[1].toInt();
-       if( vers_exp.indexIn( vers[2] )==-1 )
-         return -1;
-       int release = 0, dev1 = 0, dev2 = 0;
-       release = vers_exp.cap( 1 ).toInt();
-       dev1 = vers_exp.cap( 2 )[ 0 ].toLatin1();
-       dev2 = vers_exp.cap( 3 ).toInt();
-       
-       int dev = dev1*100+dev2, id = major;
-       id*=100; id+=minor;
-       id*=100; id+=release;
-       id*=10000;
-       if ( dev > 0 ) id+=dev-10000;
-       return id;
+        QStringList vers = exp.cap( 1 ).split( ".", QString::SkipEmptyParts );
+        int major=0, minor=0;
+        major = vers[0].toInt();
+        minor = vers[1].toInt();
+        if( vers_exp.indexIn( vers[2] )==-1 )
+          return -1;
+        int release = 0, dev1 = 0, dev2 = 0;
+        release = vers_exp.cap( 1 ).toInt();
+        dev1 = vers_exp.cap( 2 )[ 0 ].toLatin1();
+        dev2 = vers_exp.cap( 3 ).toInt();
+        
+        int dev = dev1*100+dev2, id = major;
+        id*=100; id+=minor;
+        id*=100; id+=release;
+        id*=10000;
+        if ( dev > 0 ) id+=dev-10000;
+        return id;
       }
     }
 
@@ -473,22 +473,22 @@ int main( int argc, char **argv )
       splash->setProgress( 0, sc.totalSteps() );
       // start check loop 
       while ( true ) {
-       int step    = sc.currentStep();
-       int total   = sc.totalSteps();
-       QString msg = sc.currentMessage();
-       QString err = sc.error();
-       if ( !err.isEmpty() ) {
-         QtxSplash::setError( err );
-         QApplication::instance()->processEvents();
-         result = -1;
-         break;
-       }
-       QtxSplash::setStatus( msg, step );
-       QApplication::instance()->processEvents();
-       if ( step >= total )
-         break;
-       // ...block this thread until servers checking is finished
-       _SplashStarted.wait( &_SplashMutex );
+        int step    = sc.currentStep();
+        int total   = sc.totalSteps();
+        QString msg = sc.currentMessage();
+        QString err = sc.error();
+        if ( !err.isEmpty() ) {
+          QtxSplash::setError( err );
+          QApplication::instance()->processEvents();
+          result = -1;
+          break;
+        }
+        QtxSplash::setStatus( msg, step );
+        QApplication::instance()->processEvents();
+        if ( step >= total )
+          break;
+        // ...block this thread until servers checking is finished
+        _SplashStarted.wait( &_SplashMutex );
       }
       // ...unlock mutex 'cause it is no more needed
       _SplashMutex.unlock();
@@ -506,7 +506,7 @@ int main( int argc, char **argv )
     // Launch GUI activator
     if ( isGUI ) {
       if ( splash )
-       splash->setStatus( QApplication::translate( "", "Activating desktop..." ) );
+        splash->setStatus( QApplication::translate( "", "Activating desktop..." ) );
       // ...retrieve Session interface reference
       CORBA::Object_var obj = _NS->Resolve( "/Kernel/Session" );
       SALOME::Session_var session = SALOME::Session::_narrow( obj ) ;
@@ -535,28 +535,28 @@ int main( int argc, char **argv )
       SUIT_Application* aGUIApp = aGUISession->startApplication( "SalomeApp", 0, 0 );
       if ( aGUIApp )
       {
-       Style_Salome::initialize( aGUIApp->resourceMgr() );
-       if ( aGUIApp->resourceMgr()->booleanValue( "Style", "use_salome_style", true ) )
-         Style_Salome::apply();
-
-       if ( !isFound( "noexcepthandler", argc, argv ) )
-         _qappl.setHandler( aGUISession->handler() ); // after loading SalomeApp application
-                                                      // aGUISession contains SalomeApp_ExceptionHandler
-       // Run GUI loop
-       MESSAGE( "run(): starting the main event loop" );
-
-       if ( splash )
-         splash->finish( aGUIApp->desktop() );
-         
-       result = _qappl.exec();
-       
-       splash = 0;
-
-       if ( result == SUIT_Session::NORMAL ) { // desktop is closed by user from GUI
-         shutdown = aGUISession->exitFlags();
-         _SessionMutex.lock();
-         break;
-       }
+        Style_Salome::initialize( aGUIApp->resourceMgr() );
+        if ( aGUIApp->resourceMgr()->booleanValue( "Style", "use_salome_style", true ) )
+          Style_Salome::apply();
+
+        if ( !isFound( "noexcepthandler", argc, argv ) )
+          _qappl.setHandler( aGUISession->handler() ); // after loading SalomeApp application
+                                                       // aGUISession contains SalomeApp_ExceptionHandler
+        // Run GUI loop
+        MESSAGE( "run(): starting the main event loop" );
+
+        if ( splash )
+          splash->finish( aGUIApp->desktop() );
+          
+        result = _qappl.exec();
+        
+        splash = 0;
+
+        if ( result == SUIT_Session::NORMAL ) { // desktop is closed by user from GUI
+          shutdown = aGUISession->exitFlags();
+          _SessionMutex.lock();
+          break;
+        }
       }
 
       delete aGUISession;
index 4003b22accdad1f9a87c28eefb0861062c7f8635..37218c1903feb071bb1565c6e069cc52446b2064 100644 (file)
@@ -265,8 +265,8 @@ void Session_ServerCheck::run()
       CORBA::Object_var obj = orb->resolve_initial_references( "NameService" );
       CosNaming::NamingContext_var _root_context = CosNaming::NamingContext::_narrow( obj );
       if ( !CORBA::is_nil( _root_context ) ) {
-       setStep( ++current * myAttempts );
-       break;
+        setStep( ++current * myAttempts );
+        break;
       }
     }
     catch( CORBA::COMM_FAILURE& ) {
@@ -296,11 +296,11 @@ void Session_ServerCheck::run()
       CORBA::Object_var obj = NS.Resolve( "/Registry" );
       Registry::Components_var registry = Registry::Components::_narrow( obj );
       if ( !CORBA::is_nil( registry ) ) {
-       MESSAGE( "/Registry is found" );
-       registry->ping();
-       MESSAGE( "Registry was activated" );
-       setStep( ++current * myAttempts );
-       break;
+        MESSAGE( "/Registry is found" );
+        registry->ping();
+        MESSAGE( "Registry was activated" );
+        setStep( ++current * myAttempts );
+        break;
       }
     }
     catch ( ServiceUnreachable& ) {
@@ -344,11 +344,11 @@ void Session_ServerCheck::run()
       CORBA::Object_var obj = NS.Resolve( "/myStudyManager" );
       SALOMEDS::StudyManager_var studyManager = SALOMEDS::StudyManager::_narrow( obj );
       if ( !CORBA::is_nil( studyManager ) ) {
-       MESSAGE( "/myStudyManager is found" );
-       studyManager->ping();
-       MESSAGE( "StudyManager was activated" );
-       setStep( ++current * myAttempts );
-       break;
+        MESSAGE( "/myStudyManager is found" );
+        studyManager->ping();
+        MESSAGE( "StudyManager was activated" );
+        setStep( ++current * myAttempts );
+        break;
       }
     }
     catch ( ServiceUnreachable& ) {
@@ -392,11 +392,11 @@ void Session_ServerCheck::run()
       CORBA::Object_var obj = NS.Resolve( "/Kernel/ModulCatalog" );
       SALOME_ModuleCatalog::ModuleCatalog_var catalog = SALOME_ModuleCatalog::ModuleCatalog::_narrow( obj );
       if ( !CORBA::is_nil( catalog ) ){
-       MESSAGE( "/Kernel/ModulCatalog is found" );
-       catalog->ping();
-       MESSAGE( "ModuleCatalog was activated" );
-       setStep( ++current * myAttempts );
-       break;
+        MESSAGE( "/Kernel/ModulCatalog is found" );
+        catalog->ping();
+        MESSAGE( "ModuleCatalog was activated" );
+        setStep( ++current * myAttempts );
+        break;
       }
     }
     catch ( ServiceUnreachable& ) {
@@ -440,11 +440,11 @@ void Session_ServerCheck::run()
       CORBA::Object_var obj = NS.Resolve( "/Kernel/Session" );
       SALOME::Session_var session = SALOME::Session::_narrow( obj );
       if ( !CORBA::is_nil( session ) ) {
-       MESSAGE( "/Kernel/Session is found" );
-       session->ping();
-       MESSAGE( "SALOME_Session was activated" );
-       setStep( ++current * myAttempts );
-       break;
+        MESSAGE( "/Kernel/Session is found" );
+        session->ping();
+        MESSAGE( "SALOME_Session was activated" );
+        setStep( ++current * myAttempts );
+        break;
       }
     }
     catch ( ServiceUnreachable& ) {
@@ -482,45 +482,45 @@ void Session_ServerCheck::run()
       setStep( current * myAttempts + i );
 
       try {
-       CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
-       SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
-       ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
-       NS.init_orb( orb );
-       QString containerName = QString( "/Containers/%1/FactoryServer" ).arg( Kernel_Utils::GetHostname().c_str() );
-       CORBA::Object_var obj = NS.Resolve( containerName.toLatin1() );
-       Engines::Container_var FScontainer = Engines::Container::_narrow( obj );
-       if ( !CORBA::is_nil( FScontainer ) ) {
-         MESSAGE( containerName.toLatin1().constData() << " is found" );
-         FScontainer->ping();
-         MESSAGE( "FactoryServer container was activated" );
-         setStep( ++current * myAttempts );
-         break;
-       }
+        CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
+        SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
+        ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
+        NS.init_orb( orb );
+        QString containerName = QString( "/Containers/%1/FactoryServer" ).arg( Kernel_Utils::GetHostname().c_str() );
+        CORBA::Object_var obj = NS.Resolve( containerName.toLatin1() );
+        Engines::Container_var FScontainer = Engines::Container::_narrow( obj );
+        if ( !CORBA::is_nil( FScontainer ) ) {
+          MESSAGE( containerName.toLatin1().constData() << " is found" );
+          FScontainer->ping();
+          MESSAGE( "FactoryServer container was activated" );
+          setStep( ++current * myAttempts );
+          break;
+        }
       }
       catch ( ServiceUnreachable& ) {
-       MESSAGE( "Caught exception: Naming Service unreachable." );
-       error = "Naming service unreachable";
+        MESSAGE( "Caught exception: Naming Service unreachable." );
+        error = "Naming service unreachable";
       }
       catch ( CORBA::COMM_FAILURE& ) {
-       MESSAGE( "Caught CORBA::SystemException CommFailure." );
-       error = "Caught CORBA::SystemException CommFailure.";
+        MESSAGE( "Caught CORBA::SystemException CommFailure." );
+        error = "Caught CORBA::SystemException CommFailure.";
       }
       catch ( CORBA::SystemException& ) {
-       MESSAGE( "Caught CORBA::SystemException." );
-       error = "Caught CORBA::SystemException.";
+        MESSAGE( "Caught CORBA::SystemException." );
+        error = "Caught CORBA::SystemException.";
       }
       catch ( CORBA::Exception& ) {
-       MESSAGE( "Caught CORBA::Exception." );
-       error = "Caught CORBA::Exception.";
+        MESSAGE( "Caught CORBA::Exception." );
+        error = "Caught CORBA::Exception.";
       }
       catch (...) {
-       MESSAGE( "Caught unknown exception." );
-       error = "Caught unknown exception.";
+        MESSAGE( "Caught unknown exception." );
+        error = "Caught unknown exception.";
       }
       
       if ( i == myAttempts-1 ) {
-       setError( tr( "C++ container is not found.\n%1" ).arg ( error ) );
-       return;
+        setError( tr( "C++ container is not found.\n%1" ).arg ( error ) );
+        return;
       }
     }
   }
@@ -533,45 +533,45 @@ void Session_ServerCheck::run()
       setStep( current * myAttempts + i );
 
       try {
-       CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
-       SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
-       ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
-       NS.init_orb( orb );
-       QString containerName = QString( "/Containers/%1/FactoryServerPy" ).arg( Kernel_Utils::GetHostname().c_str() );
-       CORBA::Object_var obj = NS.Resolve( containerName.toLatin1() );
-       Engines::Container_var FSPcontainer = Engines::Container::_narrow( obj );
-       if ( !CORBA::is_nil( FSPcontainer ) ) {
-         MESSAGE( containerName.toLatin1().constData() << " is found" );
-         FSPcontainer->ping();
-         MESSAGE("FactoryServerPy container was activated");
-         setStep( ++current * myAttempts );
-         break;
-       }
+        CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
+        SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
+        ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
+        NS.init_orb( orb );
+        QString containerName = QString( "/Containers/%1/FactoryServerPy" ).arg( Kernel_Utils::GetHostname().c_str() );
+        CORBA::Object_var obj = NS.Resolve( containerName.toLatin1() );
+        Engines::Container_var FSPcontainer = Engines::Container::_narrow( obj );
+        if ( !CORBA::is_nil( FSPcontainer ) ) {
+          MESSAGE( containerName.toLatin1().constData() << " is found" );
+          FSPcontainer->ping();
+          MESSAGE("FactoryServerPy container was activated");
+          setStep( ++current * myAttempts );
+          break;
+        }
       }
       catch ( ServiceUnreachable& ) {
-       MESSAGE( "Caught exception: Naming Service unreachable." );
-       error = "Naming service unreachable";
+        MESSAGE( "Caught exception: Naming Service unreachable." );
+        error = "Naming service unreachable";
       }
       catch ( CORBA::COMM_FAILURE& ) {
-       MESSAGE( "Caught CORBA::SystemException CommFailure." );
-       error = "Caught CORBA::SystemException CommFailure.";
+        MESSAGE( "Caught CORBA::SystemException CommFailure." );
+        error = "Caught CORBA::SystemException CommFailure.";
       }
       catch ( CORBA::SystemException& ) {
-       MESSAGE( "Caught CORBA::SystemException." );
-       error = "Caught CORBA::SystemException.";
+        MESSAGE( "Caught CORBA::SystemException." );
+        error = "Caught CORBA::SystemException.";
       }
       catch ( CORBA::Exception& ) {
-       MESSAGE( "Caught CORBA::Exception." );
-       error = "Caught CORBA::Exception.";
+        MESSAGE( "Caught CORBA::Exception." );
+        error = "Caught CORBA::Exception.";
       }
       catch (...) {
-       MESSAGE( "Caught unknown exception." );
-       error = "Caught unknown exception.";
+        MESSAGE( "Caught unknown exception." );
+        error = "Caught unknown exception.";
       }
 
       if ( i == myAttempts-1 ) {
-       setError( tr( "Python container is not found.\n%1" ).arg ( error ) );
-       return;
+        setError( tr( "Python container is not found.\n%1" ).arg ( error ) );
+        return;
       }
     }
   }
@@ -584,45 +584,45 @@ void Session_ServerCheck::run()
       setStep( current * myAttempts + i );
 
       try {
-       CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
-       SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
-       ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
-       NS.init_orb( orb );
-       QString containerName = QString( "/Containers/%1/SuperVisionContainer" ).arg( Kernel_Utils::GetHostname().c_str() );
-       CORBA::Object_var obj = NS.Resolve( containerName.toLatin1() );
-       Engines::Container_var SVcontainer = Engines::Container::_narrow( obj );
-       if ( !CORBA::is_nil( SVcontainer ) ) {
-         MESSAGE( containerName.toLatin1().constData() << " is found" );
-         SVcontainer->ping();
-         MESSAGE("SuperVisionContainer container was activated");
-         setStep( ++current * myAttempts );
-         break;
-       }
+        CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
+        SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance();
+        ASSERT( SINGLETON_<SALOME_NamingService>::IsAlreadyExisting() );
+        NS.init_orb( orb );
+        QString containerName = QString( "/Containers/%1/SuperVisionContainer" ).arg( Kernel_Utils::GetHostname().c_str() );
+        CORBA::Object_var obj = NS.Resolve( containerName.toLatin1() );
+        Engines::Container_var SVcontainer = Engines::Container::_narrow( obj );
+        if ( !CORBA::is_nil( SVcontainer ) ) {
+          MESSAGE( containerName.toLatin1().constData() << " is found" );
+          SVcontainer->ping();
+          MESSAGE("SuperVisionContainer container was activated");
+          setStep( ++current * myAttempts );
+          break;
+        }
       }
       catch ( ServiceUnreachable& ) {
-       MESSAGE( "Caught exception: Naming Service unreachable." );
-       error = "Naming service unreachable";
+        MESSAGE( "Caught exception: Naming Service unreachable." );
+        error = "Naming service unreachable";
       }
       catch ( CORBA::COMM_FAILURE& ) {
-       MESSAGE( "Caught CORBA::SystemException CommFailure." );
-       error = "Caught CORBA::SystemException CommFailure.";
+        MESSAGE( "Caught CORBA::SystemException CommFailure." );
+        error = "Caught CORBA::SystemException CommFailure.";
       }
       catch ( CORBA::SystemException& ) {
-       MESSAGE( "Caught CORBA::SystemException." );
-       error = "Caught CORBA::SystemException.";
+        MESSAGE( "Caught CORBA::SystemException." );
+        error = "Caught CORBA::SystemException.";
       }
       catch ( CORBA::Exception& ) {
-       MESSAGE( "Caught CORBA::Exception." );
-       error = "Caught CORBA::Exception.";
+        MESSAGE( "Caught CORBA::Exception." );
+        error = "Caught CORBA::Exception.";
       }
       catch (...) {
-       MESSAGE( "Caught unknown exception." );
-       error = "Caught unknown exception.";
+        MESSAGE( "Caught unknown exception." );
+        error = "Caught unknown exception.";
       }
     
       if ( i == myAttempts-1 ) {
-       setError( tr( "Supervision container is not found.\n%1" ).arg ( error ) );
-       return;
+        setError( tr( "Supervision container is not found.\n%1" ).arg ( error ) );
+        return;
       }
     }
   }
index ab558f666015a7a85fb51a19bd2078ee54073167..14f952927a618c7d5aebaddb809a558a324d56c9 100755 (executable)
@@ -47,13 +47,13 @@ Session_ServerLauncher::Session_ServerLauncher()
   constructor
 */
 Session_ServerLauncher::Session_ServerLauncher(int argc,
-                                              char ** argv, 
-                                              CORBA::ORB_ptr orb, 
-                                              PortableServer::POA_ptr poa,
-                                              QMutex *GUIMutex,
-                                              QWaitCondition *ServerLaunch,
-                                              QMutex *SessionMutex,
-                                              QWaitCondition *SessionStarted)
+                                               char ** argv, 
+                                               CORBA::ORB_ptr orb, 
+                                               PortableServer::POA_ptr poa,
+                                               QMutex *GUIMutex,
+                                               QWaitCondition *ServerLaunch,
+                                               QMutex *SessionMutex,
+                                               QWaitCondition *SessionStarted)
 {
   _argc = argc;
   _argv = argv;
@@ -117,60 +117,60 @@ void Session_ServerLauncher::CheckArgs()
       SCRUTE(_argv[iarg]);
       _argCopy.push_back(_argv[iarg]);
       switch (argState)
-       {
-       case 0: // looking for "--with"
-         {
-           if (strcmp(_argv[iarg],"--with")==0)
-             argState = 1;
-           break;
-         }
-       case 1: // looking for server type
-         {
-           for (int i=0; i<Session_ServerThread::NB_SRV_TYP; i++)
-               if (strcmp(_argv[iarg],Session_ServerThread::_serverTypes[i])==0)
-                 {
-                   aServArg._servType = i;
-                   argState = 2;
-                   break;
-                 }
-           break;
-         }
-       case 2: // looking for "("
-         {
-           if (strcmp(_argv[iarg],"(")!=0)
-             {
-               INFOS("parenthesis '(' is required here...");
-               for (int i=0; i<iarg; i++)
-                 cerr << _argv[i] << " ";
-               cerr << endl;
-               throw SALOME_Exception(LOCALIZED("Error in command arguments, missing prenthesis"));
-             } 
-           else
-             {
-               aServArg._firstArg=iarg+1;    // arg after '('
-               argState = 3;
-             }
-           break;
-         }
-       case 3: // looking for arguments
-         {
-           if (strcmp(_argv[iarg],")")==0)   // end of arguments = ')'
-             {
-               aServArg._lastArg=iarg-1;     // arg before ')'
-               MESSAGE("server : "<< Session_ServerThread::_serverTypes[aServArg._servType]);
-               for (int i=aServArg._firstArg; i<=aServArg._lastArg; i++)
-                 MESSAGE("  arg : " << _argCopy[i]);
-               _argServToLaunch.push_back(aServArg);
-               argState = 0;
-             } 
-           break;
-         }
-       default:
-         {
-           ASSERT(0);
-           break;
-         }
-       }
+        {
+        case 0: // looking for "--with"
+          {
+            if (strcmp(_argv[iarg],"--with")==0)
+              argState = 1;
+            break;
+          }
+        case 1: // looking for server type
+          {
+            for (int i=0; i<Session_ServerThread::NB_SRV_TYP; i++)
+                if (strcmp(_argv[iarg],Session_ServerThread::_serverTypes[i])==0)
+                  {
+                    aServArg._servType = i;
+                    argState = 2;
+                    break;
+                  }
+            break;
+          }
+        case 2: // looking for "("
+          {
+            if (strcmp(_argv[iarg],"(")!=0)
+              {
+                INFOS("parenthesis '(' is required here...");
+                for (int i=0; i<iarg; i++)
+                  cerr << _argv[i] << " ";
+                cerr << endl;
+                throw SALOME_Exception(LOCALIZED("Error in command arguments, missing prenthesis"));
+              
+            else
+              {
+                aServArg._firstArg=iarg+1;    // arg after '('
+                argState = 3;
+              }
+            break;
+          }
+        case 3: // looking for arguments
+          {
+            if (strcmp(_argv[iarg],")")==0)   // end of arguments = ')'
+              {
+                aServArg._lastArg=iarg-1;     // arg before ')'
+                MESSAGE("server : "<< Session_ServerThread::_serverTypes[aServArg._servType]);
+                for (int i=aServArg._firstArg; i<=aServArg._lastArg; i++)
+                  MESSAGE("  arg : " << _argCopy[i]);
+                _argServToLaunch.push_back(aServArg);
+                argState = 0;
+              
+            break;
+          }
+        default:
+          {
+            ASSERT(0);
+            break;
+          }
+        }
     }
   if (argState == 1)
     throw SALOME_Exception(LOCALIZED("Error in command arguments, missing server type"));
@@ -193,8 +193,8 @@ void Session_ServerLauncher::ActivateAll()
     if (argc>1)
     {
       for (int i=0; i<argc-1; i++)
-       //argv[i+1] = _argCopy[(*itServ)._firstArg + i].c_str();
-             argv[i+1] = _argv[(*itServ)._firstArg + i];
+        //argv[i+1] = _argCopy[(*itServ)._firstArg + i].c_str();
+              argv[i+1] = _argv[(*itServ)._firstArg + i];
     }
 
     MESSAGE("*** activating [" << argc << "] : " << argv[0]);
index dac62c609c80db54d482145bb3432a03a2cd1684..3f7e4df07d94744eb24d561a6e2536bd2740deb5 100755 (executable)
@@ -61,13 +61,13 @@ class SESSION_EXPORT Session_ServerLauncher: public QThread
 public:
   Session_ServerLauncher();
   Session_ServerLauncher(int argc,
-                        char ** argv, 
-                        CORBA::ORB_ptr orb, 
-                        PortableServer::POA_ptr poa,
-                        QMutex *GUIMutex,
-                        QWaitCondition *ServerLaunch,
-                        QMutex *SessionMutex,
-                        QWaitCondition *SessionStarted);
+                         char ** argv, 
+                         CORBA::ORB_ptr orb, 
+                         PortableServer::POA_ptr poa,
+                         QMutex *GUIMutex,
+                         QWaitCondition *ServerLaunch,
+                         QMutex *SessionMutex,
+                         QWaitCondition *SessionStarted);
   virtual ~Session_ServerLauncher();
   void run();
   void KillAll();
index e8c804011304dcc9bcaa14832069b35de9b678b1..83f6c2de8314e0a58f64e896c023440e1db5141e 100755 (executable)
@@ -57,11 +57,11 @@ using namespace std;
 
 const int Session_ServerThread::NB_SRV_TYP = 7;
 const char* Session_ServerThread::_serverTypes[NB_SRV_TYP] = {"Container",
-                                                             "ModuleCatalog",
-                                                             "Registry",
-                                                             "SALOMEDS",
-                                                             "Session",
-                                                             "SalomeAppEngine",
+                                                              "ModuleCatalog",
+                                                              "Registry",
+                                                              "SALOMEDS",
+                                                              "Session",
+                                                              "SalomeAppEngine",
                                                               "ContainerManager"};
 
 /*! 
@@ -76,9 +76,9 @@ Session_ServerThread::Session_ServerThread()
   constructor
 */
 Session_ServerThread::Session_ServerThread(int argc,
-                                          char ** argv, 
-                                          CORBA::ORB_ptr orb, 
-                                          PortableServer::POA_ptr poa)
+                                           char ** argv, 
+                                           CORBA::ORB_ptr orb, 
+                                           PortableServer::POA_ptr poa)
 {
   //MESSAGE("Session_ServerThread Constructor " << argv[0]);
   _argc = argc;
@@ -123,64 +123,64 @@ void Session_ServerThread::Init()
       MESSAGE("Server Thread type : "<<_serverTypes[i]);
       switch (_servType) {
       case 0:  // Container
-       {
-         NamingService_WaitForServerReadiness(_NS,"/Registry");
-         NamingService_WaitForServerReadiness(_NS,"/ContainerManager");
-         ActivateContainer(_argc, _argv);
-         break;
-       }
+        {
+          NamingService_WaitForServerReadiness(_NS,"/Registry");
+          NamingService_WaitForServerReadiness(_NS,"/ContainerManager");
+          ActivateContainer(_argc, _argv);
+          break;
+        }
       case 1:  // ModuleCatalog
-       {
-         NamingService_WaitForServerReadiness(_NS,"/Registry");
-         ActivateModuleCatalog(_argc, _argv);
-         break;
-       }
+        {
+          NamingService_WaitForServerReadiness(_NS,"/Registry");
+          ActivateModuleCatalog(_argc, _argv);
+          break;
+        }
       case 2:  // Registry
-       {
-         NamingService_WaitForServerReadiness(_NS,"");
-         ActivateRegistry(_argc, _argv);
-         break;
-       }
+        {
+          NamingService_WaitForServerReadiness(_NS,"");
+          ActivateRegistry(_argc, _argv);
+          break;
+        }
       case 3:  // SALOMEDS
-       {
-         NamingService_WaitForServerReadiness(_NS,"/Kernel/ModulCatalog");
-         ActivateSALOMEDS(_argc, _argv);
-         break;
-       }
+        {
+          NamingService_WaitForServerReadiness(_NS,"/Kernel/ModulCatalog");
+          ActivateSALOMEDS(_argc, _argv);
+          break;
+        }
       case 4:  // Session
-       {
-         NamingService_WaitForServerReadiness(_NS,"/myStudyManager");
-         string containerName = "/Containers/";
-         containerName = containerName + Kernel_Utils::GetHostname();
-         containerName = containerName + "/FactoryServer";
-         NamingService_WaitForServerReadiness(_NS,containerName);
-         ActivateSession(_argc, _argv);
-         break;
-       }
+        {
+          NamingService_WaitForServerReadiness(_NS,"/myStudyManager");
+          string containerName = "/Containers/";
+          containerName = containerName + Kernel_Utils::GetHostname();
+          containerName = containerName + "/FactoryServer";
+          NamingService_WaitForServerReadiness(_NS,containerName);
+          ActivateSession(_argc, _argv);
+          break;
+        }
       case 5: // SalomeApp_Engine
-       {
-         NamingService_WaitForServerReadiness(_NS,"/myStudyManager");
-         ActivateEngine(_argc, _argv);
-         break;
-       }
+        {
+          NamingService_WaitForServerReadiness(_NS,"/myStudyManager");
+          ActivateEngine(_argc, _argv);
+          break;
+        }
       case 6: // Container Manager
-       {
-         NamingService_WaitForServerReadiness(_NS,"");
-         ActivateContainerManager(_argc, _argv);
-         break;
-       }
+        {
+          NamingService_WaitForServerReadiness(_NS,"");
+          ActivateContainerManager(_argc, _argv);
+          break;
+        }
       default:
-       {
-         ASSERT(0);
-         break;
-       }
+        {
+          ASSERT(0);
+          break;
+        }
       }
     }
   }
 }
 
 void Session_ServerThread::ActivateModuleCatalog(int argc,
-                                                char ** argv)
+                                                 char ** argv)
 {
   try {
     MESSAGE("ModuleCatalog thread started");
@@ -215,7 +215,7 @@ void Session_ServerThread::ActivateModuleCatalog(int argc,
 }
 
 void Session_ServerThread::ActivateSALOMEDS(int argc,
-                                           char ** argv)
+                                            char ** argv)
 {
   try {
     MESSAGE("SALOMEDS thread started");
@@ -243,7 +243,7 @@ void Session_ServerThread::ActivateSALOMEDS(int argc,
 }
 
 void Session_ServerThread::ActivateRegistry(int argc,
-                                           char ** argv)
+                                            char ** argv)
 {
   MESSAGE("Registry thread started");
   SCRUTE(argc); 
@@ -292,7 +292,7 @@ void Session_ServerThread::ActivateRegistry(int argc,
 }
 
 void Session_ServerThread::ActivateContainerManager(int argc,
-                                            char ** argv)
+                                             char ** argv)
 {
   try {
     PortableServer::POA_var root_poa=PortableServer::POA::_the_root_poa();
@@ -317,7 +317,7 @@ void Session_ServerThread::ActivateContainerManager(int argc,
 }
 
 void Session_ServerThread::ActivateContainer(int argc,
-                                            char ** argv)
+                                             char ** argv)
 {
   try {
     MESSAGE("Container thread started");
@@ -333,25 +333,25 @@ void Session_ServerThread::ActivateContainer(int argc,
       MESSAGE("factory_poa does not exists, create...");
       // define policy objects     
       PortableServer::ImplicitActivationPolicy_var implicitActivation =
-       _root_poa->create_implicit_activation_policy(PortableServer::NO_IMPLICIT_ACTIVATION);
+        _root_poa->create_implicit_activation_policy(PortableServer::NO_IMPLICIT_ACTIVATION);
       // default = NO_IMPLICIT_ACTIVATION
       PortableServer::ThreadPolicy_var threadPolicy =
-       _root_poa->create_thread_policy(PortableServer::ORB_CTRL_MODEL);
+        _root_poa->create_thread_policy(PortableServer::ORB_CTRL_MODEL);
       // default = ORB_CTRL_MODEL, other choice SINGLE_THREAD_MODEL
       
       // create policy list
       CORBA::PolicyList policyList;
       policyList.length(2);
       policyList[0] = PortableServer::ImplicitActivationPolicy::
-       _duplicate(implicitActivation);
+        _duplicate(implicitActivation);
       policyList[1] = PortableServer::ThreadPolicy::
-       _duplicate(threadPolicy);
+        _duplicate(threadPolicy);
       
       PortableServer::POAManager_var nil_mgr
-       = PortableServer::POAManager::_nil();
+        = PortableServer::POAManager::_nil();
       factory_poa = _root_poa->create_POA("factory_poa",
-                                         nil_mgr,
-                                         policyList);
+                                          nil_mgr,
+                                          policyList);
       //with nil_mgr instead of pman,
       //a new POA manager is created with the new POA
       
@@ -414,7 +414,7 @@ void Session_ServerThread::ActivateEngine(int /*argc*/, char ** /*argv*/)
 }
 
 void Session_ServerThread::ActivateSession(int argc,
-                                          char ** argv)
+                                           char ** argv)
 {
   MESSAGE("Session_ServerThread::ActivateSession() not implemented!");
 }
@@ -423,11 +423,11 @@ void Session_ServerThread::ActivateSession(int argc,
   constructor 
 */
 Session_SessionThread::Session_SessionThread(int argc,
-                                            char** argv, 
-                                            CORBA::ORB_ptr orb, 
-                                            PortableServer::POA_ptr poa,
-                                            QMutex* GUIMutex,
-                                            QWaitCondition* GUILauncher)
+                                             char** argv, 
+                                             CORBA::ORB_ptr orb, 
+                                             PortableServer::POA_ptr poa,
+                                             QMutex* GUIMutex,
+                                             QWaitCondition* GUILauncher)
 : Session_ServerThread(argc, argv, orb, poa),
   _GUIMutex( GUIMutex ),
   _GUILauncher( GUILauncher )
@@ -442,7 +442,7 @@ Session_SessionThread::~Session_SessionThread()
 }
 
 void Session_SessionThread::ActivateSession(int argc,
-                                           char ** argv)
+                                            char ** argv)
 {
   try {
     MESSAGE("Session thread started");
index 549dd3021bbdf94cf759dc28499ae167160e1991..f92c8fadf761ca250931b1cae2321750870bc753 100755 (executable)
@@ -47,9 +47,9 @@ public:
 
   Session_ServerThread();
   Session_ServerThread(int argc,
-                      char ** argv, 
-                      CORBA::ORB_ptr orb, 
-                      PortableServer::POA_ptr poa);
+                       char ** argv, 
+                       CORBA::ORB_ptr orb, 
+                       PortableServer::POA_ptr poa);
   virtual ~Session_ServerThread();
   void         Init();
 protected:
@@ -77,10 +77,10 @@ class SESSION_EXPORT Session_SessionThread : public Session_ServerThread
 public:
   Session_SessionThread() {}
   Session_SessionThread(int argc,
-                      char** argv, 
-                      CORBA::ORB_ptr orb, 
-                      PortableServer::POA_ptr poa,
-                      QMutex* GUIMutex,
+                       char** argv, 
+                       CORBA::ORB_ptr orb, 
+                       PortableServer::POA_ptr poa,
+                       QMutex* GUIMutex,
                        QWaitCondition* GUILauncher);
   virtual ~Session_SessionThread();  
 
index 59ea32ac2cdb4f018d30e93b613031125f2676a2..21c0d2e7805a379b19387f4099a32b4c6e7ae17c 100755 (executable)
@@ -54,11 +54,11 @@ using namespace std;
   constructor
 */
 SALOME_Session_i::SALOME_Session_i(int argc,
-                                  char ** argv,
-                                  CORBA::ORB_ptr orb,
-                                  PortableServer::POA_ptr poa,
-                                  QMutex* GUIMutex,
-                                  QWaitCondition* GUILauncher)
+                                   char ** argv,
+                                   CORBA::ORB_ptr orb,
+                                   PortableServer::POA_ptr poa,
+                                   QMutex* GUIMutex,
+                                   QWaitCondition* GUILauncher)
 {
   _argc = argc ;
   _argv = argv ;
@@ -78,8 +78,8 @@ SALOME_Session_i::SALOME_Session_i(int argc,
 Engines::Component_ptr SALOME_Session_i::GetComponent(const char* theLibraryName)
 {
   typedef Engines::Component_ptr TGetImpl(CORBA::ORB_ptr,
-                                         PortableServer::POA_ptr,
-                                         SALOME_NamingService*,QMutex*);
+                                          PortableServer::POA_ptr,
+                                          SALOME_NamingService*,QMutex*);
   OSD_SharedLibrary  aSharedLibrary(const_cast<char*>(theLibraryName));
   if(aSharedLibrary.DlOpen(OSD_RTLD_LAZY))
     if(OSD_Function anOSDFun = aSharedLibrary.DlSymb("GetImpl"))
@@ -223,7 +223,7 @@ bool SALOME_Session_i::restoreVisualState(CORBA::Long theSavePoint)
     virtual void Execute() {
       SUIT_Study* study = SUIT_Session::session()->activeApplication()->activeStudy();
       if ( study ) {
-       study->restoreState(_savePoint);
+        study->restoreState(_savePoint);
       }
     }
   };
@@ -254,7 +254,7 @@ void SALOME_Session_i::emitMessage(const char* theMessage)
   if ( SUIT_Session::session() ) {
     if ( SUIT_Session::session()->activeApplication() ) {
       if ( SUIT_Session::session()->activeApplication()->desktop() ) {
-       ProcessVoidEvent( new TEvent(theMessage) );
+        ProcessVoidEvent( new TEvent(theMessage) );
       }
     }
   }
index c691a2ba28ad59d6c9ba922eeb54fde735f9ac9b..1fdc144d19cc52e760cc6d9d794cfb546e26b828 100755 (executable)
@@ -39,7 +39,7 @@ class QMutex;
 class QWaitCondition;
 
 class SESSION_EXPORT SALOME_Session_i:  public virtual POA_SALOME::Session,
-                        public virtual PortableServer::ServantBase
+                         public virtual PortableServer::ServantBase
 {
 public:
   SALOME_Session_i(int argc, 
index 43bb896c06c7d72a3117b03ba53dc466c14eab67..e3f8fd6cab6a184407c1ad6ba0e54cd79a9f93cb 100644 (file)
@@ -41,9 +41,9 @@
 static QColor mixColors( const QColor& c1, const QColor& c2 )
 {
   return QColor( (c1.red()   + c2.red() )   / 2,
-                (c1.green() + c2.green() ) / 2,
-                (c1.blue()  + c2.blue() )  / 2,
-                (c1.alpha() + c2.alpha() ) / 2 );
+                 (c1.green() + c2.green() ) / 2,
+                 (c1.blue()  + c2.blue() )  / 2,
+                 (c1.alpha() + c2.alpha() ) / 2 );
 }
 
 /*!
@@ -125,7 +125,7 @@ void Style_Model::fromApplication( bool reset )
   for ( int i = (int)QPalette::Active; i <= (int)QPalette::Inactive; i++ ) {
     for ( int j = (int)Style_Model::WindowText; j < (int)Style_Model::NColorRoles; j++ ) {
       myColors[ (QPalette::ColorGroup)i ][ (Style_Model::ColorRole)j ] =
-       myAppData->myPalette.color( (QPalette::ColorGroup)i, (QPalette::ColorRole)j );
+        myAppData->myPalette.color( (QPalette::ColorGroup)i, (QPalette::ColorRole)j );
     }
   }
 
@@ -281,7 +281,7 @@ void Style_Model::fromResources( QtxResourceMgr* resMgr, const QString& resSecti
       setWidgetEffect( (WidgetEffect)effect );
   }
   else if ( resourceMgr()->hasValue( section, "is-highlight-widget" ) ||
-           resourceMgr()->hasValue( section, "is-raising-widget" ) ) {
+            resourceMgr()->hasValue( section, "is-raising-widget" ) ) {
     bool highlight = resourceMgr()->booleanValue( section, "is-highlight-widget", false );
     bool autoraise = resourceMgr()->booleanValue( section, "is-highlight-widget", false );
     if ( highlight )
@@ -504,7 +504,7 @@ QColor Style_Model::color( ColorRole role, QPalette::ColorGroup cg ) const
   \sa color()
 */
 void Style_Model::setColor( Style_Model::ColorRole role, const QColor& active,
-                           const QColor& inactive, const QColor& disabled )
+                            const QColor& inactive, const QColor& disabled )
 {
   QColor ac = active, ic = inactive, dc = disabled;
 
@@ -854,7 +854,7 @@ void Style_Model::readColorValue( ColorRole role, const QString& prefix )
   \sa readColorValue()
 */
 void Style_Model::writeColorValue( ColorRole role, const QString& prefix,
-                                  QtxResourceMgr* resMgr, const QString& resSection ) const
+                                   QtxResourceMgr* resMgr, const QString& resSection ) const
 {
   QString active   = QString( "%1-color" ).arg( prefix );
   QString inactive = QString( "%1-color-inactive" ).arg( prefix );
index 10d1e397bc4cf8b2890e4ab54893f365ccc276e6..a5627e63fbf674a44a25cfaf754df43ff017d7a5 100644 (file)
@@ -211,7 +211,7 @@ void Style_PrefDlg::PaletteEditor::setColor( int id, QPalette::ColorGroup cg, co
   \internal
 */
 void Style_PrefDlg::PaletteEditor::setColor( int id, const QColor& active,
-                                            const QColor& inactive, const QColor& disabled )
+                                             const QColor& inactive, const QColor& disabled )
 {
   setColor( id, QPalette::Active,   active );
   setColor( id, QPalette::Inactive, inactive.isValid() ? inactive : active );
@@ -267,61 +267,61 @@ void Style_PrefDlg::PaletteEditor::fromColor( const QColor& c )
   const QPalette pal = QPalette( c );
   for ( int i = 0; i < (int)Style_Model::NColorRoles; i++ ) {
     setColor( i,
-             pal.color( QPalette::Active,   (QPalette::ColorRole)i ), 
-             pal.color( QPalette::Inactive, (QPalette::ColorRole)i ),
-             pal.color( QPalette::Disabled, (QPalette::ColorRole)i ) );
+              pal.color( QPalette::Active,   (QPalette::ColorRole)i ), 
+              pal.color( QPalette::Inactive, (QPalette::ColorRole)i ),
+              pal.color( QPalette::Disabled, (QPalette::ColorRole)i ) );
   }
 
   // Header
   setColor( Style_Model::Header,
-           pal.color( QPalette::Active,   QPalette::Button ), 
-           pal.color( QPalette::Inactive, QPalette::Button ),
-           pal.color( QPalette::Disabled, QPalette::Button ) );
+            pal.color( QPalette::Active,   QPalette::Button ), 
+            pal.color( QPalette::Inactive, QPalette::Button ),
+            pal.color( QPalette::Disabled, QPalette::Button ) );
   // Checked
   setColor( Style_Model::Checked,
-           pal.color( QPalette::Active,   QPalette::Base ),
-           pal.color( QPalette::Inactive, QPalette::Base ),
-           pal.color( QPalette::Disabled, QPalette::Base ) );
+            pal.color( QPalette::Active,   QPalette::Base ),
+            pal.color( QPalette::Inactive, QPalette::Base ),
+            pal.color( QPalette::Disabled, QPalette::Base ) );
   // Lines
   setColor( Style_Model::Lines,
-           pal.color( QPalette::Active,   QPalette::Mid ),
-           pal.color( QPalette::Inactive, QPalette::Mid ),
-           pal.color( QPalette::Disabled, QPalette::Mid ) );
+            pal.color( QPalette::Active,   QPalette::Mid ),
+            pal.color( QPalette::Inactive, QPalette::Mid ),
+            pal.color( QPalette::Disabled, QPalette::Mid ) );
   // Slider
   setColor( Style_Model::Slider,
-           pal.color( QPalette::Active,   QPalette::Button ),
-           pal.color( QPalette::Inactive, QPalette::Button ),
-           pal.color( QPalette::Disabled, QPalette::Button ) );
+            pal.color( QPalette::Active,   QPalette::Button ),
+            pal.color( QPalette::Inactive, QPalette::Button ),
+            pal.color( QPalette::Disabled, QPalette::Button ) );
   // ProgressBar
   setColor( Style_Model::ProgressBar,
-           pal.color( QPalette::Active,   QPalette::Highlight ),
-           pal.color( QPalette::Inactive, QPalette::Highlight ),
-           pal.color( QPalette::Disabled, QPalette::Highlight ) );
+            pal.color( QPalette::Active,   QPalette::Highlight ),
+            pal.color( QPalette::Inactive, QPalette::Highlight ),
+            pal.color( QPalette::Disabled, QPalette::Highlight ) );
   // FieldLight
   setColor( Style_Model::FieldLight,
-           pal.color( QPalette::Active,   QPalette::Light ),
-           pal.color( QPalette::Inactive, QPalette::Light ),
-           pal.color( QPalette::Disabled, QPalette::Light ) );
+            pal.color( QPalette::Active,   QPalette::Light ),
+            pal.color( QPalette::Inactive, QPalette::Light ),
+            pal.color( QPalette::Disabled, QPalette::Light ) );
   // FieldDark
   setColor( Style_Model::FieldDark,
-           pal.color( QPalette::Active,   QPalette::Mid ).light( 125 ),
-           pal.color( QPalette::Inactive, QPalette::Mid ).light( 125 ),
-           pal.color( QPalette::Disabled, QPalette::Mid ).light( 125 ) );
+            pal.color( QPalette::Active,   QPalette::Mid ).light( 125 ),
+            pal.color( QPalette::Inactive, QPalette::Mid ).light( 125 ),
+            pal.color( QPalette::Disabled, QPalette::Mid ).light( 125 ) );
   // GridLine
   setColor( Style_Model::GridLine,
-           pal.color( QPalette::Active,   QPalette::Mid ),
-           pal.color( QPalette::Inactive, QPalette::Mid ),
-           pal.color( QPalette::Disabled, QPalette::Mid ) );
+            pal.color( QPalette::Active,   QPalette::Mid ),
+            pal.color( QPalette::Inactive, QPalette::Mid ),
+            pal.color( QPalette::Disabled, QPalette::Mid ) );
   // HighlightWidget
   setColor( Style_Model::HighlightWidget,
-           pal.color( QPalette::Active,   QPalette::Button ),
-           pal.color( QPalette::Inactive, QPalette::Button ),
-           pal.color( QPalette::Disabled, QPalette::Button ) );
+            pal.color( QPalette::Active,   QPalette::Button ),
+            pal.color( QPalette::Inactive, QPalette::Button ),
+            pal.color( QPalette::Disabled, QPalette::Button ) );
   // HighlightWidget
   setColor( Style_Model::HighlightBorder,
-           pal.color( QPalette::Active,   QPalette::Button ).dark( 100 ),
-           pal.color( QPalette::Inactive, QPalette::Button ).dark( 100 ),
-           pal.color( QPalette::Disabled, QPalette::Button ).dark( 100 ) );
+            pal.color( QPalette::Active,   QPalette::Button ).dark( 100 ),
+            pal.color( QPalette::Inactive, QPalette::Button ).dark( 100 ),
+            pal.color( QPalette::Disabled, QPalette::Button ).dark( 100 ) );
   // Pointer
   setColor( Style_Model::Pointer, Qt::black, Qt::black, Qt::black );
 
@@ -331,24 +331,24 @@ void Style_PrefDlg::PaletteEditor::fromColor( const QColor& c )
 
   // BorderTop
   setColor( Style_Model::BorderTop,
-           aDarkActive.lighter(),
-           aDarkInactive.lighter(),
-           aDarkDisabled.lighter() );
+            aDarkActive.lighter(),
+            aDarkInactive.lighter(),
+            aDarkDisabled.lighter() );
   // BorderBottom
   setColor( Style_Model::BorderBottom,
-           aDarkActive.darker(),
-           aDarkInactive.darker(),
-           aDarkDisabled.darker() );
+            aDarkActive.darker(),
+            aDarkInactive.darker(),
+            aDarkDisabled.darker() );
   // TabBorderTop
   setColor( Style_Model::TabBorderTop,
-           aDarkActive.light().light().light(),
-           aDarkInactive.light().light().light(), 
-           aDarkDisabled.light().light().light() );
+            aDarkActive.light().light().light(),
+            aDarkInactive.light().light().light(), 
+            aDarkDisabled.light().light().light() );
   // TabBorderBottom
   setColor( Style_Model::TabBorderBottom,
-           aDarkActive.dark().dark().dark(),
-           aDarkInactive.dark().dark().dark(),
-           aDarkDisabled.dark().dark().dark() );
+            aDarkActive.dark().dark().dark(),
+            aDarkInactive.dark().dark().dark(),
+            aDarkDisabled.dark().dark().dark() );
 }
 
 /*!
@@ -671,9 +671,9 @@ Style_PrefDlg::Style_PrefDlg( QWidget* parent )
   connect( myStyleCheck,        SIGNAL( toggled( bool ) ),        fr,   SLOT( setEnabled( bool ) ) );
   connect( myStylesList,        SIGNAL( itemSelectionChanged() ), this, SLOT( onStyleChanged() ) );
   connect( myStylesList,        SIGNAL( itemChanged( QListWidgetItem* ) ),       
-          this, SLOT( onItemChanged( QListWidgetItem* ) ) );
+           this, SLOT( onItemChanged( QListWidgetItem* ) ) );
   connect( myStylesList,        SIGNAL( itemDoubleClicked( QListWidgetItem* ) ), 
-          this, SLOT( onApply() ) );
+           this, SLOT( onApply() ) );
   connect( myLinesCombo,        SIGNAL( activated( int ) ),       this, SLOT( onLinesType() ) );
   connect( myPaletteEditor,     SIGNAL( changed() ),              this, SIGNAL( styleChanged() ) );
   connect( myFontEdit,          SIGNAL( changed( QFont ) ),       this, SIGNAL( styleChanged() ) );
@@ -688,7 +688,7 @@ Style_PrefDlg::Style_PrefDlg( QWidget* parent )
   connect( mySplitterLength,    SIGNAL( valueChanged( int ) ),    this, SIGNAL( styleChanged() ) );
   connect( mySliderSize,        SIGNAL( valueChanged( int ) ),    this, SIGNAL( styleChanged() ) );
   connect( aGroup,              SIGNAL( buttonClicked( QAbstractButton* ) ),
-          this, SLOT( onEffectChanged( QAbstractButton* ) ) );
+           this, SLOT( onEffectChanged( QAbstractButton* ) ) );
   connect( this,                SIGNAL( styleChanged() ),         this, SLOT( onChanged() ) );
   
   connect( this, SIGNAL( dlgApply() ), this, SLOT( onApply() ) );
@@ -726,13 +726,13 @@ void Style_PrefDlg::keyPressEvent( QKeyEvent* e )
     QListWidgetItem* item = myStylesList->currentItem();
     if ( item && item->data( TypeRole ).toInt() == User ) {
       if ( QMessageBox::question( this,
-                                 tr( "Delete user theme" ),
-                                 tr( "Remove theme %1?" ).arg( item->text() ),
-                                 QMessageBox::Yes | QMessageBox::No,
-                                 QMessageBox::Yes ) == QMessageBox::Yes ) {
-       resourceMgr()->remove( item->data( NameRole ).toString() );
-       resourceMgr()->save();
-       delete item;
+                                  tr( "Delete user theme" ),
+                                  tr( "Remove theme %1?" ).arg( item->text() ),
+                                  QMessageBox::Yes | QMessageBox::No,
+                                  QMessageBox::Yes ) == QMessageBox::Yes ) {
+        resourceMgr()->remove( item->data( NameRole ).toString() );
+        resourceMgr()->save();
+        delete item;
       }
     }
   }
@@ -806,24 +806,24 @@ void Style_PrefDlg::toModel( Style_Model* model ) const
   // ... first set Button color 'cause it is used to calculate other ones
   if ( myPaletteEditor->isAuto() )
     model->setColor( Style_Model::Button,
-                    myPaletteEditor->color( Style_Model::Button, QPalette::Active ) );
+                     myPaletteEditor->color( Style_Model::Button, QPalette::Active ) );
   else 
     model->setColor( Style_Model::Button,
-                    myPaletteEditor->color( Style_Model::Button, QPalette::Active ),
-                    myPaletteEditor->color( Style_Model::Button, QPalette::Inactive ),
-                    myPaletteEditor->color( Style_Model::Button, QPalette::Disabled ));
+                     myPaletteEditor->color( Style_Model::Button, QPalette::Active ),
+                     myPaletteEditor->color( Style_Model::Button, QPalette::Inactive ),
+                     myPaletteEditor->color( Style_Model::Button, QPalette::Disabled ));
   // ... then set all other colors
   for ( int i = (int)Style_Model::WindowText; i < (int)Style_Model::LastColor; i++ ) {
     if ( i == Style_Model::NoRole ) continue; // not supported
     if ( i == Style_Model::Button ) continue; // already set
     if ( myPaletteEditor->isAuto() )
       model->setColor( (Style_Model::ColorRole)i,
-                      myPaletteEditor->color( i, QPalette::Active ) );
+                       myPaletteEditor->color( i, QPalette::Active ) );
     else 
       model->setColor( (Style_Model::ColorRole)i,
-                      myPaletteEditor->color( i, QPalette::Active ),
-                      myPaletteEditor->color( i, QPalette::Inactive ),
-                      myPaletteEditor->color( i, QPalette::Disabled ));
+                       myPaletteEditor->color( i, QPalette::Active ),
+                       myPaletteEditor->color( i, QPalette::Inactive ),
+                       myPaletteEditor->color( i, QPalette::Disabled ));
   }
   model->setAutoPalette( myPaletteEditor->isAuto() ); // internal
   // font
@@ -1019,7 +1019,7 @@ void Style_PrefDlg::onItemChanged( QListWidgetItem* item )
     myStylesList->blockSignals( false );
   }
   onChanged();
-}                              
+}                               
 
 /*!
   \brief Called when widget effect is changed
index 597e99d21907f5918a4775e88c8bf50de8e8462d..22cef09fc8077b3103adc9708d9ff17e1d0e0f9c 100644 (file)
@@ -81,8 +81,8 @@ QStringList Style_ResourceMgr::styles( StyleType type, bool sort )
       setWorkingMode( IgnoreUserValues );
       QMutableListIterator<QString> it( sl );
       while ( it.hasNext() ) {
-       QString s = it.next();
-       if ( hasSection( s ) ) it.remove();
+        QString s = it.next();
+        if ( hasSection( s ) ) it.remove();
       }
     }
     break;
index eeb12969f2336fcc726ffe799dbec166a6beace3..82d58ff717390342549d985385f4a325ccf47d25 100644 (file)
@@ -398,7 +398,7 @@ void Style_Salome::unpolish( QWidget* w )
   \param w widget
 */
 void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComplex* opt,
-                                      QPainter* p, const QWidget* w ) const
+                                       QPainter* p, const QWidget* w ) const
 {
   if ( checkDebugLevel(4) ) {
     QWindowsStyle::drawComplexControl( cc, opt, p, w );
@@ -415,14 +415,14 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
         double aRad = model()->widgetRounding( Style_Model::EditRadius );
         bool antialized = model()->antialiasing();
         QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
-       QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
+        QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
         if ( hover )
           drawHoverRect(p, optr, opt->palette.color( QPalette::Window ), aRad, Style_Tools::Left, true);
         else
           Style_Tools::shadowRect( p, optr, aRad, LINE_GR_MARGIN, SHADOW, Style_Tools::Left,
                                    model()->color( Style_Model::FieldLight ), // Style_Model::fld_light_clr,
                                    model()->color( Style_Model::FieldDark ),  // Style_Model::fld_dark_clr,
-                                  aBrdTopCol, aBrdBotCol, antialized, false );
+                                   aBrdTopCol, aBrdBotCol, antialized, false );
         QRect aBtnRect = QRect( QPoint( arUp.x(), optr.y() ), QPoint( arUp.right(), optr.bottom() ) );
         QColor aBtnCol = opt->palette.color( QPalette::Button );
         bool aStateOn = opt->state & ( State_Sunken | State_On );
@@ -482,7 +482,7 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
           copy.rect = aBtnRect;
           drawPrimitive(pe, &copy, p, w);
         }
-       break;
+        break;
      }
      case CC_ComboBox: {
       if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
@@ -495,14 +495,14 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
         bool antialized = model()->antialiasing();
         double aRad = model()->widgetRounding( Style_Model::EditRadius );
         QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
-       QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
+        QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
         if ( hover )
           drawHoverRect(p, optr, opt->palette.color( QPalette::Window ), aRad, Style_Tools::Left, true);
         else
           Style_Tools::shadowRect( p, optr, aRad, LINE_GR_MARGIN, SHADOW, Style_Tools::Left,
                                    model()->color( Style_Model::FieldLight ), // Style_Model::fld_light_clr,
                                    model()->color( Style_Model::FieldDark ),  // Style_Model::fld_dark_clr,
-                                  aBrdTopCol, aBrdBotCol, antialized, false );
+                                   aBrdTopCol, aBrdBotCol, antialized, false );
         if (cmb->subControls & SC_ComboBoxArrow) {
           State flags = State_None;
           QColor aBtnCol = opt->palette.color( QPalette::Button );
@@ -533,7 +533,7 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
             p->setPen(cmb->palette.highlightedText().color());
           }
           else
-           p->setPen(cmb->palette.text().color());
+            p->setPen(cmb->palette.text().color());
         }
         break;
       }
@@ -545,7 +545,7 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
 
             if( hasHover() && (slider->state & State_Enabled) &&
                          (slider->state & State_MouseOver) ) {
-             QRect moderated = w->rect();
+              QRect moderated = w->rect();
                 drawHoverRect(p, moderated, opt->palette.color( QPalette::Window ),
                               model()->widgetRounding( Style_Model::ButtonRadius ), Style_Tools::All, false);
             }
@@ -572,8 +572,8 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
               bool tickAbove = slider->tickPosition == QSlider::TicksAbove;
               bool tickBelow = slider->tickPosition == QSlider::TicksBelow;
               QColor aBtnCol = model()->color( Style_Model::Slider );          // Style_Model::slider_clr
-             QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
-             QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
+              QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
+              QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
               // rect was changed on +/-DELTA_SLIDER value for correct painting Antialised border of slider
               int aDelta = DELTA_SLIDER-1;
               QRect slRect = QRect(x+aDelta, y+aDelta, wi-aDelta, he-aDelta);
@@ -622,8 +622,8 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
         menuArea = subControlRect(cc, toolbutton, SC_ToolButtonMenu, w);
 
         if (w && ( qobject_cast<QToolBar *>(w->parentWidget() ) || 
-                  toolbutton->state & State_AutoRaise && !( toolbutton->state & State_MouseOver ) )
-           ) {
+                   toolbutton->state & State_AutoRaise && !( toolbutton->state & State_MouseOver ) )
+            ) {
           QWindowsStyle::drawComplexControl( cc, opt, p, w );
           return;
         }
@@ -639,8 +639,8 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
         bool isAutoRaising = model()->widgetEffect() == Style_Model::AutoRaiseEffect;
         bool isHighWdg     = model()->widgetEffect() == Style_Model::HighlightEffect;
         bool hover = hasHover() && (opt->state & State_Enabled) && ( opt->state & State_MouseOver );
-       QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
-       QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
+        QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
+        QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
         QRect aRect = button;
         int aType = isMenuBtn ? Style_Tools::Left : Style_Tools::All;
         if ( toolbutton->subControls & SC_ToolButton ) {
@@ -652,7 +652,7 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
           else
             Style_Tools::shadowRect( p, aRect, aMinDelta, -1, SHADOW, aType, top, bottom,
                                      aBrdTopCol, aBrdBotCol, antialized, true, aStateOn );
-       }
+        }
         if (toolbutton->subControls & SC_ToolButtonMenu) {
           p->save();
           if ( aMinDelta > menuArea.height()/2 )
@@ -694,7 +694,7 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
           fr.rect.adjust(3, 3, -3, -3);
           if (toolbutton->features & QStyleOptionToolButton::Menu)
             fr.rect.adjust(0, 0, -pixelMetric(QStyle::PM_MenuButtonIndicator, toolbutton, w), 0);
-         Style_Tools::drawFocus( p, fr.rect, aMinDelta-1,  isMenuBtn ? Style_Tools::Left :
+          Style_Tools::drawFocus( p, fr.rect, aMinDelta-1,  isMenuBtn ? Style_Tools::Left :
                                   Style_Tools::All, aBrdBotCol );
         }
         QStyleOptionToolButton label = *toolbutton;
@@ -717,13 +717,13 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp
         QRect checkBoxRect = subControlRect( cc, opt, SC_GroupBoxCheckBox, w);
         if (groupBox->subControls & QStyle::SC_GroupBoxFrame) {
           QRect aRect = subControlRect( cc, opt, SC_GroupBoxFrame, w);
-         QColor aBrdTopCol = model()->color( Style_Model::TabBorderTop );    // Style_Model::border_tab_top_clr
-         QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom ); // Style_Model::border_tab_bot_clr
+          QColor aBrdTopCol = model()->color( Style_Model::TabBorderTop );    // Style_Model::border_tab_top_clr
+          QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom ); // Style_Model::border_tab_bot_clr
           Style_Tools::shadowRect( p, aRect, model()->widgetRounding( Style_Model::FrameRadius ), 0.,
                                    SHADOW, Style_Tools::All,
                                    model()->color( Style_Model::FieldLight ), // Style_Model::fld_light_clr
                                    model()->color( Style_Model::FieldDark ),  // Style_Model::fld_dark_clr
-                                  aBrdTopCol, aBrdBotCol, false, false, false, false);
+                                   aBrdTopCol, aBrdBotCol, false, false, false, false);
         }
         // Draw title
         if ((groupBox->subControls & QStyle::SC_GroupBoxLabel) && !groupBox->text.isEmpty()) {
@@ -788,10 +788,10 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
         drawControl(CE_PushButtonLabel, &subopt, p, w);
         if (btn->state & State_HasFocus) {
           QRect aRect = subElementRect( SE_PushButtonFocusRect, btn, w );
-         Style_Tools::drawFocus( p, aRect, model()->widgetRounding( Style_Model::ButtonRadius ),
+          Style_Tools::drawFocus( p, aRect, model()->widgetRounding( Style_Model::ButtonRadius ),
                                   Style_Tools::All, model()->color( Style_Model::BorderBottom ) );
         }
-       break;
+        break;
       }
     case CE_PushButtonBevel:
       if ( qstyleoption_cast<const QStyleOptionButton *>(opt) ) {
@@ -804,9 +804,9 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
 
         QColor aBtnCol = opt->palette.color( QPalette::Button );
         QColor top = aBtnCol.light( BUT_PERCENT_COL ),
-              bottom = aBtnCol.dark( BUT_PERCENT_COL );
+               bottom = aBtnCol.dark( BUT_PERCENT_COL );
         QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
-       QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
+        QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
         QRect r = opt->rect;
         bool antialized = model()->antialiasing();
         if ( isAutoRaising && hover && !aStateOn )
@@ -814,10 +814,10 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
                                    aBrdTopCol, aBrdBotCol, antialized, true, aStateOn );
         else if ( isHighWdg && hover && !aStateOn )
           drawHoverRect( p, r, opt->palette.color( QPalette::Window ), aRad, Style_Tools::All, true );
-       else
+        else
           Style_Tools::shadowRect( p, r, aRad, -1, SHADOW, Style_Tools::All, top, bottom,
                                    aBrdTopCol, aBrdBotCol, antialized, true, aStateOn );
-       break;
+        break;
       }
       case CE_DockWidgetTitle:
         if (const QStyleOptionDockWidget *dwOpt = qstyleoption_cast<const QStyleOptionDockWidget *>(opt)) {
@@ -894,8 +894,8 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
                          dwOpt->state & State_Enabled, aTitle,
                          floating ? (active ? QPalette::BrightText : QPalette::Window) : QPalette::WindowText);
             p->setFont(oldFont);
-         }
-         break;
+          }
+          break;
         }
     case CE_Splitter: {
       QWindowsStyle::drawControl( ce, opt, p, w );
@@ -919,10 +919,10 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
           bool isSelected = opt->state & State_Selected;
           bool isLast = tab->position == QStyleOptionTab::End ||
                         tab->position == QStyleOptionTab::OnlyOneTab;
-         QColor aColor = opt->palette.color( QPalette::Window ),
+          QColor aColor = opt->palette.color( QPalette::Window ),
                  aDarkColor = aColor.dark( BUT_PERCENT_ON );
-         QColor aBrdTopCol = model()->color( Style_Model::TabBorderTop );     // Style_Model::border_tab_top_clr
-         QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom );  // Style_Model::border_tab_bot_clr
+          QColor aBrdTopCol = model()->color( Style_Model::TabBorderTop );     // Style_Model::border_tab_top_clr
+          QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom );  // Style_Model::border_tab_bot_clr
 
           bool isHover = hasHover() && (opt->state & State_Enabled) &&
                                        (opt->state & State_MouseOver);
@@ -935,13 +935,13 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
                                 DELTA_H_TAB, aColor, aDarkColor,
                                 aBrdTopCol, aBrdBotCol, isSelected, isLast, isHover );
           p->restore();
-       } else
+        } else
            QCommonStyle::drawControl(ce, opt, p, w);
         break;
       }
     case CE_TabBarTabLabel:
       if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) {
-       if ( tab->position == QStyleOptionTab::End ||
+        if ( tab->position == QStyleOptionTab::End ||
              tab->position == QStyleOptionTab::OnlyOneTab ) {
           QRect oldRect = opt->rect;
           int aDelta = 0;
@@ -949,14 +949,14 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
             aDelta = (int)(opt->rect.height()*DELTA_H_TAB/2);
             oldRect = QRect( oldRect.topLeft(), QPoint( oldRect.right()-aDelta, oldRect.bottom() ) );
           }
-         else {
+          else {
             aDelta = (int)(opt->rect.width()*DELTA_H_TAB/2);
             oldRect = QRect( oldRect.topLeft(), QPoint( oldRect.right(), oldRect.bottom()-aDelta ) );
-         }
+          }
           QStyleOptionTab* copyTab = (QStyleOptionTab*)tab;
           copyTab->rect = oldRect;
           QWindowsStyle::drawControl( ce, copyTab, p, w );
-       }
+        }
         else
           QWindowsStyle::drawControl( ce, opt, p, w );
         break;
@@ -978,8 +978,8 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
             QColor aBtnCol = opt->palette.color( QPalette::Window ),
                    top =    aBtnCol.light( BUT_PERCENT_ON ),
                    bottom = aBtnCol.dark( BUT_PERCENT_ON );
-           QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
-           QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
+            QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
+            QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
             bool aHighWdg = model()->widgetEffect() == Style_Model::HighlightEffect;
             if ( !aStateOn && aHighWdg && (opt->state & State_Enabled) &&
                  (opt->state & State_Selected) )
@@ -1004,7 +1004,7 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
       break;
     case CE_ProgressBarGroove: {
       QColor aBgColor = opt->palette.color( QPalette::Window ),
-       top =    aBgColor.light( BUT_PERCENT_ON ),
+        top =    aBgColor.light( BUT_PERCENT_ON ),
         bottom = aBgColor.dark( BUT_PERCENT_ON );
       QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
       QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
@@ -1150,9 +1150,9 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
           int myHeight = pbBits.rect.height();
           pbBits.state = State_None;
           QRect aRect;
-         QColor aColor = model()->color( Style_Model::ProgressBar );    // Style_Model::prbar_clr
-         QColor top    = aColor.light( BUT_PERCENT_COL );
-         QColor bottom = aColor.dark( BUT_PERCENT_COL );
+          QColor aColor = model()->color( Style_Model::ProgressBar );    // Style_Model::prbar_clr
+          QColor top    = aColor.light( BUT_PERCENT_COL );
+          QColor bottom = aColor.dark( BUT_PERCENT_COL );
           int aType;
           for (int i = 0; i <= nu; ++i) {
             aType = Style_Tools::None;
@@ -1194,7 +1194,7 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
             if ( unit_width > 1 ) {
               aTopClr = aColor.light();
               aBotClr = aColor.dark();
-           }
+            }
             Style_Tools::shadowRect( p, aRect, model()->widgetRounding( Style_Model::EditRadius ), -1, 0,
                                      aType, top, bottom, aTopClr, aBotClr, false, true );
             x += reverse ? -unit_width : unit_width;
@@ -1224,7 +1224,7 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
         double aMargin = LINE_GR_MARGIN;
         QLinearGradient gr(x,y,menuitem->rect.right(),y);
         gr.setColorAt( 0.0, aBgColor );
-       gr.setColorAt( aMargin/width, model()->color( Style_Model::FieldLight ) ); // Style_Model::fld_light_clr
+        gr.setColorAt( aMargin/width, model()->color( Style_Model::FieldLight ) ); // Style_Model::fld_light_clr
         gr.setColorAt( 1.0, model()->color( Style_Model::FieldLight ) );
         QBrush fill;
         if ( act )
@@ -1234,8 +1234,8 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
         p->fillRect(menuitem->rect, fill);
         if (menuitem->menuItemType == QStyleOptionMenuItem::Separator){
           int yoff = y-1 + h / 2;
-         QColor aBrdTopCol = model()->color( Style_Model::TabBorderTop );    // Style_Model::border_tab_top_clr
-         QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom ); // Style_Model::border_tab_bot_clr
+          QColor aBrdTopCol = model()->color( Style_Model::TabBorderTop );    // Style_Model::border_tab_top_clr
+          QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom ); // Style_Model::border_tab_bot_clr
           p->setPen( aBrdBotCol );
           p->drawLine(x + 2, yoff, x + width - 4, yoff);
           p->setPen( aBrdTopCol );
@@ -1388,7 +1388,7 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
                                  Qt::AlignLeft | Qt::AlignVCenter,
                                  iconRect.size(), alignRect);
  
-         // Here's absent filling of pixmap on basic color for editable comboBox
+          // Here's absent filling of pixmap on basic color for editable comboBox
           drawItemPixmap(p, iconRect, Qt::AlignCenter, pixmap);
 
           if (cb->direction == Qt::RightToLeft)
@@ -1410,7 +1410,7 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
         QColor top =    aBtnCol.light( BUT_PERCENT_COL ),
                bottom = aBtnCol.dark( BUT_PERCENT_COL );
         QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
-       QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
+        QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
         Style_Tools::shadowRect( p, opt->rect, 0, -1, 0, Style_Tools::All, top, bottom, aBrdTopCol,
                                  aBrdBotCol, false, true, aStateOn, true );
       PrimitiveElement arrow;
@@ -1438,13 +1438,13 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
         if ( hasHover() && enabled && (opt->state & State_MouseOver) )
          drawHoverRect(p, opt->rect, opt->palette.color( QPalette::Window ), aRad, Style_Tools::All, false);
         else {
-       QColor aColor = model()->color( Style_Model::Slider );      // Style_Model::slider_clr
+        QColor aColor = model()->color( Style_Model::Slider );      // Style_Model::slider_clr
           if ( !enabled )
             aColor = opt->palette.button().color();
-         QColor top =    aColor.light( BUT_PERCENT_ON ),
+          QColor top =    aColor.light( BUT_PERCENT_ON ),
                  bottom = aColor.dark( BUT_PERCENT_ON );
-         QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
-         QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
+          QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
+          QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
           QRect r = opt->rect;
           QPainterPath path = Style_Tools::roundRect( r, aRad,
                                                       Style_Tools::All );
@@ -1501,7 +1501,7 @@ void Style_Salome::drawControl( ControlElement ce, const QStyleOption* opt,
   \param w widget (optional)
 */
 void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
-                                 QPainter* p, const QWidget* w ) const
+                                  QPainter* p, const QWidget* w ) const
 {
   if ( checkDebugLevel(6) ) {
     QWindowsStyle::drawPrimitive( pe, opt, p, w );
@@ -1516,8 +1516,8 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
         QColor aBtnCol = opt->palette.color( QPalette::Window ),
                top =    aBtnCol.light( BUT_PERCENT_ON ),
                bottom = aBtnCol.dark( BUT_PERCENT_ON );
-       QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
-       QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
+        QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
+        QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
         Style_Tools::shadowRect( p, opt->rect, 0, 0., SHADOW, Style_Tools::All, top,
                                  bottom, aBrdTopCol, aBrdBotCol, false, false, false, false );
         break;
@@ -1525,7 +1525,7 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
     case PE_PanelButtonTool : {
       if ( w && ( opt->state & State_Enabled ) && 
            ( ( qobject_cast<QToolBar*>( w->parentWidget() ) ) ||
-            ( w->inherits("QDockWidgetTitleButton") ) ||
+             ( w->inherits("QDockWidgetTitleButton") ) ||
              ( w->inherits("QtxWorkstackAreaTitleButton") ) ) ) {
         bool aStateOn = opt->state & (State_Sunken | State_On);
         bool aHighWdg = model()->widgetEffect() == Style_Model::HighlightEffect;
@@ -1534,14 +1534,14 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
           drawHoverRect(p, opt->rect, opt->palette.color( QPalette::Window ), 0, Style_Tools::All, true);
         else {
           QColor aBtnCol = opt->palette.color( QPalette::Window );
-         QColor aBrdTopCol = model()->color( Style_Model::TabBorderTop );    // Style_Model::border_tab_top_clr
-         QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom ); // Style_Model::border_tab_bot_clr
+          QColor aBrdTopCol = model()->color( Style_Model::TabBorderTop );    // Style_Model::border_tab_top_clr
+          QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom ); // Style_Model::border_tab_bot_clr
           QColor top =    aBtnCol.light( BUT_PERCENT_COL ),
                  bottom = aBtnCol.dark( BUT_PERCENT_COL );
           Style_Tools::shadowRect( p, opt->rect, 0.0, 0, SHADOW, Style_Tools::All, top, bottom,
            aBrdTopCol, aBrdBotCol, model()->antialiasing(), true, aStateOn );
-       }
-       break;
+        }
+        break;
       }
       else
         QWindowsStyle::drawPrimitive( pe, opt, p, w );
@@ -1550,8 +1550,8 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
     case PE_FrameFocusRect: {
       if (w && qobject_cast<QTabBar*>((QWidget*)w)) {
         QTabBar* tabBar = qobject_cast<QTabBar*>((QWidget*)w);
-       QColor aBrdTopCol = model()->color( Style_Model::TabBorderTop );    // Style_Model::border_tab_top_clr
-       QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom ); // Style_Model::border_tab_bot_clr
+        QColor aBrdTopCol = model()->color( Style_Model::TabBorderTop );    // Style_Model::border_tab_top_clr
+        QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom ); // Style_Model::border_tab_bot_clr
         bool isHover = hasHover() && (opt->state & State_Enabled) && (opt->state & State_MouseOver);
         Style_Tools::tabRect( p, opt->rect, (int)tabBar->shape(),
                               model()->widgetRounding( Style_Model::FrameRadius ), DELTA_H_TAB,
@@ -1560,7 +1560,7 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
                               aBrdTopCol, aBrdBotCol, false, false, isHover, true );
       }
       else {
-       QWindowsStyle::drawPrimitive( pe, opt, p, w );
+        QWindowsStyle::drawPrimitive( pe, opt, p, w );
       }
       break;
     }
@@ -1575,24 +1575,24 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
       QRect rect = opt->rect;
       QColor pen, brush;
       if ( opt->state & State_Enabled ) {
-       pen = model()->color( Style_Model::Pointer );    // Style_Model::pointer_clr
-       brush = opt->palette.color( QPalette::Button );
+        pen = model()->color( Style_Model::Pointer );    // Style_Model::pointer_clr
+        brush = opt->palette.color( QPalette::Button );
         if ( ( opt->state & State_Sunken ) && (opt->state & State_Enabled ) )
           rect.moveTo( rect.x()+1, rect.y()+1 );
       } else {
         pen = opt->palette.mid().color();
-       brush = pen;
+        brush = pen;
       }
       if ( pe == PE_IndicatorSpinPlus || pe == PE_IndicatorSpinMinus )
-       Style_Tools::drawSign( pe, p, rect, pen, brush );
+        Style_Tools::drawSign( pe, p, rect, pen, brush );
       else
-       Style_Tools::drawArrow( pe, p, rect, pen, brush );
+        Style_Tools::drawArrow( pe, p, rect, pen, brush );
       break;
     }
     case PE_IndicatorCheckBox: {
       if ( hasHover() && (opt->state & State_Enabled) && (opt->state & State_MouseOver) )
         drawHoverRect(p, w->rect(), opt->palette.color( QPalette::Window ),
-                     model()->widgetRounding( Style_Model::EditRadius ),
+                      model()->widgetRounding( Style_Model::EditRadius ),
                       Style_Tools::All, false);
       QBrush fill;
       if (opt->state & State_NoChange)
@@ -1642,10 +1642,10 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
       }
       const QStyleOptionViewItem *itemViewOpt = qstyleoption_cast<const QStyleOptionViewItem *>(opt);
       p->setPen(itemViewOpt && itemViewOpt->showDecorationSelected
-               && opt->state & State_Selected ? opt->palette.highlightedText().color()
-               : opt->palette.text().color());
+                && opt->state & State_Selected ? opt->palette.highlightedText().color()
+                : opt->palette.text().color());
       if (opt->state & State_NoChange)
-       p->setBrush( opt->palette.color( QPalette::Button ) );
+        p->setBrush( opt->palette.color( QPalette::Button ) );
       p->drawRect(opt->rect.x() + 1, opt->rect.y() + 1, 11, 11);
       if (!(opt->state & State_Off)) {
         QLineF lines[11];
@@ -1666,7 +1666,7 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
         QColor aColor = model()->color( Style_Model::Pointer ); // Style_Model::pointer_clr
         if ( !(opt->state & State_Enabled ) )
           aColor = opt->palette.mid().color();
-       if ( opt->state & State_Selected && itemViewOpt && itemViewOpt->showDecorationSelected )
+        if ( opt->state & State_Selected && itemViewOpt && itemViewOpt->showDecorationSelected )
           aColor = opt->palette.highlightedText().color();
 
         p->setPen( QPen( aColor ) );
@@ -1680,7 +1680,7 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
     case PE_IndicatorRadioButton: {
       if ( hasHover() && (opt->state & State_Enabled) && (opt->state & State_MouseOver) )
         drawHoverRect(p, w->rect(), opt->palette.color( QPalette::Window ), 
-                     model()->widgetRounding( Style_Model::ButtonRadius ),
+                      model()->widgetRounding( Style_Model::ButtonRadius ),
                       Style_Tools::All, false);
 #define PTSARRLEN(x) sizeof(x)/(sizeof(QPoint))
       static const QPoint pts_border[] = {              // border line
@@ -1713,7 +1713,7 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
       else {
         QColor fillColor =  opt->palette.color( QPalette::Base );
         if ( enabled && on )
-         fillColor = model()->color( Style_Model::Checked ); // Style_Model::checked_clr
+          fillColor = model()->color( Style_Model::Checked ); // Style_Model::checked_clr
         QLinearGradient gr( 3, 3, 8, 8 );
         gr.setColorAt( 0.0, fillColor.dark( BUT_PERCENT_ON ) );
         gr.setColorAt( 1.0, fillColor );
@@ -1762,14 +1762,14 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
       }
       if ( pe == PE_FrameLineEdit ) {
         QColor aBrdTopCol = model()->color( Style_Model::BorderTop );    // Style_Model::border_top_clr
-       QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
+        QColor aBrdBotCol = model()->color( Style_Model::BorderBottom ); // Style_Model::border_bot_clr
         bool hover = hasHover() && (opt->state & State_Enabled) && (opt->state & State_MouseOver);
         double aRad = model()->widgetRounding( Style_Model::EditRadius );
         if ( hover )
           drawHoverRect(p, opt->rect, opt->palette.color( QPalette::Window ), aRad, Style_Tools::All, true);
         else {
           Style_Tools::shadowRect( p, opt->rect, aRad, LINE_GR_MARGIN, SHADOW,
-                                  Style_Tools::All, opt->palette.color( QPalette::Base ), // getColor( Style_Model::fld_light_clr ),
+                                   Style_Tools::All, opt->palette.color( QPalette::Base ), // getColor( Style_Model::fld_light_clr ),
                                    model()->color( Style_Model::FieldDark ), aBrdTopCol, aBrdBotCol,
                                    model()->antialiasing(), false );
         }
@@ -1778,14 +1778,14 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
         if (const QStyleOptionFrame *panel = qstyleoption_cast<const QStyleOptionFrame *>(opt)) {
           QRect rect = panel->rect.adjusted( panel->lineWidth,  panel->lineWidth,
                                              -panel->lineWidth, -panel->lineWidth);
-         if ( w->inherits("QLineEdit") && panel->lineWidth > 0 ) {
+          if ( w->inherits("QLineEdit") && panel->lineWidth > 0 ) {
             drawPrimitive( PE_FrameLineEdit, panel, p, w );
-         }
+          }
           else {
-           QColor c = panel->palette.color(QPalette::Base); c.setAlpha(255);
+            QColor c = panel->palette.color(QPalette::Base); c.setAlpha(255);
             p->fillRect( rect, c ); // panel->palette.brush(QPalette::Base)
-         }
-       }
+          }
+        }
       }
       break;
     }
@@ -1801,7 +1801,7 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
         if ( aTabPos != QTabWidget::East )
           aRoundType = aRoundType | Style_Tools::TopRight;
         QColor aBrdTopCol = model()->color( Style_Model::TabBorderTop );    // Style_Model::border_tab_top_clr
-       QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom ); // Style_Model::border_tab_bot_clr
+        QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom ); // Style_Model::border_tab_bot_clr
         Style_Tools::shadowRect( p, opt->rect, model()->widgetRounding( Style_Model::FrameRadius ),
                                  0., SHADOW, aRoundType,
                                  model()->color( Style_Model::FieldLight ),
@@ -1838,7 +1838,7 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
       if (const QStyleOptionTabBarBase *tbb
           = qstyleoption_cast<const QStyleOptionTabBarBase *>(opt)) {
         if (tbb->shape != QTabBar::RoundedNorth && tbb->shape != QTabBar::RoundedEast &&
-           tbb->shape != QTabBar::RoundedSouth && tbb->shape != QTabBar::RoundedWest) {
+            tbb->shape != QTabBar::RoundedSouth && tbb->shape != QTabBar::RoundedWest) {
           QWindowsStyle::drawPrimitive( pe, opt, p, w );
           break;
         }
@@ -1851,18 +1851,18 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
           isLast = tabBar->currentIndex() == tabBar->count() -1;
         QColor aColor = opt->palette.color( QPalette::Window );
         QColor aBrdTopCol = model()->color( Style_Model::TabBorderTop );    // Style_Model::border_tab_top_clr
-       QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom ); // Style_Model::border_tab_bot_clr
+        QColor aBrdBotCol = model()->color( Style_Model::TabBorderBottom ); // Style_Model::border_tab_bot_clr
         bool isHover = hasHover() && (opt->state & State_Enabled) &&
                                      (opt->state & State_MouseOver);
         QPainterPath aSelPath = Style_Tools::tabRect( p, aSelRect, (int)tbb->shape,
-                                                     model()->widgetRounding( Style_Model::FrameRadius ),
-                                                     DELTA_H_TAB, aColor, aColor,
+                                                      model()->widgetRounding( Style_Model::FrameRadius ),
+                                                      DELTA_H_TAB, aColor, aColor,
                             aColor, aColor, isSelected, isLast, isHover, false, false );
         if ( !aSelPath.isEmpty() )
           aSelRect = aSelPath.controlPointRect().toRect();
         QStyleOptionTabBarBase* copyOpt = (QStyleOptionTabBarBase*)tbb;
         copyOpt->selectedTabRect = aSelRect;
-       QCommonStyle::drawPrimitive( pe, copyOpt, p, w );
+        QCommonStyle::drawPrimitive( pe, copyOpt, p, w );
         break;
       }
     case PE_IndicatorBranch: {
@@ -1932,9 +1932,9 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
         QPalette aPal = aWdg->palette();
         double aMarg = LINE_GR_MARGIN;
         QColor base = model()->color( Style_Model::Base ), // Style_Model::pal_base_clr
-         light = base,
-         light_alt = base.dark(110),//AlternateBase color
-         dark  = model()->color( Style_Model::FieldDark ); // Style_Model::fld_dark_clr
+          light = base,
+          light_alt = base.dark(110),//AlternateBase color
+          dark  = model()->color( Style_Model::FieldDark ); // Style_Model::fld_dark_clr
         //light.setAlpha( 0 ); // VSR commented: IPAL19262
         QLinearGradient gr_h(r.x(), r.y(), r.right(), r.y());
         gr_h.setColorAt( 0.0, dark );
@@ -1947,7 +1947,7 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
         // draw frame
         p->fillRect( r, base );
         p->fillRect( r, gr_h );
-       p->fillRect( r, gr_v );
+        p->fillRect( r, gr_v );
         aPal.setBrush( QPalette::Base, QBrush( light ) );
 
         QLinearGradient gr_alt(r.x(), r.y(), r.right(), r.y());
@@ -1973,7 +1973,7 @@ void Style_Salome::drawPrimitive( PrimitiveElement pe, const QStyleOption* opt,
   \return metric value
 */
 int Style_Salome::pixelMetric( PixelMetric metric, const QStyleOption* opt,
-                              const QWidget* w ) const
+                               const QWidget* w ) const
 {
   if ( checkDebugLevel(7) ) {
     return QWindowsStyle::pixelMetric( metric, opt, w );
@@ -2028,11 +2028,11 @@ QSize Style_Salome::sizeFromContents( ContentsType ct, const QStyleOption* opt,
           if ( tab->shape == QTabBar::RoundedNorth || tab->shape == QTabBar::RoundedSouth ) {
             int aDelta = (int)(opt->rect.height()*DELTA_H_TAB/2);
             sz.setWidth( sz.width() + aDelta );
-         }
+          }
           if ( tab->shape == QTabBar::RoundedEast || tab->shape == QTabBar::RoundedWest ) {
             int aDelta = (int)(opt->rect.width()*DELTA_H_TAB/2);
             sz.setHeight( sz.height() + aDelta );
-         }
+          }
         }
         break;
       }
@@ -2055,7 +2055,7 @@ QSize Style_Salome::sizeFromContents( ContentsType ct, const QStyleOption* opt,
             aDelta += aHalfRect; // for right of line edit internal
           sz.setWidth( res.width() + aDelta + aHalfRect );
         }
-       break;
+        break;
       default:
       break;
   }
@@ -2100,8 +2100,8 @@ QPixmap Style_Salome::standardPixmap(StandardPixmap stPixmap, const QStyleOption
   \return standard icon
 */
 QIcon Style_Salome::standardIconImplementation( StandardPixmap standardIcon, 
-                                               const QStyleOption* opt,
-                                               const QWidget* w ) const
+                                                const QStyleOption* opt,
+                                                const QWidget* w ) const
 {
   if ( checkDebugLevel(10) ) {
     return QWindowsStyle::standardIconImplementation( standardIcon, opt, w );
@@ -2165,7 +2165,7 @@ int Style_Salome::styleHint( StyleHint hint, const QStyleOption* opt, const QWid
   \return subcontrol rectangle
 */
 QRect Style_Salome::subControlRect( ComplexControl cc, const QStyleOptionComplex* opt,
-                                   SubControl sc, const QWidget* wid ) const
+                                    SubControl sc, const QWidget* wid ) const
 {
   if ( checkDebugLevel(12) ) {
     return QWindowsStyle::subControlRect( cc, opt, sc, wid );
@@ -2227,8 +2227,8 @@ QRect Style_Salome::subControlRect( ComplexControl cc, const QStyleOptionComplex
             else
               res.setTop( res.top() - aRect - 1);
           break;
-         default:
-           break;
+          default:
+            break;
         }
         break;
       }
@@ -2310,7 +2310,7 @@ void Style_Salome::updatePaletteColors()
     for ( int j = (int)Style_Model::WindowText; j < (int)Style_Model::NColorRoles; j++ ) {
       if ( j == QPalette::NoRole ) continue;
       pal.setColor( (QPalette::ColorGroup)i, (QPalette::ColorRole)j,
-                   model()->color( (Style_Model::ColorRole)j, (QPalette::ColorGroup)i ) );
+                    model()->color( (Style_Model::ColorRole)j, (QPalette::ColorGroup)i ) );
     }
   }
   QPixmapCache::clear();
@@ -2331,7 +2331,7 @@ void Style_Salome::updateAllWidgets( QApplication* app )
   for (QWidgetList::ConstIterator it2 = all.constBegin(); it2 != all.constEnd(); ++it2) {
     w = *it2;
     if (w->windowType() != Qt::Desktop && w->testAttribute(Qt::WA_WState_Polished)
-       && !w->testAttribute(Qt::WA_SetStyle)) {
+        && !w->testAttribute(Qt::WA_SetStyle)) {
       QEvent e(QEvent::StyleChange);
       QApplication::sendEvent(w, &e);
       polish( w );
@@ -2467,7 +2467,7 @@ void Style_Salome::drawBackground( QPainter* p, const QRect& r, const QColor& bg
     {
       const int d = 3;
       for ( int i = 0; i <= h; i += d )
-       lines.append( QLine( x, y+i, w, r.y()+i ) );
+        lines.append( QLine( x, y+i, w, r.y()+i ) );
     }
     break;
   case Style_Model::Inclined:
@@ -2476,9 +2476,9 @@ void Style_Salome::drawBackground( QPainter* p, const QRect& r, const QColor& bg
       w = w/d*d;
       h = h/d*d;
       for ( int i = 0; i <= w; i += d )
-       lines.append( QLine( x+i, y, x, y+i ) );
+        lines.append( QLine( x+i, y, x, y+i ) );
       for ( int i = 0; i < h; i += d )
-       lines.append( QLine( left+w-i, top+h, left+w, top+h-i ) );
+        lines.append( QLine( left+w-i, top+h, left+w, top+h-i ) );
     }
     break;
   default:
index 75659e9ac5901b90eae46a4320cf6fe2f9106cad..8502acd920c6d1d9df14e99f96229117363d35ba 100644 (file)
@@ -60,35 +60,35 @@ public:
   virtual void        polish( QWidget* );
   virtual void        unpolish( QWidget* );
   virtual void        drawComplexControl( ComplexControl, const QStyleOptionComplex*,
-                                         QPainter*, const QWidget* = 0 ) const;
+                                          QPainter*, const QWidget* = 0 ) const;
   
   virtual void        drawControl( ControlElement, const QStyleOption*, QPainter*, const QWidget* ) const;
   virtual void        drawPrimitive( PrimitiveElement, const QStyleOption*,
-                                    QPainter*, const QWidget* = 0 ) const;
+                                     QPainter*, const QWidget* = 0 ) const;
   virtual int         pixelMetric( PixelMetric, const QStyleOption* = 0,
-                                  const QWidget* = 0 ) const;
+                                   const QWidget* = 0 ) const;
   virtual QSize       sizeFromContents ( ContentsType, const QStyleOption*,
-                                        const QSize&, const QWidget* = 0 ) const;
+                                         const QSize&, const QWidget* = 0 ) const;
   virtual QPixmap     standardPixmap( StandardPixmap, const QStyleOption*,
-                                     const QWidget* = 0) const;
+                                      const QWidget* = 0) const;
   virtual int         styleHint( StyleHint, const QStyleOption* = 0,
-                                const QWidget* = 0, QStyleHintReturn* = 0 ) const;
+                                 const QWidget* = 0, QStyleHintReturn* = 0 ) const;
   virtual QRect       subControlRect( ComplexControl, const QStyleOptionComplex*,
-                                     SubControl, const QWidget* = 0 ) const;
+                                      SubControl, const QWidget* = 0 ) const;
   virtual QRect       subElementRect( SubElement, const QStyleOption*, const QWidget* = 0 ) const;
 
 protected slots:
   QIcon               standardIconImplementation( StandardPixmap, const QStyleOption* = 0,
-                                                 const QWidget* = 0 ) const;
+                                                  const QWidget* = 0 ) const;
 private:
   void                updatePaletteColors();
   void                updateAllWidgets( QApplication* );
   bool                hasHover() const;
   void                drawHoverRect( QPainter*, const QRect&, const QColor&, const double,
-                                    const int, const bool ) const;
+                                     const int, const bool ) const;
   void                drawHandle( QPainter*, const QRect&, bool, bool = true ) const;
   void                drawBackground( QPainter*, const QRect&, const QColor&, const bool,
-                                     const bool = false, const bool = true ) const;
+                                      const bool = false, const bool = true ) const;
   void                drawBorder( QPainter*, const QRect&, bool ) const;
 
   QString             titleText( const QString&, const int, const int, QFont& ) const;
index 8ba7c60c687ffe0cff3b3e4c035ae41c3b2eb5a6..83f1ba0eaf4d5f15f4428151fb3fb7533aed7e76 100644 (file)
@@ -436,7 +436,7 @@ void Style_Tools::drawArrow( QStyle::PrimitiveElement type, QPainter* p, const Q
   \param brush background painter brush
 */
 void Style_Tools::drawSign( QStyle::PrimitiveElement type, QPainter* p, const QRect& r,
-                           const QColor& pen, const QColor& brush )
+                            const QColor& pen, const QColor& brush )
 {
   p->save();
   QPainterPath sign;
@@ -458,31 +458,31 @@ void Style_Tools::drawSign( QStyle::PrimitiveElement type, QPainter* p, const QR
         deltaY = -deltaY;
       }
       if ( correct ) 
-       sign.moveTo(  deltaY/2,   -aDelta/2-(deltaY/2-aDelta/3) );
+        sign.moveTo(  deltaY/2,   -aDelta/2-(deltaY/2-aDelta/3) );
       else {
-       sign.moveTo(  aDelta/3,   -aDelta/2 );
-       sign.lineTo(  aDelta/3,   -aDelta/2-(deltaY/2-aDelta/3) );
-       sign.lineTo(  deltaY/2,   -aDelta/2-(deltaY/2-aDelta/3) );
+        sign.moveTo(  aDelta/3,   -aDelta/2 );
+        sign.lineTo(  aDelta/3,   -aDelta/2-(deltaY/2-aDelta/3) );
+        sign.lineTo(  deltaY/2,   -aDelta/2-(deltaY/2-aDelta/3) );
       }
       
       sign.lineTo(    deltaY/2,   -aDelta/2-(deltaY/2-aDelta/3)-2*aDelta/3 );
       
       if ( !correct ) {
-       sign.lineTo(  aDelta/3,   -aDelta/2-(deltaY/2-aDelta/3)-2*aDelta/3 );
-       sign.lineTo(  aDelta/3,   -aDelta/2-deltaY );
-       sign.lineTo( -aDelta/3,   -aDelta/2-deltaY );
-       sign.lineTo( -aDelta/3,   -aDelta/2-(deltaY/2-aDelta/3)-2*aDelta/3 );
+        sign.lineTo(  aDelta/3,   -aDelta/2-(deltaY/2-aDelta/3)-2*aDelta/3 );
+        sign.lineTo(  aDelta/3,   -aDelta/2-deltaY );
+        sign.lineTo( -aDelta/3,   -aDelta/2-deltaY );
+        sign.lineTo( -aDelta/3,   -aDelta/2-(deltaY/2-aDelta/3)-2*aDelta/3 );
       }
       
       sign.lineTo(   -deltaY/2,   -aDelta/2-(deltaY/2-aDelta/3)-2*aDelta/3 );
       sign.lineTo(   -deltaY/2,   -aDelta/2-(deltaY/2-aDelta/3) );
 
       if ( correct ) 
-       sign.lineTo(  deltaY/2,   -aDelta/2-(deltaY/2-aDelta/3) );
+        sign.lineTo(  deltaY/2,   -aDelta/2-(deltaY/2-aDelta/3) );
       else {
-       sign.lineTo( -aDelta/3,   -aDelta/2-(deltaY/2-aDelta/3) );
-       sign.lineTo( -aDelta/3,   -aDelta/2 );
-       sign.lineTo(  aDelta/3,   -aDelta/2);
+        sign.lineTo( -aDelta/3,   -aDelta/2-(deltaY/2-aDelta/3) );
+        sign.lineTo( -aDelta/3,   -aDelta/2 );
+        sign.lineTo(  aDelta/3,   -aDelta/2);
       }
 
       if ( correct )
index a21893e2e6f736358b8da9d1c2c50f8d1bc1ccee..9f94ec750e84d4f1c77dc17af0af02d1fbf63592 100644 (file)
@@ -90,7 +90,7 @@ public:
   static void         drawArrow( QStyle::PrimitiveElement, QPainter*, const QRect&,
                                  const QColor&, const QColor& );
   static void         drawSign( QStyle::PrimitiveElement, QPainter*, const QRect&,
-                               const QColor&, const QColor& );
+                                const QColor&, const QColor& );
   static QPainterPath tabRect( QPainter*, const QRect&, const int, const double,
                                const double, const QColor&, const QColor&,
                                const QColor&, const QColor&,
index 0ae32da23deb3ec29cc79f748bcf6111957fab3f..0326eecd4470fd728dd328be13df55d6d1401caa 100755 (executable)
@@ -324,8 +324,8 @@ QString ToolsGUI_CatalogGeneratorDlg::getIdlPath()
     QCString dir;
     if (dir = getenv( modulename + "_ROOT_DIR")) {
       IDLpath = IDLpath + "-I" + SUIT_Tools::addSlash( SUIT_Tools::addSlash(dir) + 
-                                                     SUIT_Tools::addSlash("idl") + 
-                                                     SUIT_Tools::addSlash("salome")) + " ";
+                                                      SUIT_Tools::addSlash("idl") + 
+                                                      SUIT_Tools::addSlash("salome")) + " ";
     }
   }
 
@@ -371,7 +371,7 @@ void ToolsGUI_CatalogGeneratorDlg::onBrowseBtnClicked()
 void ToolsGUI_CatalogGeneratorDlg::updateButtonState()
 {
   myApplyBtn->setEnabled( !myIdlEdit->text().trimmed().isEmpty() && 
-                         !myXmlEdit->text().trimmed().isEmpty() );
+                          !myXmlEdit->text().trimmed().isEmpty() );
 }
 
 /*!
@@ -395,25 +395,25 @@ void ToolsGUI_CatalogGeneratorDlg::onApply()
   if ( !XmlFile.isEmpty() && !IdlFile.isEmpty() ) {
     if ( !QFile::exists( IdlFile ) ) {
       SUIT_MessageBox::critical( this, 
-                                tr("TOOLS_ERR_ERROR"), 
-                                tr("TOOLS_ERR_FILE_NOT_EXIST").arg(IdlFile) );
+                                 tr("TOOLS_ERR_ERROR"), 
+                                 tr("TOOLS_ERR_FILE_NOT_EXIST").arg(IdlFile) );
     }
     else {
       QString command = "";
       if ( getenv("KERNEL_ROOT_DIR")  )
-       command = QString( getenv( "KERNEL_ROOT_DIR" ) ) + "/bin/salome/runIDLparser -K " + IDLpath + " -Wbcatalog=" + XmlFile;
+        command = QString( getenv( "KERNEL_ROOT_DIR" ) ) + "/bin/salome/runIDLparser -K " + IDLpath + " -Wbcatalog=" + XmlFile;
       else {
-       SUIT_MessageBox::critical( this, 
-                                  tr("TOOLS_ERR_ERROR"), 
-                                  tr("KERNEL_ROOT_DIR variable is not defined") );
+        SUIT_MessageBox::critical( this, 
+                                   tr("TOOLS_ERR_ERROR"), 
+                                   tr("KERNEL_ROOT_DIR variable is not defined") );
       }
 
       if (!Author.isEmpty()) command += ",author=" + Author; 
       if (!Version.isEmpty()) command += ",version=" + Version;
       if (!PngFile.isEmpty()) {
-       OSD_Path aPath((Standard_CString)PngFile.toLatin1().constData()); 
-       TCollection_AsciiString aFile = aPath.Name() + aPath.Extension();
-       command += QString(",icon=") + QString(aFile.ToCString());
+        OSD_Path aPath((Standard_CString)PngFile.toLatin1().constData()); 
+        TCollection_AsciiString aFile = aPath.Name() + aPath.Extension();
+        command += QString(",icon=") + QString(aFile.ToCString());
       }
       if (!CompName.isEmpty()) command += ",name=" + CompName;
       if (!CompUserName.isEmpty()) command += ",username=" + CompUserName;
@@ -424,9 +424,9 @@ void ToolsGUI_CatalogGeneratorDlg::onApply()
       int res;
       res = system( ( char* )( command.toLatin1().constData() ) );
       if ( res == -1 ) {
-       MESSAGE( "work failed (system command result = " << res );
+        MESSAGE( "work failed (system command result = " << res );
       } else if (res == 217) {
-       MESSAGE( "shell exec failed (system command result = " << res );
+        MESSAGE( "shell exec failed (system command result = " << res );
       }
     }
   }
index 8c7fca3547cb909a56ee550fcdda2a15978091ee..038eaafbf86e646054ed46355506a765b537d5b3 100755 (executable)
@@ -462,7 +462,7 @@ ToolsGUI_RegWidget* ToolsGUI_RegWidget::myRegWidgetPtr = 0;
   \param parent parent widget
 */
 ToolsGUI_RegWidget* ToolsGUI_RegWidget::GetRegWidget( CORBA::ORB_var& orb,
-                                                     QWidget* parent )
+                                                      QWidget* parent )
 {
   if ( !myRegWidgetPtr ) 
     myRegWidgetPtr = new ToolsGUI_RegWidget( orb, parent );
@@ -594,13 +594,13 @@ bool ToolsGUI_RegWidget::eventFilter( QObject* object, QEvent* event )
     else if ( object == _clients && event->type() == QEvent::KeyPress ) {
       QKeyEvent* ke = (QKeyEvent*)event;
       if ( ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Return ) {
-       slotClientChanged( _clients->currentItem(), 0 );
+        slotClientChanged( _clients->currentItem(), 0 );
       }
     }
     else if ( object == _history && event->type() == QEvent::KeyPress ) {
       QKeyEvent* ke = (QKeyEvent*)event;
       if ( ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Return ) {
-       slotHistoryChanged( _history->currentItem(), 0 );
+        slotHistoryChanged( _history->currentItem(), 0 );
       }
     }
   }
@@ -616,9 +616,9 @@ bool ToolsGUI_RegWidget::eventFilter( QObject* object, QEvent* event )
   \return item index or -1 if it is not found.
 */
 int ToolsGUI_RegWidget::numitem( const QString& name, 
-                                const QString& pid, 
-                                const QString& machine,
-                                const Registry::AllInfos* listclient )
+                                 const QString& pid, 
+                                 const QString& machine,
+                                 const Registry::AllInfos* listclient )
 {
   for (CORBA::ULong i=0; i<listclient->length(); i++) {       
     const Registry::Infos & c_info=(*listclient)[i];
@@ -626,8 +626,8 @@ int ToolsGUI_RegWidget::numitem( const QString& name,
     QString b;
     b.setNum(int(c_info.pid));
     if ( (name.compare(QString(c_info.name)) == 0) && 
-        (machine.compare(QString(c_info.machine)) == 0) && 
-        (pid.compare(b) == 0) ) {
+         (machine.compare(QString(c_info.machine)) == 0) && 
+         (pid.compare(b) == 0) ) {
       return i;
     }
   }
index 1c9b3d5492055098a73b9bdaff83ed2dc1ad1d35..b1df2375c696b50536eb360023cf21655c9629fd 100755 (executable)
@@ -62,7 +62,7 @@ public:
   bool                       eventFilter( QObject* object, QEvent* event );
 
   static ToolsGUI_RegWidget* GetRegWidget( CORBA::ORB_var& orb, 
-                                          QWidget* parent = 0 );
+                                           QWidget* parent = 0 );
 
   virtual QMenu*             createPopupMenu();
 
@@ -77,9 +77,9 @@ public slots:
 protected:  
   static QString             setlongText( const Registry::Infos& c_info );
   int                        numitem( const QString& name, 
-                                     const QString& pid, 
-                                     const QString& machine, 
-                                     const Registry::AllInfos* clistclient );
+                                      const QString& pid, 
+                                      const QString& machine, 
+                                      const Registry::AllInfos* clistclient );
   void                       closeEvent( QCloseEvent* e );
    
 protected :
index 0f4429c2badb3363023fe4f443073305fc0395ec..57ee30ee875d4cdf081a72efdfb5ea6712452524 100644 (file)
@@ -52,16 +52,16 @@ class VTKVIEWER_EXPORT VTKViewer_Triangulator
 
   bool 
   Execute(vtkUnstructuredGrid *theInput,
-         vtkCellData* thInputCD,
-         vtkIdType theCellId,
-         int theShowInside,
-         int theAllVisible,
-         const char* theCellsVisibility,
-         vtkPolyData *theOutput,
-         vtkCellData* theOutputCD,
-         int theStoreMapping,
-         std::vector<vtkIdType>& theVTK2ObjIds,
-         bool theIsCheckConvex);
+          vtkCellData* thInputCD,
+          vtkIdType theCellId,
+          int theShowInside,
+          int theAllVisible,
+          const char* theCellsVisibility,
+          vtkPolyData *theOutput,
+          vtkCellData* theOutputCD,
+          int theStoreMapping,
+          std::vector<vtkIdType>& theVTK2ObjIds,
+          bool theIsCheckConvex);
 
  private:
   vtkIdList* myCellIds;
@@ -74,7 +74,7 @@ class VTKVIEWER_EXPORT VTKViewer_Triangulator
   virtual
   vtkPoints* 
   InitPoints(vtkUnstructuredGrid *theInput,
-            vtkIdType theCellId);
+             vtkIdType theCellId);
 
   virtual
   vtkIdType 
@@ -95,9 +95,9 @@ class VTKVIEWER_EXPORT VTKViewer_Triangulator
 
   void 
   GetCellNeighbors(vtkUnstructuredGrid *theInput,
-                  vtkIdType theCellId,
-                  vtkCell* theFace,
-                  vtkIdList* theCellIds);
+                   vtkIdType theCellId,
+                   vtkCell* theFace,
+                   vtkIdList* theCellIds);
 
   vtkIdType 
   GetConnectivity(vtkIdType thePntId);
@@ -121,7 +121,7 @@ class VTKVIEWER_EXPORT VTKViewer_OrderedTriangulator : public VTKViewer_Triangul
   virtual
   vtkPoints* 
   InitPoints(vtkUnstructuredGrid *theInput,
-            vtkIdType theCellId);
+             vtkIdType theCellId);
 
   virtual
   vtkIdType 
@@ -151,7 +151,7 @@ class VTKVIEWER_EXPORT VTKViewer_DelaunayTriangulator : public VTKViewer_Triangu
   virtual
   vtkPoints* 
   InitPoints(vtkUnstructuredGrid *theInput,
-            vtkIdType theCellId);
+             vtkIdType theCellId);
 
   virtual
   vtkIdType