#include <SelectMgr_ListIteratorOfListOfFilter.hxx>
+#define FEATURE_ITEM_COLOR "0,0,225"
+
+
/*!Create and return new instance of XGUI_Module*/
extern "C" PARTSET_EXPORT ModuleBase_IModule* createModule(ModuleBase_IWorkshop* theWshop)
{
"Dimension color",
Config_Prop::Color, SKETCH_DIMENSION_COLOR);
+ Config_PropManager::registerProp("Visualization", "feature_objectbrowser_color",
+ "Feature items in Object Browser",
+ Config_Prop::Color, FEATURE_ITEM_COLOR);
+
Config_PropManager::registerProp("Shortcuts", "add_parameter_shortcut",
"Add parameter in parameters manager dialog",
Config_Prop::Shortcut, "Ctrl+A");
#include <ModelAPI_Folder.h>
#include <ModelAPI_AttributeReference.h>
+#include <Config_PropManager.h>
+
#include <QBrush>
#include <QMap>
else
return QIcon();
}
+ case Qt::ForegroundRole:
+ if (myObject->groupName() == ModelAPI_Feature::group()) {
+ std::vector<int> aColor =
+ Config_PropManager::color("Visualization", "feature_objectbrowser_color");
+ return QColor(aColor[0], aColor[1], aColor[2]);
+ }
+ break;
}
return PartSet_TreeNode::data(theColumn, theRole);
}
return aResult;
}
+QVariant PartSet_ObjectFolderNode::data(int theColumn, int theRole) const
+{
+ if (theRole == Qt::ForegroundRole) {
+ std::vector<int> aColor =
+ Config_PropManager::color("Visualization", "feature_objectbrowser_color");
+ return QColor(aColor[0], aColor[1], aColor[2]);
+ }
+ return PartSet_ObjectNode::data(theColumn, theRole);
+}
//////////////////////////////////////////////////////////////////////////////////
QVariant PartSet_StepNode::data(int theColumn, int theRole) const
/// \param theDoc a document where objects were deleted
/// \param theGroup a name of group where objects were deleted
virtual QTreeNodesList objectsDeleted(const DocumentPtr& theDoc, const QString& theGroup);
+
+ /// Returns the node representation according to theRole.
+ virtual QVariant data(int theColumn, int theRole) const;
};