2012-05-18 09:45:23 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2014-09-23 15:04:57 +02:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2012-05-18 09:45:23 +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.
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
|
2017-02-21 08:57:40 +01:00
|
|
|
#include "RimPropertyFilter.h"
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2015-07-31 18:58:23 +02:00
|
|
|
#include "cafPdmChildField.h"
|
|
|
|
|
2015-05-21 10:05:33 +02:00
|
|
|
class RimEclipseView;
|
2015-06-25 11:48:24 +02:00
|
|
|
class RimEclipsePropertyFilterCollection;
|
2015-06-25 09:38:53 +02:00
|
|
|
class RimEclipseResultDefinition;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
|
|
|
class RigGridBase;
|
2013-03-22 15:43:42 +01:00
|
|
|
class RigCaseCellResultsData;
|
2012-06-26 16:10:41 +02:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2017-02-21 08:57:40 +01:00
|
|
|
class RimEclipsePropertyFilter : public RimPropertyFilter
|
2012-05-18 09:45:23 +02:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2015-06-24 15:03:55 +02:00
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
public:
|
2015-06-25 11:45:31 +02:00
|
|
|
RimEclipsePropertyFilter();
|
|
|
|
virtual ~RimEclipsePropertyFilter();
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2016-08-05 09:28:04 +02:00
|
|
|
caf::PdmChildField<RimEclipseResultDefinition*> resultDefinition;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2016-08-05 09:28:04 +02:00
|
|
|
void rangeValues(double* lower, double* upper) const;
|
2016-09-13 14:07:45 +02:00
|
|
|
bool isCategorySelectionActive() const;
|
2016-08-05 08:31:15 +02:00
|
|
|
|
2015-06-24 15:03:55 +02:00
|
|
|
void setToDefaultValues();
|
2015-07-02 12:49:28 +02:00
|
|
|
void updateFilterName();
|
2015-06-24 15:03:55 +02:00
|
|
|
void computeResultValueRange();
|
2017-03-14 17:26:40 +01:00
|
|
|
void updateFromCurrentTimeStep();
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2015-06-24 15:03:55 +02:00
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
2015-08-12 11:02:09 +02:00
|
|
|
virtual void initAfterRead();
|
|
|
|
|
2012-06-26 16:10:41 +02:00
|
|
|
protected:
|
2015-11-02 09:30:04 +01:00
|
|
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
|
|
|
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName);
|
|
|
|
|
2015-06-24 15:03:55 +02:00
|
|
|
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute);
|
2012-06-26 16:10:41 +02:00
|
|
|
|
2015-11-02 09:30:04 +01:00
|
|
|
private:
|
2016-08-05 11:37:39 +02:00
|
|
|
friend class RimEclipsePropertyFilterCollection;
|
|
|
|
friend class RicEclipsePropertyFilterFeatureImpl;
|
2016-08-05 08:31:15 +02:00
|
|
|
|
|
|
|
void updateActiveState();
|
2015-11-02 09:30:04 +01:00
|
|
|
void updateReadOnlyStateOfAllFields();
|
2017-03-14 16:13:40 +01:00
|
|
|
void updateRangeLabel();
|
2015-11-02 09:30:04 +01:00
|
|
|
bool isPropertyFilterControlled();
|
2017-03-24 21:34:46 +01:00
|
|
|
void setCategoriesFromTracerNames(const std::vector<QString>& tracerNames);
|
2015-11-02 09:30:04 +01:00
|
|
|
|
2017-03-15 08:43:06 +01:00
|
|
|
RimEclipsePropertyFilterCollection* parentContainer();
|
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
private:
|
2017-03-14 16:13:40 +01:00
|
|
|
caf::PdmField<QString> m_rangeLabelText;
|
2016-08-05 09:28:04 +02:00
|
|
|
caf::PdmField<double> m_lowerBound;
|
|
|
|
caf::PdmField<double> m_upperBound;
|
2016-09-13 13:43:20 +02:00
|
|
|
|
2016-12-14 11:13:54 +01:00
|
|
|
caf::PdmField<bool> m_useCategorySelection;
|
2016-08-05 08:31:15 +02:00
|
|
|
|
|
|
|
double m_minimumResultValue;
|
2015-06-24 15:03:55 +02:00
|
|
|
double m_maximumResultValue;
|
|
|
|
|
|
|
|
public:
|
|
|
|
// Obsolete stuff
|
|
|
|
enum EvaluationRegionType
|
|
|
|
{
|
|
|
|
RANGE_FILTER_REGION,
|
|
|
|
GLOBAL_REGION
|
|
|
|
};
|
|
|
|
private:
|
|
|
|
caf::PdmField< caf::AppEnum< EvaluationRegionType > > obsoleteField_evaluationRegion;
|
2012-05-18 09:45:23 +02:00
|
|
|
};
|
|
|
|
|