#4195 Grid Cross Plot: Add annotation item to axis

This commit is contained in:
Magne Sjaastad
2019-03-12 16:05:58 +01:00
parent edc6dad0f7
commit 15f2a76ee1
8 changed files with 198 additions and 8 deletions

View File

@@ -22,6 +22,7 @@
#include "RiaDefines.h"
#include "RimRiuQwtPlotOwnerInterface.h"
#include "RimPlotAxisAnnotation.h"
#include "cafPdmUiSliderEditor.h"
@@ -90,6 +91,11 @@ RimPlotAxisProperties::RimPlotAxisProperties()
CAF_PDM_InitField(&isLogarithmicScaleEnabled, "LogarithmicScale", false, "Logarithmic Scale", "", "", "");
CAF_PDM_InitField(&m_isAxisInverted, "AxisInverted", false, "Invert Axis", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_annotations, "Annotations", "", "", "", "");
m_annotations.uiCapability()->setUiHidden(true);
m_annotations.push_back(new RimPlotAxisAnnotation);
updateOptionSensitivity();
}
// clang-format on
@@ -289,6 +295,14 @@ bool RimPlotAxisProperties::isAxisInverted() const
return m_isAxisInverted();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimPlotAxisAnnotation*> RimPlotAxisProperties::annotations() const
{
return m_annotations.childObjects();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------