mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2657 WIP: Add movable widget with color legend for ensemble curve sets to summary plot
This commit is contained in:
@@ -145,6 +145,13 @@ RimEnsambleCurveSet::RimEnsambleCurveSet()
|
||||
RimEnsambleCurveSet::~RimEnsambleCurveSet()
|
||||
{
|
||||
m_curves.deleteAllChildObjects();
|
||||
|
||||
RimSummaryPlot* parentPlot;
|
||||
firstAncestorOrThisOfTypeAsserted(parentPlot);
|
||||
if (parentPlot->qwtPlot())
|
||||
{
|
||||
parentPlot->qwtPlot()->removeEnsambleCurveSetLegend(this);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -185,6 +192,15 @@ void RimEnsambleCurveSet::loadDataAndUpdate(bool updateParentPlot)
|
||||
parentPlot->qwtPlot()->updateLegend();
|
||||
parentPlot->updateAxes();
|
||||
parentPlot->updateZoomInQwt();
|
||||
|
||||
if (m_showCurves() && m_colorMode() == BY_ENSAMBLE_PARAM)
|
||||
{
|
||||
parentPlot->qwtPlot()->addOrUpdateEnsambleCurveSetLegend(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
parentPlot->qwtPlot()->removeEnsambleCurveSetLegend(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -422,6 +438,14 @@ void RimEnsambleCurveSet::handleKeyPressEvent(QKeyEvent* keyEvent)
|
||||
//}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimRegularLegendConfig* RimEnsambleCurveSet::legendConfig()
|
||||
{
|
||||
return m_legendConfig;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -79,6 +79,7 @@ public:
|
||||
//std::vector<caf::PdmFieldHandle*> fieldsToShowInToolbar();
|
||||
|
||||
void handleKeyPressEvent(QKeyEvent* keyEvent);
|
||||
RimRegularLegendConfig* legendConfig();
|
||||
|
||||
private:
|
||||
caf::PdmFieldHandle* objectToggleField();
|
||||
|
||||
Reference in New Issue
Block a user