From: vsv Date: Thu, 21 Aug 2008 14:57:21 +0000 (+0000) Subject: MainWindow removed from using X-Git-Tag: TG_VISU_2008_2008-08-22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=765d6482387dc50e49b6f20a7816a6412e585156;p=modules%2Fvisu.git MainWindow removed from using --- diff --git a/src/VISUGUI/VisuGUI_ClippingPanel.cxx b/src/VISUGUI/VisuGUI_ClippingPanel.cxx index 59984c11..0714ff8a 100644 --- a/src/VISUGUI/VisuGUI_ClippingPanel.cxx +++ b/src/VISUGUI/VisuGUI_ClippingPanel.cxx @@ -655,16 +655,23 @@ bool VisuGUI_ClippingPanel::isVISUDataReady() void VisuGUI_ClippingPanel::onApply() { if (myIsApplied) return; - - int aPrsNum = myPrsList->currentRow(); - if (aPrsNum < 0) return; - - foreach(int aPlnNum, myCheckedPlanes) { - applyPlaneToPrs(aPlnNum, aPrsNum, (myPlanesList->item(aPlnNum, 0)->checkState() == Qt::Checked)); + + PlaneDef aPlane; + int i; + for(i = 0; i < myPlanes.size(); i++) { + aPlane = myPlanes.at(i); + aPlane.plane->setActive((myPlanesList->item(i, 1)->checkState() == Qt::Checked)); } - myCheckedPlanes.clear(); myIsApplied = true; - VISU::UpdateObjBrowser(myModule); + + int aPrsNum = myPrsList->currentRow(); + if (aPrsNum > -1) { + for(i = 0; i < myPlanes.size(); i++) { + applyPlaneToPrs(i, aPrsNum, (myPlanesList->item(i, 0)->checkState() == Qt::Checked)); + } + //myCheckedPlanes.clear(); + VISU::UpdateObjBrowser(myModule); + } if (myViewWindow) myViewWindow->Repaint(); } @@ -738,13 +745,18 @@ void VisuGUI_ClippingPanel::onCellChanged(int row, int col) PlaneDef aPlane = myPlanes.at(row); bool isChecked = (myPlanesList->item(row, col)->checkState() == Qt::Checked); if (col == 1) { // activate column clicked - aPlane.plane->setActive(isChecked); + if (isAutoApply()) + aPlane.plane->setActive(isChecked); + else { + myIsApplied = false; + return; + } } else { // Plane checked if (aPlane.isAuto) return; if (!isAutoApply()) { - myCheckedPlanes.append(row); + //myCheckedPlanes.append(row); myIsApplied = false; return; } @@ -768,12 +780,13 @@ void VisuGUI_ClippingPanel::applyPlaneToPrs(int thePlaneNum, int thePrsNum, bool _PTR(SObject) aSObject = aPlane.plane->getPlaneObject(); _PTR(SObject) aPrsSObj = aStudy->FindObjectID(aPrs->GetEntry()); if (isChecked) { - if (!containsPlane(aPrs, aPlane)) + if (!containsPlane(aPrs, aPlane)) { aPrs->AddClippingPlane(aPlane.plane); - if(!aStudy->GetProperties()->IsLocked()) { - _PTR(SObject) aNewObj = aBuilder->NewObject(aSObject); + if(!aStudy->GetProperties()->IsLocked()) { + _PTR(SObject) aNewObj = aBuilder->NewObject(aSObject); aBuilder->Addreference(aNewObj, aPrsSObj); + } } } else { for (int i = 0; i < aPrs->GetNumberOfClippingPlanes(); i++) { diff --git a/src/VISUGUI/VisuGUI_ClippingPanel.h b/src/VISUGUI/VisuGUI_ClippingPanel.h index 27b977b8..b96a4dd1 100644 --- a/src/VISUGUI/VisuGUI_ClippingPanel.h +++ b/src/VISUGUI/VisuGUI_ClippingPanel.h @@ -178,7 +178,7 @@ private slots: int myEditingPlanePos; SVTK_ViewWindow* myViewWindow; bool myIsApplied; - QList myCheckedPlanes; + //QList myCheckedPlanes; }; #endif diff --git a/src/VISUGUI/VisuGUI_GaussPointsSelectionPane.cxx b/src/VISUGUI/VisuGUI_GaussPointsSelectionPane.cxx index 15d621e6..4d5595df 100644 --- a/src/VISUGUI/VisuGUI_GaussPointsSelectionPane.cxx +++ b/src/VISUGUI/VisuGUI_GaussPointsSelectionPane.cxx @@ -39,7 +39,7 @@ #include "SVTK_Selector.h" #include "SVTK_ViewWindow.h" -#include "SVTK_MainWindow.h" +//#include "SVTK_MainWindow.h" #include "SVTK_RenderWindowInteractor.h" #include "VTKViewer_Algorithm.h" @@ -87,8 +87,8 @@ namespace SVTK_RenderWindowInteractor* anInteractor = NULL; if( SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow( myModule ) ) - if( SVTK_MainWindow* aMainWindow = aViewWindow->getMainWindow() ) - anInteractor = aMainWindow->GetInteractor(); + //if( SVTK_MainWindow* aMainWindow = aViewWindow->getMainWindow() ) + anInteractor = aViewWindow->GetInteractor(); if ( !anInteractor ) return aResult; @@ -355,11 +355,11 @@ SVTK_RenderWindowInteractor* VisuGUI_GaussPointsSelectionPane::getInteractor() { if( SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow( myModule ) ) { - if( SVTK_MainWindow* aMainWindow = aViewWindow->getMainWindow() ) - { - SVTK_RenderWindowInteractor* anInteractor = aMainWindow->GetInteractor(); + //if( SVTK_MainWindow* aMainWindow = aViewWindow->getMainWindow() ) + //{ + SVTK_RenderWindowInteractor* anInteractor = aViewWindow->GetInteractor(); return anInteractor; - } + //} } return 0; } diff --git a/src/VISUGUI/VisuGUI_Module.cxx b/src/VISUGUI/VisuGUI_Module.cxx index 072b5155..2ed05390 100644 --- a/src/VISUGUI/VisuGUI_Module.cxx +++ b/src/VISUGUI/VisuGUI_Module.cxx @@ -54,7 +54,7 @@ #include "SVTK_ViewModel.h" #include "SVTK_ViewManager.h" -#include "SVTK_MainWindow.h" +#include "SVTK_ViewWindow.h" #include "SVTK_RenderWindowInteractor.h" #include "VISU_Event.h" @@ -991,31 +991,31 @@ void VisuGUI_Module::setProperty( SVTK_ViewWindow* viewWindow, const QString& pr return; SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); - SVTK_MainWindow* aMainWindow = viewWindow->getMainWindow(); + //SVTK_MainWindow* aMainWindow = viewWindow->getMainWindow(); int val; if ( pref == "speed_increment" ) { val = resMgr->integerValue( "VTKViewer", pref, 10 ); - aMainWindow->InvokeEvent( SVTK::SetSpeedIncrementEvent, &val ); + viewWindow->InvokeEvent( SVTK::SetSpeedIncrementEvent, &val ); } else if ( pref == "spacemouse_func1_btn" ) { val = resMgr->integerValue( "VTKViewer", pref, 1 ); - aMainWindow->InvokeEvent( SVTK::SetSMDecreaseSpeedEvent, &val ); + viewWindow->InvokeEvent( SVTK::SetSMDecreaseSpeedEvent, &val ); } else if ( pref == "spacemouse_func2_btn" ) { val = resMgr->integerValue( "VTKViewer", pref, 2 ); - aMainWindow->InvokeEvent( SVTK::SetSMIncreaseSpeedEvent, &val ); + viewWindow->InvokeEvent( SVTK::SetSMIncreaseSpeedEvent, &val ); } else if ( pref == "spacemouse_func3_btn" ) { val = resMgr->integerValue( "VISU", pref, 10 ); - aMainWindow->InvokeEvent( VISU::SetSMDecreaseMagnificationEvent, &val ); + viewWindow->InvokeEvent( VISU::SetSMDecreaseMagnificationEvent, &val ); } else if ( pref == "spacemouse_func4_btn" ) { val = resMgr->integerValue( "VISU", pref, 11 ); - aMainWindow->InvokeEvent( VISU::SetSMIncreaseMagnificationEvent, &val ); + viewWindow->InvokeEvent( VISU::SetSMIncreaseMagnificationEvent, &val ); } else if ( pref == "spacemouse_func5_btn" ) { val = resMgr->integerValue( "VTKViewer", pref, 9 ); - aMainWindow->InvokeEvent( SVTK::SetSMDominantCombinedSwitchEvent, &val ); + viewWindow->InvokeEvent( SVTK::SetSMDominantCombinedSwitchEvent, &val ); } } diff --git a/src/VISUGUI/VisuGUI_SelectionPanel.cxx b/src/VISUGUI/VisuGUI_SelectionPanel.cxx index 0a750c34..6257e402 100644 --- a/src/VISUGUI/VisuGUI_SelectionPanel.cxx +++ b/src/VISUGUI/VisuGUI_SelectionPanel.cxx @@ -61,7 +61,7 @@ #include "SALOME_ListIteratorOfListIO.hxx" #include "SVTK_ViewWindow.h" -#include "SVTK_MainWindow.h" +//#include "SVTK_MainWindow.h" #include "SVTK_Selector.h" #include "SVTK_RenderWindowInteractor.h" @@ -423,11 +423,11 @@ void VisuGUI_SelectionPanel::onSelectionEvent() { int aType = myTabWidget->currentIndex(); - if(SVTK_MainWindow* aMainWindow = aViewWindow->getMainWindow()) - { - SVTK_RenderWindowInteractor* anInteractor = aMainWindow->GetInteractor(); + //if(SVTK_MainWindow* aMainWindow = aViewWindow->getMainWindow()) + //{ + SVTK_RenderWindowInteractor* anInteractor = aViewWindow->GetInteractor(); myGaussPointsPane->setInteractor(anInteractor); - } + //} SVTK_Selector* aSelector = aViewWindow->GetSelector(); @@ -672,13 +672,13 @@ bool onIdEdit (const QString& theText, aViewWindow->highlight(anIO, true, true); - if( SVTK_MainWindow* aMainWindow = aViewWindow->getMainWindow() ) - { - SVTK_RenderWindowInteractor* anInteractor = aMainWindow->GetInteractor(); + //if( SVTK_MainWindow* aMainWindow = aViewWindow->getMainWindow() ) + //{ + SVTK_RenderWindowInteractor* anInteractor = aViewWindow->GetInteractor(); VISU_Actor* anActor = SVTK::Find(anInteractor->getRenderer()->GetActors(), SVTK::TIsSameIObject( anIO )); anActor->Highlight( anIO ); - } + //} return true; diff --git a/src/VVTK/Makefile.am b/src/VVTK/Makefile.am index cfa91ad8..8afb0e31 100755 --- a/src/VVTK/Makefile.am +++ b/src/VVTK/Makefile.am @@ -29,46 +29,17 @@ lib_LTLIBRARIES= libVVTK.la # header files salomeinclude_HEADERS= \ VVTK.h \ -# VVTK_ViewManager.h \ -# VVTK_ViewModel.h \ -# VVTK_InteractorStyle.h \ -# VVTK_PickingDlg.h \ -# VVTK_SegmentationCursorDlg.h \ VVTK_PrimitiveBox.h \ VVTK_SizeBox.h -# VVTK_ViewWindow.h \ -# VVTK_MainWindow.h \ -# VVTK_ImageWriter.h \ -# VVTK_ImageWriterMgr.h \ -# VVTK_RecorderDlg.h \ -# VVTK_Recorder.h dist_libVVTK_la_SOURCES= \ -# VVTK_ViewManager.cxx \ -# VVTK_ViewModel.cxx \ -# VVTK_InteractorStyle.cxx \ -# VVTK_PickingDlg.cxx \ -# VVTK_SegmentationCursorDlg.cxx \ VVTK_PrimitiveBox.cxx \ VVTK_SizeBox.cxx -# VVTK_ViewWindow.cxx \ -# VVTK_Renderer.cxx \ -# VVTK_MainWindow.cxx \ -# VVTK_ImageWriter.cxx \ -# VVTK_ImageWriterMgr.cxx \ -# VVTK_RecorderDlg.cxx \ -# VVTK_Recorder.cxx MOC_FILES= \ -# VVTK_ViewWindow_moc.cxx \ -# VVTK_ViewModel_moc.cxx \ -# VVTK_ViewManager_moc.cxx \ -# VVTK_PickingDlg_moc.cxx \ -# VVTK_SegmentationCursorDlg_moc.cxx \ -# VVTK_RecorderDlg_moc.cxx \ VVTK_PrimitiveBox_moc.cxx \ VVTK_SizeBox_moc.cxx -# VVTK_MainWindow_moc.cxx + nodist_libVVTK_la_SOURCES=$(MOC_FILES) libVVTK_la_CPPFLAGS= \