#include "PartSet_MenuMgr.h"
#include "PartSet_CustomPrs.h"
#include "PartSet_IconFactory.h"
+#include "PartSet_WidgetChoice.h"
#include "PartSet_Filters.h"
#include "PartSet_FilterInfinite.h"
#include <ModuleBase_FilterFactory.h>
#include <ModuleBase_Tools.h>
#include <ModuleBase_OperationFeature.h>
-#include <ModuleBase_WidgetTable.h>
#include <ModelAPI_Object.h>
#include <ModelAPI_Events.h>
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;
}
aPointWgt->setSketch(mySketchMgr->activeSketch());
connect(aPointWgt, SIGNAL(vertexSelected()), sketchReentranceMgr(), SLOT(onVertexSelected()));
aWgt = aPointWgt;
- }
- else if (theType == "tablevalue") {
- aWgt = new ModuleBase_WidgetTable(theParent, theWidgetApi, theParentId);
- }else if (theType == "sketch-2dpoint_flyout_selector") {
+ } else if (theType == "sketch-2dpoint_flyout_selector") {
PartSet_WidgetPoint2DFlyout* aPointWgt = new PartSet_WidgetPoint2DFlyout(theParent, aWorkshop,
theWidgetApi, theParentId);
aPointWgt->setSketch(mySketchMgr->activeSketch());
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;
}
{
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;
+ }
+}