+//********************************************************************
+bool ModuleBase_WidgetMultiSelector::setSelection(QList<ModuleBase_ViewerPrs>& theValues,
+ const bool theToValidate)
+{
+ QList<ModuleBase_ViewerPrs> aSkippedValues;
+
+ QList<ModuleBase_ViewerPrs>::const_iterator anIt = theValues.begin(), aLast = theValues.end();
+ bool isDone = false;
+ for (; anIt != aLast; anIt++) {
+ ModuleBase_ViewerPrs aValue = *anIt;
+ bool aProcessed = false;
+ if (!theToValidate || isValidInFilters(aValue)) {
+ aProcessed = setSelectionCustom(aValue);
+ }
+ else
+ aSkippedValues.append(aValue);
+ // if there is at least one set, the result is true
+ isDone = isDone || aProcessed;
+ }
+ // updateObject - to update/redisplay feature
+ // it is commented in order to perfom it outside the method
+ //if (isDone) {
+ //updateObject(myFeature);
+ // this emit is necessary to call store/restore method an restore type of selection
+ //emit valuesChanged();
+ //}
+ theValues.clear();
+ if (!aSkippedValues.empty())
+ theValues.append(aSkippedValues);
+
+ return isDone;
+}
+
+//********************************************************************
+void ModuleBase_WidgetMultiSelector::getHighlighted(QList<ModuleBase_ViewerPrs>& theValues)
+{
+ std::set<int> anAttributeIds;
+ getSelectedAttributeIndices(anAttributeIds);
+ if (!anAttributeIds.empty())
+ convertIndicesToViewerSelection(anAttributeIds, theValues);
+}