X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_Module.cpp;h=9b380a839de031128e1b0311af90b67a7373f389;hb=4d3ed04028394a778cbba218593158d0f84c6607;hp=69d58a916dfc8cf1b39691db64bc5fe660149e3d;hpb=2453acda48eeae4eecf565f7bff2c123e9480cd5;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 69d58a916..9b380a839 100755 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -18,6 +18,7 @@ #include "PartSet_MenuMgr.h" #include "PartSet_CustomPrs.h" #include "PartSet_IconFactory.h" +#include "PartSet_WidgetChoice.h" #include "PartSet_Filters.h" #include "PartSet_FilterInfinite.h" @@ -373,11 +374,11 @@ void PartSet_Module::updateViewerMenu(const QMap& theStdActio myMenuMgr->updateViewerMenu(theStdActions); } -QString PartSet_Module::getFeatureError(const FeaturePtr& theFeature, const bool isCheckGUI) +QString PartSet_Module::getFeatureError(const FeaturePtr& theFeature) { - QString anError = ModuleBase_IModule::getFeatureError(theFeature, isCheckGUI); + QString anError = ModuleBase_IModule::getFeatureError(theFeature); if (anError.isEmpty()) - anError = sketchMgr()->getFeatureError(theFeature, isCheckGUI); + anError = sketchMgr()->getFeatureError(theFeature); return anError; } @@ -543,6 +544,9 @@ ModuleBase_ModelWidget* PartSet_Module::createWidgetByType(const std::string& th aWgt = new PartSet_WidgetFileSelector(theParent, aWorkshop, theWidgetApi, theParentId); } else if (theType == "sketch_launcher") { aWgt = new PartSet_WidgetSketchCreator(theParent, this, theWidgetApi, theParentId); + } else if (theType == "module_choice") { + aWgt = new PartSet_WidgetChoice(theParent, theWidgetApi, theParentId); + connect(aWgt, SIGNAL(itemSelected(int)), SLOT(onBooleanOperationChange(int))); } return aWgt; } @@ -1019,3 +1023,24 @@ bool PartSet_Module::processEnter(const std::string& thePreviousAttributeID) { return mySketchReentrantMgr->processEnter(thePreviousAttributeID); } + + +//****************************************************** +void PartSet_Module::onBooleanOperationChange(int theOperation) +{ + ModuleBase_Operation* aOperation = myWorkshop->currentOperation(); + if (!aOperation) + return; + ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel(); + switch (theOperation) { + case 0: + aPanel->setWindowTitle(tr("Cut")); + break; + case 1: + aPanel->setWindowTitle(tr("Fuse")); + break; + case 2: + aPanel->setWindowTitle(tr("Common")); + break; + } +}