#include "CAM_Module.h"
+#include "SALOME_Event.hxx"
#include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h"
#include "LightApp_VTKSelector.h"
#include "SVTK_ViewModel.h"
#include "SVTK_ViewManager.h"
#include "SVTK_MainWindow.h"
+#include "SVTK_RenderWindowInteractor.h"
#include "VISU_Event.h"
#include "VisuGUI_Prs3dTools.h"
#define GAUSS_SAVE_CONFIGURATION 5700
#define GAUSS_OVERWRITE_CONFIGURATION 5701
#define GAUSS_RESTORE_CONFIGURATION 5702
-
-int VisuGUI_Module::myNbConfigs = 0;
+#define GAUSS_RENAME_CONFIGURATION 5703
void
CreateCurves( SalomeApp_Module* theModule,
mgr->setRule( action( GAUSS_DISPLAY_ONLY_PRS ),
aRule, true );
+ createAction( GAUSS_RENAME_CONFIGURATION, tr("MEN_RENAME"), QIconSet(),
+ tr("MEN_RENAME"), "", 0, this, false,
+ this, SLOT(OnRename()));
+ mgr->insert( action( GAUSS_RENAME_CONFIGURATION ), -1, -1, -1 );
+ mgr->setRule( action( GAUSS_RENAME_CONFIGURATION ), "selcount=1 and type='VISU::TGAUSSVIEW'", true );
+
createAction( GAUSS_SAVE_CONFIGURATION, tr("MEN_SAVE_CONFIGURATION"), QIconSet(),
tr("MEN_SAVE_CONFIGURATION"), "", 0, this, false,
this, SLOT(OnSaveConfiguration()));
this, SLOT(OnRestoreConfiguration()));
mgr->insert( action( GAUSS_RESTORE_CONFIGURATION ), -1, -1, -1 );
mgr->setRule( action( GAUSS_RESTORE_CONFIGURATION ),
- "selcount=1 and type='VISU::TGAUSSVIEW' and activeView='VVTK'", true );
+ "selcount=1 and type='VISU::TGAUSSVIEW'", true );
}
//---------------------------------------------------------------
GetViewParams(theViewWindow,"1",theStr);
VISU_WidgetCtrl* aWidgetCtrl = theViewWindow->GetWidgetCtrl();
-
- VISU_PlanesWidget *aPlanesWidget = aWidgetCtrl->GetPlanesWidget();
-
- float anOrigin[3];
- aPlanesWidget->GetOrigin(anOrigin);
- Storable::DataToStream(theStr,"myCursorOrigin[0]",anOrigin[0]);
- Storable::DataToStream(theStr,"myCursorOrigin[1]",anOrigin[1]);
- Storable::DataToStream(theStr,"myCursorOrigin[2]",anOrigin[2]);
-
- float aNormal[3];
- aPlanesWidget->GetNormal(aNormal);
- Storable::DataToStream(theStr,"myCursorNormal[0]",aNormal[0]);
- Storable::DataToStream(theStr,"myCursorNormal[1]",aNormal[1]);
- Storable::DataToStream(theStr,"myCursorNormal[2]",aNormal[2]);
-
- float aDepth = aPlanesWidget->Distance();
- Storable::DataToStream(theStr,"myCursorDepth",aDepth);
-
-
- VISU_SphereWidget *aSphereWidget = aWidgetCtrl->GetSphereWidget();
- float aCenter[3];
- aSphereWidget->GetCenter(aCenter);
- Storable::DataToStream(theStr,"mySphereCursorCenter[0]",aCenter[0]);
- Storable::DataToStream(theStr,"mySphereCursorCenter[1]",aCenter[1]);
- Storable::DataToStream(theStr,"mySphereCursorCenter[2]",aCenter[2]);
-
- float aRadius = aSphereWidget->GetRadius();
- Storable::DataToStream(theStr,"mySphereCursorRaduis",aRadius);
+ if(aWidgetCtrl->GetEnabled()){
+ std::string aSegmentationMode;
+ if(aWidgetCtrl->IsPlanesActive()){
+ VISU_PlanesWidget *aPlanesWidget = aWidgetCtrl->GetPlanesWidget();
+ float anOrigin[3];
+ aPlanesWidget->GetOrigin(anOrigin);
+ Storable::DataToStream(theStr,"myCursorOrigin[0]",anOrigin[0]);
+ Storable::DataToStream(theStr,"myCursorOrigin[1]",anOrigin[1]);
+ Storable::DataToStream(theStr,"myCursorOrigin[2]",anOrigin[2]);
+
+ float aNormal[3];
+ aPlanesWidget->GetNormal(aNormal);
+ Storable::DataToStream(theStr,"myCursorNormal[0]",aNormal[0]);
+ Storable::DataToStream(theStr,"myCursorNormal[1]",aNormal[1]);
+ Storable::DataToStream(theStr,"myCursorNormal[2]",aNormal[2]);
+
+ float aDepth = aPlanesWidget->Distance();
+ Storable::DataToStream(theStr,"myCursorDepth",aDepth);
+
+ aSegmentationMode = "Planes";
+ }else if(aWidgetCtrl->IsSphereActive()){
+ VISU_SphereWidget *aSphereWidget = aWidgetCtrl->GetSphereWidget();
+ float aCenter[3];
+ aSphereWidget->GetCenter(aCenter);
+ Storable::DataToStream(theStr,"mySphereCursorCenter[0]",aCenter[0]);
+ Storable::DataToStream(theStr,"mySphereCursorCenter[1]",aCenter[1]);
+ Storable::DataToStream(theStr,"mySphereCursorCenter[2]",aCenter[2]);
+
+ float aRadius = aSphereWidget->GetRadius();
+ Storable::DataToStream(theStr,"mySphereCursorRaduis",aRadius);
+
+ aSegmentationMode = "Sphere";
+ }
+
+ Storable::DataToStream(theStr,"mySegmentationMode",aSegmentationMode);
+ }
}
//---------------------------------------------------------------
const Storable::TRestoringMap& theMap)
{
SetViewParams(theViewWindow,"1",theMap);
-
- VISU_WidgetCtrl* aWidgetCtrl = theViewWindow->GetWidgetCtrl();
-
- VISU_PlanesWidget *aPlanesWidget = aWidgetCtrl->GetPlanesWidget();
- float anOrigin[3];
- anOrigin[0] = Storable::FindValue(theMap,"myCursorOrigin[0]").toDouble();
- anOrigin[1] = Storable::FindValue(theMap,"myCursorOrigin[1]").toDouble();
- anOrigin[2] = Storable::FindValue(theMap,"myCursorOrigin[2]").toDouble();
- aPlanesWidget->SetOrigin(anOrigin);
-
- float aNormal[3];
- aNormal[0] = Storable::FindValue(theMap,"myCursorNormal[0]").toDouble();
- aNormal[1] = Storable::FindValue(theMap,"myCursorNormal[1]").toDouble();
- aNormal[2] = Storable::FindValue(theMap,"myCursorNormal[2]").toDouble();
- aPlanesWidget->SetNormal(aNormal);
-
- float aDepth = Storable::FindValue(theMap,"myCursorDepth").toDouble();
- aPlanesWidget->SetDistance(aDepth);
-
-
- VISU_SphereWidget *aSphereWidget = aWidgetCtrl->GetSphereWidget();
- float aCenter[3];
- aCenter[0] = Storable::FindValue(theMap,"mySphereCursorCenter[0]").toDouble();
- aCenter[1] = Storable::FindValue(theMap,"mySphereCursorCenter[1]").toDouble();
- aCenter[2] = Storable::FindValue(theMap,"mySphereCursorCenter[2]").toDouble();
- aSphereWidget->SetCenter(aCenter);
-
- float aRadius = Storable::FindValue(theMap,"mySphereCursorRaduis").toDouble();
- aSphereWidget->SetRadius(aRadius);
}
return aStream.str();
}
- //---------------------------------------------------------------
- void
- SetViewParams(VVTK_ViewWindow* theViewWindow,
- const Storable::TRestoringMap& theMap)
- {
- Selection_Mode aSelectionMode = Storable::FindValue(theMap,"mySelectionMode").toInt();
- SVTK_Selector* aSelector = theViewWindow->GetSelector();
- aSelector->SetSelectionMode(aSelectionMode);
-
- SetViewParams(theViewWindow->getMainWindow1(),theMap);
- SetViewParams(theViewWindow->getMainWindow2(),theMap);
- }
-
-
//---------------------------------------------------------------
struct TSelection
{
for(; anIter.More(); anIter.Next()){
Handle(SALOME_InteractiveObject) anIO = anIter.Value();
std::string anEntry = anIO->getEntry();
- TSelection& aSelection = theVisibleEntries[anEntry];
- aSelection.myIsSelected = true;
- TColStd_IndexedMapOfInteger anIndexes;
- aSelector->GetIndex(anIO,anIndexes);
- if(anIndexes.Extent() > 0){
- aSelection.myHasSubId = true;
- aSelection.mySubId = anIndexes(1);
+ TVisibleEntries::iterator anEntriesIter = theVisibleEntries.find(anEntry);
+ if(anEntriesIter != theVisibleEntries.end()){
+ TSelection& aSelection = anEntriesIter->second;
+ aSelection.myIsSelected = true;
+ TColStd_IndexedMapOfInteger anIndexes;
+ aSelector->GetIndex(anIO,anIndexes);
+ if(anIndexes.Extent() > 0){
+ aSelection.myHasSubId = true;
+ aSelection.mySubId = anIndexes(1);
+ }
}
}
}
aSelector->EndPickCallback(); // To invoke selection changed signal
}
-}
-
-//---------------------------------------------------------------
-void
-VisuGUI_Module::
-OnSaveConfiguration()
-{
- _PTR(Study) aCStudy = GetCStudy(GetAppStudy(this));
- if (CheckLock(aCStudy,GetDesktop(this)))
- return;
- LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(this);
-
- SUIT_ViewManager* aViewManager = getApp()->activeViewManager();
- if(aViewManager->getType() == VVTK_Viewer::Type()){
- SUIT_ViewWindow* aWindow = aViewManager->getActiveView();
- VVTK_ViewWindow* aViewWindow = dynamic_cast<VVTK_ViewWindow*>(aWindow);
-
- SUIT_Study* aSStudy = aViewManager->study();
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy);
- _PTR(Study) aCStudy = aStudy->studyDS();
+ //---------------------------------------------------------------
+ void
+ OnStoreConfiguration(SalomeApp_Module* theModule,
+ bool theIsNew)
+ {
+ _PTR(Study) aCStudy = GetCStudy(GetAppStudy(theModule));
+ if (CheckLock(aCStudy,GetDesktop(theModule)))
+ return;
- _PTR(SComponent) aSComponent = ClientFindOrCreateVisuComponent(aCStudy);
-
- std::string aName = VISU::GenerateName("Config.", ++myNbConfigs).latin1();
- std::string aValue = GetViewParams(aViewWindow);
-
- std::string aSComponentEntry = aSComponent->GetID();
- std::string anEntry = CreateAttributes(aCStudy,
- aSComponentEntry.c_str(),
- "",
- "",
- aName.c_str(),
- "",
- aValue.c_str());
-
- ::TVisibleEntries aVisibleEntries;
- ::GetGaussPointsSelection(aViewWindow,
- aVisibleEntries);
+ LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(theModule);
- _PTR(SObject) aSObject = aCStudy->FindObjectID(anEntry);
- _PTR(StudyBuilder) aStudyBuilder = aCStudy->NewBuilder();
- ::TVisibleEntries::const_iterator anIter = aVisibleEntries.begin();
- for(; anIter != aVisibleEntries.end(); anIter++){
- const std::string& anEntry = anIter->first;
- const TSelection& aSelection = anIter->second;
-
- ::CreateReference(aCStudy,
- aStudyBuilder,
- aSObject,
- anEntry,
- aSelection);
+ SUIT_ViewManager* aViewManager = theModule->getApp()->activeViewManager();
+ if(aViewManager->getType() == VVTK_Viewer::Type()){
+ SUIT_ViewWindow* aWindow = aViewManager->getActiveView();
+ VVTK_ViewWindow* aViewWindow = dynamic_cast<VVTK_ViewWindow*>(aWindow);
+
+ SUIT_Study* aSStudy = aViewManager->study();
+ SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy);
+ _PTR(Study) aCStudy = aStudy->studyDS();
+ _PTR(StudyBuilder) aStudyBuilder = aCStudy->NewBuilder();
+
+ std::string anEntry;
+ std::string aValue = GetViewParams(aViewWindow);
+
+ if(theIsNew){
+ _PTR(SComponent) aSComponent = ClientFindOrCreateVisuComponent(aCStudy);
+
+ static int myNbConfigs = 0;
+ std::string aName = VISU::GenerateName("Config.", ++myNbConfigs).latin1();
+
+ std::string aSComponentEntry = aSComponent->GetID();
+ anEntry = CreateAttributes(aCStudy,
+ aSComponentEntry.c_str(),
+ "",
+ "",
+ aName.c_str(),
+ "",
+ aValue.c_str());
+ }else{
+ SALOME_ListIO aListIO;
+ aSelectionMgr->selectedObjects(aListIO);
+ SALOME_ListIteratorOfListIO aListIter( aListIO );
+ for(; aListIter.More(); aListIter.Next()){
+ Handle(SALOME_InteractiveObject) anIO = aListIter.Value();
+ _PTR(SObject) aSObject = aCStudy->FindObjectID(anIO->getEntry());
+ _PTR(GenericAttribute) anAttr;
+ if(aSObject->FindAttribute(anAttr,"AttributeComment")){
+ _PTR(AttributeComment) aComment(anAttr);
+ std::string aCommentValue(aComment->Value());
+ if(aCommentValue.compare("myComment=GAUSSVIEW") >= 0){
+ aComment->SetValue(aValue.c_str());
+ anEntry = aSObject->GetID();
+
+ _PTR(ChildIterator) aChildIter = aCStudy->NewChildIterator(aSObject);
+ for (; aChildIter->More(); aChildIter->Next()) {
+ _PTR(SObject) aChildSObject = aChildIter->Value();
+ aStudyBuilder->RemoveObject(aChildSObject);
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ if(anEntry != ""){
+ TVisibleEntries aVisibleEntries;
+ GetGaussPointsSelection(aViewWindow,
+ aVisibleEntries);
+
+ _PTR(SObject) aSObject = aCStudy->FindObjectID(anEntry);
+ _PTR(StudyBuilder) aStudyBuilder = aCStudy->NewBuilder();
+ TVisibleEntries::const_iterator anIter = aVisibleEntries.begin();
+ for(; anIter != aVisibleEntries.end(); anIter++){
+ const std::string& anEntry = anIter->first;
+ const TSelection& aSelection = anIter->second;
+
+ CreateReference(aCStudy,
+ aStudyBuilder,
+ aSObject,
+ anEntry,
+ aSelection);
+ }
+
+ //UpdateObjBrowser(theModule,true,aSObject);
+ UpdateObjBrowser(theModule,true);
+ }
}
+ }
- UpdateObjBrowser(this,true,aSObject);
+
+ //---------------------------------------------------------------
+ template<class TMainWindow>
+ void
+ SetMainWindowParams(VisuGUI* theModule,
+ _PTR(SObject) theSObject,
+ VVTK_ViewWindow* theViewWindow,
+ TMainWindow* theMainWindow)
+ {
+ _PTR(Study) aCStudy = GetCStudy(GetAppStudy(theModule));
+
+ _PTR(GenericAttribute) anAttr;
+ if(theSObject->FindAttribute(anAttr,"AttributeComment")){
+ _PTR(AttributeComment) aComment(anAttr);
+ QString aStream(aComment->Value().c_str());
+ Storable::TRestoringMap aMap;
+ Storable::StrToMap(aStream,aMap);
+ SetViewParams(theMainWindow,aMap);
+ }
}
}
//---------------------------------------------------------------
void
VisuGUI_Module::
-OnOverwriteConfiguration()
+OnSaveConfiguration()
{
- _PTR(Study) aCStudy = GetCStudy(GetAppStudy(this));
- if (CheckLock(aCStudy,GetDesktop(this)))
- return;
-
- LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(this);
-
- SALOME_ListIO aListIO;
- aSelectionMgr->selectedObjects(aListIO);
- if(aListIO.Extent() != 1)
- return;
-
- std::string aName = aListIO.First()->getName();
+ ::OnStoreConfiguration(this,true);
+}
- SUIT_ViewManager* aViewManager = getApp()->activeViewManager();
- if(aViewManager->getType() == VVTK_Viewer::Type()){
- SUIT_ViewWindow* aWindow = aViewManager->getActiveView();
- VVTK_ViewWindow* aViewWindow = dynamic_cast<VVTK_ViewWindow*>(aWindow);
- std::string aValue = GetViewParams(aViewWindow);
- SUIT_Study* aSStudy = aViewManager->study();
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy);
- _PTR(Study) aCStudy = aStudy->studyDS();
- std::vector<_PTR(SObject)> aList = aCStudy->FindObjectByName(aName,"VISU");
- _PTR(GenericAttribute) anAttr;
- int iEnd = aList.size();
- for(int i = 0; i < iEnd; i++){
- _PTR(SObject) anObj = aList[i];
- std::string anEntry = anObj->GetID();
- if(anObj->FindAttribute(anAttr,"AttributeComment")){
- _PTR(AttributeComment) aCmnt (anAttr);
- std::string aComm (aCmnt->Value());
- if(aComm.compare(View3D_i::myComment) >= 0){
- aCmnt->SetValue(aValue.c_str());
- return;
- }
- }
- }
-
- _PTR(SComponent) aSComponent = ClientFindOrCreateVisuComponent(aCStudy);
- std::string aSComponentEntry = aSComponent->GetID();
- std::string anEntry = CreateAttributes(aCStudy,
- aSComponentEntry.c_str(),
- "",
- "",
- aName.c_str(),
- "",
- aValue.c_str());
- }else
- return;
-
- UpdateObjBrowser(this);
+//---------------------------------------------------------------
+void
+VisuGUI_Module::
+OnOverwriteConfiguration()
+{
+ ::OnStoreConfiguration(this,false);
}
if(aListIO.Extent() > 1)
return;
- const Handle(SALOME_InteractiveObject)& anIO = aListIO.First();
- _PTR(Study) aCStudy = GetCStudy(GetAppStudy(this));
- _PTR(SObject) aSObj = aCStudy->FindObjectID(anIO->getEntry());
- std::string aName = aSObj->GetName();
-
if(SUIT_ViewManager* aViewManager = getViewManager(VVTK_Viewer::Type(),true)){
+ const Handle(SALOME_InteractiveObject)& anIO = aListIO.First();
+ _PTR(Study) aCStudy = GetCStudy(GetAppStudy(this));
+ _PTR(SObject) aSObject = aCStudy->FindObjectID(anIO->getEntry());
+ myConfigSObject = aSObject;
_PTR(GenericAttribute) anAttr;
- if(aSObj->FindAttribute(anAttr,"AttributeComment")){
- _PTR(AttributeComment) aCmnt(anAttr);
- QString aStream(aCmnt->Value().c_str());
+ if(aSObject->FindAttribute(anAttr,"AttributeComment")){
+ _PTR(AttributeComment) aComment(anAttr);
+ QString aStream(aComment->Value().c_str());
Storable::TRestoringMap aMap;
Storable::StrToMap(aStream,aMap);
SUIT_ViewWindow* aWindow = aViewManager->getActiveView();
VVTK_ViewWindow* aViewWindow = dynamic_cast<VVTK_ViewWindow*>(aWindow);
+
+ Selection_Mode aSelectionMode = Storable::FindValue(aMap,"mySelectionMode").toInt();
+ SVTK_Selector* aSelector = aViewWindow->GetSelector();
+ aSelector->SetSelectionMode(aSelectionMode);
+
+ std::string aSegmentationMode;
+ if(VVTK_MainWindow1* aMainWindow = aViewWindow->getMainWindow1()){
+ aMainWindow->SetPlanesSegementation(false);
+ aMainWindow->SetSphereSegementation(false);
+ VISU_WidgetCtrl* aWidgetCtrl = aMainWindow->GetWidgetCtrl();
+ aSegmentationMode = Storable::FindValue(aMap,"mySegmentationMode").latin1();
+
+ if(aSegmentationMode == "Planes"){
+ VISU_PlanesWidget *aPlanesWidget = aWidgetCtrl->GetPlanesWidget();
+ float anOrigin[3];
+ anOrigin[0] = Storable::FindValue(aMap,"myCursorOrigin[0]").toDouble();
+ anOrigin[1] = Storable::FindValue(aMap,"myCursorOrigin[1]").toDouble();
+ anOrigin[2] = Storable::FindValue(aMap,"myCursorOrigin[2]").toDouble();
+ aPlanesWidget->SetOrigin(anOrigin);
+
+ float aNormal[3];
+ aNormal[0] = Storable::FindValue(aMap,"myCursorNormal[0]").toDouble();
+ aNormal[1] = Storable::FindValue(aMap,"myCursorNormal[1]").toDouble();
+ aNormal[2] = Storable::FindValue(aMap,"myCursorNormal[2]").toDouble();
+ aPlanesWidget->SetNormal(aNormal);
+
+ float aDepth = Storable::FindValue(aMap,"myCursorDepth").toDouble();
+ aPlanesWidget->SetDistance(aDepth);
+
+ aMainWindow->SetPlanesSegementation(true);
+ }else if(aSegmentationMode == "Sphere"){
+ VISU_SphereWidget *aSphereWidget = aWidgetCtrl->GetSphereWidget();
+ float aCenter[3];
+ aCenter[0] = Storable::FindValue(aMap,"mySphereCursorCenter[0]").toDouble();
+ aCenter[1] = Storable::FindValue(aMap,"mySphereCursorCenter[1]").toDouble();
+ aCenter[2] = Storable::FindValue(aMap,"mySphereCursorCenter[2]").toDouble();
+ aSphereWidget->SetCenter(aCenter);
+
+ float aRadius = Storable::FindValue(aMap,"mySphereCursorRaduis").toDouble();
+ aSphereWidget->SetRadius(aRadius);
+
+ aMainWindow->SetSphereSegementation(true);
+ }
+ }
- SetViewParams(aViewWindow,aMap);
+ if(VVTK_MainWindow1* aMainWindow = aViewWindow->getMainWindow1()){
+ SVTK_RenderWindowInteractor* anInteractor = aMainWindow->GetInteractor();
+ if(anInteractor->isVisible()){
+ SetMainWindowParams(this,myConfigSObject,aViewWindow,aMainWindow);
+ }else
+ anInteractor->installEventFilter(this);
+ }
+
+ if(aSegmentationMode != ""){
+ if(VVTK_MainWindow2* aMainWindow = aViewWindow->getMainWindow2()){
+ SVTK_RenderWindowInteractor* anInteractor = aMainWindow->GetInteractor();
+ if(anInteractor->isVisible())
+ SetMainWindowParams(this,myConfigSObject,aViewWindow,aMainWindow);
+ else
+ anInteractor->installEventFilter(this);
+ }
+ }
- SetGaussPointsSelection(this,aViewWindow,aCStudy,aSObj);
+ SetGaussPointsSelection(this,aViewWindow,aCStudy,aSObject);
}
}
}
+
+//---------------------------------------------------------------
+bool
+VisuGUI_Module::
+eventFilter( QObject * theWatched, QEvent * theEvent )
+{
+ bool aRet = VisuGUI::eventFilter(theWatched,theEvent);
+ if(theEvent->type() == QEvent::Show){
+ if(SUIT_ViewManager* aViewManager = getViewManager(VVTK_Viewer::Type(),false)){
+ SUIT_ViewWindow* aWindow = aViewManager->getActiveView();
+ VVTK_ViewWindow* aViewWindow = dynamic_cast<VVTK_ViewWindow*>(aWindow);
+ if(VVTK_MainWindow1* aMainWindow = aViewWindow->getMainWindow1()){
+ SVTK_RenderWindowInteractor* anInteractor = aMainWindow->GetInteractor();
+ if(theWatched == anInteractor){
+ SetMainWindowParams(this,myConfigSObject,aViewWindow,aMainWindow);
+ anInteractor->removeEventFilter(this);
+ }
+ }
+ if(VVTK_MainWindow2* aMainWindow = aViewWindow->getMainWindow2()){
+ SVTK_RenderWindowInteractor* anInteractor = aMainWindow->GetInteractor();
+ if(theWatched == aMainWindow->GetInteractor()){
+ SetMainWindowParams(this,myConfigSObject,aViewWindow,aMainWindow);
+ anInteractor->removeEventFilter(this);
+ }
+ }
+ }
+ }
+ return aRet;
+}