mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Renamed to PdmObjectCollection
This commit is contained in:
parent
2b47793d68
commit
e12a5b62de
@ -860,7 +860,7 @@ void WellSelectionPage::buildWellTreeView()
|
||||
RimOilRegionEntry* oilRegion = m_wellPathImportObject->regions[rIdx];
|
||||
if (oilRegion->selected)
|
||||
{
|
||||
caf::PdmGuardedObjects* regGroup = new caf::PdmGuardedObjects;
|
||||
caf::PdmObjectCollection* regGroup = new caf::PdmObjectCollection;
|
||||
regGroup->objects.uiCapability()->setUiHidden(true);
|
||||
|
||||
regGroup->setUiName(oilRegion->userDescriptionField()->uiCapability()->uiValue().toString());
|
||||
@ -872,7 +872,7 @@ void WellSelectionPage::buildWellTreeView()
|
||||
RimOilFieldEntry* oilField = oilRegion->fields[fIdx];
|
||||
if (oilField->selected)
|
||||
{
|
||||
caf::PdmGuardedObjects* fieldGroup = new caf::PdmGuardedObjects;
|
||||
caf::PdmObjectCollection* fieldGroup = new caf::PdmObjectCollection;
|
||||
fieldGroup->objects.uiCapability()->setUiHidden(true);
|
||||
|
||||
fieldGroup->setUiName(oilField->userDescriptionField()->uiCapability()->uiValue().toString());
|
||||
@ -982,7 +982,7 @@ WellSummaryPage::WellSummaryPage(RimWellPathImport* wellPathImport, QWidget* par
|
||||
layout->addWidget(m_listView);
|
||||
m_listView->hide();
|
||||
|
||||
m_objectGroup = new caf::PdmGuardedObjects;
|
||||
m_objectGroup = new caf::PdmObjectCollection;
|
||||
|
||||
setButtonText(QWizard::FinishButton, "Import");
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ namespace caf
|
||||
class PdmUiTreeView;
|
||||
class PdmUiListView;
|
||||
class PdmUiPropertyView;
|
||||
class PdmGuardedObjects;
|
||||
class PdmObjectCollection;
|
||||
}
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ private:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Container class used to define column headers
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class ObjectGroupWithHeaders : public caf::PdmGuardedObjects
|
||||
class ObjectGroupWithHeaders : public caf::PdmObjectCollection
|
||||
{
|
||||
public:
|
||||
ObjectGroupWithHeaders() {};
|
||||
@ -164,7 +164,7 @@ private:
|
||||
RimWellPathImport* m_wellPathImportObject;
|
||||
QTextEdit* m_textEdit;
|
||||
caf::PdmUiListView* m_listView;
|
||||
caf::PdmGuardedObjects* m_objectGroup;
|
||||
caf::PdmObjectCollection* m_objectGroup;
|
||||
};
|
||||
|
||||
|
||||
|
@ -47,21 +47,21 @@ void PdmObjectGroup::addObject(PdmObjectHandle * obj)
|
||||
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(PdmGuardedObjects, "PdmGuardedObjects");
|
||||
CAF_PDM_SOURCE_INIT(PdmObjectCollection, "PdmObjectCollection");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
PdmGuardedObjects::PdmGuardedObjects()
|
||||
PdmObjectCollection::PdmObjectCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("PdmGuardedObjects", "", "", "");
|
||||
CAF_PDM_InitObject("PdmObjectCollection", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&objects, "PdmObjects", "", "", "", "")
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
PdmGuardedObjects::~PdmGuardedObjects()
|
||||
PdmObjectCollection::~PdmObjectCollection()
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -12,8 +12,6 @@ class PdmReferenceHelper;
|
||||
|
||||
//==================================================================================================
|
||||
/// The PdmObjectGroup serves as a container of unknown PdmObjects
|
||||
|
||||
/// It is not clear whether it really has a reusable value on its own.
|
||||
//==================================================================================================
|
||||
class PdmObjectGroup : public PdmObject
|
||||
{
|
||||
@ -90,12 +88,15 @@ void PdmObjectGroup::createCopyByType(std::vector<PdmPointer<T> >* copyOfTypedOb
|
||||
}
|
||||
|
||||
|
||||
class PdmGuardedObjects : public PdmObject
|
||||
//==================================================================================================
|
||||
/// The PdmObjectCollection serves as a container of unknown PdmObjects stored in a PdmChildArrayField
|
||||
//==================================================================================================
|
||||
class PdmObjectCollection : public PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
PdmGuardedObjects();
|
||||
~PdmGuardedObjects();
|
||||
PdmObjectCollection();
|
||||
~PdmObjectCollection();
|
||||
|
||||
caf::PdmChildArrayField<PdmObjectHandle*> objects;
|
||||
};
|
||||
|
@ -80,7 +80,7 @@ PdmUiListView::~PdmUiListView()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void PdmUiListView::setPdmObject(caf::PdmGuardedObjects* object)
|
||||
void PdmUiListView::setPdmObject(caf::PdmObjectCollection* object)
|
||||
{
|
||||
assert(m_listViewEditor);
|
||||
|
||||
|
@ -44,7 +44,7 @@ class QVBoxLayout;
|
||||
namespace caf
|
||||
{
|
||||
|
||||
class PdmGuardedObjects;
|
||||
class PdmObjectCollection;
|
||||
class PdmUiListViewEditor;
|
||||
|
||||
//==================================================================================================
|
||||
@ -57,7 +57,7 @@ public:
|
||||
PdmUiListView(QWidget* parent = 0, Qt::WindowFlags f = 0);
|
||||
~PdmUiListView();
|
||||
|
||||
void setPdmObject(caf::PdmGuardedObjects* object);
|
||||
void setPdmObject(caf::PdmObjectCollection* object);
|
||||
|
||||
private:
|
||||
PdmUiListViewEditor* m_listViewEditor;
|
||||
|
@ -184,7 +184,7 @@ QVariant caf::UiListViewModelPdm::data(const QModelIndex &index, int role /*= Qt
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void caf::UiListViewModelPdm::setPdmData(PdmGuardedObjects* objectGroup, const QString& configName)
|
||||
void caf::UiListViewModelPdm::setPdmData(PdmObjectCollection* objectGroup, const QString& configName)
|
||||
{
|
||||
m_pdmObjectGroup = objectGroup;
|
||||
m_configName = configName;
|
||||
@ -244,7 +244,7 @@ QWidget* PdmUiListViewEditor::createWidget(QWidget* parent)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void PdmUiListViewEditor::configureAndUpdateUi(const QString& uiConfigName)
|
||||
{
|
||||
PdmGuardedObjects* objectGroup = dynamic_cast<PdmGuardedObjects*>(pdmObject());
|
||||
PdmObjectCollection* objectGroup = dynamic_cast<PdmObjectCollection*>(pdmObject());
|
||||
m_tableModelPdm->setPdmData(objectGroup, uiConfigName);
|
||||
|
||||
m_tableView->resizeColumnsToContents();
|
||||
|
@ -50,7 +50,7 @@ namespace caf
|
||||
{
|
||||
class PdmUiFieldEditorHandle;
|
||||
class PdmUiItem;
|
||||
class PdmGuardedObjects;
|
||||
class PdmObjectCollection;
|
||||
|
||||
|
||||
|
||||
@ -80,7 +80,7 @@ class UiListViewModelPdm : public QAbstractTableModel
|
||||
public:
|
||||
UiListViewModelPdm(QObject* parent);
|
||||
|
||||
void setPdmData(PdmGuardedObjects* objectGroup, const QString& configName);
|
||||
void setPdmData(PdmObjectCollection* objectGroup, const QString& configName);
|
||||
|
||||
// Qt overrides
|
||||
virtual int rowCount( const QModelIndex &parent = QModelIndex( ) ) const;
|
||||
@ -92,7 +92,7 @@ private:
|
||||
void computeColumnCount();
|
||||
|
||||
private:
|
||||
PdmGuardedObjects* m_pdmObjectGroup;
|
||||
PdmObjectCollection* m_pdmObjectGroup;
|
||||
QString m_configName;
|
||||
PdmUiListViewEditorAttribute m_editorAttribute;
|
||||
int m_columnCount;
|
||||
|
Loading…
Reference in New Issue
Block a user