2015-09-08 10:17:35 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2015-09-08 10:17:35 +02:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2015-09-08 10:17:35 +02:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2015-09-08 10:17:35 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2015-09-16 14:26:25 +02:00
|
|
|
#include "cafPdmChildField.h"
|
2015-09-08 10:17:35 +02:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
|
|
|
|
|
|
class RimViewLinker;
|
|
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
|
|
|
|
///
|
2015-09-08 10:17:35 +02:00
|
|
|
//==================================================================================================
|
|
|
|
|
class RimViewLinkerCollection : public caf::PdmObject
|
|
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
CAF_PDM_HEADER_INIT;
|
2015-09-08 10:17:35 +02:00
|
|
|
|
|
|
|
|
public:
|
2019-09-06 10:40:57 +02:00
|
|
|
RimViewLinkerCollection( void );
|
|
|
|
|
~RimViewLinkerCollection( void ) override;
|
2015-09-08 10:17:35 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
caf::PdmField<bool> isActive;
|
|
|
|
|
caf::PdmChildField<RimViewLinker*> viewLinker;
|
2015-09-08 10:17:35 +02:00
|
|
|
|
2020-05-18 16:02:27 +02:00
|
|
|
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects );
|
|
|
|
|
|
2015-09-08 10:17:35 +02:00
|
|
|
protected:
|
2020-02-12 11:13:38 +01:00
|
|
|
caf::PdmFieldHandle* objectToggleField() override { return &isActive; }
|
2019-09-06 10:40:57 +02:00
|
|
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
2020-02-12 11:43:15 +01:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2019-09-06 10:40:57 +02:00
|
|
|
void initAfterRead() override;
|
2015-09-08 10:17:35 +02:00
|
|
|
};
|