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

@@ -44,9 +44,9 @@ RimColorLegend::~RimColorLegend()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimColorLegend::userDescriptionField()
QString RimColorLegend::colorLegendName()
{
return &m_colorLegendName;
return m_colorLegendName;
}
//--------------------------------------------------------------------------------------------------
@@ -57,6 +57,19 @@ void RimColorLegend::setColorLegendName( const QString& colorLegendName )
m_colorLegendName = colorLegendName;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimColorLegend::setReadOnly( bool doReadOnly )
{
m_colorLegendName.uiCapability()->setUiReadOnly( true );
for ( auto colorLegendItem : m_colorLegendItems )
{
colorLegendItem->setReadOnly( true );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -73,6 +86,14 @@ std::vector<RimColorLegendItem*> RimColorLegend::colorLegendItems() const
return m_colorLegendItems.childObjects();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimColorLegend::userDescriptionField()
{
return &m_colorLegendName;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------