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();
}
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;
}
_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++) {
int myEditingPlanePos;
SVTK_ViewWindow* myViewWindow;
bool myIsApplied;
- QList<int> myCheckedPlanes;
+ //QList<int> myCheckedPlanes;
};
#endif
#include "SVTK_Selector.h"
#include "SVTK_ViewWindow.h"
-#include "SVTK_MainWindow.h"
+//#include "SVTK_MainWindow.h"
#include "SVTK_RenderWindowInteractor.h"
#include "VTKViewer_Algorithm.h"
SVTK_RenderWindowInteractor* anInteractor = NULL;
if( SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>( myModule ) )
- if( SVTK_MainWindow* aMainWindow = aViewWindow->getMainWindow() )
- anInteractor = aMainWindow->GetInteractor();
+ //if( SVTK_MainWindow* aMainWindow = aViewWindow->getMainWindow() )
+ anInteractor = aViewWindow->GetInteractor();
if ( !anInteractor )
return aResult;
{
if( SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>( 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;
}
#include "SVTK_ViewModel.h"
#include "SVTK_ViewManager.h"
-#include "SVTK_MainWindow.h"
+#include "SVTK_ViewWindow.h"
#include "SVTK_RenderWindowInteractor.h"
#include "VISU_Event.h"
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 );
}
}
#include "SALOME_ListIteratorOfListIO.hxx"
#include "SVTK_ViewWindow.h"
-#include "SVTK_MainWindow.h"
+//#include "SVTK_MainWindow.h"
#include "SVTK_Selector.h"
#include "SVTK_RenderWindowInteractor.h"
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();
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<VISU_Actor>(anInteractor->getRenderer()->GetActors(),
SVTK::TIsSameIObject<VISU_Actor>( anIO ));
anActor->Highlight( anIO );
- }
+ //}
return true;
# 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= \