#1999 Curve calc. Curve creator now uses CurveDefSelection component

This commit is contained in:
Bjørn Erik Jensen
2017-10-23 11:41:16 +02:00
parent ec53855cd4
commit 8276d92ce7
10 changed files with 118 additions and 944 deletions

View File

@@ -186,6 +186,7 @@ RiuSummaryCurveDefSelection::RiuSummaryCurveDefSelection() : m_identifierFieldsM
m_selectedSummaryCategories.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
m_currentSummaryCategory.uiCapability()->setUiHidden(true);
m_multiSelectionMode = false;
}
//--------------------------------------------------------------------------------------------------
@@ -237,6 +238,22 @@ std::vector<RiaSummaryCurveDefinition> RiuSummaryCurveDefSelection::selectedCurv
return caseAndAddressVector;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuSummaryCurveDefSelection::setMultiSelectionMode(bool multiSelectionMode)
{
m_multiSelectionMode = multiSelectionMode;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuSummaryCurveDefSelection::setFieldChangedHandler(const std::function<void()>& handlerFunc)
{
m_toggleChangedHandler = handlerFunc;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -316,6 +333,10 @@ std::set<RifEclipseSummaryAddress> RiuSummaryCurveDefSelection::findPossibleSumm
//--------------------------------------------------------------------------------------------------
void RiuSummaryCurveDefSelection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{
if (m_toggleChangedHandler != nullptr)
{
m_toggleChangedHandler();
}
}
//--------------------------------------------------------------------------------------------------
@@ -806,7 +827,7 @@ void RiuSummaryCurveDefSelection::defineEditorAttribute(const caf::PdmFieldHandl
attrib->showToggleAllCheckbox = false;
}
attrib->singleSelectionMode = true;
attrib->singleSelectionMode = !m_multiSelectionMode;
}
}