mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-14 01:55:53 -06:00
#15049: Extend color legend collection and plot curve appearance
This commit is contained in:
1 parent
3d4fbca066
commit
6cc691ea6f
4 files changed
+73
-10
No files matched your search
@@ -226,10 +226,39 @@ void RimColorLegendCollection::createStandardColorLegends()
|
||||
}
|
||||
|
||||
m_standardColorLegends.push_back( createRockTypeColorLegend() );
|
||||
m_standardColorLegends.push_back( createSummaryCurveColorLegend() );
|
||||
|
||||
updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimColorLegendCollection::summaryCurveColorLegendName()
|
||||
{
|
||||
return "Summary Curve Colors";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Category legend with the colors of the default summary curve color palette, in palette order
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimColorLegend* RimColorLegendCollection::createSummaryCurveColorLegend() const
|
||||
{
|
||||
auto* colorLegend = new RimColorLegend;
|
||||
colorLegend->setColorLegendName( summaryCurveColorLegendName() );
|
||||
colorLegend->setReadOnly( true );
|
||||
|
||||
const auto colors = RiaColorTables::summaryCurveDefaultPaletteColors().color3ubArray();
|
||||
for ( size_t i = 0; i < colors.size(); i++ )
|
||||
{
|
||||
auto* item = new RimColorLegendItem;
|
||||
item->setValues( "", static_cast<int>( i ), cvf::Color3f( colors[i] ) );
|
||||
colorLegend->appendColorLegendItem( item );
|
||||
}
|
||||
|
||||
return colorLegend;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user