Merge branch 'annotation-items' into dev

This commit is contained in:
Magne Sjaastad
2019-03-19 15:00:30 +01:00
45 changed files with 2104 additions and 117 deletions

View File

@@ -23,6 +23,7 @@
#include "RigStatisticsCalculator.h"
#include "RimRiuQwtPlotOwnerInterface.h"
#include "RimPlotAxisAnnotation.h"
#include "cafPdmUiSliderEditor.h"
@@ -95,6 +96,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.uiCapability()->setUiTreeChildrenHidden(true);
updateOptionSensitivity();
}
// clang-format on
@@ -302,6 +308,22 @@ bool RimPlotAxisProperties::isAxisInverted() const
return m_isAxisInverted();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimPlotAxisAnnotation*> RimPlotAxisProperties::annotations() const
{
return m_annotations.childObjects();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimPlotAxisProperties::appendAnnotation(RimPlotAxisAnnotation* annotation)
{
m_annotations.push_back(annotation);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -318,6 +340,22 @@ bool RimPlotAxisProperties::isActive() const
return m_isActive;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimPlotAxisProperties::setInvertedAxis(bool enable)
{
m_isAxisInverted = enable;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimPlotAxisProperties::showAnnotationObjectsInProjectTree()
{
m_annotations.uiCapability()->setUiTreeChildrenHidden(false);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------