+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
/*
* ModuleBase_WidgetMultiSelector.cpp
*
#include <QComboBox>
#include <QEvent>
-#include <boost/smart_ptr/shared_ptr.hpp>
+#include <memory>
#include <string>
ModuleBase_WidgetMultiSelector::ModuleBase_WidgetMultiSelector(QWidget* theParent,
myListControl = new QListWidget(myMainWidget);
aMainLay->addWidget(myListControl, 2, 0, 2, -1);
- aMainLay->setColumnStretch(1, 1);
+ aMainLay->setRowStretch(2, 1);
+ aMainLay->addWidget(new QLabel(myMainWidget));
+ aMainLay->setRowMinimumHeight(3, 20);
myMainWidget->setLayout(aMainLay);
-
//TODO: Move into the base class
myUseSubShapes = theData->getBooleanAttribute("use_subshapes", false);
//TODO_END
return false;
DataPtr aData = myFeature->data();
AttributeSelectionListPtr aSelectionListAttr =
- boost::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(aData->attribute(attributeID()));
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(aData->attribute(attributeID()));
if (aSelectionListAttr) {
aSelectionListAttr->clear();
return false;
DataPtr aData = myFeature->data();
AttributeSelectionListPtr aSelectionListAttr =
- boost::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(aData->attribute(attributeID()));
+ std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(aData->attribute(attributeID()));
if (aSelectionListAttr) {
mySelection.clear();
void ModuleBase_WidgetMultiSelector::onSelectionTypeChanged()
{
activateShapeSelection();
- QList<ObjectPtr> anEmptyList;
+ QObjectPtrList anEmptyList;
myWorkshop->setSelected(anEmptyList);
// Clear mySelection, myListControl and storeValue()
onSelectionChanged();
NCollection_List<TopoDS_Shape>::Iterator aShpIt(aSelectedShapes);
GeomShapePtr aShape;
for (aIt = aOwnersList.cbegin(); aIt != aOwnersList.cend(); aShpIt.Next(), aIt++) {
- ResultPtr aResult = boost::dynamic_pointer_cast<ModelAPI_Result>(*aIt);
+ ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(*aIt);
if (myFeature) {
// We can not select a result of our feature
const std::list<ResultPtr>& aResList = myFeature->results();
if(isSkipSelf)
continue;
}
- aShape = boost::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
+ aShape = std::shared_ptr<GeomAPI_Shape>(new GeomAPI_Shape());
aShape->setImpl(new TopoDS_Shape(aShpIt.Value()));
mySelection.append(GeomSelection(aResult, aShape));
}