X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_ResultGroup.cpp;h=39809bade0444a0a964855077dd8926599024119;hb=baa32d4d231be0ed859fc32f1736afcbcfaa1f73;hp=3e467395d827eded82e71d7e8ceb128c715bc4df;hpb=644f0470e456dbe2f085869d4b501b5f601b308d;p=modules%2Fshaper.git diff --git a/src/Model/Model_ResultGroup.cpp b/src/Model/Model_ResultGroup.cpp index 3e467395d..39809bade 100644 --- a/src/Model/Model_ResultGroup.cpp +++ b/src/Model/Model_ResultGroup.cpp @@ -1,26 +1,47 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: Model_ResultGroup.cpp // Created: 08 Jul 2014 // Author: Mikhail PONIKAROV #include #include +#include + #include -Model_ResultGroup::Model_ResultGroup(boost::shared_ptr theOwnerData) +#include + +Model_ResultGroup::Model_ResultGroup(std::shared_ptr theOwnerData) { setIsConcealed(false); myOwnerData = theOwnerData; } -boost::shared_ptr Model_ResultGroup::shape() const +void Model_ResultGroup::initAttributes() +{ + // append the color attribute. It is empty, the attribute will be filled by a request + DataPtr aData = data(); + aData->addAttribute(COLOR_ID(), ModelAPI_AttributeIntArray::typeId()); +} + +void Model_ResultGroup::colorConfigInfo(std::string& theSection, std::string& theName, + std::string& theDefault) +{ + theSection = "Visualization"; + theName = "result_group_color"; + theDefault = DEFAULT_COLOR(); +} + +std::shared_ptr Model_ResultGroup::shape() { - boost::shared_ptr aResult; + std::shared_ptr aResult; if (myOwnerData) { AttributeSelectionListPtr aList = myOwnerData->selectionList("group_list"); if (aList) { - std::list > aSubs; + std::list > aSubs; for(int a = aList->size() - 1; a >= 0; a--) { - boost::shared_ptr aSelection = aList->value(a)->value(); + std::shared_ptr aSelection = aList->value(a)->value(); if (aSelection && !aSelection->isNull()) { aSubs.push_back(aSelection); }