#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_AttributeSelection.h>
#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_AttributeInteger.h>
#include <ModelAPI_Session.h>
#include <ModelAPI_Validator.h>
data()->addAttribute(DIRECTION_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(USE_SHAPES_ID(), ModelAPI_AttributeInteger::typeId());
+
ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), TO_OBJECT_ID());
ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), FROM_OBJECT_ID());
ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), DIRECTION_OBJECT_ID());
return MY_FROM_OFFSET_ID;
}
+ /// Attribute name of using shape types.
+ inline static const std::string& USE_SHAPES_ID()
+ {
+ static const std::string MY_USE_SHAPEST_ID("use_sapes");
+ return MY_USE_SHAPEST_ID;
+ }
+
/// \return the kind of a feature.
FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
{
shape_types="vertices edges wires faces shells solids compsolids compounds">
<validator id="FeaturesPlugin_ValidatorCompositeLauncher" parameters="base,Sketch"/>
</sketch_launcher>
+ <choice id="use_sapes"
+ widget_type="radiobuttons"
+ buttons_dir="horizontal"
+ label="Type"
+ tooltip="Using shapes type"
+ string_list="Vertices Edges Faces"
+ icons_list=":pictures/vertex32.png :pictures/edge32.png :pictures/face32.png"
+ default="2">
+ </choice>
<multi_selector id="base"
label="Base objects:"
tooltip="Select a base objects"
XGUI_PropertyPanel* aPanel = aWorkshop->propertyPanel();
const QList<ModuleBase_ModelWidget*>& aWidgets = aPanel->modelWidgets();
foreach(ModuleBase_ModelWidget* aWidget, aWidgets) {
+ QString aType(aWidget->metaObject()->className());
+ if (aType == "ModuleBase_WidgetChoice")
+ continue;
if (theSelectionControl) { // hide other controls
if (aWidget != this)
aWidget->setVisible(false);