Various operations on color legends

This commit is contained in:
Stein Inge Dale
2020-05-13 14:28:06 +02:00
committed by Magne Sjaastad
parent fd475589a5
commit d39bcb31ab
20 changed files with 599 additions and 28 deletions

View File

@@ -33,6 +33,7 @@ RimColorLegendItem::RimColorLegendItem()
CAF_PDM_InitObject( "ColorLegendItem", "", "", "" );
CAF_PDM_InitFieldNoDefault( &m_color, "Color", "Color", "", "", "" );
m_color = cvf::Color3f( cvf::Color3::ColorIdent::BLACK );
CAF_PDM_InitField( &m_categoryValue, "CategoryValue", 0, "Category Value", "", "", "" );
CAF_PDM_InitField( &m_categoryName, "CategoryName", QString( "" ), "Category Name", "", "", "" );
@@ -60,6 +61,16 @@ void RimColorLegendItem::setValues( const QString& categoryName, int categoryVal
m_color = color;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimColorLegendItem::setReadOnly( bool doReadOnly )
{
m_categoryName.uiCapability()->setUiReadOnly( true );
m_categoryValue.uiCapability()->setUiReadOnly( true );
m_color.uiCapability()->setUiReadOnly( true );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------