Ternary legend : Added title

This commit is contained in:
Magne Sjaastad committed 2014-08-14 10:56:05 +02:00
1 parent 09f7868eb5
commit 8b04e2a2e8
5 files changed
+44 -11

No files matched your search

@@ -40,6 +40,7 @@
#include "RiuViewer.h"
#include "RivReservoirPipesPartMgr.h"
#include "RivWellPathCollectionPartMgr.h"
#include "RivTernarySaturationOverlayItem.h"
#include "cafCadNavigation.h"
#include "cafCeetronPlusNavigation.h"
@@ -1508,6 +1509,7 @@ void RimReservoirView::updateMinMaxValuesAndAddLegendToView(QString legendLabel,
if (resultSlot->ternaryLegendConfig->legend())
{
resultSlot->ternaryLegendConfig->legend()->setTitle(cvfqt::Utils::toString(legendLabel));
m_viewer->addColorLegendToBottomLeftCorner(resultSlot->ternaryLegendConfig->legend());
}
}
@@ -298,7 +298,7 @@ void RimTernaryLegendConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOr
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::OverlayItem* RimTernaryLegendConfig::legend()
RivTernarySaturationOverlayItem* RimTernaryLegendConfig::legend()
{
return m_legend.p();
}
@@ -69,7 +69,8 @@ public:
void ternaryRanges(double& soilLower, double& soilUpper, double& sgasLower, double& sgasUpper, double& swatLower, double& swatUpper) const;
void recreateLegend();
cvf::OverlayItem* legend();
RivTernarySaturationOverlayItem* legend();
protected:
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);