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@
#include <vtkPolyData.h>
#include <vtkShrinkFilter.h>
-//#include "utilities.h"
-
using namespace std;
#ifdef _DEBUG_
#include "SVTK_InteractorStyle.h"
-#include "utilities.h"
-
#include "VTKViewer_CellRectPicker.h"
#include "VTKViewer_Utilities.h"
#include "VTKViewer_RectPicker.h"
using namespace std;
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
namespace
{
int
SVTK_InteractorStyle
::~SVTK_InteractorStyle()
{
- if(MYDEBUG) INFOS("SVTK_InteractorStyle::~SVTK_InteractorStyle()");
myViewWindow->RemoveActor(myPreSelectionActor);
}
Handle(SALOME_InteractiveObject) anIO = aSActor->getIO();
if(aSelectionMode != EdgeOfCellSelection) {
if(CheckDimensionId(aSelectionMode,aSActor,anObjId)){
- if(MYDEBUG) INFOS(" CellId : "<<anObjId);
if (GetSelector()->IsSelected(anIO)) {
// This IO is already in the selection
GetSelector()->AddOrRemoveIndex(anIO,anObjId,myShiftState);
}
int anEdgeId = GetEdgeId(picker,aSActor,anObjId);
if (anEdgeId >= 0) {
- if(MYDEBUG) INFOS(" CellId : "<<anObjId<<"; EdgeId : "<<anEdgeId);
GetSelector()->AddOrRemoveIndex(anIO,anObjId,false);
GetSelector()->AddOrRemoveIndex(anIO,-anEdgeId-1,true);
GetSelector()->AddIObject(aSActor);
this->HighlightProp( NULL );
GetSelector()->ClearIObjects();
}
- if(MYDEBUG) INFOS(" PointId : "<<anObjId);
GetSelector()->AddOrRemoveIndex(anIO,anObjId,myShiftState);
GetSelector()->AddIObject(aSActor);
}
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 ) {
if(aResult){
mySelectedActor = aSActor;
myElemId = anObjId;
- if(MYDEBUG) INFOS(" CellId : "<<anObjId);
myInteractor->setCellData(anObjId,aSActor,myPreSelectionActor);
}
}
mySelectedActor = aSActor;
myEdgeId = anEdgeId;
myElemId = anObjId;
- if(MYDEBUG) INFOS(" CellId : "<<anObjId<<"; EdgeId : "<<anEdgeId);
myInteractor->setEdgeData(anObjId,aSActor,-anEdgeId-1,myPreSelectionActor);
}
}
if(!anIsSameObjId) {
mySelectedActor = aSActor;
myNodeId = anObjId;
- if(MYDEBUG) INFOS(" PointId : "<<anObjId);
myInteractor->setPointData(anObjId,aSActor,myPreSelectionActor);
}
myPreSelectionActor->GetProperty()->SetRepresentationToSurface();
#include <TColStd_IndexedMapOfInteger.hxx>
-#include "utilities.h"
-
using namespace std;
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
-
SVTK_RenderWindowInteractor*
SVTK_RenderWindowInteractor
::New()
SVTK_RenderWindowInteractor
::~SVTK_RenderWindowInteractor()
{
- if(MYDEBUG) INFOS("SVTK_RenderWindowInteractor::~SVTK_RenderWindowInteractor()");
-
delete mTimer ;
myViewWindow->RemoveActor(myCellActor);
#include "SVTK_ViewWindow.h"
#include "SVTK_SelectorDef.h"
-#include "utilities.h"
SVTK_SelectorDef
::SVTK_SelectorDef()
#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()
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<SUIT_ViewWindow> aViews = myViewManager->getViews();
for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
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<SUIT_ViewWindow> aViews = myViewManager->getViews();
for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
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<SUIT_ViewWindow> aViews = myViewManager->getViews();
for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
if(SUIT_ViewWindow* aViewWindow = aViews.at(i)){
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{
+++ /dev/null
-// File: SalomeApp_Dialog.cxx
-// Author: Alexander SOLOVYOV
-
-#include <SalomeApp_Dialog.h>
-#include <SUIT_Session.h>
-
-#include <qtoolbutton.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-
-/*
- 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<int,int> types;
- TypesList::const_iterator anIt = list.begin(),
- aLast = list.end();
- for( ; anIt!=aLast; anIt++ )
- types.insert( *anIt, 0 );
-
-
- internal.clear();
- QMap<int,int>::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<int,int> 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<int,int>::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<int, int> 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<int,int>::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;
-}
+++ /dev/null
-// File: SalomeApp_Dialog.h
-// Author: Alexander SOLOVYOV
-
-#ifndef SALOMEAPP_DIALOG_H
-#define SALOMEAPP_DIALOG_H
-
-#include <QtxDialog.h>
-
-#include <qvaluelist.h>
-#include <qmap.h>
-#include <qpixmap.h>
-
-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<int> TypesList;
- typedef QMap<int,QStringList> SelectedObjects;
-
- enum ObjectWg
- {
- Label = 0x00000001,
- Btn = 0x00000002,
- Control = 0x00000004
- };
-
- typedef enum
- {
- OneName, //<! only one object can be selected and it's name is shown
- OneNameOrCount, //<! if one object is selected, it's name is shown otherwise
- // "<count> <type>" is shown
- ListOfNames, //! list of all names is shown
- Count //! In every case "<count> <type>" 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 "<count> <type>" 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<int, Object> ObjectMap;
-
-private:
- ObjectMap myObjects;
- QMap<int,QString> myTypeNames;
- bool myIsExclusive, myIsBusy;
- QPixmap myPixmap;
-};
-
-#endif
+++ /dev/null
-// SALOME SalomeApp
-//
-// Copyright (C) 2005 CEA/DEN, EDF R&D
-//
-//
-//
-// File : SalomeApp_Operation.h
-// Author : Sergey LITONIN
-// Module : SALOME
-
-#include <SalomeApp_Operation.h>
-#include <SalomeApp_Module.h>
-#include <SalomeApp_Application.h>
-#include <SalomeApp_Operation.h>
-#include <SalomeApp_SelectionMgr.h>
-#include <SalomeApp_Dialog.h>
-
-#include <SUIT_Desktop.h>
-
-#include <qapplication.h>
-
-
-/*!
- * \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;
-}
+++ /dev/null
-// 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 <SUIT_Operation.h>
-
-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
-
-
-
-
-
-
+++ /dev/null
-/**
-* 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 <CAM_Application.h>
-#include <SUIT_Operation.h>
-#include <SUIT_Study.h>
-#include <qevent.h>
-#include <qwidget.h>
-#include <qptrlist.h>
-#include <qapplication.h>
-
-/*!
- * \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<SUIT_Operation> 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 );
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-/**
-* 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 <qobject.h>
-
-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
-
-
-
-
-
-
+++ /dev/null
-// 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
-
-
-
-
-
-
<parameter name="xterm" value="no"/>
<parameter name="portkill" value="no"/>
<parameter name="killall" value="no"/>
- <parameter name="modules" value="GEOM,SMESH,VISU,SUPERV,MED,COMPONENT"/>
+ <parameter name="modules" value="GEOM,LIGHT,SMESH,VISU,SUPERV,MED,COMPONENT"/>
<parameter name="pyModules" value=""/>
<parameter name="embedded" value="SalomeAppEngine,study"/>
<parameter name="standalone" value="pyContainer,cppContainer,registry,moduleCatalog"/>
<parameter name="SalomeApp" value="${SUITRoot}/resources"/>
<parameter name="OB" value="${SUITRoot}/resources"/>
<parameter name="CAM" value="${SUITRoot}/resources"/>
+ <parameter name="LightApp" value="${SUITRoot}/resources"/>
<parameter name="GEOM" value="${GEOM_ROOT_DIR}/share/salome/resources"/>
+ <parameter name="LIGHT" value="${LIGHT_ROOT_DIR}/share/salome/resources"/>
<parameter name="SMESH" value="${SMESH_ROOT_DIR}/share/salome/resources"/>
<parameter name="VISU" value="${VISU_ROOT_DIR}/share/salome/resources"/>
<parameter name="SUPERV" value="${SUPERV_ROOT_DIR}/share/salome/resources"/>
<parameter name="name" value="Geometry"/>
<parameter name="icon" value="ModuleGeom.png"/>
</section>
+ <section name="LIGHT">
+ <parameter name="name" value="Light"/>
+ <parameter name="icon" value="LIGHT.png"/>
+ </section>
<section name="SMESH">
<parameter name="name" value="Mesh"/>
<parameter name="icon" value="ModuleMesh.png"/>
"Last-Translator: FULLNAME <EMAIL@ADDRESS>\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
//=======================================================================================
-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"
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"
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"
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 \"<b>%1</b>\" 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"
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"
//=======================================================================================
-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"
msgid "SalomeApp_Application::PUBLISH_IN_STUDY"
msgstr "Publish in study"
-msgid "SalomeApp_Application::ACTIVATING_MODULE"
-msgstr "Trying to activate module \"%1\""
-
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;
/*!Destructor.*/
VTKViewer_InteractorStyle::~VTKViewer_InteractorStyle()
{
-// if(MYDEBUG) INFOS("VTKViewer_InteractorStyle::~VTKViewer_InteractorStyle()");
m_ViewWnd->RemoveActor(myPreSelectionActor);
}
Handle(SALOME_InteractiveObject) IO = SActor->getIO();
if(aSelectionMode != EdgeOfCellSelection) {
if(CheckDimensionId(aSelectionMode,SActor,anObjId)){
- if(MYDEBUG) INFOS(" CellId : "<<anObjId);
if (IsSelected(IO,aSel)) {
// This IO is already in the selection
aSel->AddOrRemoveIndex( IO, anObjId, myShiftState, false );
}
int anEdgeId = GetEdgeId(picker,SActor,anObjId);
if (anEdgeId >= 0) {
- if(MYDEBUG) INFOS(" CellId : "<<anObjId<<"; EdgeId : "<<anEdgeId);
aSel->AddOrRemoveIndex( IO, anObjId, true, false);
aSel->AddOrRemoveIndex( IO, -anEdgeId-1, true, true );
aSel->AddIObject( IO, false );
this->HighlightProp( NULL );
aSel->ClearIObjects();
}
- if(MYDEBUG) INFOS(" PointId : "<<anObjId);
aSel->AddOrRemoveIndex( IO, anObjId, myShiftState, false );
aSel->AddIObject( IO, false );
}
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 ) {
if(aResult){
mySelectedActor = SActor;
myElemId = anObjId;
- if(MYDEBUG) INFOS(" CellId : "<<anObjId);
m_Interactor->setCellData(anObjId,SActor,myPreSelectionActor);
}
}
mySelectedActor = SActor;
myEdgeId = anEdgeId;
myElemId = anObjId;
- if(MYDEBUG) INFOS(" CellId : "<<anObjId<<"; EdgeId : "<<anEdgeId);
m_Interactor->setEdgeData(anObjId,SActor,-anEdgeId-1,myPreSelectionActor);
}
}
if(!anIsSameObjId) {
mySelectedActor = SActor;
myNodeId = anObjId;
- if(MYDEBUG) INFOS(" PointId : "<<anObjId);
m_Interactor->setPointData(anObjId,SActor,myPreSelectionActor);
}
myPreSelectionActor->GetProperty()->SetRepresentationToSurface();
}
}
}
- //if(MYDEBUG) INFOS ( " NAME PREVIEW " << SActor->getName() );
}
}
}
#include <vtkPointData.h>
#include <vtkUnstructuredGrid.h>
-#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);