mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#827 Refactored CategoryMapper function names and added comments
This commit is contained in:
@@ -22,32 +22,32 @@ CategoryMapper::CategoryMapper()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void CategoryMapper::setCategories(const IntArray& categoryValues)
|
||||
void CategoryMapper::setCategories(const std::vector<int>& categoryValues)
|
||||
{
|
||||
m_categoryValues = categoryValues;
|
||||
|
||||
ref<Color3ubArray> colorArr = ScalarMapper::colorTableArray(ColorTable::NORMAL);
|
||||
|
||||
setColors(*(colorArr.p()));
|
||||
setCycleColors(*(colorArr.p()));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void CategoryMapper::setCategories(const cvf::IntArray& categoryValues, const std::vector<cvf::String>& categoryNames)
|
||||
void CategoryMapper::setCategoriesWithNames(const std::vector<int>& categoryValues, const std::vector<cvf::String>& categoryNames)
|
||||
{
|
||||
m_categoryValues = categoryValues;
|
||||
m_categoryNames = categoryNames;
|
||||
|
||||
ref<Color3ubArray> colorArr = ScalarMapper::colorTableArray(ColorTable::NORMAL);
|
||||
|
||||
setColors(*(colorArr.p()));
|
||||
setCycleColors(*(colorArr.p()));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void CategoryMapper::setColors(const Color3ubArray& colorArray)
|
||||
void CategoryMapper::setCycleColors(const Color3ubArray& colorArray)
|
||||
{
|
||||
m_colors.resize(m_categoryValues.size());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user