From 3b2d95166227d0a2a6931356292a47e9838ad635 Mon Sep 17 00:00:00 2001 From: vsr Date: Sun, 28 Feb 2010 20:19:40 +0000 Subject: [PATCH] Improve actions management Remove deprecated code --- src/GEOMToolsGUI/GEOMToolsGUI.cxx | 253 ++++++-------------- src/GEOMToolsGUI/GEOMToolsGUI.h | 3 - src/GEOMToolsGUI/GEOMToolsGUI_1.cxx | 112 --------- src/GenerationGUI/GenerationGUI.cxx | 9 +- src/GroupGUI/GroupGUI.cxx | 8 +- src/MeasureGUI/MeasureGUI.cxx | 27 ++- src/OperationGUI/OperationGUI.cxx | 17 +- src/PrimitiveGUI/PrimitiveGUI.cxx | 15 +- src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx | 2 +- src/RepairGUI/RepairGUI.cxx | 25 +- src/TransformationGUI/TransformationGUI.cxx | 19 +- 11 files changed, 137 insertions(+), 353 deletions(-) diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index cb93e55af..8f58d5c0c 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -27,6 +27,7 @@ #include "GEOMToolsGUI_DeleteDlg.h" #include +#include "GeometryGUI_Operations.h" #include #include #include @@ -285,149 +286,75 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent) { getGeometryGUI()->EmitSignalDeactivateDialog(); - switch (theCommandID) - { - case 31: // COPY - { - OnEditCopy(); - break; - } - case 33: // DELETE - { - OnEditDelete(); - break; - } - case 111: // IMPORT BREP - case 112: // IMPORT IGES - case 113: // IMPORT STEP - { - Import(); - break; - } - case 121: // EXPORT BREP - case 122: // EXPORT IGES - case 123: // EXPORT STEP - { - Export(); - break; - } - case 2171: // POPUP VIEWER - SELECT ONLY - VERTEX - { - OnSelectOnly( GEOM_POINT ); - break; - } - case 2172: // POPUP VIEWER - SELECT ONLY - EDGE - { - OnSelectOnly( GEOM_EDGE ); - break; - } - case 2173: // POPUP VIEWER - SELECT ONLY - WIRE - { - OnSelectOnly( GEOM_WIRE ); - break; - } - case 2174: // POPUP VIEWER - SELECT ONLY - FACE - { - OnSelectOnly( GEOM_FACE ); - break; - } - case 2175: // POPUP VIEWER - SELECT ONLY - SHELL - { - OnSelectOnly( GEOM_SHELL ); - break; - } - case 2176: // POPUP VIEWER - SELECT ONLY - SOLID - { - OnSelectOnly( GEOM_SOLID ); - break; - } - case 2177: // POPUP VIEWER - SELECT ONLY - COMPOUND - { - OnSelectOnly( GEOM_COMPOUND ); - break; - } - case 2178: // POPUP VIEWER - SELECT ONLY - SELECT ALL - { - OnSelectOnly( GEOM_ALLOBJECTS ); - break; - } - case 411: // SETTINGS - ADD IN STUDY - { - // SAN -- TO BE REMOVED !!! - break; - } - case 412: // SETTINGS - SHADING COLOR - { - OnSettingsColor(); - break; - } - case 804: // ADD IN STUDY - POPUP VIEWER - { - // SAN -- TO BE REMOVED !!!! - break; - } - case 901: // RENAME - { - OnRename(); - break; - } - case 5103: // CHECK GEOMETRY - { - OnCheckGeometry(); - break; - } - case 8031: // DEFLECTION ANGLE - POPUP VIEWER - { - OnDeflection(); - break; - } - case 8032: // COLOR - POPUP VIEWER - { - OnColor(); - break; - } - case 8033: // TRANSPARENCY - POPUP VIEWER - { - OnTransparency(); - break; - } - case 8034: // ISOS - POPUP VIEWER - { - OnNbIsos(); - break; - } - case 8035: // AUTO COLOR - POPUP VIEWER - { - OnAutoColor(); - break; - } - case 8036: // DISABLE AUTO COLOR - POPUP VIEWER - { - OnDisableAutoColor(); - break; - } - case 8037: // SHOW CHILDREN - POPUP VIEWER - case 8038: // HIDE CHILDREN - POPUP VIEWER - { - OnShowHideChildren( theCommandID == 8037 ); - break; - } - case 8039: // POINT MARKER - { - OnPointMarker(); - break; - } - case 9024 : // OPEN - OBJBROSER POPUP - { - OnOpen(); - break; - } - default: - { - SUIT_Session::session()->activeApplication()->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); - break; - } - } + switch ( theCommandID ) { + case GEOMOp::OpDelete: // EDIT - DELETE + OnEditDelete(); + break; + case GEOMOp::OpImport: // FILE - IMPORT + Import(); + break; + case GEOMOp::OpExport: // FILE - EXPORT + Export(); + break; + case GEOMOp::OpCheckGeom: // TOOLS - CHECK GEOMETRY + OnCheckGeometry(); + break; + case GEOMOp::OpSelectVertex: // POPUP - SELECT ONLY - VERTEX + OnSelectOnly( GEOM_POINT ); + break; + case GEOMOp::OpSelectEdge: // POPUP - SELECT ONLY - EDGE + OnSelectOnly( GEOM_EDGE ); + break; + case GEOMOp::OpSelectWire: // POPUP - SELECT ONLY - WIRE + OnSelectOnly( GEOM_WIRE ); + break; + case GEOMOp::OpSelectFace: // POPUP - SELECT ONLY - FACE + OnSelectOnly( GEOM_FACE ); + break; + case GEOMOp::OpSelectShell: // POPUP - SELECT ONLY - SHELL + OnSelectOnly( GEOM_SHELL ); + break; + case GEOMOp::OpSelectSolid: // POPUP - SELECT ONLY - SOLID + OnSelectOnly( GEOM_SOLID ); + break; + case GEOMOp::OpSelectCompound: // POPUP - SELECT ONLY - COMPOUND + OnSelectOnly( GEOM_COMPOUND ); + break; + case GEOMOp::OpSelectAll: // POPUP - SELECT ONLY - SELECT ALL + OnSelectOnly( GEOM_ALLOBJECTS ); + break; + case GEOMOp::OpRename: // POPUP - RENAME + OnRename(); + break; + case GEOMOp::OpDeflection: // POPUP - DEFLECTION ANGLE + OnDeflection(); + break; + case GEOMOp::OpColor: // POPUP - COLOR + OnColor(); + break; + case GEOMOp::OpTransparency: // POPUP - TRANSPARENCY + OnTransparency(); + break; + case GEOMOp::OpIsos: // POPUP - ISOS + OnNbIsos(); + break; + case GEOMOp::OpAutoColor: // POPUP - AUTO COLOR + OnAutoColor(); + break; + case GEOMOp::OpNoAutoColor: // POPUP - DISABLE AUTO COLOR + OnDisableAutoColor(); + break; + case GEOMOp::OpShowChildren: // POPUP - SHOW CHILDREN + case GEOMOp::OpHideChildren: // POPUP - HIDE CHILDREN + OnShowHideChildren( theCommandID == GEOMOp::OpShowChildren ); + break; + case GEOMOp::OpPointMarker: // POPUP - POINT MARKER + OnPointMarker(); + break; + default: + SUIT_Session::session()->activeApplication()->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); + break; + } return true; } @@ -585,45 +512,9 @@ void GEOMToolsGUI::OnEditDelete() app->updateActions(); //SRN: To update a Save button in the toolbar } - -//============================================================================== -// function : OnEditCopy() -// purpose : -//============================================================================== -void GEOMToolsGUI::OnEditCopy() -{ -/* - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection() ); - GEOM::string_array_var listIOR = new GEOM::string_array; - - const SALOME_ListIO& List = Sel->StoredIObjects(); - - myGeomBase->ConvertListOfIOInListOfIOR(List, listIOR); - - Sel->ClearIObjects(); - - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - int aStudyID = aStudy->StudyId(); - - for (unsigned int ind = 0; ind < listIOR->length();ind++) { - GEOM::GEOM_Object_var aShapeInit = myGeom->GetIORFromString(listIOR[ind]); - try { - GEOM::GEOM_IInsertOperations_var IOp = myGeom->GetIInsertOperations(aStudyID); - GEOM::GEOM_Object_var result = IOp->MakeCopy(aShapeInit); - myGeomBase->Display(result); - } - catch (const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - } - - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_READY")); -*/ -} - //===================================================================================== // function : Import -// purpose : BRep, Iges, Step +// purpose : BRep, Iges, Step, ... //===================================================================================== bool GEOMToolsGUI::Import() { @@ -931,7 +822,7 @@ bool GEOMToolsGUI::Export() //===================================================================================== // function : RemoveObjectWithChildren -// purpose : to be used by OnEditDelete() method +// purpose : used by OnEditDelete() method //===================================================================================== void GEOMToolsGUI::removeObjectWithChildren(_PTR(SObject) obj, _PTR(Study) aStudy, diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.h b/src/GEOMToolsGUI/GEOMToolsGUI.h index d60f23484..6d88f6c16 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI.h @@ -56,10 +56,8 @@ private: bool Import(); bool Export(); - void OnEditCopy(); void OnEditDelete(); - void OnSettingsColor(); void OnRename(); void OnCheckGeometry(); @@ -70,7 +68,6 @@ private: void OnTransparency(); void OnNbIsos(); void OnDeflection(); - void OnOpen(); void OnSelectOnly(int mode); void OnShowHideChildren( bool ); void OnPointMarker(); diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index 543c07270..905ebb1a6 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -89,25 +89,6 @@ // VTK includes #include -void GEOMToolsGUI::OnSettingsColor() -{ - SUIT_Session* sess = SUIT_Session::session(); - SUIT_ResourceMgr* resMgr = sess->resourceMgr(); - SUIT_Desktop* desk = sess->activeApplication()->desktop(); - - QColor anInitColor = resMgr->colorValue( "Geometry", "SettingsShadingColor", QColor( "yellow" ) ); - - QColor aDialogColor = QColorDialog::getColor(anInitColor, desk ); - if( aDialogColor.isValid() ) - { - QString type = desk->activeWindow()->getViewManager()->getType(); - if( type != OCCViewer_Viewer::Type() && type != SVTK_Viewer::Type() ) - MESSAGE("Settings Color is not supported for current Viewer"); - - resMgr->setValue( "Geometry", "SettingsShadingColor", aDialogColor ); - } -} - void GEOMToolsGUI::OnRename() { SALOME_ListIO selected; @@ -644,99 +625,6 @@ void GEOMToolsGUI::OnDeflection() } // end vtkviewer } -void GEOMToolsGUI::OnOpen() -{ -/* - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); - _PTR(Study) aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - - SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); - Handle(SALOME_InteractiveObject) anIObject; - for(;It.More();It.Next()) { - anIObject = It.Value(); - _PTR(SObject) obj ( aStudy->FindObjectID(anIObject->getEntry()) ); - _PTR(AttributePersistentRef) aPersist; - _PTR(AttributeIOR) anIOR; - if(obj) { - // this SObject may be GEOM module root SObject - _PTR(ChildIterator) anIter ( aStudy->NewChildIterator() ); - _PTR(GenericAttribute) anAttr; - bool useSubItems = false; - while (anIter->More() && !useSubItems) { - _PTR(SObject) subobj ( anIter->Value() ); - if (subobj->FindAttribute(anAttr, "AttributePersistentRef")) { - useSubItems = true; - obj = subobj; - } - else - anIter->Next(); - } - obj->FindAttribute(anAttr, "AttributePersistentRef"); - - while(useSubItems?anIter->More():!anAttr->_is_nil()) { - if(!obj->FindAttribute(anAttr, "AttributeIOR") && - obj->FindAttribute(anAttr, "AttributePersistentRef")) { - _PTR(SComponent) FComp ( obj->GetFatherComponent() ); - if (FComp) { - if (FComp->FindAttribute(anAttr, "AttributeName")) { - _PTR(AttributeName) aName ( anAttr ); - QString compName = QAD_Application::getDesktop()->getComponentName(aName->Value().c_str()); - // parent->loadComponentData(parent->getComponentName(aName->Value())); - Engines::Component_var comp ; - if ( compName.compare("SUPERV") == 0 ) { - comp = QAD_Application::getDesktop()->getEngine( "SuperVisionContainer", compName) ; - } - else { - comp = QAD_Application::getDesktop()->getEngine( "FactoryServer", compName); - if ( comp->_is_nil() ) - comp = QAD_Application::getDesktop()->getEngine( "FactoryServerPy", compName); - } - - if (!CORBA::is_nil(comp)) { - SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(comp); - if (!CORBA::is_nil(driver)) { - SALOMEDS::StudyBuilder_var B = dynamic_cast(aStudy.get())->GetStudy()->NewBuilder(); - if (!CORBA::is_nil(B)) { - B->LoadWith(FComp,driver); - } else { - return; - } - } - else { - MESSAGE("loadComponentData(): Driver is null"); - return; - } - } - else { - MESSAGE("loadComponentData(): Engine is null"); - return; - } - // // load - // Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer","GEOM"); - // if (!CORBA::is_nil(comp)) { - // SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(comp); - // SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); - // SALOMEDS::SComponent_var SC = aStudy->FindComponent("GEOM"); - // if (!CORBA::is_nil(SC)) - // aStudyBuilder->LoadWith(SC,driver); - } - } - else { - MESSAGE("Component is null"); - } - } - if(useSubItems) { - anIter->Next(); - obj.reset( anIter->Value() ); - } - else - anAttr = NULL; - } - } - } -*/ -} - void GEOMToolsGUI::OnSelectOnly(int mode) { SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() ); diff --git a/src/GenerationGUI/GenerationGUI.cxx b/src/GenerationGUI/GenerationGUI.cxx index 0b16254ac..5754c2e5a 100644 --- a/src/GenerationGUI/GenerationGUI.cxx +++ b/src/GenerationGUI/GenerationGUI.cxx @@ -26,6 +26,7 @@ #include "GenerationGUI.h" #include +#include "GeometryGUI_Operations.h" #include #include @@ -67,10 +68,10 @@ bool GenerationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) QDialog* aDlg = NULL; switch ( theCommandID ) { - case 4031: aDlg = new GenerationGUI_PrismDlg ( getGeometryGUI(), parent ); break; - case 4032: aDlg = new GenerationGUI_RevolDlg ( getGeometryGUI(), parent ); break; - case 4033: aDlg = new GenerationGUI_FillingDlg ( getGeometryGUI(), parent ); break; - case 4034: aDlg = new GenerationGUI_PipeDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpPrism: aDlg = new GenerationGUI_PrismDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpRevolution: aDlg = new GenerationGUI_RevolDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpFilling: aDlg = new GenerationGUI_FillingDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpPipe: aDlg = new GenerationGUI_PipeDlg ( getGeometryGUI(), parent ); break; default: app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) ); break; } diff --git a/src/GroupGUI/GroupGUI.cxx b/src/GroupGUI/GroupGUI.cxx index fd59b68b5..e89e99e0a 100644 --- a/src/GroupGUI/GroupGUI.cxx +++ b/src/GroupGUI/GroupGUI.cxx @@ -27,6 +27,8 @@ #include "GroupGUI_GroupDlg.h" #include +#include "GeometryGUI_Operations.h" + #include #include @@ -80,11 +82,11 @@ bool GroupGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) } switch ( theCommandID ) { - case 800: - case 8001: // CREATE GROUP + case GEOMOp::OpGroupCreate: + case GEOMOp::OpGroupCreatePopup: // CREATE GROUP aDlg = new GroupGUI_GroupDlg( GroupGUI_GroupDlg::CreateGroup, getGeometryGUI(), parent ); break; - case 801: // EDIT GROUP + case GEOMOp::OpGroupEdit: // EDIT GROUP { SALOME_ListIO aList; aList.Clear(); diff --git a/src/MeasureGUI/MeasureGUI.cxx b/src/MeasureGUI/MeasureGUI.cxx index a240d7562..b4fe55235 100644 --- a/src/MeasureGUI/MeasureGUI.cxx +++ b/src/MeasureGUI/MeasureGUI.cxx @@ -26,6 +26,7 @@ #include "MeasureGUI.h" #include +#include "GeometryGUI_Operations.h" #include #include @@ -74,40 +75,40 @@ bool MeasureGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) QDialog* dlg = 0; switch ( theCommandID ) { - case 701: + case GEOMOp::OpProperties: dlg = new MeasureGUI_PropertiesDlg( getGeometryGUI(), parent ); break; // LENGTH, AREA AND VOLUME - case 702: + case GEOMOp::OpCenterMass: dlg = new MeasureGUI_CenterMassDlg( getGeometryGUI(), parent ); - break; // CENTER MASS - case 703: + break; // CENTER MASS7 + case GEOMOp::OpInertia: dlg = new MeasureGUI_InertiaDlg( getGeometryGUI(), parent ); break; // INERTIA - case 704 : + case GEOMOp::OpNormale : dlg = new MeasureGUI_NormaleDlg( getGeometryGUI(), parent ); break; // NORMALE - case 7041: + case GEOMOp::OpBoundingBox: dlg = new MeasureGUI_BndBoxDlg( getGeometryGUI(), parent ); break; // BOUNDING BOX - case 7042: + case GEOMOp::OpMinDistance: dlg = new MeasureGUI_DistanceDlg( getGeometryGUI(), parent ); break; // MIN DISTANCE - case 7043: + case GEOMOp::OpAngle: dlg = new MeasureGUI_AngleDlg( getGeometryGUI(), parent ); break; // ANGLE - case 705: + case GEOMOp::OpTolerance: dlg = new MeasureGUI_MaxToleranceDlg( getGeometryGUI(), parent ); break; // MAXTOLERANCE - case 706: + case GEOMOp::OpWhatIs: dlg = new MeasureGUI_WhatisDlg( getGeometryGUI(), parent ); break; // WHATIS - case 707: + case GEOMOp::OpCheckShape: dlg = new MeasureGUI_CheckShapeDlg( getGeometryGUI(), parent ); break; // CHECKSHAPE - case 7072: + case GEOMOp::OpCheckCompound: dlg = new MeasureGUI_CheckCompoundOfBlocksDlg( getGeometryGUI(), parent ); break; // CHECKCOMPOUND - case 708: + case GEOMOp::OpPointCoordinates: dlg = new MeasureGUI_PointDlg( getGeometryGUI(), parent ); break; // POINT COORDINATES default: diff --git a/src/OperationGUI/OperationGUI.cxx b/src/OperationGUI/OperationGUI.cxx index 74906380d..461b49f6d 100644 --- a/src/OperationGUI/OperationGUI.cxx +++ b/src/OperationGUI/OperationGUI.cxx @@ -26,6 +26,7 @@ #include "OperationGUI.h" #include +#include "GeometryGUI_Operations.h" #include #include @@ -73,14 +74,14 @@ bool OperationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) getGeometryGUI()->EmitSignalDeactivateDialog(); switch ( theCommandID ) { - case 503: ( new OperationGUI_PartitionDlg ( getGeometryGUI(), parent ) )->show(); break; - case 504: ( new OperationGUI_ArchimedeDlg ( getGeometryGUI(), parent ) )->show(); break; - case 505: ( new OperationGUI_FilletDlg ( getGeometryGUI(), parent ) )->show(); break; - case 506: ( new OperationGUI_ChamferDlg ( getGeometryGUI(), parent ) )->show(); break; - case 507: ( new OperationGUI_ClippingDlg ( getGeometryGUI(), parent ) )->show(); break; - case 508: ( new OperationGUI_GetShapesOnShapeDlg( getGeometryGUI(), parent ) )->show(); break; - case 510: ( new OperationGUI_Fillet1d2dDlg ( getGeometryGUI(), parent,true ) )->show(); break; - case 509: ( new OperationGUI_Fillet1d2dDlg ( getGeometryGUI(), parent,false ) )->show(); break; + case GEOMOp::OpPartition: ( new OperationGUI_PartitionDlg ( getGeometryGUI(), parent ) )->show(); break; + case GEOMOp::OpArchimede: ( new OperationGUI_ArchimedeDlg ( getGeometryGUI(), parent ) )->show(); break; + case GEOMOp::OpFillet3d: ( new OperationGUI_FilletDlg ( getGeometryGUI(), parent ) )->show(); break; + case GEOMOp::OpChamfer: ( new OperationGUI_ChamferDlg ( getGeometryGUI(), parent ) )->show(); break; + case GEOMOp::OpClipping: ( new OperationGUI_ClippingDlg ( getGeometryGUI(), parent ) )->show(); break; + case GEOMOp::OpShapesOnShape: ( new OperationGUI_GetShapesOnShapeDlg( getGeometryGUI(), parent ) )->show(); break; + case GEOMOp::OpFillet1d: ( new OperationGUI_Fillet1d2dDlg ( getGeometryGUI(), parent, true ) )->show(); break; + case GEOMOp::OpFillet2d: ( new OperationGUI_Fillet1d2dDlg ( getGeometryGUI(), parent, false ) )->show(); break; default: app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) ); } diff --git a/src/PrimitiveGUI/PrimitiveGUI.cxx b/src/PrimitiveGUI/PrimitiveGUI.cxx index b6c831aba..7eb17a923 100644 --- a/src/PrimitiveGUI/PrimitiveGUI.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI.cxx @@ -26,6 +26,7 @@ #include "PrimitiveGUI.h" #include +#include "GeometryGUI_Operations.h" #include #include @@ -68,25 +69,25 @@ bool PrimitiveGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) QDialog* aDlg = NULL; switch ( theCommandID ) { - case 4021: // BOX + case GEOMOp::OpBox: // BOX aDlg = new PrimitiveGUI_BoxDlg( getGeometryGUI(), parent ); break; - case 4022: // CYLINDER + case GEOMOp::OpCylinder: // CYLINDER aDlg = new PrimitiveGUI_CylinderDlg( getGeometryGUI(), parent ); break; - case 4023: // SPHERE + case GEOMOp::OpSphere: // SPHERE aDlg = new PrimitiveGUI_SphereDlg( getGeometryGUI(), parent ); break; - case 4024: // TORUS + case GEOMOp::OpTorus: // TORUS aDlg = new PrimitiveGUI_TorusDlg( getGeometryGUI(), parent ); break; - case 4025: // CONE + case GEOMOp::OpCone: // CONE aDlg = new PrimitiveGUI_ConeDlg( getGeometryGUI(), parent); break; - case 4026: // FACE + case GEOMOp::OpRectangle: // FACE aDlg = new PrimitiveGUI_FaceDlg( getGeometryGUI(), parent); break; - case 4027: // DISK + case GEOMOp::OpDisk: // DISK aDlg = new PrimitiveGUI_DiskDlg( getGeometryGUI(), parent); break; default: diff --git a/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx index dfbab6629..bd26bbd69 100755 --- a/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx @@ -57,7 +57,7 @@ PrimitiveGUI_FaceDlg::PrimitiveGUI_FaceDlg( GeometryGUI* theGeometryGUI, QWidget QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT"))); QPixmap image2 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_FACE_HW"))); - setWindowTitle( tr( "GEOM_FACE_TITLE" ) ); + setWindowTitle( tr( "GEOM_RECTANGLE_TITLE" ) ); /***************************************************************/ mainFrame()->GroupConstructors->setTitle( tr( "GEOM_FACE" ) ); diff --git a/src/RepairGUI/RepairGUI.cxx b/src/RepairGUI/RepairGUI.cxx index ff1045d49..2b89c4cf2 100644 --- a/src/RepairGUI/RepairGUI.cxx +++ b/src/RepairGUI/RepairGUI.cxx @@ -26,6 +26,7 @@ #include "RepairGUI.h" #include +#include "GeometryGUI_Operations.h" #include #include @@ -75,18 +76,18 @@ bool RepairGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) QDialog* aDlg = NULL; switch ( theCommandID ) { - case 601: aDlg = new RepairGUI_SewingDlg ( getGeometryGUI(), parent ); break; - case 602: aDlg = new RepairGUI_GlueDlg ( getGeometryGUI(), parent ); break; - case 603: aDlg = new RepairGUI_SuppressFacesDlg ( getGeometryGUI(), parent ); break; - case 604: aDlg = new RepairGUI_RemoveHolesDlg ( getGeometryGUI(), parent ); break; - case 605: aDlg = new RepairGUI_ShapeProcessDlg ( getGeometryGUI(), parent ); break; - case 606: aDlg = new RepairGUI_CloseContourDlg ( getGeometryGUI(), parent ); break; - case 607: aDlg = new RepairGUI_RemoveIntWiresDlg ( getGeometryGUI(), parent ); break; - case 608: aDlg = new RepairGUI_DivideEdgeDlg ( getGeometryGUI(), parent ); break; - case 609: aDlg = new RepairGUI_FreeBoundDlg ( getGeometryGUI(), parent ); break; - case 610: aDlg = new RepairGUI_FreeFacesDlg ( getGeometryGUI(), parent ); break; - case 611: aDlg = new RepairGUI_ChangeOrientationDlg ( getGeometryGUI(), parent ); break; - case 612: aDlg = new RepairGUI_RemoveExtraEdgesDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpSewing: aDlg = new RepairGUI_SewingDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpGlueFaces: aDlg = new RepairGUI_GlueDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpSuppressFaces: aDlg = new RepairGUI_SuppressFacesDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpSuppressHoles: aDlg = new RepairGUI_RemoveHolesDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpShapeProcess: aDlg = new RepairGUI_ShapeProcessDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpCloseContour: aDlg = new RepairGUI_CloseContourDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpRemoveIntWires: aDlg = new RepairGUI_RemoveIntWiresDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpAddPointOnEdge: aDlg = new RepairGUI_DivideEdgeDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpFreeBoundaries: aDlg = new RepairGUI_FreeBoundDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpFreeFaces: aDlg = new RepairGUI_FreeFacesDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpOrientation: aDlg = new RepairGUI_ChangeOrientationDlg ( getGeometryGUI(), parent ); break; + case GEOMOp::OpRemoveExtraEdges: aDlg = new RepairGUI_RemoveExtraEdgesDlg ( getGeometryGUI(), parent ); break; default: app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) ); break; diff --git a/src/TransformationGUI/TransformationGUI.cxx b/src/TransformationGUI/TransformationGUI.cxx index 136102503..7949e5566 100644 --- a/src/TransformationGUI/TransformationGUI.cxx +++ b/src/TransformationGUI/TransformationGUI.cxx @@ -27,6 +27,7 @@ #include #include +#include "GeometryGUI_Operations.h" #include #include @@ -77,31 +78,31 @@ bool TransformationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) QDialog* aDlg = NULL; switch ( theCommandID ) { - case 5021: // TRANSLATION + case GEOMOp::OpTranslate: // TRANSLATION aDlg = new TransformationGUI_TranslationDlg( getGeometryGUI(), parent ); break; - case 5022: // ROTATION + case GEOMOp::OpRotate: // ROTATION aDlg = new TransformationGUI_RotationDlg( getGeometryGUI(), parent ); break; - case 5023: // POSITION + case GEOMOp::OpChangeLoc: // POSITION aDlg = new TransformationGUI_PositionDlg( getGeometryGUI(), parent ); break; - case 5024: // MIRROR + case GEOMOp::OpMirror: // MIRROR aDlg = new TransformationGUI_MirrorDlg( getGeometryGUI(), parent ); break; - case 5025: // SCALE + case GEOMOp::OpScale: // SCALE aDlg = new TransformationGUI_ScaleDlg( getGeometryGUI(), parent ); break; - case 5026: // OFFSET + case GEOMOp::OpOffset: // OFFSET aDlg = new TransformationGUI_OffsetDlg( getGeometryGUI(), parent ); break; - case 5027: // MULTI TRANSLATION + case GEOMOp::OpMultiTranslate: // MULTI TRANSLATION aDlg = new TransformationGUI_MultiTranslationDlg( getGeometryGUI(), parent ); break; - case 5028: // MULTI ROTATION + case GEOMOp::OpMultiRotate: // MULTI ROTATION aDlg = new TransformationGUI_MultiRotationDlg( getGeometryGUI(), parent ); break; - case 5029: // RELOAD IMPORTED SHAPE + case GEOMOp::OpReimport: // RELOAD IMPORTED SHAPE { SalomeApp_Study* anAppStudy = dynamic_cast(app->activeStudy()); -- 2.39.2