#3788 Annotations. Mirror global annotations into view annotation collection. Not thorougly testet yet

This commit is contained in:
Bjørn Erik Jensen
2018-12-03 13:14:04 +01:00
parent 918efd3a27
commit 11e2fe29d4
33 changed files with 1605 additions and 104 deletions

View File

@@ -0,0 +1,63 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2018- equinor ASA
//
// 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.
//
// 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.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "RiaEclipseUnitTools.h"
#include "cafPdmChildArrayField.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"
#include "cafPdmPointer.h"
class QString;
class RimTextAnnotation;
class RimGridView;
//==================================================================================================
///
///
//==================================================================================================
class RimAnnotationGroupCollection : public caf::PdmObject
{
friend class RimAnnotationCollection;
friend class RimAnnotationInViewCollection;
CAF_PDM_HEADER_INIT;
public:
RimAnnotationGroupCollection();
RimAnnotationGroupCollection(const QString& title);
~RimAnnotationGroupCollection() override;
void setTitle(const QString& title);
bool isActive() const;
bool isVisible() const;
void addAnnotation(caf::PdmObject* annotation);
std::vector<caf::PdmObject*> annotations() const;
protected:
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
caf::PdmFieldHandle* objectToggleField() override;
caf::PdmFieldHandle* userDescriptionField() override;
protected:
caf::PdmField<QString> m_title;
caf::PdmField<bool> m_isActive;
caf::PdmChildArrayField<caf::PdmObject*> m_annotations;
};