#2727 Legends : Remove obsolete functions

This commit is contained in:
Magne Sjaastad 2018-04-18 10:43:01 +02:00
parent 71b7bd21f9
commit 978a74a1fe
7 changed files with 15 additions and 44 deletions

View File

@ -602,12 +602,12 @@ void Rim2dIntersectionView::updateLegends()
if ( eclView->cellResult()->isTernarySaturationSelected() )
{
m_ternaryLegendConfig()->setTitle("Cell Result:\n");
legend = m_ternaryLegendConfig()->legend();
legend = m_ternaryLegendConfig()->titledOverlayFrame();
}
else
{
m_legendConfig()->setTitle("Cell Result:\n" + eclView->cellResult()->resultVariableUiShortName());
legend = m_legendConfig()->legend();
legend = m_legendConfig()->titledOverlayFrame();
}
}
@ -616,7 +616,7 @@ void Rim2dIntersectionView::updateLegends()
m_legendConfig()->setUiValuesFromLegendConfig(geoView->cellResult()->legendConfig());
geoView->updateLegendTextAndRanges(m_legendConfig(), m_currentTimeStep());
legend = m_legendConfig()->legend();
legend = m_legendConfig()->titledOverlayFrame();
}
if ( legend )

View File

@ -1087,7 +1087,7 @@ void RimEclipseView::updateLegends()
}
}
m_viewer->addColorLegendToBottomLeftCorner(this->cellEdgeResult()->legendConfig()->legend());
m_viewer->addColorLegendToBottomLeftCorner(this->cellEdgeResult()->legendConfig()->titledOverlayFrame());
this->cellEdgeResult()->legendConfig()->setTitle(QString("Edge Results: \n") + this->cellEdgeResult()->resultVariableUiShortName());
}
else
@ -1102,9 +1102,9 @@ void RimEclipseView::updateLegends()
{
fractureColors()->updateLegendData();
if (fractureColors()->isChecked() && stimPlanLegend->legend())
if (fractureColors()->isChecked() && stimPlanLegend->titledOverlayFrame())
{
m_viewer->addColorLegendToBottomLeftCorner(stimPlanLegend->legend());
m_viewer->addColorLegendToBottomLeftCorner(stimPlanLegend->titledOverlayFrame());
}
}
@ -1113,7 +1113,7 @@ void RimEclipseView::updateLegends()
updateVirtualConnectionLegendRanges();
RimRegularLegendConfig* virtLegend = m_virtualPerforationResult->legendConfig();
m_viewer->addColorLegendToBottomLeftCorner(virtLegend->legend());
m_viewer->addColorLegendToBottomLeftCorner(virtLegend->titledOverlayFrame());
}
}
@ -1128,17 +1128,17 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel,
if (resultColors->hasResult() && resultColors->legendConfig()->showLegend())
{
m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->legend());
m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->titledOverlayFrame());
resultColors->legendConfig()->setTitle(legendLabel + resultColors->resultVariableUiShortName());
}
size_t maxTimeStepCount = cellResultsData->maxTimeStepCount();
if (resultColors->isTernarySaturationSelected() && maxTimeStepCount > 1)
{
if (resultColors->ternaryLegendConfig->showLegend() && resultColors->ternaryLegendConfig->legend())
if (resultColors->ternaryLegendConfig->showLegend() && resultColors->ternaryLegendConfig->titledOverlayFrame())
{
resultColors->ternaryLegendConfig->setTitle(legendLabel);
m_viewer->addColorLegendToBottomLeftCorner(resultColors->ternaryLegendConfig->legend());
m_viewer->addColorLegendToBottomLeftCorner(resultColors->ternaryLegendConfig->titledOverlayFrame());
}
}
}
@ -1598,10 +1598,10 @@ void RimEclipseView::resetLegendsInViewer()
if (cellResultNormalLegendConfig)
{
m_viewer->addColorLegendToBottomLeftCorner(cellResultNormalLegendConfig->legend());
m_viewer->addColorLegendToBottomLeftCorner(cellResultNormalLegendConfig->titledOverlayFrame());
}
m_viewer->addColorLegendToBottomLeftCorner(this->cellEdgeResult()->legendConfig()->legend());
m_viewer->addColorLegendToBottomLeftCorner(this->cellEdgeResult()->legendConfig()->titledOverlayFrame());
}
//--------------------------------------------------------------------------------------------------

View File

@ -364,7 +364,7 @@ void RimGeoMechView::resetLegendsInViewer()
this->cellResult()->legendConfig->recreateLegend();
m_viewer->removeAllColorLegends();
m_viewer->addColorLegendToBottomLeftCorner(this->cellResult()->legendConfig->legend());
m_viewer->addColorLegendToBottomLeftCorner(this->cellResult()->legendConfig->titledOverlayFrame());
}
//--------------------------------------------------------------------------------------------------
@ -380,7 +380,7 @@ void RimGeoMechView::updateLegends()
if (cellResult()->hasResult() && cellResult()->legendConfig()->showLegend())
{
m_viewer->addColorLegendToBottomLeftCorner(cellResult()->legendConfig->legend());
m_viewer->addColorLegendToBottomLeftCorner(cellResult()->legendConfig->titledOverlayFrame());
}
updateTensorLegendTextAndRanges(m_tensorResults->arrowColorLegendConfig(), m_currentTimeStep());
@ -389,7 +389,7 @@ void RimGeoMechView::updateLegends()
{
if (tensorResults()->arrowColorLegendConfig()->showLegend())
{
m_viewer->addColorLegendToBottomLeftCorner(m_tensorResults->arrowColorLegendConfig->legend());
m_viewer->addColorLegendToBottomLeftCorner(m_tensorResults->arrowColorLegendConfig->titledOverlayFrame());
}
}
}

View File

@ -658,18 +658,6 @@ void RimRegularLegendConfig::setTitle(const QString& title)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::TitledOverlayFrame* RimRegularLegendConfig::legend()
{
if (m_currentScalarMapper == m_categoryMapper)
{
return m_categoryLegend.p();
}
else
{
return m_scalarMapperLegend.p();
}
}
bool RimRegularLegendConfig::showLegend() const
{
return m_showLegend;

View File

@ -120,7 +120,6 @@ public:
void setUiValuesFromLegendConfig(const RimRegularLegendConfig* otherLegendConfig);
cvf::ScalarMapper* scalarMapper() { return m_currentScalarMapper.p(); }
caf::TitledOverlayFrame* legend();
bool showLegend() const;
const caf::TitledOverlayFrame* titledOverlayFrame() const override;

View File

@ -328,19 +328,6 @@ void RimTernaryLegendConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOr
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const RivTernarySaturationOverlayItem* RimTernaryLegendConfig::legend() const
{
return m_legend.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivTernarySaturationOverlayItem* RimTernaryLegendConfig::legend()
{
return m_legend.p();
}
bool RimTernaryLegendConfig::showLegend() const
{
return m_showLegend;

View File

@ -71,9 +71,6 @@ public:
void recreateLegend();
const RivTernarySaturationOverlayItem* legend() const;
RivTernarySaturationOverlayItem* legend();
bool showLegend() const;
void setTitle(const QString& title);