#1751 #1840 Summary case: Edit name of collection

This commit is contained in:
Rebecca Cox 2017-09-07 16:08:13 +02:00
parent 36dec3062a
commit b7ac93a905
2 changed files with 15 additions and 2 deletions

View File

@ -31,10 +31,12 @@ CAF_PDM_SOURCE_INIT(RimSummaryCaseCollection,"SummaryCaseSubCollection");
//--------------------------------------------------------------------------------------------------
RimSummaryCaseCollection::RimSummaryCaseCollection()
{
CAF_PDM_InitObject("Summary Case Group",":/Folder.png","","");
CAF_PDM_InitObject("Summary Case Group", ":/Folder.png", "", "");
CAF_PDM_InitFieldNoDefault(&m_cases,"SummaryCases","","","","");
CAF_PDM_InitFieldNoDefault(&m_cases, "SummaryCases", "", "", "", "");
m_cases.uiCapability()->setUiHidden(true);
CAF_PDM_InitField(&m_name, "CollectionName", QString("Case Group"), "Name", "", "", "");
}
//--------------------------------------------------------------------------------------------------
@ -73,6 +75,14 @@ std::vector<RimSummaryCase*> RimSummaryCaseCollection::allSummaryCases()
return allSummaryCases;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimSummaryCaseCollection::userDescriptionField()
{
return &m_name;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -18,6 +18,7 @@
#pragma once
#include "cafPdmChildArrayField.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"
#include <vector>
@ -37,9 +38,11 @@ public:
void deleteCase(RimSummaryCase* summaryCase);
void addCase(RimSummaryCase* summaryCase);
std::vector<RimSummaryCase*> allSummaryCases();
virtual caf::PdmFieldHandle* userDescriptionField() override;
private:
private:
caf::PdmChildArrayField<RimSummaryCase*> m_cases;
caf::PdmField<QString> m_name;
};