#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())) {
std::string aType = anAttribute->attributeType();
if (aType == ModelAPI_AttributeSelectionList::typeId()) {
AttributeSelectionListPtr aSelectionListAttr = myFeature->data()->selectionList(attributeID());
- int aa = aSelectionListAttr->size();
std::string aMode = myTypeCtrl->textValue().toStdString();
if (myTypeCtrl->isVisible() && myIsFirst && (!myDefMode.empty()))
aMode = myDefMode;
{
//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_ */