From: nds Date: Thu, 15 Sep 2005 13:55:54 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d2edb71a1d57ae14d96c6c0148182be3b9e51a74;p=modules%2Fgui.git *** empty log message *** --- diff --git a/src/SVTK/Makefile.in b/src/SVTK/Makefile.in index e41cfb610..928dfd5eb 100755 --- a/src/SVTK/Makefile.in +++ b/src/SVTK/Makefile.in @@ -48,14 +48,9 @@ LIB_MOC = SVTK_RenderWindowInteractor.h \ SVTK_ViewModel.h \ SVTK_ViewManager.h -LIB_CLIENT_IDL = SALOMEDS.idl \ - SALOME_Exception.idl \ - SALOME_ModuleCatalog.idl \ - SALOME_GenericObj.idl +CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(BOOST_CPPFLAGS) -CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(BOOST_CPPFLAGS) -I$(KERNEL_ROOT_DIR)/include/salome - -LDFLAGS+=$(QT_MT_LIBS) $(OCC_LIBS) $(VTK_LIBS) -L$(KERNEL_ROOT_DIR)/lib/salome -LIBS+= -lsuit -lCAM -lSalomeObject -lSalomePrs -lVTKViewer -lOpUtil +LDFLAGS+=$(QT_MT_LIBS) $(OCC_LIBS) $(VTK_LIBS) +LIBS+= -lsuit -lCAM -lSalomeObject -lSalomePrs -lVTKViewer @CONCLUDE@ diff --git a/src/SVTK/SVTK_Actor.cxx b/src/SVTK/SVTK_Actor.cxx index 1ec5fa4b1..c958f2852 100644 --- a/src/SVTK/SVTK_Actor.cxx +++ b/src/SVTK/SVTK_Actor.cxx @@ -31,8 +31,6 @@ #include #include -//#include "utilities.h" - using namespace std; #ifdef _DEBUG_ diff --git a/src/SVTK/SVTK_InteractorStyle.cxx b/src/SVTK/SVTK_InteractorStyle.cxx index 0a5e19f49..6564c0007 100644 --- a/src/SVTK/SVTK_InteractorStyle.cxx +++ b/src/SVTK/SVTK_InteractorStyle.cxx @@ -29,8 +29,6 @@ #include "SVTK_InteractorStyle.h" -#include "utilities.h" - #include "VTKViewer_CellRectPicker.h" #include "VTKViewer_Utilities.h" #include "VTKViewer_RectPicker.h" @@ -74,12 +72,6 @@ using namespace std; -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - namespace { int @@ -147,7 +139,6 @@ SVTK_InteractorStyle SVTK_InteractorStyle ::~SVTK_InteractorStyle() { - if(MYDEBUG) INFOS("SVTK_InteractorStyle::~SVTK_InteractorStyle()"); myViewWindow->RemoveActor(myPreSelectionActor); } @@ -911,7 +902,6 @@ SVTK_InteractorStyle Handle(SALOME_InteractiveObject) anIO = aSActor->getIO(); if(aSelectionMode != EdgeOfCellSelection) { if(CheckDimensionId(aSelectionMode,aSActor,anObjId)){ - if(MYDEBUG) INFOS(" CellId : "<IsSelected(anIO)) { // This IO is already in the selection GetSelector()->AddOrRemoveIndex(anIO,anObjId,myShiftState); @@ -931,7 +921,6 @@ SVTK_InteractorStyle } int anEdgeId = GetEdgeId(picker,aSActor,anObjId); if (anEdgeId >= 0) { - if(MYDEBUG) INFOS(" CellId : "<AddOrRemoveIndex(anIO,anObjId,false); GetSelector()->AddOrRemoveIndex(anIO,-anEdgeId-1,true); GetSelector()->AddIObject(aSActor); @@ -957,7 +946,6 @@ SVTK_InteractorStyle this->HighlightProp( NULL ); GetSelector()->ClearIObjects(); } - if(MYDEBUG) INFOS(" PointId : "<AddOrRemoveIndex(anIO,anObjId,myShiftState); GetSelector()->AddIObject(aSActor); } @@ -1087,7 +1075,6 @@ SVTK_InteractorStyle continue; VTKViewer_CellDataSet cellList = picker->GetCellData(aActor); if ( !cellList.empty() ) { - if(MYDEBUG) INFOS ( " NAME Actor : " << aSActor->getName() ); TColStd_MapOfInteger anIndexes; VTKViewer_CellDataSet::iterator it; for ( it = cellList.begin(); it != cellList.end(); ++it ) { @@ -1273,7 +1260,6 @@ SVTK_InteractorStyle if(aResult){ mySelectedActor = aSActor; myElemId = anObjId; - if(MYDEBUG) INFOS(" CellId : "<setCellData(anObjId,aSActor,myPreSelectionActor); } } @@ -1288,7 +1274,6 @@ SVTK_InteractorStyle mySelectedActor = aSActor; myEdgeId = anEdgeId; myElemId = anObjId; - if(MYDEBUG) INFOS(" CellId : "<setEdgeData(anObjId,aSActor,-anEdgeId-1,myPreSelectionActor); } } @@ -1309,7 +1294,6 @@ SVTK_InteractorStyle if(!anIsSameObjId) { mySelectedActor = aSActor; myNodeId = anObjId; - if(MYDEBUG) INFOS(" PointId : "<setPointData(anObjId,aSActor,myPreSelectionActor); } myPreSelectionActor->GetProperty()->SetRepresentationToSurface(); diff --git a/src/SVTK/SVTK_RenderWindowInteractor.cxx b/src/SVTK/SVTK_RenderWindowInteractor.cxx index a80733492..55dd794e7 100644 --- a/src/SVTK/SVTK_RenderWindowInteractor.cxx +++ b/src/SVTK/SVTK_RenderWindowInteractor.cxx @@ -54,17 +54,8 @@ #include -#include "utilities.h" - using namespace std; -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - - SVTK_RenderWindowInteractor* SVTK_RenderWindowInteractor ::New() @@ -113,8 +104,6 @@ SVTK_RenderWindowInteractor SVTK_RenderWindowInteractor ::~SVTK_RenderWindowInteractor() { - if(MYDEBUG) INFOS("SVTK_RenderWindowInteractor::~SVTK_RenderWindowInteractor()"); - delete mTimer ; myViewWindow->RemoveActor(myCellActor); diff --git a/src/SVTK/SVTK_Selector.cxx b/src/SVTK/SVTK_Selector.cxx index 96690603e..7a18425d5 100644 --- a/src/SVTK/SVTK_Selector.cxx +++ b/src/SVTK/SVTK_Selector.cxx @@ -36,7 +36,6 @@ #include "SVTK_ViewWindow.h" #include "SVTK_SelectorDef.h" -#include "utilities.h" SVTK_SelectorDef ::SVTK_SelectorDef() diff --git a/src/SVTK/SVTK_ViewModel.cxx b/src/SVTK/SVTK_ViewModel.cxx index 17f0ac85c..02bdb6d64 100644 --- a/src/SVTK/SVTK_ViewModel.cxx +++ b/src/SVTK/SVTK_ViewModel.cxx @@ -20,33 +20,38 @@ #include "SALOME_Actor.h" #include "SALOME_InteractiveObject.hxx" -#include "Utils_ORB_INIT.hxx" -#include "Utils_SINGLETON.hxx" -#include "SALOME_ModuleCatalog_impl.hxx" -#include "SALOME_NamingService.hxx" +// Temporarily commented to avoid awful dependecy on SALOMEDS +// TODO: better mechanism of storing display/erse status in a study +// should be provided... +//#include "Utils_ORB_INIT.hxx" +//#include "Utils_SINGLETON.hxx" +//#include "SALOME_ModuleCatalog_impl.hxx" +//#include "SALOME_NamingService.hxx" -#include "SALOMEDSClient.hxx" -#include "SALOMEDS_StudyManager.hxx" +//#include "SALOMEDSClient.hxx" +//#include "SALOMEDS_StudyManager.hxx" // in order NOT TO link with SalomeApp, here the code returns SALOMEDS_Study. // SalomeApp_Study::studyDS() does it as well, but -- here it is retrieved from // SALOMEDS::StudyManager - no linkage with SalomeApp. -static _PTR(Study) getStudyDS() -{ - SALOMEDSClient_Study* aStudy = NULL; - _PTR(StudyManager) aMgr( new SALOMEDS_StudyManager() ); - +// Temporarily commented to avoid awful dependecy on SALOMEDS +// TODO: better mechanism of storing display/erse status in a study +// should be provided... +//static _PTR(Study) getStudyDS() +//{ +// SALOMEDSClient_Study* aStudy = NULL; +// _PTR(StudyManager) aMgr( new SALOMEDS_StudyManager() ); // get id of SUIT_Study, if it's a SalomeApp_Study, it will return // id of its underlying SALOMEDS::Study - SUIT_Application* app = SUIT_Session::session()->activeApplication(); - if ( !app ) return _PTR(Study)(aStudy); - SUIT_Study* stud = app->activeStudy(); - if ( !stud ) return _PTR(Study)(aStudy); - const int id = stud->id(); // virtual method, must return SALOMEDS_Study id +// SUIT_Application* app = SUIT_Session::session()->activeApplication(); +// if ( !app ) return _PTR(Study)(aStudy); +// SUIT_Study* stud = app->activeStudy(); +// if ( !stud ) return _PTR(Study)(aStudy); +// const int id = stud->id(); // virtual method, must return SALOMEDS_Study id // get SALOMEDS_Study with this id from StudyMgr - return aMgr->GetStudyByID( id ); -} +// return aMgr->GetStudyByID( id ); +//} //========================================================== SVTK_Viewer::SVTK_Viewer() @@ -254,15 +259,21 @@ SVTK_Viewer return; if(vtkActorCollection* anActorCollection = aPrs->GetObjects()){ // get SALOMEDS Study - _PTR(Study) aStudy(getStudyDS()); + // Temporarily commented to avoid awful dependecy on SALOMEDS + // TODO: better mechanism of storing display/erse status in a study + // should be provided... + // _PTR(Study) aStudy(getStudyDS()); anActorCollection->InitTraversal(); while(vtkActor* anActor = anActorCollection->GetNextActor()){ if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){ // Set visibility flag - Handle(SALOME_InteractiveObject) anObj = anAct->getIO(); - if(!anObj.IsNull() && anObj->hasEntry() && aStudy){ - ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),true,this); - } + // 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 QPtrVector aViews = myViewManager->getViews(); for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){ @@ -295,15 +306,21 @@ SVTK_Viewer return; if(vtkActorCollection* anActorCollection = aPrs->GetObjects()){ // get SALOMEDS Study - _PTR(Study) aStudy(getStudyDS()); + // Temporarily commented to avoid awful dependecy on SALOMEDS + // TODO: better mechanism of storing display/erse status in a study + // should be provided... + //_PTR(Study) aStudy(getStudyDS()); anActorCollection->InitTraversal(); while(vtkActor* anActor = anActorCollection->GetNextActor()) if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){ // Set visibility flag - Handle(SALOME_InteractiveObject) anObj = anAct->getIO(); - if(!anObj.IsNull() && anObj->hasEntry() && aStudy){ - ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),false,this); - } + // 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 QPtrVector aViews = myViewManager->getViews(); for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){ @@ -325,7 +342,10 @@ void SVTK_Viewer ::EraseAll( const bool forced ) { - _PTR(Study) aStudy(getStudyDS()); + // Temporarily commented to avoid awful dependecy on SALOMEDS + // TODO: better mechanism of storing display/erse status in a study + // should be provided... + //_PTR(Study) aStudy(getStudyDS()); QPtrVector aViews = myViewManager->getViews(); for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){ if(SUIT_ViewWindow* aViewWindow = aViews.at(i)){ @@ -336,9 +356,12 @@ SVTK_Viewer while(vtkActor* anActor = anActorCollection->GetNextActor()){ if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){ // Set visibility flag - Handle(SALOME_InteractiveObject) anObj = anAct->getIO(); - if(!anObj.IsNull() && anObj->hasEntry() && aStudy) - ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),false,this); + // 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{ diff --git a/src/SalomeApp/SalomeApp_Dialog.cxx b/src/SalomeApp/SalomeApp_Dialog.cxx deleted file mode 100644 index d708776ee..000000000 --- a/src/SalomeApp/SalomeApp_Dialog.cxx +++ /dev/null @@ -1,860 +0,0 @@ -// File: SalomeApp_Dialog.cxx -// Author: Alexander SOLOVYOV - -#include -#include - -#include -#include -#include - -/* - Class : SalomeApp_Dialog - Description : Base class for all SALOME dialogs -*/ - -//======================================================================= -// name : SalomeApp_Dialog -// Purpose : Constructor -//======================================================================= -SalomeApp_Dialog::SalomeApp_Dialog( QWidget* parent, const char* name, bool modal, - bool allowResize, const int f, WFlags wf ) -: QtxDialog( parent, name, modal, allowResize, f, wf ), - myIsExclusive( true ), - myIsBusy( false ) -{ - setObjectPixmap( "SalomeApp", tr( "ICON_SELECT" ) ); -} - -//======================================================================= -// name : ~SalomeApp_Dialog -// Purpose : Destructor -//======================================================================= -SalomeApp_Dialog::~SalomeApp_Dialog() -{ -} - -//======================================================================= -// name : show -// Purpose : -//======================================================================= -void SalomeApp_Dialog::show() -{ - QtxDialog::show(); -} - -//======================================================================= -// name : isExclusive -// Purpose : -//======================================================================= -bool SalomeApp_Dialog::isExclusive() const -{ - return myIsExclusive; -} - -//======================================================================= -// name : updateButtons -// Purpose : -//======================================================================= -void SalomeApp_Dialog::updateButtons( const int _id ) -{ - if( !myIsExclusive ) - return; - - int id = _id; - - ObjectMap::const_iterator anIt = myObjects.begin(), - aLast = myObjects.end(); - for( ; anIt!=aLast; anIt++ ) - { - QToolButton* but = (QToolButton*)anIt.data().myBtn; - if( but && but->isOn() ) - { - if( id==-1 ) - id = anIt.key(); - - if( anIt.key()!=id ) - but->setOn( false ); - } - } -} - -//======================================================================= -// name : setExclusive -// Purpose : -//======================================================================= -void SalomeApp_Dialog::setExclusive( const bool ex ) -{ - myIsExclusive = ex; - updateButtons(); -} - -//======================================================================= -// name : showObject -// Purpose : -//======================================================================= -void SalomeApp_Dialog::showObject( const int id ) -{ - setObjectShown( id, true ); -} - -//======================================================================= -// name : hideObject -// Purpose : -//======================================================================= -void SalomeApp_Dialog::hideObject( const int id ) -{ - setObjectShown( id, false ); -} - -//======================================================================= -// name : setObjectShown -// Purpose : -//======================================================================= -void SalomeApp_Dialog::setObjectShown( const int id, const bool shown ) -{ - if( myObjects.contains( id ) && isObjectShown( id )!=shown ) - { - Object& obj = myObjects[ id ]; - obj.myEdit->setShown( shown ); - obj.myBtn->setShown( shown ); - obj.myLabel->setShown( shown ); - if( !shown ) - ( ( QToolButton* )obj.myBtn )->setOn( false ); - } -} - -//======================================================================= -// name : isObjectShown -// Purpose : -//======================================================================= -bool SalomeApp_Dialog::isObjectShown( const int id ) const -{ - return myObjects.contains( id ) && myObjects[ id ].myEdit->isShown(); -} - -//======================================================================= -// name : setObjectEnabled -// Purpose : -//======================================================================= -void SalomeApp_Dialog::setObjectEnabled( const int id, const bool en ) -{ - if( myObjects.contains( id ) && isObjectEnabled( id )!=en ) - { - Object& obj = myObjects[ id ]; - obj.myEdit->setEnabled( en ); - obj.myBtn->setEnabled( en ); -// obj.myLabel->setEnabled( en ); - if( !en ) - ( ( QToolButton* )obj.myBtn )->setOn( false ); - } -} - -//======================================================================= -// name : isObjectEnabled -// Purpose : -//======================================================================= -bool SalomeApp_Dialog::isObjectEnabled( const int id ) const -{ - return myObjects.contains( id ) && myObjects[ id ].myEdit->isEnabled(); -} - -//======================================================================= -// name : selectObject -// Purpose : -//======================================================================= -void SalomeApp_Dialog::selectObject( const QString& name, const int type, const QString& id, const bool update ) -{ - QStringList names; names.append( name ); - TypesList types; types.append( type ); - QStringList ids; ids.append( id ); - selectObject( names, types, ids, update ); -} - -//======================================================================= -// name : selectObject -// Purpose : -//======================================================================= -void SalomeApp_Dialog::selectObject( const QStringList& _names, - const TypesList& _types, - const QStringList& _ids, - const bool update ) -{ - ObjectMap::iterator anIt = myObjects.begin(), - aLast = myObjects.end(); - for( ; anIt!=aLast; anIt++ ) - if( anIt.data().myBtn->isOn() ) - selectObject( anIt.key(), _names, _types, _ids, update ); -} - -//======================================================================= -// name : hasSelection -// Purpose : -//======================================================================= -bool SalomeApp_Dialog::hasSelection( const int id ) const -{ - return myObjects.contains( id ) && !myObjects[ id ].myIds.isEmpty(); -} - -//======================================================================= -// name : clearSelection -// Purpose : -//======================================================================= -void SalomeApp_Dialog::clearSelection( const int id ) -{ - if( id==-1 ) - { - ObjectMap::const_iterator anIt = myObjects.begin(), - aLast = myObjects.end(); - for( ; anIt!=aLast; anIt++ ) - clearSelection( anIt.key() ); - } - - else if( myObjects.contains( id ) ) - { - myObjects[ id ].myIds.clear(); - myObjects[ id ].myTypes.clear(); - myObjects[ id ].myNames.clear(); - - myObjects[ id ].myEdit->setText( QString::null ); - emit selectionChanged( id ); - } -} - -//======================================================================= -// name : objectWg -// Purpose : -//======================================================================= -QWidget* SalomeApp_Dialog::objectWg( const int theId, const int theWgId ) const -{ - QWidget* aResWg = 0; - if( myObjects.contains( theId ) ) - { - if ( theWgId == Label ) - aResWg = myObjects[ theId ].myLabel; - else if ( theWgId == Btn ) - aResWg = myObjects[ theId ].myBtn; - else if ( theWgId == Control ) - aResWg = myObjects[ theId ].myEdit; - } - return aResWg; -} - -//======================================================================= -// name : objectText -// Purpose : -//======================================================================= -QString SalomeApp_Dialog::objectText( const int theId ) const -{ - return myObjects.contains( theId ) ? myObjects[ theId ].myEdit->text() : ""; -} - -//======================================================================= -// name : setObjectText -// Purpose : -//======================================================================= -void SalomeApp_Dialog::setObjectText( const int theId, const QString& theText ) -{ - if ( myObjects.contains( theId ) ) - myObjects[ theId ].myEdit->setText( theText ); -} - -//======================================================================= -// name : selectedObject -// Purpose : -//======================================================================= -void SalomeApp_Dialog::selectedObject( const int id, QStringList& list ) const -{ - if( myObjects.contains( id ) ) - list = myObjects[ id ].myIds; -} - -//======================================================================= -// name : selectedObject -// Purpose : -//======================================================================= -QString SalomeApp_Dialog::selectedObject( const int id ) const -{ - if ( myObjects.contains( id ) && myObjects[ id ].myIds.count() > 0 ) - return myObjects[ id ].myIds.first(); - else - return ""; -} - -//======================================================================= -// name : objectSelection -// Purpose : -//======================================================================= -void SalomeApp_Dialog::objectSelection( SelectedObjects& objs ) const -{ - //objs.clear(); - ObjectMap::const_iterator anIt = myObjects.begin(), - aLast = myObjects.end(); - for( ; anIt!=aLast; anIt++ ) - { - QStringList ids; - selectedObject( anIt.key(), ids ); - if( !ids.isEmpty() ) - objs.insert( anIt.key(), ids ); - } -} - -//======================================================================= -// name : createObject -// Purpose : -//======================================================================= -int SalomeApp_Dialog::createObject( const QString& label, QWidget* parent, const int id ) -{ - int nid = id; - if( nid<0 ) - for( nid=0; myObjects.contains( nid ); nid++ ); - - if( !myObjects.contains( nid ) ) - { - QLabel* lab = new QLabel( label, parent ); - myObjects[ nid ].myLabel = lab; - - QToolButton* but = new QToolButton( parent ); - but->setIconSet( QIconSet( myPixmap ) ); - but->setToggleButton( true ); - but->setMaximumWidth( but->height() ); - but->setMinimumWidth( but->height() ); - connect( but, SIGNAL( toggled( bool ) ), this, SLOT( onToggled( bool ) ) ); - myObjects[ nid ].myBtn = but; - - QLineEdit* ne = new QLineEdit( parent ); - ne->setReadOnly( true ); - ne->setMinimumWidth( 150 ); - connect( ne, SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) ); - myObjects[ nid ].myEdit = ne; - - myObjects[ nid ].myNI = OneNameOrCount; - } - return nid; -} - -//======================================================================= -// name : renameObject -// Purpose : -//======================================================================= -void SalomeApp_Dialog::renameObject( const int id, const QString& label ) -{ - if( myObjects.contains( id ) ) - myObjects[ id ].myLabel->setText( label ); -} - -//======================================================================= -// name : setObjectType -// Purpose : -//======================================================================= -void SalomeApp_Dialog::setObjectType( const int id, const int type1, ... ) -{ - TypesList types; - - const int* tt = &type1; - while( *tt>=0 ) - { - types.append( *tt ); - tt++; - } - - setObjectType( id, types ); -} - -//======================================================================= -// name : setObjectType -// Purpose : -//======================================================================= -void SalomeApp_Dialog::setObjectType( const int id, const TypesList& list ) -{ - if( !myObjects.contains( id ) ) - return; - - TypesList& internal = myObjects[ id ].myPossibleTypes; - - QMap types; - TypesList::const_iterator anIt = list.begin(), - aLast = list.end(); - for( ; anIt!=aLast; anIt++ ) - types.insert( *anIt, 0 ); - - - internal.clear(); - QMap::const_iterator aMIt = types.begin(), - aMLast = types.end(); - for( ; aMIt!=aMLast; aMIt++ ) - internal.append( aMIt.key() ); - - updateObject( id ); -} - -//======================================================================= -// name : addObjectType -// Purpose : -//======================================================================= -void SalomeApp_Dialog::addObjectType( const int id, const int type1, const int, ... ) -{ - TypesList types; objectTypes( id, types ); - - const int* tt = &type1; - while( *tt>=0 ) - { - types.append( *tt ); - tt++; - } - - setObjectType( id, types ); -} - -//======================================================================= -// name : addObjectType -// Purpose : -//======================================================================= -void SalomeApp_Dialog::addObjectType( const int id, const TypesList& list ) -{ - TypesList types = list; objectTypes( id, types ); - setObjectType( id, types ); -} - -//======================================================================= -// name : addObjectType -// Purpose : -//======================================================================= -void SalomeApp_Dialog::addObjectType( const int id, const int type ) -{ - TypesList types; objectTypes( id, types ); - types.append( type ); - setObjectType( id, types ); -} - -//======================================================================= -// name : removeObjectType -// Purpose : -//======================================================================= -void SalomeApp_Dialog::removeObjectType( const int id ) -{ - TypesList types; - setObjectType( id, types ); -} - -//======================================================================= -// name : removeObjectType -// Purpose : -//======================================================================= -void SalomeApp_Dialog::removeObjectType( const int id, const TypesList& list ) -{ - if( !myObjects.contains( id ) ) - return; - - TypesList& internal = myObjects[ id ].myPossibleTypes; - - QMap types; - TypesList::const_iterator anIt = internal.begin(), - aLast = internal.end(); - for( ; anIt!=aLast; anIt++ ) - types.insert( *anIt, 0 ); - anIt = list.begin(); aLast = list.end(); - for( ; anIt!=aLast; anIt++ ) - types.remove( *anIt ); - - - internal.clear(); - QMap::const_iterator aMIt = types.begin(), - aMLast = types.end(); - for( ; aMIt!=aMLast; aMIt++ ) - internal.append( aMIt.key() ); - - updateObject( id ); -} - -//======================================================================= -// name : removeObjectType -// Purpose : -//======================================================================= -void SalomeApp_Dialog::removeObjectType( const int id, const int type ) -{ - TypesList list; list.append( type ); - removeObjectType( id, list ); -} - -//======================================================================= -// name : hasObjectType -// Purpose : -//======================================================================= -bool SalomeApp_Dialog::hasObjectType( const int id, const int type ) const -{ - if( myObjects.contains( id ) ) - return myObjects[ id ].myPossibleTypes.contains( type ); - else - return false; -} - -//======================================================================= -// name : objectTypes -// Purpose : -//======================================================================= -void SalomeApp_Dialog::objectTypes( const int id, TypesList& list ) const -{ - if( myObjects.contains( id ) ) - { - TypesList::const_iterator anIt = myObjects[ id ].myPossibleTypes.begin(), - aLast = myObjects[ id ].myPossibleTypes.end(); - for( ; anIt!=aLast; anIt++ ) - list.append( *anIt ); - } -} - -//======================================================================= -// name : onToggled -// Purpose : -//======================================================================= -void SalomeApp_Dialog::onToggled( bool on ) -{ - QButton* but = ( QButton* )sender(); - int id = -1; - - if( !but ) - return; - - ObjectMap::const_iterator anIt = myObjects.begin(), - aLast = myObjects.end(); - for( ; anIt!=aLast && id==-1; anIt++ ) - if( anIt.data().myBtn==but ) - id = anIt.key(); - - if( id!=-1 ) - if( on ) - { - emit objectActivated( id ); - updateButtons( id ); - } - else - emit objectDeactivated( id ); -} - -//======================================================================= -// name : updateObject -// Purpose : -//======================================================================= -void SalomeApp_Dialog::updateObject( const int id, bool emit_signal ) -{ - if( hasSelection( id ) ) - { - Object& obj = myObjects[ id ]; - filterTypes( id, obj.myNames, obj.myTypes, obj.myIds ); - obj.myEdit->setText( selectionDescription( obj.myNames, obj.myTypes, obj.myNI ) ); - if( emit_signal ) - emit selectionChanged( id ); - } -} - -//======================================================================= -// name : filterTypes -// Purpose : -//======================================================================= -void SalomeApp_Dialog::filterTypes( const int id, QStringList& names, TypesList& types, QStringList& ids ) const -{ - if( !myObjects.contains( id ) ) - return; - - const Object& obj = myObjects[ id ]; - if( obj.myPossibleTypes.isEmpty() ) - return; - - QStringList new_names, new_ids; - TypesList new_types; - - TypesList::const_iterator anIt1 = types.begin(), - aLast = types.end(); - QStringList::const_iterator anIt2 = names.begin(), - anIt3 = ids.begin(); - for( ; anIt1!=aLast; anIt1++, anIt2++, anIt3++ ) - if( obj.myPossibleTypes.contains( *anIt1 ) ) - { - if( new_types.count()==1 && !multipleSelection( id ) ) - break; - - new_names.append( *anIt2 ); - new_types.append( *anIt1 ); - new_ids.append( *anIt3 ); - } - names = new_names; - types = new_types; - ids = new_ids; -} - -//======================================================================= -// name : resMgr -// Purpose : -//======================================================================= -SUIT_ResourceMgr* SalomeApp_Dialog::resMgr() const -{ - return SUIT_Session::session()->resourceMgr(); -} - -//======================================================================= -// name : setObjectPixmap -// Purpose : -//======================================================================= -void SalomeApp_Dialog::setObjectPixmap( const QPixmap& p ) -{ - myPixmap = p; - ObjectMap::const_iterator anIt = myObjects.begin(), - aLast = myObjects.end(); - for( ; anIt!=aLast; anIt++ ) - ( ( QToolButton* )anIt.data().myBtn )->setIconSet( p ); -} - -//======================================================================= -// name : setObjectPixmap -// Purpose : -//======================================================================= -void SalomeApp_Dialog::setObjectPixmap( const QString& section, const QString& file ) -{ - SUIT_ResourceMgr* mgr = resMgr(); - if( mgr ) - setObjectPixmap( mgr->loadPixmap( section, file ) ); -} - -//======================================================================= -// name : multipleSelection -// Purpose : -//======================================================================= -bool SalomeApp_Dialog::multipleSelection( const int id ) const -{ - return nameIndication( id )!=OneName; -} - -//======================================================================= -// name : nameIndication -// Purpose : -//======================================================================= -SalomeApp_Dialog::NameIndication SalomeApp_Dialog::nameIndication( const int id ) const -{ - if( myObjects.contains( id ) ) - return myObjects[ id ].myNI; - else - return OneNameOrCount; -} - -//======================================================================= -// name : setNameIndication -// Purpose : -//======================================================================= -void SalomeApp_Dialog::setNameIndication( const int id, const NameIndication ni ) -{ - if( id==-1 ) - { - ObjectMap::iterator anIt = myObjects.begin(), - aNext, - aLast = myObjects.end(); - for( ; anIt!=aLast; anIt++ ) - { - anIt.data().myNI = ni; - setReadOnly( anIt.key(), isReadOnly( anIt.key() ) ); - aNext = anIt; aNext++; - updateObject( anIt.key(), aNext==aLast ); - } - } - else if( myObjects.contains( id ) ) - { - myObjects[ id ].myNI = ni; - setReadOnly( id, isReadOnly( id ) ); - updateObject( id, true ); - } -} - -//======================================================================= -// name : selectionDescription -// Purpose : -//======================================================================= -QString SalomeApp_Dialog::selectionDescription( const QStringList& names, const TypesList& types, const NameIndication ni ) const -{ - if( names.count()!=types.count() ) - return "SalomeApp_Dialog::selectionDescription(): Error!!!"; - - if( names.isEmpty() ) - return QString::null; - - switch( ni ) - { - case OneName: - return names.first(); - break; - - case OneNameOrCount: - if( names.count()==1 ) - return names.first(); - else - return countOfTypes( types ); - break; - - case ListOfNames: - return names.join( " " ); - break; - - case Count: - return countOfTypes( types ); - break; - }; - return QString::null; -} - -//======================================================================= -// name : countOfTypes -// Purpose : -//======================================================================= -QString SalomeApp_Dialog::countOfTypes( const TypesList& types ) const -{ - QMap typesCount; - QStringList typeCount; - - TypesList::const_iterator anIt = types.begin(), - aLast = types.end(); - for( ; anIt!=aLast; anIt++ ) - if( typesCount.contains( *anIt ) ) - typesCount[ *anIt ]++; - else - typesCount[ *anIt ] = 1; - - QMap::const_iterator aMIt = typesCount.begin(), - aMLast = typesCount.end(); - for( ; aMIt!=aMLast; aMIt++ ) - typeCount.append( QString( "%1 %2" ).arg( aMIt.data() ).arg( typeName( aMIt.key() ) ) ); - - return typeCount.join( ", " ); -} - -//======================================================================= -// name : typeName -// Purpose : -//======================================================================= -QString& SalomeApp_Dialog::typeName( const int type ) -{ - return myTypeNames[ type ]; -} - -//======================================================================= -// name : typeName -// Purpose : -//======================================================================= -const QString& SalomeApp_Dialog::typeName( const int type ) const -{ - return myTypeNames[ type ]; -} - - -//======================================================================= -// name : activateObject -// Purpose : -//======================================================================= -void SalomeApp_Dialog::activateObject( const int theId ) -{ - if ( myObjects.contains( theId ) && !myObjects[ theId ].myBtn->isOn() ) - myObjects[ theId ].myBtn->toggle(); -} - -//======================================================================= -// name : deactivateAll -// Purpose : -//======================================================================= -void SalomeApp_Dialog::deactivateAll() -{ - ObjectMap::iterator anIt = myObjects.begin(), - aLast = myObjects.end(); - for( ; anIt!=aLast; anIt++ ) - { - QToolButton* btn = ( QToolButton* )anIt.data().myBtn; - btn->setOn( false ); - } -} - -//======================================================================= -// name : selectObject -// Purpose : -//======================================================================= -void SalomeApp_Dialog::selectObject( const int id, const QString& name, const int type, const QString& selid, const bool update ) -{ - QStringList names; names.append( name ); - TypesList types; types.append( type ); - QStringList ids; ids.append( selid ); - selectObject( id, names, types, ids, update ); -} - -//======================================================================= -// name : selectObject -// Purpose : -//======================================================================= -void SalomeApp_Dialog::selectObject( const int id, const QStringList& _names, const TypesList& _types, - const QStringList& _ids, const bool update ) -{ - if( !myObjects.contains( id ) ) - return; - - QStringList names = _names, ids = _ids; - TypesList types = _types; - - filterTypes( id, names, types, ids ); - - Object& obj = myObjects[ id ]; - if( update ) - obj.myEdit->setText( selectionDescription( names, types, obj.myNI ) ); - obj.myTypes = types; - obj.myIds = ids; - obj.myNames = names; - - emit selectionChanged( id ); -} - -//======================================================================= -// name : setReadOnly -// Purpose : -//======================================================================= -void SalomeApp_Dialog::setReadOnly( const int id, const bool ro ) -{ - if( myObjects.contains( id ) ) - myObjects[ id ].myEdit->setReadOnly( nameIndication( id )==ListOfNames || nameIndication( id )==OneName ? ro : true ); -} - -//======================================================================= -// name : isReadOnly -// Purpose : -//======================================================================= -bool SalomeApp_Dialog::isReadOnly( const int id ) const -{ - if( myObjects.contains( id ) ) - return myObjects[ id ].myEdit->isReadOnly(); - else - return true; -} - -//======================================================================= -// name : onTextChanged -// Purpose : -//======================================================================= -void SalomeApp_Dialog::onTextChanged( const QString& text ) -{ - if( myIsBusy ) - return; - - myIsBusy = true; - - if( sender() && sender()->inherits( "QLineEdit" ) ) - { - QLineEdit* edit = ( QLineEdit* )sender(); - int id = -1; - ObjectMap::const_iterator anIt = myObjects.begin(), - aLast = myObjects.end(); - for( ; anIt!=aLast; anIt++ ) - if( anIt.data().myEdit == edit ) - id = anIt.key(); - - if( id>=0 && !isReadOnly( id ) ) - { - QStringList list = QStringList::split( " ", text ); - emit objectChanged( id, list ); - } - } - - myIsBusy = false; -} diff --git a/src/SalomeApp/SalomeApp_Dialog.h b/src/SalomeApp/SalomeApp_Dialog.h deleted file mode 100644 index 8ffba8309..000000000 --- a/src/SalomeApp/SalomeApp_Dialog.h +++ /dev/null @@ -1,266 +0,0 @@ -// File: SalomeApp_Dialog.h -// Author: Alexander SOLOVYOV - -#ifndef SALOMEAPP_DIALOG_H -#define SALOMEAPP_DIALOG_H - -#include - -#include -#include -#include - -class QLineEdit; -class QButton; -class QLabel; - -class SUIT_ResourceMgr; - -/* - Class : SalomeApp_Dialog - Description : Base class for all SALOME dialogs -*/ -class SalomeApp_Dialog : public QtxDialog -{ - Q_OBJECT - -public: - typedef QValueList TypesList; - typedef QMap SelectedObjects; - - enum ObjectWg - { - Label = 0x00000001, - Btn = 0x00000002, - Control = 0x00000004 - }; - - typedef enum - { - OneName, // " is shown - ListOfNames, //! list of all names is shown - Count //! In every case " " is shown - - } NameIndication; - //! The enumeration describing how names of selected objects will be shown in line edit - //! For more details see above - -public: - SalomeApp_Dialog( QWidget* = 0, const char* = 0, bool = false, - bool = false, const int = Standard, WFlags = 0 ); - virtual ~SalomeApp_Dialog(); - - virtual void show(); - - //! Check if buttons is exclusive (as radiobuttons) - bool isExclusive() const; - - //! Set exclusive state - void setExclusive( const bool ); - - //! Check if operation according to dialog will be resumed automatically when mouse enter the dialog - bool isAutoResumed() const; - - //! Set auto resumed state - void setAutoResumed( const bool ); - - //! Show widgets corresponding to id - void showObject( const int ); - - //! Hide widgets corresponding to id - void hideObject( const int ); - - //! Change the shown state of widgets corresponding to id - void setObjectShown( const int, const bool ); - - //! Check the shown state - bool isObjectShown( const int ) const; - - //! Change the enabled state of widgets corresponding to id - void setObjectEnabled( const int, const bool ); - - //! Check the enabled state - bool isObjectEnabled( const int ) const; - - //! Get widget of object (see ObjectWg enumeration) - QWidget* objectWg( const int theId, const int theWgId ) const; - - //! Pass to all active widgets name, type and id of selected object - void selectObject( const QString&, const int, const QString&, const bool = true ); - - /*! - Pass to all active widgets list of names, types and ids of selected objects - Every active widget filters list and accept only objects with possible types - */ - void selectObject( const QStringList&, const TypesList&, const QStringList&, const bool = true ); - - //! Get text of object's control - QString objectText( const int ) const; - - //! Set text of object's control - void setObjectText( const int, const QString& ); - - //! Select in certain widget avoiding check if there is active widget - void selectObject( const int, const QString&, const int, const QString&, const bool = true ); - void selectObject( const int, const QStringList&, const TypesList&, const QStringList&, const bool = true ); - - //! Check if certain widget has selection - bool hasSelection( const int ) const; - - //! Clear selection in widgets. If parameter is -1, then selection in all widgets will be cleared - void clearSelection( const int = -1 ); - - //! Get ids list of object selected in certain widget - void selectedObject( const int, QStringList& ) const; - - //! Get ids list of object selected in certain widget - QString selectedObject( const int ) const; - - //! Get map "widget id -> ids list" - void objectSelection( SelectedObjects& ) const; - - //! Activate object selection button - void activateObject( const int ); - - //! Set all object selection buttons to inactive state - void deactivateAll(); - -signals: - //! selection in certain widget is changed - void selectionChanged ( int ); - - //! selection in certain widget is on - void objectActivated ( int ); - - //! selection in certain widget is off - void objectDeactivated( int ); - - /* - text representation of selection is changed - it is emitted only if "read only" state of line edit is false - */ - void objectChanged( int, const QStringList& ); - -protected: - //! Finds and returns resource manager - SUIT_ResourceMgr* resMgr() const; - - /*! Create label, button and line edit for object selection - * If passed id is negative, then id will be calculated automatically (first free id) - * Returns the same id (if id>=0) or calculated - */ - int createObject ( const QString&, QWidget*, const int = -1 ); - - //! Set pixmap as icon for all selection buttons - void setObjectPixmap ( const QPixmap& ); - - //! Load pixmap with section, name using resource manager and set as icon for all selection buttons - void setObjectPixmap ( const QString&, const QString& ); - - //! Change label - void renameObject ( const int, const QString& ); - - //! Set possible types for certain id. The list of arguments must be finished by negative integer - void setObjectType ( const int, const int, ... ); - - //! Set list as possible types for object selection - void setObjectType ( const int, const TypesList& ); - - /*! - Add types to list of possible types - The list of arguments must be finished by negative integer - */ - void addObjectType ( const int, const int, const int, ... ); - - //! Add types to list of possible types - void addObjectType ( const int, const TypesList& ); - - //! Add type to list of possible types - void addObjectType ( const int, const int ); - - //! Clear list of possible types (it means, that all types are welcome) - void removeObjectType( const int ); - - //! Remove types in list from list of possible types - void removeObjectType( const int, const TypesList& ); - - //! Remove a type from list of possible types - void removeObjectType( const int, const int ); - - //! Check if list of possible types contains this one - bool hasObjectType ( const int, const int ) const; - - //! Return list of possible types - void objectTypes ( const int, TypesList& ) const; - - //!Change and get type name for indicating in selection widget - QString& typeName( const int ); - const QString& typeName( const int ) const; - - //! Create string contains selection list by list of names, list of types and current name indication state - virtual QString selectionDescription( const QStringList&, const TypesList&, const NameIndication ) const; - - //! Create string by pattern " " for current list of types - virtual QString countOfTypes( const TypesList& ) const; - - //! Get and set name indication for certain widget - NameIndication nameIndication( const int ) const; - void setNameIndication( const int, const NameIndication ); - - //! Check using name indication if multiple selection in possible - bool multipleSelection( const int ) const; - - //! Set the "read only" state of object selection line edit - //! The "read only" will be false only if name indication is ListOfNames - void setReadOnly( const int, const bool ); - - //! Check the "read only" state of object selection line edit - bool isReadOnly( const int ) const; - -private slots: - //! emits if the object selection button changes state - void onToggled( bool ); - - //! text in some line edit is changed - void onTextChanged( const QString& ); - -private: - /*! - If buttons are exclusive, set to "off" all buttons except one with id - If id=-1, then all buttons, except first with "on" state, will be set to "off" - */ - void updateButtons( const int = -1 ); - - /*! - Filter types and update selection string in line edit - If bool is true, then signal is emitted - */ - void updateObject( const int, bool = true ); - - //! Remove from list not possible types and remove from names and ids lists the corresponding items - void filterTypes( const int, QStringList&, TypesList&, QStringList& ) const; - -private: - typedef struct - { - QLineEdit* myEdit; - QButton* myBtn; - QLabel* myLabel; - QStringList myNames, myIds; - TypesList myTypes, myPossibleTypes; - NameIndication myNI; - - } Object; - - typedef QMap ObjectMap; - -private: - ObjectMap myObjects; - QMap myTypeNames; - bool myIsExclusive, myIsBusy; - QPixmap myPixmap; -}; - -#endif diff --git a/src/SalomeApp/SalomeApp_Operation.cxx b/src/SalomeApp/SalomeApp_Operation.cxx deleted file mode 100755 index 267229156..000000000 --- a/src/SalomeApp/SalomeApp_Operation.cxx +++ /dev/null @@ -1,290 +0,0 @@ -// SALOME SalomeApp -// -// Copyright (C) 2005 CEA/DEN, EDF R&D -// -// -// -// File : SalomeApp_Operation.h -// Author : Sergey LITONIN -// Module : SALOME - -#include -#include -#include -#include -#include -#include - -#include - -#include - - -/*! - * \brief Constructor -* -* Constructor sets myModule in NULL and myIsAutoResumed in TRUE -*/ -SalomeApp_Operation::SalomeApp_Operation() -: SUIT_Operation( 0 ), - myModule( 0 ), - myIsAutoResumed( true ) -{ -} - -/*! - * \brief Destructor -* -* Destructor does nothing -*/ -SalomeApp_Operation::~SalomeApp_Operation() -{ - -} - -/*! - * \brief Gets module of operation - * \return Pointer to the module -* -* Gets pointer to the module or NULL if module was not set. It is strongly recomended to -* set valid pointer on the module before start of operation -*/ -SalomeApp_Module* SalomeApp_Operation::module() const -{ - return myModule; -} - - -/*! - * \brief Sets module of operation - * \param theModule - module to be set -* -* Sets pointer to the module. It is strongly recomended to set valid pointer on the -* module before start of operation -*/ -void SalomeApp_Operation::setModule( SalomeApp_Module* theModule ) -{ - myModule = theModule; - setApplication( myModule ? myModule->application() : 0 ); - setStudy( application() ? application()->activeStudy() : 0 ); -} - -/*! - * \brief Gets desktop of operation - * \return Pointer to the desktop -* -* Gets pointer to the desktop or NULL if application was not set. It is strongly recomended -* to set valid pointer on the application before start of operation -*/ -SUIT_Desktop* SalomeApp_Operation::desktop() const -{ - return application() != 0 ? application()->desktop() : 0; -} - -/*! - * \brief Enable dialog of operation -* -* Virtual method redefined from the base class. Enable dialog if it was desabled (in -* suspend method) and activate selection -*/ -void SalomeApp_Operation::resumeOperation() -{ - SUIT_Operation::resumeOperation(); - setDialogActive( true ); -} - -/*! - * \brief Performs actions needed for starting operation -* -* Virtual method redefined from the base class. Connect signal of selection manager to -* onSelectionDone() slot -*/ -void SalomeApp_Operation::startOperation() -{ - if( selectionMgr() ) - connect( selectionMgr(), SIGNAL( selectionChanged() ), SLOT( onSelectionDone() ) ); - - //If suspended operation was stopped during starting other operation, - //the dialog is inactive now, We must activate it - setDialogActive( true ); -} - -/*! - * \brief Performs actions needed for suspending operation -* -* Virtual method redefined from the base class. This implementation calls corresponding -* method of base class and cals setDialogActive( false ) -*/ -void SalomeApp_Operation::suspendOperation() -{ - SUIT_Operation::suspendOperation(); - setDialogActive( false ); -} - -//======================================================================= -// name : abortOperation -// Purpose : Hide dialog box (if it is exists) -//======================================================================= -/*! - * \brief Performs actions needed for aborting operation -* -* Virtual method redefined from the base class calls corresponding method of base class -* and hides dialog box (if it is exists), disconnect slots from selection manager -*/ -void SalomeApp_Operation::abortOperation() -{ - SUIT_Operation::abortOperation(); - setDialogActive( true ); - if ( dlg() ) - dlg()->hide(); - - if( selectionMgr() ) - disconnect( selectionMgr(), SIGNAL( selectionChanged() ), this, SLOT( onSelectionDone() ) ); -} - -/*! - * \brief Performs actions needed for committing operation -* -* Virtual method redefined from the base class calls corresponding method of base class -* and hides dialog box (if it is exists), disconnect slots from selection manager -*/ -void SalomeApp_Operation::commitOperation() -{ - SUIT_Operation::commitOperation(); - setDialogActive( true ); - if ( dlg() ) - dlg()->hide(); - - if( selectionMgr() ) - disconnect( selectionMgr(), SIGNAL( selectionChanged() ), this, SLOT( onSelectionDone() ) ); -} - -/*! - * \brief Gets dialog - * \return Pointer to the dialog of this operation or NULL if it does not exist -* -* This method should be redefined in derived classes if they use dialogs. If this -* function returns pointer to dialog then dialog will be correctly -* -# deactivated in suspendOperation method -* -# activated in resumeOperation method -* -# hidden in abortOperation and commitOperation methods -*/ -SalomeApp_Dialog* SalomeApp_Operation::dlg() const -{ - return 0; -} - -/*! - * \brief Activates selection -* -* Virtual method should be redefined in derived classes if they use own selection modes -* (different from default) -*/ -void SalomeApp_Operation::activateSelection() -{ -} - -/*! - * \brief Virtual method called when selection is changed -* -* Virtual method should be redefined in derived classes if they works with selection -* to provide reaction on the change of selection -*/ -void SalomeApp_Operation::selectionDone() -{ -} - -/*! - * \brief Gets active operation -* -* This method provided for convinience calls SUIT_Study::activeOperation() one -*/ -SUIT_Operation* SalomeApp_Operation::activeOperation() const -{ - return study() != 0 ? study()->activeOperation() : 0; -} - -/*! - * \brief Gets selection manager -* -* This method provided for convinience calls SalomeApp_Application::selectionMgr() one -*/ -SalomeApp_SelectionMgr* SalomeApp_Operation::selectionMgr() const -{ - SUIT_Application* app = application(); - if ( app != 0 && app->inherits( "SalomeApp_Application" ) ) - return ( (SalomeApp_Application*)app )->selectionMgr(); - else - return 0; -} - -/*! - * \brief Call selectionDone() method -* -* Call selectionDone() method if operator is an active one (see selectionDone() for more -* description ) -*/ -void SalomeApp_Operation::onSelectionDone() -{ - if ( isActive() ) - selectionDone(); -} - -/*! - * \brief Update object browser or/and viewer etc. - * \param flags - update flags -* -* This method provided for convinience calls SalomeApp_Module::update() one (see -* SalomeApp_Module::update() for more description) -*/ -void SalomeApp_Operation::update( const int flags ) -{ - if ( myModule != 0 ) - myModule->update( flags ); -} - -/*! - * \brief Activate/Deactivate dialog of operation - * \param active - State of the dialog to be set -* -* Activate/Deactivate dialog of operation. This method called from startOperation(), -* suspendOperation() ones and so on -*/ -void SalomeApp_Operation::setDialogActive( const bool active ) -{ - if( dlg() ) - { - if( active ) - { - activateSelection(); - dlg()->setActiveWindow(); - } - } -} - -/*! - * \brief Gets autoresume property - * \return Autoresume property. -* -* Autoresume property is used during automatic resuming operation. If operation is -* suspended and cursor is moved above dialog of the operation then operation is resumed -* automatically (if possible). It can be resumed only program call otherwise (see -* SalomeApp_SwitchOp for more description). This property is TRUE by default and may be -* changed with setAutoResumed() method call. -*/ -bool SalomeApp_Operation::isAutoResumed() const -{ - return myIsAutoResumed; -} - -/*! - * \brief Sets autoresume property - * \param on - Value to be set - * \return Autoresume property. -* -* Sets autoresume property (see isAutoResumed() for more description) -*/ -void SalomeApp_Operation::setAutoResumed( const bool on ) -{ - myIsAutoResumed = on; -} diff --git a/src/SalomeApp/SalomeApp_Operation.h b/src/SalomeApp/SalomeApp_Operation.h deleted file mode 100755 index 39c0ca6e9..000000000 --- a/src/SalomeApp/SalomeApp_Operation.h +++ /dev/null @@ -1,90 +0,0 @@ -// SALOME SalomeApp -// -// Copyright (C) 2005 CEA/DEN, EDF R&D -// -// -// -// File : SalomeApp_Operation.h -// Author : Sergey LITONIN -// Module : SALOME - - -#ifndef SalomeApp_Operation_H -#define SalomeApp_Operation_H - -#include - -class SalomeApp_Module; -class SalomeApp_Application; -class SalomeApp_Operation; -class SalomeApp_SelectionMgr; -class SalomeApp_Dialog; -class SUIT_Desktop; - -/* - Class : SalomeApp_Operation - Description : Base class for all operations -*/ - -/*! - * \brief Base class for all salome operations - * - * Base class for all salome operations (see SUIT_Operation for more description) -*/ -class SalomeApp_Operation : public SUIT_Operation -{ - Q_OBJECT - -public: - SalomeApp_Operation(); - virtual ~SalomeApp_Operation(); - - virtual void setModule( SalomeApp_Module* ); - SalomeApp_Module* module() const; - - bool isAutoResumed() const; - - virtual SalomeApp_Dialog* dlg() const; - -protected: - - // Methods redefined from base class - - virtual void startOperation(); - virtual void suspendOperation(); - virtual void resumeOperation(); - virtual void abortOperation(); - virtual void commitOperation(); - - // Additional virtual methods may be redefined by derived classes - - virtual void setDialogActive( const bool ); - virtual void activateSelection(); - virtual void selectionDone(); - - - // Axiluary methods - - SUIT_Desktop* desktop() const; - SUIT_Operation* activeOperation() const; - SalomeApp_SelectionMgr* selectionMgr() const; - void update( const int ); - void setAutoResumed( const bool ); - -private slots: - - virtual void onSelectionDone(); - -private: - - SalomeApp_Module* myModule; - bool myIsAutoResumed; -}; - -#endif - - - - - - diff --git a/src/SalomeApp/SalomeApp_SwitchOp.cxx b/src/SalomeApp/SalomeApp_SwitchOp.cxx deleted file mode 100755 index cb0d33397..000000000 --- a/src/SalomeApp/SalomeApp_SwitchOp.cxx +++ /dev/null @@ -1,164 +0,0 @@ -/** -* SALOME SalomeApp -* -* Copyright (C) 2005 CEA/DEN, EDF R&D -* -* -* -* File : SalomeApp_SwitchOp.h -* Author : Sergey LITONIN -* Module : SALOME -*/ - -#include "SalomeApp_SwitchOp.h" -#include "SalomeApp_Module.h" -#include "SalomeApp_Operation.h" -#include "SalomeApp_Dialog.h" -#include -#include -#include -#include -#include -#include -#include - -/*! - * \brief Constructor - * \param theParent - parent of object -* -* Creates instance of the object. Connects signals and slots. Install eveny filter -* on application -*/ -SalomeApp_SwitchOp::SalomeApp_SwitchOp( SalomeApp_Module* theModule ) -: QObject( 0 ), - myModule( theModule ) -{ - qApp->installEventFilter( this ); -} - -/*! - * \brief Destructor -*/ -SalomeApp_SwitchOp::~SalomeApp_SwitchOp() -{ - -} - -/*! - * \brief Get module -* -* Get module. Module is a parent of this class -*/ -SalomeApp_Module* SalomeApp_SwitchOp::module() const -{ - return myModule; -} - -/*! - * \brief Get study - * \return Active study of application (in current realisation) -* -* Get study -*/ -SUIT_Study* SalomeApp_SwitchOp::study() const -{ - return module()->application()->activeStudy(); -} - -/*! - * \brief Get operation by widget - * \param theWg - key widget to find operation - * \return Pointer to the operations if it is found or zero -* -* Find operation containing dialog with given widget -*/ -SalomeApp_Operation* SalomeApp_SwitchOp::operation( QWidget* theWg ) const -{ - // get dialog from widget - SalomeApp_Dialog* aDlg = 0; - QWidget* aParent = theWg; - while( aParent && !aParent->inherits( "SalomeApp_Dialog" ) ) - aParent = aParent->parentWidget(); - - if ( aParent && aParent->inherits( "SalomeApp_Dialog" ) ) - aDlg = (SalomeApp_Dialog*)aParent; - - // try to find operation corresponding to the dialog - if ( aDlg != 0 && study() != 0 ) - { - QPtrListIterator anIter( study()->operations() ); - while( SUIT_Operation* anOp = anIter.current() ) - { - if ( anOp->inherits( "SalomeApp_Operation" ) && - ((SalomeApp_Operation*)anOp)->dlg() == aDlg ) - return ((SalomeApp_Operation*)anOp); - ++anIter; - } - } - - return 0; -} - -/*! - * \brief Event filter - * \param theObj - object - * \param theEv - event -* -* Event filter. Catched signals off application. If event concerns to dialog then -* corresponding operation is found and activated. -*/ -bool SalomeApp_SwitchOp::eventFilter( QObject* theObj, QEvent* theEv ) -{ - if ( theObj->inherits( "QWidget" ) && ( theEv->type() == QEvent::Enter ) ) - { - QEvent::Type aType = theEv->type(); - SalomeApp_Operation* anOp = operation( (QWidget*)theObj ); - if ( anOp ) - { - switch ( aType ) - { - case QEvent::Enter: - { - if ( !anOp->isActive() && anOp->isAutoResumed() && - study() && !study()->blockingOperation( anOp ) ) - study()->resume( anOp ); - } - break; - - case QEvent::MouseButtonRelease: - case QEvent::MouseButtonPress: - case QEvent::MouseButtonDblClick: - case QEvent::MouseMove: - case QEvent::KeyPress: - case QEvent::KeyRelease: - { - if ( !anOp->isActive() ) - return true; - } - break; - - } - } - } - - return QObject::eventFilter( theObj, theEv ); -} - - - - - - - - - - - - - - - - - - - diff --git a/src/SalomeApp/SalomeApp_SwitchOp.h b/src/SalomeApp/SalomeApp_SwitchOp.h deleted file mode 100755 index 9b69905fe..000000000 --- a/src/SalomeApp/SalomeApp_SwitchOp.h +++ /dev/null @@ -1,71 +0,0 @@ -/** -* SALOME SalomeApp -* -* Copyright (C) 2005 CEA/DEN, EDF R&D -* -* -* -* File : SalomeApp_SwitchOp.h -* Author : Sergey LITONIN -* Module : SALOME -*/ - - - -#ifndef SalomeApp_SwitchOp_H -#define SalomeApp_SwitchOp_H - -#include - -class SalomeApp_Module; -class SalomeApp_Operation; -class QEvent; -class SUIT_Study; - -/*! - * \brief This class is intended for controling switching between operation - * - * Several operation may be launched simultaneously. This class is intended for - * controlling switching between such operations. This class works with operations having - * dialogs (activation of other operations is performed by SUIT_Study). When several - * operations is launched simultaneously corresponding dialogs are shown on the screen. - * Only one operation from the launched ones can be active (active operation). Other - * operations are suspended. As result only one dialog from shown ones can be active too. - * Other dialogs are disabled. This class installs event filter on application. When mouse - * cursor is moved above disabled dialog corresponding event is catched by this class. - * It finds corresponding operation and verify whether operation can be resumed (see - * SUIT_Study::isDenied( SUIT_Operation* ) method). If yes then current active - * operation is suspended and new operation activated. Module contains this class as a - * field. Then module is created instance of this class created too. - */ -class SalomeApp_SwitchOp : public QObject -{ - Q_OBJECT - -public: - - SalomeApp_SwitchOp( SalomeApp_Module* ); - virtual ~SalomeApp_SwitchOp(); - - // Redefined from base class - bool eventFilter( QObject*, QEvent* ); - -private: - - SalomeApp_Module* module() const; - SalomeApp_Operation* operation( QWidget* ) const; - SUIT_Study* study() const; - -private: - - SalomeApp_Module* myModule; - -}; - -#endif - - - - - - diff --git a/src/SalomeApp/SalomeApp_UpdateFlags.h b/src/SalomeApp/SalomeApp_UpdateFlags.h deleted file mode 100755 index 7943ac23e..000000000 --- a/src/SalomeApp/SalomeApp_UpdateFlags.h +++ /dev/null @@ -1,37 +0,0 @@ -// SALOME SalomeApp -// -// Copyright (C) 2005 CEA/DEN, EDF R&D -// -// -// -// File : SalomeApp_UpdateFlags.h -// Author : Sergey LITONIN -// Module : SALOME - - -#ifndef SalomeApp_UpdateFlags_H -#define SalomeApp_UpdateFlags_H - -/* - Enum : UpdateFlags - Description : Enumeration for update flags. First byte is reserved for SalomeApp_Module. - Modules derived from this model must use other 3 bytes to define their - own update flags -*/ - -typedef enum -{ - UF_Forced = 0x00000001, - UF_Model = 0x00000002, - UF_Viewer = 0x00000004, - UF_ObjBrowser = 0x00000008, - UF_Controls = 0x00000010, -} UpdateFlags; - -#endif - - - - - - diff --git a/src/SalomeApp/resources/SalomeApp.xml b/src/SalomeApp/resources/SalomeApp.xml index c53d81841..cd868f107 100644 --- a/src/SalomeApp/resources/SalomeApp.xml +++ b/src/SalomeApp/resources/SalomeApp.xml @@ -16,7 +16,7 @@ - + @@ -36,7 +36,9 @@ + + @@ -51,6 +53,10 @@ +
+ + +
diff --git a/src/SalomeApp/resources/SalomeApp_images.po b/src/SalomeApp/resources/SalomeApp_images.po index 1ca46e34d..29ec0e6e6 100644 --- a/src/SalomeApp/resources/SalomeApp_images.po +++ b/src/SalomeApp/resources/SalomeApp_images.po @@ -11,20 +11,3 @@ msgstr "" "Last-Translator: FULLNAME \n" "Content-Type: text/plain; charset=iso-8859-1\n" -msgid "APP_LOGO_ICO" -msgstr "icon_applogo.png" - -msgid "ABOUT" -msgstr "icon_about.png" - -msgid "APP_DEFAULT_ICO" -msgstr "icon_default.png" - -msgid "APP_MODULE_ICO" -msgstr "icon_module.png" - -msgid "APP_MODULE_BIG_ICO" -msgstr "icon_module_big.png" - -msgid "ICON_SELECT" -msgstr "icon_select.png" \ No newline at end of file diff --git a/src/SalomeApp/resources/SalomeApp_msg_en.po b/src/SalomeApp/resources/SalomeApp_msg_en.po index ad917a2ce..3caf3870e 100644 --- a/src/SalomeApp/resources/SalomeApp_msg_en.po +++ b/src/SalomeApp/resources/SalomeApp_msg_en.po @@ -47,30 +47,9 @@ msgstr "GNU LGPL" //======================================================================================= -msgid "SalomeApp_Application::OBJECT_BROWSER" -msgstr "Object Browser" - msgid "SalomeApp_Application::PYTHON_CONSOLE" msgstr "Python Console" -msgid "SalomeApp_Application::LOG_WINDOW" -msgstr "Message Window" - -msgid "SalomeApp_Application::DATA_MODELS" -msgstr "Data models" - -msgid "SalomeApp_Application::NEW_WINDOW_0" -msgstr "GL view" - -msgid "SalomeApp_Application::NEW_WINDOW_1" -msgstr "Plot2d view" - -msgid "SalomeApp_Application::NEW_WINDOW_2" -msgstr "OCC view" - -msgid "SalomeApp_Application::NEW_WINDOW_3" -msgstr "VTK view" - msgid "SalomeApp_Application::TOT_DESK_FILE_DUMP_STUDY" msgstr "Dump study" @@ -92,12 +71,6 @@ msgstr "Loads python script from file" msgid "SalomeApp_Application::TOT_FILE_DESK_PREFERENCES" msgstr "Preferences" -msgid "SalomeApp_Application::MEN_DESK_PREFERENCES" -msgstr "Preferences..." - -msgid "SalomeApp_Application::PRP_DESK_PREFERENCES" -msgstr "Allow to change the preferences" - msgid "SalomeApp_Application::MEN_DESK_TOOLS" msgstr "Tools" @@ -134,8 +107,11 @@ msgstr "Properties..." msgid "SalomeApp_Application::PRP_DESK_PROPERTIES" msgstr "Edits study properties" -msgid "SalomeApp_Application::MEN_REFRESH" -msgstr "Refresh" +msgid "SalomeApp_Application::PREF_CATEGORY_SALOME" +msgstr "SALOME" + +msgid "SalomeApp_Application::PREF_TAB_OBJBROWSER" +msgstr "Object browser" msgid "SalomeApp_Application::MEN_OPENWITH" msgstr "Activate Module" @@ -151,44 +127,8 @@ msgstr "New window" msgid "SalomeApp_Application::MEN_VIEW_WNDS" msgstr "Windows" -msgid "SalomeApp_Application::PRP_MODULE" -msgstr "Switch to the module \"%1\"" - -msgid "SalomeApp_Application::PRP_APP_MODULE" -msgstr "Switch to SALOME platform neutral point" - -msgid "SalomeApp_Application::INF_TOOLBAR_MODULES" -msgstr "Modules" - -msgid "SalomeApp_Application::INF_CANCELLED" -msgstr "Module activation cancelled" - //======================================================================================= -msgid "SalomeApp_Application::PREFERENCES_NOT_LOADED" -msgstr "Preferences for module \"%1\" will be available when the module will be loaded" - -msgid "SalomeApp_Application::PREF_FONT" -msgstr "Font" - -msgid "SalomeApp_Application::PREF_CATEGORY_SALOME" -msgstr "SALOME" - -msgid "SalomeApp_Application::PREF_TAB_GENERAL" -msgstr "General" - -msgid "SalomeApp_Application::PREF_TAB_OBJBROWSER" -msgstr "Object browser" - -msgid "SalomeApp_Application::PREF_GROUP_EXT_BROWSER" -msgstr "External browser" - -msgid "SalomeApp_Application::PREF_APP" -msgstr "Application" - -msgid "SalomeApp_Application::PREF_PARAM" -msgstr "Parameters" - msgid "SalomeApp_Application::PREF_GROUP_DEF_COLUMNS" msgstr "Default columns" @@ -198,99 +138,6 @@ msgstr "Settings" msgid "SalomeApp_Application::PREF_AUTO_SIZE" msgstr "Auto size columns" -msgid "SalomeApp_Application::PREF_GROUP_STUDY" -msgstr "Study properties" - -msgid "SalomeApp_Application::PREF_GROUP_PY_CONSOLE" -msgstr "Python console properties" - -msgid "SalomeApp_Application::PREF_TAB_VIEWERS" -msgstr "Viewers" - -msgid "SalomeApp_Application::PREF_GROUP_OCCVIEWER" -msgstr "OCC Viewer 3d" - -msgid "SalomeApp_Application::PREF_MULTI_FILE" -msgstr "Multi file save" - -msgid "SalomeApp_Application::PREF_ASCII_FILE" -msgstr "ASCII save" - -msgid "SalomeApp_Application::PREF_UNDO_LEVEL" -msgstr "Undo level" - -msgid "SalomeApp_Application::PREF_GROUP_VTKVIEWER" -msgstr "VTK Viewer 3d" - -msgid "SalomeApp_Application::PREF_VIEWER_BACKGROUND" -msgstr "Background color" - -msgid "SalomeApp_Application::PREF_TRIHEDRON_SIZE" -msgstr "Trihedron size" - -msgid "SalomeApp_Application::PREF_ISOS_U" -msgstr "Number of isolines along U" - -msgid "SalomeApp_Application::PREF_ISOS_V" -msgstr "Number of isolines along V" - -msgid "SalomeApp_Application::PREF_TRIHEDRON_SHOW" -msgstr "Show trihedron" - -msgid "SalomeApp_Application::PREF_GROUP_PLOT2DVIEWER" -msgstr "Plot2d Viewer" - -msgid "SalomeApp_Application::PREF_SHOW_LEGEND" -msgstr "Show legend" - -msgid "SalomeApp_Application::PREF_LEGEND_POSITION" -msgstr "Legend position:" - -msgid "SalomeApp_Application::PREF_LEFT" -msgstr "Left" - -msgid "SalomeApp_Application::PREF_RIGHT" -msgstr "Right" - -msgid "SalomeApp_Application::PREF_TOP" -msgstr "Top" - -msgid "SalomeApp_Application::PREF_BOTTOM" -msgstr "Bottom" - -msgid "SalomeApp_Application::PREF_CURVE_TYPE" -msgstr "Curve type:" - -msgid "SalomeApp_Application::PREF_POINTS" -msgstr "Points" - -msgid "SalomeApp_Application::PREF_LINES" -msgstr "Lines" - -msgid "SalomeApp_Application::PREF_SPLINE" -msgstr "Spline" - -msgid "SalomeApp_Application::PREF_MARKER_SIZE" -msgstr "Marker size:" - -msgid "SalomeApp_Application::PREF_LINEAR" -msgstr "Linear" - -msgid "SalomeApp_Application::PREF_LOGARITHMIC" -msgstr "Logarithmic" - -msgid "SalomeApp_Application::PREF_HOR_AXIS_SCALE" -msgstr "Horizontal axis scale:" - -msgid "SalomeApp_Application::PREF_VERT_AXIS_SCALE" -msgstr "Vertical axis scale:" - -msgid "SalomeApp_Application::PREF_TAB_DIRECTORIES" -msgstr "Directories" - -msgid "SalomeApp_Application::PREF_GROUP_DIRECTORIES" -msgstr "Quick directory list" - //======================================================================================= msgid "SalomeApp_Application::OBJ_BROWSER_NAME" @@ -319,31 +166,6 @@ msgstr "LOCKED" //======================================================================================= -msgid "SalomeApp_ModuleDlg::CAPTION" -msgstr "Activate module" - -msgid "SalomeApp_ModuleDlg::NEW" -msgstr "&New" - -msgid "SalomeApp_ModuleDlg::OPEN" -msgstr "&Open" - -msgid "SalomeApp_ModuleDlg::LOAD" -msgstr "&Load" - -msgid "SalomeApp_ModuleDlg::CANCEL" -msgstr "&Cancel" - -msgid "SalomeApp_ModuleDlg::ActivateComponent_DESCRIPTION" -msgstr "Create, open or load study." - -//======================================================================================= - -msgid "SalomeApp_PreferencesDlg::CAPTION" -msgstr "Preferences" - -//======================================================================================= - msgid "SalomeApp_StudyPropertiesDlg::PRP_MODE_FROM_SCRATCH" msgstr "from scratch" @@ -382,6 +204,3 @@ msgstr "No" msgid "SalomeApp_Application::PUBLISH_IN_STUDY" msgstr "Publish in study" -msgid "SalomeApp_Application::ACTIVATING_MODULE" -msgstr "Trying to activate module \"%1\"" - diff --git a/src/SalomeApp/resources/icon_select.png b/src/SalomeApp/resources/icon_select.png deleted file mode 100644 index 99ebde65e..000000000 Binary files a/src/SalomeApp/resources/icon_select.png and /dev/null differ diff --git a/src/VTKViewer/VTKViewer_InteractorStyle.cxx b/src/VTKViewer/VTKViewer_InteractorStyle.cxx index 18a496089..fa407641d 100644 --- a/src/VTKViewer/VTKViewer_InteractorStyle.cxx +++ b/src/VTKViewer/VTKViewer_InteractorStyle.cxx @@ -64,12 +64,6 @@ using namespace std; -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - /* static int GetEdgeId(vtkPicker *thePicker, SALOME_Actor *theActor, int theObjId){ int anEdgeId = -1; @@ -117,7 +111,6 @@ VTKViewer_InteractorStyle::VTKViewer_InteractorStyle() /*!Destructor.*/ VTKViewer_InteractorStyle::~VTKViewer_InteractorStyle() { -// if(MYDEBUG) INFOS("VTKViewer_InteractorStyle::~VTKViewer_InteractorStyle()"); m_ViewWnd->RemoveActor(myPreSelectionActor); } @@ -899,7 +892,6 @@ void VTKViewer_InteractorStyle::onFinishOperation() Handle(SALOME_InteractiveObject) IO = SActor->getIO(); if(aSelectionMode != EdgeOfCellSelection) { if(CheckDimensionId(aSelectionMode,SActor,anObjId)){ - if(MYDEBUG) INFOS(" CellId : "<AddOrRemoveIndex( IO, anObjId, myShiftState, false ); @@ -919,7 +911,6 @@ void VTKViewer_InteractorStyle::onFinishOperation() } int anEdgeId = GetEdgeId(picker,SActor,anObjId); if (anEdgeId >= 0) { - if(MYDEBUG) INFOS(" CellId : "<AddOrRemoveIndex( IO, anObjId, true, false); aSel->AddOrRemoveIndex( IO, -anEdgeId-1, true, true ); aSel->AddIObject( IO, false ); @@ -945,7 +936,6 @@ void VTKViewer_InteractorStyle::onFinishOperation() this->HighlightProp( NULL ); aSel->ClearIObjects(); } - if(MYDEBUG) INFOS(" PointId : "<AddOrRemoveIndex( IO, anObjId, myShiftState, false ); aSel->AddIObject( IO, false ); } @@ -1076,7 +1066,6 @@ void VTKViewer_InteractorStyle::onFinishOperation() continue; VTKViewer_CellDataSet cellList = picker->GetCellData(aActor); if ( !cellList.empty() ) { - if(MYDEBUG) INFOS ( " NAME Actor : " << aSActor->getName() ); SALOME_Selection::TContainerOfId anIndexes; VTKViewer_CellDataSet::iterator it; for ( it = cellList.begin(); it != cellList.end(); ++it ) { @@ -1260,7 +1249,6 @@ void VTKViewer_InteractorStyle::onCursorMove(QPoint mousePos) { if(aResult){ mySelectedActor = SActor; myElemId = anObjId; - if(MYDEBUG) INFOS(" CellId : "<setCellData(anObjId,SActor,myPreSelectionActor); } } @@ -1275,7 +1263,6 @@ void VTKViewer_InteractorStyle::onCursorMove(QPoint mousePos) { mySelectedActor = SActor; myEdgeId = anEdgeId; myElemId = anObjId; - if(MYDEBUG) INFOS(" CellId : "<setEdgeData(anObjId,SActor,-anEdgeId-1,myPreSelectionActor); } } @@ -1296,7 +1283,6 @@ void VTKViewer_InteractorStyle::onCursorMove(QPoint mousePos) { if(!anIsSameObjId) { mySelectedActor = SActor; myNodeId = anObjId; - if(MYDEBUG) INFOS(" PointId : "<setPointData(anObjId,SActor,myPreSelectionActor); } myPreSelectionActor->GetProperty()->SetRepresentationToSurface(); @@ -1328,7 +1314,6 @@ void VTKViewer_InteractorStyle::onCursorMove(QPoint mousePos) { } } } - //if(MYDEBUG) INFOS ( " NAME PREVIEW " << SActor->getName() ); } } } diff --git a/src/VTKViewer/VTKViewer_ShrinkFilter.cxx b/src/VTKViewer/VTKViewer_ShrinkFilter.cxx index f980b5c0d..c65699a9a 100755 --- a/src/VTKViewer/VTKViewer_ShrinkFilter.cxx +++ b/src/VTKViewer/VTKViewer_ShrinkFilter.cxx @@ -35,14 +35,6 @@ #include #include -#ifdef _DEBUG_ -static int MYDEBUG = 0; -static int MYDEBUGWITHFILES = 0; -#else -static int MYDEBUG = 0; -static int MYDEBUGWITHFILES = 0; -#endif - vtkCxxRevisionMacro(VTKViewer_ShrinkFilter, "$Revision$"); vtkStandardNewMacro(VTKViewer_ShrinkFilter);