From 355b471d49894323f55712c877a53cdc2c3bf705 Mon Sep 17 00:00:00 2001 From: apo Date: Wed, 10 May 2006 06:51:44 +0000 Subject: [PATCH] To make the code compilable (must to be uncommented in future) --- src/VISUGUI/VisuGUI.cxx | 202 ++++++++++++++++++++-------------------- 1 file changed, 101 insertions(+), 101 deletions(-) diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index 264c03bc..04efddee 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -2279,10 +2279,10 @@ createActions() tr("MEN_SHOW_ANIMATION"), "", 0, aParent, false, this, SLOT(OnShowAnimation())); - aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_PLOT_3D")); - createAction( VISU_PLOT3D_FROM_CUTPLANE, tr("MEN_PLOT3D_FROM_CUTPLANE"), QIconSet(aPixmap), - tr("MEN_PLOT3D_FROM_CUTPLANE"), "", 0, aParent, false, - this, SLOT(OnPlot3dFromCutPlane())); + //aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_PLOT_3D")); + //createAction( VISU_PLOT3D_FROM_CUTPLANE, tr("MEN_PLOT3D_FROM_CUTPLANE"), QIconSet(aPixmap), + // tr("MEN_PLOT3D_FROM_CUTPLANE"), "", 0, aParent, false, + // this, SLOT(OnPlot3dFromCutPlane())); } void @@ -2721,8 +2721,8 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, Q } } - if (isOneCutPlane) - action( VISU_PLOT3D_FROM_CUTPLANE )->addTo(theMenu); + //if (isOneCutPlane) + // action( VISU_PLOT3D_FROM_CUTPLANE )->addTo(theMenu); theMenu->insertSeparator(); @@ -3215,99 +3215,99 @@ LightApp_Displayer* VisuGUI::displayer() void VisuGUI::OnPlot3dFromCutPlane() { - _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; - - - VISU::CutPlanes_i* aCutPrs = 0; - Handle(SALOME_InteractiveObject) anIO; - _PTR(SObject) aSObject; - SALOME_ListIteratorOfListIO It (aListIO); - for (; It.More(); It.Next()) { - anIO = It.Value(); - - if (!anIO.IsNull() && anIO->hasEntry()) { - aSObject = aCStudy->FindObjectID(anIO->getEntry()); - if ( !aSObject ) - continue; - CORBA::Object_var anObject = GetSelectedObj(GetAppStudy(this), anIO->getEntry()); - if (!CORBA::is_nil(anObject)) { - VISU::Prs3d_i* aPrsObject = dynamic_cast(VISU::GetServant(anObject).in()); - if (aPrsObject->GetType() == VISU::TCUTPLANES) { - aCutPrs = dynamic_cast(aPrsObject); - if (aCutPrs) - break; - } - } - } - } - - if (aCutPrs) { - _PTR(SObject) aTimeStampSObj = aSObject->GetFather(); - if (SUIT_ViewManager* aViewManager = getApp()->activeViewManager()) { - QString aType = aViewManager->getType(); - bool isVVTK = aType == VVTK_Viewer::Type(); - - Storable::TRestoringMap aMap = getMapOfValue(aTimeStampSObj); - bool isExist; - aType = Storable::FindValue(aMap,"myType",&isExist); - if (!isExist || aType.toInt() != TTIMESTAMP ) - return; - - QString aMeshName = Storable::FindValue(aMap,"myMeshName",&isExist).latin1(); - QString anEntity = Storable::FindValue(aMap,"myEntityId",&isExist).latin1(); - QString aFieldName = Storable::FindValue(aMap,"myFieldName",&isExist).latin1(); - QString aTimeStampId = Storable::FindValue(aMap,"myTimeStampId",&isExist).latin1(); - - int aPos; - SUIT_ViewWindow* aViewWindow = 0; - if (isVVTK) { - aViewWindow = GetViewWindow(this); - aPos = GetFreePositionOfDefaultScalarBar(this, dynamic_cast(aViewWindow)); - } else { - aViewWindow = GetViewWindow(this); - aPos = GetFreePositionOfDefaultScalarBar(this, dynamic_cast(GetViewWindow(this))); - } - GetResourceMgr()->setValue("VISU", "scalar_bar_position_num", aPos); - - VISU::Plot3D_i* aPrs3d = CreatePrs3d(this, aTimeStampSObj, aMeshName.latin1(), (Entity)anEntity.toInt(), - aFieldName.latin1(), aTimeStampId.toInt()); - if (aPrs3d) { - SUIT_ResourceMgr* aResourceMgr = GetResourceMgr(); - int aValue = aResourceMgr->integerValue("VISU","BuildDefaultPrs3d",0); - if (!aValue) { - VisuGUI_Plot3DDlg* aDlg = new VisuGUI_Plot3DDlg(this); - aDlg->initFromPrsObject(aPrs3d); - int aOrient = aCutPrs->GetOrientationType(); // Plot3d has the same orientation type - double aRotX = aCutPrs->GetRotateX(); - double aRotY = aCutPrs->GetRotateY(); - double aPlanePos = aCutPrs->GetPlanePosition(0); - aDlg->setPlane(aOrient, aRotX, aRotY, aPlanePos); - - if (!(runAndWait(aDlg, 0) && (aDlg->storeToPrsObject(aPrs3d)))) { - DeletePrs3d(this, aPrs3d, anIO); - delete aDlg; - return; - } - delete aDlg; - UpdateObjBrowser(this, true, aTimeStampSObj); - } - SVTK_ViewWindow* aSVtkWindow = dynamic_cast(aViewWindow); - if ( aSVtkWindow ) { - PublishInView(this, aPrs3d, aSVtkWindow, /*highlight = */true); - aSVtkWindow->onFitAll(); - - AddScalarBarPosition(this, aSVtkWindow, aPrs3d, aPos); - } - } - } - application()->putInfo(QObject::tr("INF_DONE")); - } +// _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; +// +// +// VISU::CutPlanes_i* aCutPrs = 0; +// Handle(SALOME_InteractiveObject) anIO; +// _PTR(SObject) aSObject; +// SALOME_ListIteratorOfListIO It (aListIO); +// for (; It.More(); It.Next()) { +// anIO = It.Value(); +// +// if (!anIO.IsNull() && anIO->hasEntry()) { +// aSObject = aCStudy->FindObjectID(anIO->getEntry()); +// if ( !aSObject ) +// continue; +// CORBA::Object_var anObject = GetSelectedObj(GetAppStudy(this), anIO->getEntry()); +// if (!CORBA::is_nil(anObject)) { +// VISU::Prs3d_i* aPrsObject = dynamic_cast(VISU::GetServant(anObject).in()); +// if (aPrsObject->GetType() == VISU::TCUTPLANES) { +// aCutPrs = dynamic_cast(aPrsObject); +// if (aCutPrs) +// break; +// } +// } +// } +// } +// +// if (aCutPrs) { +// _PTR(SObject) aTimeStampSObj = aSObject->GetFather(); +// if (SUIT_ViewManager* aViewManager = getApp()->activeViewManager()) { +// QString aType = aViewManager->getType(); +// bool isVVTK = aType == VVTK_Viewer::Type(); +// +// Storable::TRestoringMap aMap = getMapOfValue(aTimeStampSObj); +// bool isExist; +// aType = Storable::FindValue(aMap,"myType",&isExist); +// if (!isExist || aType.toInt() != TTIMESTAMP ) +// return; +// +// QString aMeshName = Storable::FindValue(aMap,"myMeshName",&isExist).latin1(); +// QString anEntity = Storable::FindValue(aMap,"myEntityId",&isExist).latin1(); +// QString aFieldName = Storable::FindValue(aMap,"myFieldName",&isExist).latin1(); +// QString aTimeStampId = Storable::FindValue(aMap,"myTimeStampId",&isExist).latin1(); +// +// int aPos; +// SUIT_ViewWindow* aViewWindow = 0; +// if (isVVTK) { +// aViewWindow = GetViewWindow(this); +// aPos = GetFreePositionOfDefaultScalarBar(this, dynamic_cast(aViewWindow)); +// } else { +// aViewWindow = GetViewWindow(this); +// aPos = GetFreePositionOfDefaultScalarBar(this, dynamic_cast(GetViewWindow(this))); +// } +// GetResourceMgr()->setValue("VISU", "scalar_bar_position_num", aPos); +// +// VISU::Plot3D_i* aPrs3d = CreatePrs3d(this, aTimeStampSObj, aMeshName.latin1(), (Entity)anEntity.toInt(), +// aFieldName.latin1(), aTimeStampId.toInt()); +// if (aPrs3d) { +// SUIT_ResourceMgr* aResourceMgr = GetResourceMgr(); +// int aValue = aResourceMgr->integerValue("VISU","BuildDefaultPrs3d",0); +// if (!aValue) { +// VisuGUI_Plot3DDlg* aDlg = new VisuGUI_Plot3DDlg(this); +// aDlg->initFromPrsObject(aPrs3d); +// int aOrient = aCutPrs->GetOrientationType(); // Plot3d has the same orientation type +// double aRotX = aCutPrs->GetRotateX(); +// double aRotY = aCutPrs->GetRotateY(); +// double aPlanePos = aCutPrs->GetPlanePosition(0); +// aDlg->setPlane(aOrient, aRotX, aRotY, aPlanePos); +// +// if (!(runAndWait(aDlg, 0) && (aDlg->storeToPrsObject(aPrs3d)))) { +// DeletePrs3d(this, aPrs3d, anIO); +// delete aDlg; +// return; +// } +// delete aDlg; +// UpdateObjBrowser(this, true, aTimeStampSObj); +// } +// SVTK_ViewWindow* aSVtkWindow = dynamic_cast(aViewWindow); +// if ( aSVtkWindow ) { +// PublishInView(this, aPrs3d, aSVtkWindow, /*highlight = */true); +// aSVtkWindow->onFitAll(); +// +// AddScalarBarPosition(this, aSVtkWindow, aPrs3d, aPos); +// } +// } +// } +// application()->putInfo(QObject::tr("INF_DONE")); +// } } -- 2.39.2