type_choice="Vertices Edges Faces Solids"
use_choice="true"
clear_in_neutral_point="false"
- filter_points="false" >
+ filter_points="false"
+ same_topology="true">
<validator id="GeomValidators_BodyShapes"/>
</multi_selector>
</source>
\ No newline at end of file
#include <QClipboard>
#include <QTimer>
#include <QMainWindow>
+#include <QCheckBox>
#include <memory>
#include <string>
//this->setLayout(aMainLay);
connect(myTypeCtrl, SIGNAL(valueChanged(int)), this, SLOT(onSelectionTypeChanged()));
+ bool aSameTop = theData->getBooleanAttribute("same_topology", false);
+ if (aSameTop) {
+ myGeomCheck = new QCheckBox(tr("Add elements that share the same topology"), this);
+ aMainLay->addWidget(myGeomCheck);
+ connect(myGeomCheck, SIGNAL(toggled(bool)), SLOT(onSameTopology(bool)));
+ }
+ else
+ myGeomCheck = 0;
+
myIsNeutralPointClear = theData->getBooleanAttribute("clear_in_neutral_point", true);
if (myShapeTypes.size() > 1 || myIsUseChoice) {
if (defaultValues.contains(myFeatureId + attributeID())) {
{
//focusTo();
emitFocusInWidget();
-}
\ No newline at end of file
+}
+
+void ModuleBase_WidgetMultiSelector::onSameTopology(bool theOn)
+{
+ AttributePtr anAttribute = myFeature->data()->attribute(attributeID());
+ std::string aType = anAttribute->attributeType();
+ if (aType == ModelAPI_AttributeSelectionList::typeId()) {
+ AttributeSelectionListPtr aSelectionListAttr = myFeature->data()->selectionList(attributeID());
+ //TODO: set same topology flag
+ updateObject(myFeature);
+ }
+}
#include <QMap>
class QWidget;
+class QCheckBox;
//class QComboBox;
class ModuleBase_ListView;
class ModuleBase_IWorkshop;
void onListActivated();
+ void onSameTopology(bool theOn);
+
protected:
/// Returns true if the event is processed. The default implementation is empty, returns false.
virtual bool processDelete();
bool myIsFirst;
std::string myDefMode;
+
+ QCheckBox* myGeomCheck;
};
#endif /* MODULEBASE_WIDGETFILESELECTOR_H_ */