mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-14 09:33:56 -06:00
79 lines
3.1 KiB
C++
79 lines
3.1 KiB
C++
/////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// 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 "RimAnnotationCollectionBase.h"
|
|
|
|
#include "cafPdmChildArrayField.h"
|
|
#include "cafPdmField.h"
|
|
#include "cafPdmObject.h"
|
|
#include "cafPdmPointer.h"
|
|
|
|
class QString;
|
|
class RimTextAnnotation;
|
|
class RimReachCircleAnnotation;
|
|
class RimUserDefinedPolylinesAnnotation;
|
|
class RimPolylinesFromFileAnnotation;
|
|
class RimGridView;
|
|
|
|
//==================================================================================================
|
|
///
|
|
///
|
|
//==================================================================================================
|
|
class RimAnnotationCollection : public RimAnnotationCollectionBase
|
|
{
|
|
CAF_PDM_HEADER_INIT;
|
|
public:
|
|
RimAnnotationCollection();
|
|
~RimAnnotationCollection() override;
|
|
|
|
void loadDataAndUpdate();
|
|
|
|
double annotationPlaneZ() const;
|
|
bool snapAnnotations() const;
|
|
|
|
void addAnnotation(RimReachCircleAnnotation* annotation);
|
|
void addAnnotation(RimUserDefinedPolylinesAnnotation* annotation);
|
|
void addAnnotation(RimPolylinesFromFileAnnotation* annotation);
|
|
|
|
std::vector<RimReachCircleAnnotation*> reachCircleAnnotations() const;
|
|
std::vector<RimUserDefinedPolylinesAnnotation*> userDefinedPolylineAnnotations() const;
|
|
std::vector<RimPolylinesFromFileAnnotation*> polylinesFromFileAnnotations() const;
|
|
|
|
RimPolylinesFromFileAnnotation* importOrUpdatePolylinesFromFile(const QStringList& fileNames );
|
|
|
|
size_t lineBasedAnnotationsCount() const;
|
|
|
|
protected:
|
|
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
|
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
|
|
|
private:
|
|
void reloadPolylinesFromFile(const std::vector<RimPolylinesFromFileAnnotation *>& polyLinesObjsToReload);
|
|
|
|
caf::PdmChildArrayField<RimReachCircleAnnotation*> m_reachCircleAnnotations;
|
|
caf::PdmChildArrayField<RimUserDefinedPolylinesAnnotation*> m_userDefinedPolylineAnnotations;
|
|
caf::PdmChildArrayField<RimPolylinesFromFileAnnotation*> m_polylineFromFileAnnotations;
|
|
|
|
caf::PdmField<double> m_annotationPlaneDepth;
|
|
caf::PdmField<bool> m_snapAnnotations;
|
|
};
|