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