mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Various operations on color legends
This commit is contained in:
committed by
Magne Sjaastad
parent
fd475589a5
commit
d39bcb31ab
@@ -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 );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user