Grid Statistics Plot: Add ui for histogram configuration.

This commit is contained in:
Kristian Bendiksen 2021-05-12 15:04:57 +02:00
parent 8d1bc7bfd9
commit 31734d04cb
4 changed files with 8 additions and 4 deletions

View File

@ -96,7 +96,8 @@ void RimEnsembleFractureStatisticsPlot::defineUiOrdering( QString uiConfigName,
uiOrdering.add( &m_ensembleFractureStatistics );
uiOrdering.add( &m_property );
RimStatisticsPlot::uiOrderingForHistogram( uiConfigName, uiOrdering );
bool showNumHistogramBins = true;
RimStatisticsPlot::uiOrderingForHistogram( uiConfigName, uiOrdering, showNumHistogramBins );
caf::PdmUiGroup* plotLayoutGroup = uiOrdering.addNewGroup( "Plot Layout" );
RimStatisticsPlot::uiOrderingForPlotLayout( uiConfigName, *plotLayoutGroup );

View File

@ -140,6 +140,9 @@ void RimGridStatisticsPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOr
m_property->uiOrdering( uiConfigName, *propertyGroup );
}
bool showNumHistogramBins = false;
RimStatisticsPlot::uiOrderingForHistogram( uiConfigName, uiOrdering, showNumHistogramBins );
caf::PdmUiGroup* plotLayoutGroup = uiOrdering.addNewGroup( "Plot Layout" );
RimStatisticsPlot::uiOrderingForPlotLayout( uiConfigName, *plotLayoutGroup );

View File

@ -225,10 +225,10 @@ void RimStatisticsPlot::defineEditorAttribute( const caf::PdmFieldHandle* field,
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimStatisticsPlot::uiOrderingForHistogram( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
void RimStatisticsPlot::uiOrderingForHistogram( QString uiConfigName, caf::PdmUiOrdering& uiOrdering, bool showHistogramBins )
{
caf::PdmUiGroup* histogramGroup = uiOrdering.addNewGroup( "Histogram" );
histogramGroup->add( &m_numHistogramBins );
if ( showHistogramBins ) histogramGroup->add( &m_numHistogramBins );
histogramGroup->add( &m_histogramBarColor );
histogramGroup->add( &m_histogramBarWidth );
histogramGroup->add( &m_histogramFrequencyType );

View File

@ -67,7 +67,7 @@ protected:
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute ) override;
void uiOrderingForHistogram( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
void uiOrderingForHistogram( QString uiConfigName, caf::PdmUiOrdering& uiOrdering, bool showHistogramBins );
void onLoadDataAndUpdate() override;
void updatePlots();