mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Remove obsolete code
This commit is contained in:
@@ -52,7 +52,6 @@
|
||||
#include "RimSummaryCaseMainCollection.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryCurveCollection.h"
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
#include "RimWellLogRftCurve.h"
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "RimGridCrossPlotDataSet.h"
|
||||
#include "RimMimeData.h"
|
||||
#include "RimModeledWellPath.h"
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimWellAllocationPlot.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryCaseMainCollection.h"
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryCrossPlotCollection.h"
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryCaseMainCollection.h"
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
#include "RimSummaryCrossPlot.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
|
||||
#include "cafPdmDefaultObjectFactory.h"
|
||||
#include "cafPdmDocument.h"
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
#include "RimSummaryCrossPlot.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
|
||||
#include "cafPdmDefaultObjectFactory.h"
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "RimSummaryCrossPlot.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryCurveCollection.h"
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
|
||||
@@ -8,9 +8,7 @@ set(SOURCE_GROUP_HEADER_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCurve.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCurveAppearanceCalculator.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCurveAutoName.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCurveFilter.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryPlotAxisFormatter.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryFilter.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCurveCollection.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryPlot.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryPlotCollection.h
|
||||
@@ -51,9 +49,7 @@ set(SOURCE_GROUP_SOURCE_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCurve.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCurveAppearanceCalculator.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCurveAutoName.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCurveFilter.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryPlotAxisFormatter.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryFilter.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCurveCollection.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryPlot.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryPlotCollection.cpp
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryFilter.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryTimeAxisProperties.h"
|
||||
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryCurveAutoName.h"
|
||||
#include "RimSummaryFilter.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimTimeStepFilter.h"
|
||||
|
||||
@@ -221,14 +220,6 @@ RimEnsembleCurveSet::RimEnsembleCurveSet()
|
||||
m_disableStatisticCurves = false;
|
||||
m_isCurveSetFiltered = false;
|
||||
|
||||
// Obsolete fields
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_yValuesSummaryFilter_OBSOLETE, "VarListFilter", "Filter" );
|
||||
m_yValuesSummaryFilter_OBSOLETE.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
m_yValuesSummaryFilter_OBSOLETE.uiCapability()->setUiTreeHidden( true );
|
||||
m_yValuesSummaryFilter_OBSOLETE.xmlCapability()->setIOWritable( false );
|
||||
m_yValuesSummaryFilter_OBSOLETE = new RimSummaryFilter_OBSOLETE;
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@ class RimSummaryCase;
|
||||
class RimSummaryCaseCollection;
|
||||
class RimSummaryCurve;
|
||||
class RimSummaryAddress;
|
||||
class RimSummaryFilter_OBSOLETE;
|
||||
class RimSummaryPlotSourceStepping;
|
||||
class RimSummaryCurveAutoName;
|
||||
class RimEnsembleCurveFilterCollection;
|
||||
@@ -254,7 +253,4 @@ private:
|
||||
|
||||
bool m_disableStatisticCurves;
|
||||
bool m_isCurveSetFiltered;
|
||||
|
||||
// Obsolete fields
|
||||
caf::PdmChildField<RimSummaryFilter_OBSOLETE*> m_yValuesSummaryFilter_OBSOLETE;
|
||||
};
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include "RimSummaryCrossPlot.h"
|
||||
#include "RimSummaryCurveAutoName.h"
|
||||
#include "RimSummaryCurveCollection.h"
|
||||
#include "RimSummaryFilter.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
#include "RimSummaryTimeAxisProperties.h"
|
||||
@@ -128,18 +127,6 @@ RimSummaryCurve::RimSummaryCurve()
|
||||
setSymbolSkipDistance( 10.0f );
|
||||
setLineThickness( 2 );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_yValuesSummaryFilter_OBSOLETE, "VarListFilter", "Filter" );
|
||||
m_yValuesSummaryFilter_OBSOLETE.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
m_yValuesSummaryFilter_OBSOLETE.uiCapability()->setUiTreeHidden( true );
|
||||
m_yValuesSummaryFilter_OBSOLETE.xmlCapability()->setIOWritable( false );
|
||||
m_yValuesSummaryFilter_OBSOLETE = new RimSummaryFilter_OBSOLETE;
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_xValuesSummaryFilter_OBSOLETE, "VarListFilterX", "Filter" );
|
||||
m_xValuesSummaryFilter_OBSOLETE.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
m_xValuesSummaryFilter_OBSOLETE.uiCapability()->setUiTreeHidden( true );
|
||||
m_xValuesSummaryFilter_OBSOLETE.xmlCapability()->setIOWritable( false );
|
||||
m_xValuesSummaryFilter_OBSOLETE = new RimSummaryFilter_OBSOLETE;
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
class RifSummaryReaderInterface;
|
||||
class RimSummaryCase;
|
||||
class RimSummaryFilter_OBSOLETE;
|
||||
class RiuQwtPlotCurve;
|
||||
class RimSummaryCurveAutoName;
|
||||
class RimSummaryAddress;
|
||||
@@ -148,8 +147,4 @@ private:
|
||||
caf::PdmChildField<RimSummaryCurveAutoName*> m_curveNameConfig;
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::PlotAxis>> m_plotAxis;
|
||||
caf::PdmField<bool> m_isTopZWithinCategory;
|
||||
|
||||
// Obsolete fields
|
||||
caf::PdmChildField<RimSummaryFilter_OBSOLETE*> m_yValuesSummaryFilter_OBSOLETE;
|
||||
caf::PdmChildField<RimSummaryFilter_OBSOLETE*> m_xValuesSummaryFilter_OBSOLETE;
|
||||
};
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016 Statoil 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryCurveAutoName.h"
|
||||
#include "RimSummaryFilter.h"
|
||||
#include "cafPdmUiListEditor.h"
|
||||
#include "cafPdmUiPushButtonEditor.h"
|
||||
|
||||
// See also corresponding fake implementations in RimSummaryCurve
|
||||
|
||||
QTextStream& operator<<( QTextStream& str, const std::vector<RifEclipseSummaryAddress>& sobj )
|
||||
{
|
||||
CVF_ASSERT( false );
|
||||
return str;
|
||||
}
|
||||
|
||||
QTextStream& operator>>( QTextStream& str, std::vector<RifEclipseSummaryAddress>& sobj )
|
||||
{
|
||||
CVF_ASSERT( false );
|
||||
return str;
|
||||
}
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimSummaryCurveFilter_OBSOLETE, "SummaryCurveFilter" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCurveFilter_OBSOLETE::RimSummaryCurveFilter_OBSOLETE()
|
||||
{
|
||||
CAF_PDM_InitObject( "Curve Filter", ":/SummaryCurveFilter16x16.png", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_selectedSummaryCases, "SummaryCases", "Cases" );
|
||||
m_selectedSummaryCases.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
m_selectedSummaryCases.uiCapability()->setUiEditorTypeName( caf::PdmUiListEditor::uiEditorTypeName() );
|
||||
m_selectedSummaryCases.uiCapability()->setAutoAddingOptionFromValue( false );
|
||||
m_selectedSummaryCases.xmlCapability()->disableIO();
|
||||
m_selectedSummaryCases.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_summaryFilter, "VarListFilter", "Filter" );
|
||||
m_summaryFilter.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
m_summaryFilter.uiCapability()->setUiTreeHidden( true );
|
||||
|
||||
m_summaryFilter = new RimSummaryFilter_OBSOLETE;
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_uiFilterResultMultiSelection,
|
||||
"FilterResultSelection",
|
||||
"Filter Result",
|
||||
"",
|
||||
"Ctrl-A : Select All",
|
||||
"" );
|
||||
m_uiFilterResultMultiSelection.xmlCapability()->disableIO();
|
||||
m_uiFilterResultMultiSelection.uiCapability()->setUiEditorTypeName( caf::PdmUiListEditor::uiEditorTypeName() );
|
||||
m_uiFilterResultMultiSelection.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
m_uiFilterResultMultiSelection.uiCapability()->setAutoAddingOptionFromValue( false );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_curves, "FilteredCurves", "Filtered Curves" );
|
||||
m_curves.uiCapability()->setUiTreeHidden( true );
|
||||
m_curves.uiCapability()->setUiTreeChildrenHidden( false );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_applyButtonField, "ApplySelection", "" );
|
||||
m_applyButtonField.xmlCapability()->disableIO();
|
||||
m_applyButtonField = false;
|
||||
m_applyButtonField.uiCapability()->setUiEditorTypeName( caf::PdmUiPushButtonEditor::uiEditorTypeName() );
|
||||
m_applyButtonField.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::LEFT );
|
||||
|
||||
CAF_PDM_InitField( &m_autoApplyChangesToPlot, "AutoApplyFilterChanges", true, "Auto Apply Changes" );
|
||||
|
||||
CAF_PDM_InitField( &m_showCurves, "IsActive", true, "Show Curves" );
|
||||
m_showCurves.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitField( &m_useAutoAppearanceAssignment, "UseAutoAppearanceAssignment", true, "Auto" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_caseAppearanceType, "CaseAppearanceType", "Case" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_variableAppearanceType, "VariableAppearanceType", "Vector" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_wellAppearanceType, "WellAppearanceType", "Well" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_groupAppearanceType, "GroupAppearanceType", "Group" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_regionAppearanceType, "RegionAppearanceType", "Region" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_plotAxis, "PlotAxis", "Axis" );
|
||||
CAF_PDM_InitField( &m_showLegend, "ShowLegend", true, "Contribute To Legend" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_curveNameConfig, "SummaryCurveNameConfig", "SummaryCurveNameConfig" );
|
||||
m_curveNameConfig.uiCapability()->setUiTreeHidden( true );
|
||||
m_curveNameConfig.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
|
||||
m_curveNameConfig = new RimSummaryCurveAutoName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCurveFilter_OBSOLETE::~RimSummaryCurveFilter_OBSOLETE()
|
||||
{
|
||||
m_curves.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimSummaryCurve*> RimSummaryCurveFilter_OBSOLETE::curves()
|
||||
{
|
||||
std::vector<RimSummaryCurve*> myCurves;
|
||||
for ( RimSummaryCurve* curve : m_curves )
|
||||
{
|
||||
myCurves.push_back( curve );
|
||||
}
|
||||
|
||||
return myCurves;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCurveFilter_OBSOLETE::clearCurvesWithoutDelete()
|
||||
{
|
||||
m_curves.clear();
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016 Statoil 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 "cafAppEnum.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmChildField.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmPointer.h"
|
||||
#include "cafPdmPtrArrayField.h"
|
||||
#include "cafPdmPtrField.h"
|
||||
|
||||
#include "RifEclipseSummaryAddressQMetaType.h"
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "RimSummaryCurveAppearanceCalculator.h"
|
||||
|
||||
class RimSummaryFilter_OBSOLETE;
|
||||
class RimSummaryCurveAutoName;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimSummaryCurveFilter_OBSOLETE : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RimSummaryCurveFilter_OBSOLETE();
|
||||
~RimSummaryCurveFilter_OBSOLETE() override;
|
||||
|
||||
std::vector<RimSummaryCurve*> curves();
|
||||
void clearCurvesWithoutDelete();
|
||||
|
||||
private:
|
||||
// QPointer<QwtPlot> m_parentQwtPlot;
|
||||
|
||||
// Fields
|
||||
caf::PdmField<bool> m_showCurves;
|
||||
caf::PdmPtrArrayField<RimSummaryCase*> m_selectedSummaryCases;
|
||||
caf::PdmChildArrayField<RimSummaryCurve*> m_curves;
|
||||
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::PlotAxis>> m_plotAxis;
|
||||
caf::PdmField<bool> m_showLegend;
|
||||
|
||||
// Filter fields
|
||||
caf::PdmChildField<RimSummaryFilter_OBSOLETE*> m_summaryFilter;
|
||||
caf::PdmField<std::vector<RifEclipseSummaryAddress>> m_uiFilterResultMultiSelection;
|
||||
|
||||
caf::PdmChildField<RimSummaryCurveAutoName*> m_curveNameConfig;
|
||||
|
||||
caf::PdmField<bool> m_autoApplyChangesToPlot;
|
||||
caf::PdmField<bool> m_applyButtonField;
|
||||
|
||||
caf::PdmField<bool> m_useAutoAppearanceAssignment;
|
||||
typedef caf::AppEnum<RimSummaryCurveAppearanceCalculator::CurveAppearanceType> AppearanceTypeAppEnum;
|
||||
caf::PdmField<AppearanceTypeAppEnum> m_caseAppearanceType;
|
||||
caf::PdmField<AppearanceTypeAppEnum> m_variableAppearanceType;
|
||||
caf::PdmField<AppearanceTypeAppEnum> m_wellAppearanceType;
|
||||
caf::PdmField<AppearanceTypeAppEnum> m_groupAppearanceType;
|
||||
caf::PdmField<AppearanceTypeAppEnum> m_regionAppearanceType;
|
||||
|
||||
std::vector<caf::PdmPointer<RimSummaryCase>> m_selectionCache;
|
||||
};
|
||||
@@ -1,519 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016 Statoil 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimSummaryFilter.h"
|
||||
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template <>
|
||||
void caf::AppEnum<RimSummaryFilter_OBSOLETE::SummaryFilterType>::setUp()
|
||||
{
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_VAR_STRING, "SUM_FILTER_VAR_STRING", "All" );
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_FIELD, "SUM_FILTER_FIELD", "Field" );
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_WELL, "SUM_FILTER_WELL", "Well" );
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_WELL_GROUP, "SUM_FILTER_WELL_GROUP", "Group" );
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_WELL_COMPLETION, "SUM_FILTER_WELL_COMPLETION", "Completion" );
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_WELL_SEGMENT, "SUM_FILTER_SEGMENT", "Segment" );
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_BLOCK, "SUM_FILTER_BLOCK", "Block" );
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_REGION, "SUM_FILTER_REGION", "Region" );
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_REGION_2_REGION, "SUM_FILTER_REGION_2_REGION", "Region-Region" );
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_WELL_LGR, "SUM_FILTER_WELL_LGR", "Lgr-Well" );
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_WELL_COMPLETION_LGR, "SUM_FILTER_WELL_COMPLETION_LGR", "Lgr-Completion" );
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_BLOCK_LGR, "SUM_FILTER_BLOCK_LGR", "Lgr-Block" );
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_MISC, "SUM_FILTER_MISC", "Misc" );
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_AQUIFER, "SUM_FILTER_AQUIFER", "Aquifer" );
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_NETWORK, "SUM_FILTER_NETWORK", "Network" );
|
||||
addItem( RimSummaryFilter_OBSOLETE::SUM_FILTER_ANY, "SUM_FILTER_ANY", "All (Advanced)" );
|
||||
setDefault( RimSummaryFilter_OBSOLETE::SUM_FILTER_VAR_STRING );
|
||||
}
|
||||
|
||||
} // namespace caf
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimSummaryFilter_OBSOLETE, "SummaryFilterSettings" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryFilter_OBSOLETE::RimSummaryFilter_OBSOLETE()
|
||||
{
|
||||
CAF_PDM_InitObject( "Summary Filter" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_filterType, "SummaryFilterType", "Search" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_completeVarStringFilter, "SummaryCompleteVarStringFilter", "Filter" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_filterQuantityName, "SummaryVarQuantityFilter", "Vector name" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_regionNumberFilter, "SummaryRegionNumberFilter", "Region number" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_regionNumber2Filter, "SummaryRegionNumber2Filter", "2. Region number" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_wellGroupNameFilter, "SummaryWellGroupNameFilter", "Group name" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_wellNameFilter, "SummaryWellNameFilter", "Well name" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_wellSegmentNumberFilter, "SummaryWellSegmentNumberFilter", "Segment number" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_lgrNameFilter, "SummaryLgrNameFilter", "LGR Name" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_cellIJKFilter, "SummaryCellIJKFilter", "I, J, K" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryFilter_OBSOLETE::~RimSummaryFilter_OBSOLETE()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString cellIJKString( int cellI, int cellJ, int cellK )
|
||||
{
|
||||
QString ijkString;
|
||||
if ( cellI >= 0 && cellJ >= 0 && cellK >= 0 )
|
||||
{
|
||||
ijkString = QString::number( cellI ) + ", " + QString::number( cellJ ) + ", " + QString::number( cellK );
|
||||
}
|
||||
|
||||
return ijkString;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryFilter_OBSOLETE::updateFromAddress( const RifEclipseSummaryAddress& address )
|
||||
{
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category = address.category();
|
||||
|
||||
m_filterQuantityName = QString::fromStdString( address.quantityName() );
|
||||
|
||||
switch ( category )
|
||||
{
|
||||
case RifEclipseSummaryAddress::SUMMARY_INVALID:
|
||||
m_filterType = SUM_FILTER_VAR_STRING;
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_FIELD:
|
||||
m_filterType = SUM_FILTER_FIELD;
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_AQUIFER:
|
||||
m_filterType = SUM_FILTER_AQUIFER;
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_NETWORK:
|
||||
m_filterType = SUM_FILTER_NETWORK;
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_MISC:
|
||||
m_filterType = SUM_FILTER_MISC;
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_REGION:
|
||||
m_filterType = SUM_FILTER_REGION;
|
||||
m_regionNumberFilter = QString( "%1" ).arg( address.regionNumber() );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION:
|
||||
m_filterType = SUM_FILTER_REGION_2_REGION;
|
||||
m_regionNumberFilter = QString( "%1" ).arg( address.regionNumber() );
|
||||
m_regionNumber2Filter = QString( "%1" ).arg( address.regionNumber2() );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_GROUP:
|
||||
m_filterType = SUM_FILTER_WELL_GROUP;
|
||||
m_wellGroupNameFilter = QString::fromStdString( address.wellGroupName() );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL:
|
||||
m_filterType = SUM_FILTER_WELL;
|
||||
m_wellNameFilter = QString::fromStdString( address.wellName() );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION:
|
||||
m_filterType = SUM_FILTER_WELL_COMPLETION;
|
||||
m_wellNameFilter = QString::fromStdString( address.wellName() );
|
||||
m_cellIJKFilter = cellIJKString( address.cellI(), address.cellJ(), address.cellK() );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_LGR:
|
||||
m_filterType = SUM_FILTER_WELL_LGR;
|
||||
m_wellNameFilter = QString::fromStdString( address.wellName() );
|
||||
m_lgrNameFilter = QString::fromStdString( address.lgrName() );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR:
|
||||
m_filterType = SUM_FILTER_WELL_COMPLETION_LGR;
|
||||
m_wellNameFilter = QString::fromStdString( address.wellName() );
|
||||
m_lgrNameFilter = QString::fromStdString( address.lgrName() );
|
||||
m_cellIJKFilter = cellIJKString( address.cellI(), address.cellJ(), address.cellK() );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT:
|
||||
m_filterType = SUM_FILTER_WELL_SEGMENT;
|
||||
m_wellNameFilter = QString::fromStdString( address.wellName() );
|
||||
m_wellSegmentNumberFilter = QString( "%1" ).arg( address.wellSegmentNumber() );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_BLOCK:
|
||||
m_filterType = SUM_FILTER_BLOCK;
|
||||
m_cellIJKFilter = cellIJKString( address.cellI(), address.cellJ(), address.cellK() );
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR:
|
||||
m_filterType = SUM_FILTER_BLOCK_LGR;
|
||||
m_lgrNameFilter = QString::fromStdString( address.lgrName() );
|
||||
m_cellIJKFilter = cellIJKString( address.cellI(), address.cellJ(), address.cellK() );
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool isNumberMatch( QString numericalFilterString, int number )
|
||||
{
|
||||
if ( numericalFilterString.isEmpty() ) return true;
|
||||
|
||||
if ( numericalFilterString.trimmed() == "*" )
|
||||
{
|
||||
if ( number >= 0 )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
// Todo: Ranges, and lists
|
||||
int filterNumber = numericalFilterString.toInt();
|
||||
return number == filterNumber;
|
||||
}
|
||||
|
||||
bool isStringMatch( QString filterString, std::string value )
|
||||
{
|
||||
if ( filterString.isEmpty() ) return true;
|
||||
if ( filterString.trimmed() == "*" )
|
||||
{
|
||||
if ( !value.empty() )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
QRegExp searcher( filterString, Qt::CaseInsensitive, QRegExp::WildcardUnix );
|
||||
QString qstrValue = QString::fromStdString( value );
|
||||
return searcher.exactMatch( qstrValue );
|
||||
}
|
||||
|
||||
bool isIJKMatch( QString filterString, int cellI, int cellJ, int cellK )
|
||||
{
|
||||
if ( filterString.isEmpty() ) return true;
|
||||
if ( filterString.trimmed() == "*" )
|
||||
{
|
||||
if ( cellI >= 0 && cellJ >= 0 && cellK >= 0 )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
QString ijkString = cellIJKString( cellI, cellJ, cellK );
|
||||
|
||||
// Todo: Ranges, and lists
|
||||
QRegExp searcher( filterString, Qt::CaseInsensitive, QRegExp::WildcardUnix );
|
||||
|
||||
return searcher.exactMatch( ijkString );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSummaryFilter_OBSOLETE::isIncludedByFilter( const RifEclipseSummaryAddress& addr ) const
|
||||
{
|
||||
if ( !isSumVarTypeMatchingFilterType( m_filterType(), addr.category() ) ) return false;
|
||||
|
||||
if ( m_filterType() == SUM_FILTER_VAR_STRING )
|
||||
{
|
||||
return addr.isUiTextMatchingFilterText( m_completeVarStringFilter() );
|
||||
}
|
||||
|
||||
if ( !isStringMatch( m_filterQuantityName(), addr.quantityName() ) ) return false;
|
||||
|
||||
if ( m_filterType() == SUM_FILTER_ANY )
|
||||
{
|
||||
return ( isNumberMatch( m_regionNumberFilter(), addr.regionNumber() ) &&
|
||||
isNumberMatch( m_regionNumber2Filter(), addr.regionNumber2() ) &&
|
||||
isStringMatch( m_wellGroupNameFilter(), addr.wellGroupName() ) &&
|
||||
isStringMatch( m_wellNameFilter(), addr.wellName() ) &&
|
||||
isStringMatch( m_lgrNameFilter(), addr.lgrName() ) &&
|
||||
isNumberMatch( m_wellSegmentNumberFilter(), addr.wellSegmentNumber() ) &&
|
||||
isIJKMatch( m_cellIJKFilter(), addr.cellI(), addr.cellJ(), addr.cellK() ) );
|
||||
}
|
||||
|
||||
switch ( addr.category() )
|
||||
{
|
||||
case RifEclipseSummaryAddress::SUMMARY_REGION:
|
||||
{
|
||||
return isNumberMatch( m_regionNumberFilter(), addr.regionNumber() );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION:
|
||||
{
|
||||
return isNumberMatch( m_regionNumberFilter(), addr.regionNumber() ) &&
|
||||
isNumberMatch( m_regionNumber2Filter(), addr.regionNumber2() );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_GROUP:
|
||||
{
|
||||
return isStringMatch( m_wellGroupNameFilter(), addr.wellGroupName() );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL:
|
||||
{
|
||||
return isStringMatch( m_wellNameFilter(), addr.wellName() );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION:
|
||||
{
|
||||
return isStringMatch( m_wellNameFilter(), addr.wellName() ) &&
|
||||
isIJKMatch( m_cellIJKFilter(), addr.cellI(), addr.cellJ(), addr.cellK() );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_LGR:
|
||||
{
|
||||
return isStringMatch( m_wellNameFilter(), addr.wellName() ) &&
|
||||
isStringMatch( m_lgrNameFilter(), addr.lgrName() );
|
||||
}
|
||||
break;
|
||||
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR:
|
||||
{
|
||||
return isStringMatch( m_wellNameFilter(), addr.wellName() ) &&
|
||||
isStringMatch( m_lgrNameFilter(), addr.lgrName() ) &&
|
||||
isIJKMatch( m_cellIJKFilter(), addr.cellI(), addr.cellJ(), addr.cellK() );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT:
|
||||
{
|
||||
return isStringMatch( m_wellNameFilter(), addr.wellName() ) &&
|
||||
isNumberMatch( m_wellSegmentNumberFilter(), addr.wellSegmentNumber() );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_BLOCK:
|
||||
{
|
||||
return isIJKMatch( m_cellIJKFilter(), addr.cellI(), addr.cellJ(), addr.cellK() );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR:
|
||||
{
|
||||
return isStringMatch( m_lgrNameFilter(), addr.lgrName() ) &&
|
||||
isIJKMatch( m_cellIJKFilter(), addr.cellI(), addr.cellJ(), addr.cellK() );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSummaryFilter_OBSOLETE::isSumVarTypeMatchingFilterType( SummaryFilterType sumFilterType,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory sumVarType )
|
||||
{
|
||||
if ( sumVarType == RifEclipseSummaryAddress::SUMMARY_INVALID ) return false;
|
||||
if ( sumFilterType == SUM_FILTER_ANY || sumFilterType == SUM_FILTER_VAR_STRING ) return true;
|
||||
|
||||
switch ( sumVarType )
|
||||
{
|
||||
case RifEclipseSummaryAddress::SUMMARY_FIELD:
|
||||
{
|
||||
return ( sumFilterType == SUM_FILTER_FIELD );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_AQUIFER:
|
||||
{
|
||||
return ( sumFilterType == SUM_FILTER_AQUIFER );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_NETWORK:
|
||||
{
|
||||
return ( sumFilterType == SUM_FILTER_NETWORK );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_MISC:
|
||||
{
|
||||
return ( sumFilterType == SUM_FILTER_MISC );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_REGION:
|
||||
{
|
||||
return ( sumFilterType == SUM_FILTER_REGION );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION:
|
||||
{
|
||||
return ( sumFilterType == SUM_FILTER_REGION_2_REGION );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_GROUP:
|
||||
{
|
||||
return ( sumFilterType == SUM_FILTER_WELL_GROUP );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL:
|
||||
{
|
||||
return ( sumFilterType == SUM_FILTER_WELL );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION:
|
||||
{
|
||||
return ( sumFilterType == SUM_FILTER_WELL_COMPLETION );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_LGR:
|
||||
{
|
||||
return ( sumFilterType == SUM_FILTER_WELL_LGR );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR:
|
||||
{
|
||||
return ( sumFilterType == SUM_FILTER_WELL_COMPLETION_LGR );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT:
|
||||
{
|
||||
return ( sumFilterType == SUM_FILTER_WELL_SEGMENT );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_BLOCK:
|
||||
{
|
||||
return ( sumFilterType == SUM_FILTER_BLOCK );
|
||||
}
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR:
|
||||
{
|
||||
return ( sumFilterType == SUM_FILTER_BLOCK_LGR );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryFilter_OBSOLETE::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
uiOrdering.add( &m_filterType );
|
||||
|
||||
if ( m_filterType() == SUM_FILTER_VAR_STRING )
|
||||
{
|
||||
uiOrdering.add( &m_completeVarStringFilter );
|
||||
}
|
||||
else
|
||||
{
|
||||
caf::PdmUiOrdering* curveVarFilterGroup = &uiOrdering; // uiOrdering.addNewGroup("Search Options");
|
||||
|
||||
curveVarFilterGroup->add( &m_filterQuantityName );
|
||||
|
||||
switch ( m_filterType() )
|
||||
{
|
||||
case SUM_FILTER_ANY:
|
||||
{
|
||||
curveVarFilterGroup->add( &m_wellNameFilter );
|
||||
curveVarFilterGroup->add( &m_wellGroupNameFilter );
|
||||
curveVarFilterGroup->add( &m_regionNumberFilter );
|
||||
curveVarFilterGroup->add( &m_regionNumber2Filter );
|
||||
curveVarFilterGroup->add( &m_wellSegmentNumberFilter );
|
||||
curveVarFilterGroup->add( &m_lgrNameFilter );
|
||||
curveVarFilterGroup->add( &m_cellIJKFilter );
|
||||
}
|
||||
break;
|
||||
case SUM_FILTER_REGION:
|
||||
{
|
||||
curveVarFilterGroup->add( &m_regionNumberFilter );
|
||||
}
|
||||
break;
|
||||
case SUM_FILTER_REGION_2_REGION:
|
||||
{
|
||||
curveVarFilterGroup->add( &m_regionNumberFilter );
|
||||
curveVarFilterGroup->add( &m_regionNumber2Filter );
|
||||
}
|
||||
break;
|
||||
case SUM_FILTER_WELL_GROUP:
|
||||
{
|
||||
curveVarFilterGroup->add( &m_wellGroupNameFilter );
|
||||
}
|
||||
break;
|
||||
case SUM_FILTER_WELL:
|
||||
{
|
||||
curveVarFilterGroup->add( &m_wellNameFilter );
|
||||
}
|
||||
break;
|
||||
case SUM_FILTER_WELL_COMPLETION:
|
||||
{
|
||||
curveVarFilterGroup->add( &m_wellNameFilter );
|
||||
curveVarFilterGroup->add( &m_cellIJKFilter );
|
||||
}
|
||||
break;
|
||||
case SUM_FILTER_WELL_LGR:
|
||||
{
|
||||
curveVarFilterGroup->add( &m_wellNameFilter );
|
||||
curveVarFilterGroup->add( &m_lgrNameFilter );
|
||||
}
|
||||
break;
|
||||
case SUM_FILTER_WELL_COMPLETION_LGR:
|
||||
{
|
||||
curveVarFilterGroup->add( &m_wellNameFilter );
|
||||
curveVarFilterGroup->add( &m_lgrNameFilter );
|
||||
curveVarFilterGroup->add( &m_cellIJKFilter );
|
||||
}
|
||||
break;
|
||||
case SUM_FILTER_WELL_SEGMENT:
|
||||
{
|
||||
curveVarFilterGroup->add( &m_wellNameFilter );
|
||||
curveVarFilterGroup->add( &m_wellSegmentNumberFilter );
|
||||
}
|
||||
break;
|
||||
case SUM_FILTER_BLOCK:
|
||||
{
|
||||
curveVarFilterGroup->add( &m_cellIJKFilter );
|
||||
}
|
||||
break;
|
||||
case SUM_FILTER_BLOCK_LGR:
|
||||
{
|
||||
curveVarFilterGroup->add( &m_lgrNameFilter );
|
||||
curveVarFilterGroup->add( &m_cellIJKFilter );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
uiOrdering.skipRemainingFields();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryFilter_OBSOLETE::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
{
|
||||
caf::PdmObject* parent = dynamic_cast<caf::PdmObject*>( this->parentField()->ownerObject() );
|
||||
|
||||
if ( parent )
|
||||
{
|
||||
parent->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016 Statoil 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 "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
class RimSummaryFilter_OBSOLETE : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
enum SummaryFilterType
|
||||
{
|
||||
SUM_FILTER_VAR_STRING,
|
||||
SUM_FILTER_ANY,
|
||||
SUM_FILTER_FIELD,
|
||||
SUM_FILTER_AQUIFER,
|
||||
SUM_FILTER_NETWORK,
|
||||
SUM_FILTER_MISC,
|
||||
SUM_FILTER_REGION,
|
||||
SUM_FILTER_REGION_2_REGION,
|
||||
SUM_FILTER_WELL_GROUP,
|
||||
SUM_FILTER_WELL,
|
||||
SUM_FILTER_WELL_COMPLETION,
|
||||
SUM_FILTER_WELL_COMPLETION_LGR,
|
||||
SUM_FILTER_WELL_LGR,
|
||||
SUM_FILTER_WELL_SEGMENT,
|
||||
SUM_FILTER_BLOCK,
|
||||
SUM_FILTER_BLOCK_LGR,
|
||||
};
|
||||
|
||||
RimSummaryFilter_OBSOLETE();
|
||||
~RimSummaryFilter_OBSOLETE() override;
|
||||
|
||||
void updateFromAddress( const RifEclipseSummaryAddress& address );
|
||||
|
||||
bool isIncludedByFilter( const RifEclipseSummaryAddress& addr ) const;
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
private:
|
||||
friend class RimSummaryCurve;
|
||||
|
||||
static bool isSumVarTypeMatchingFilterType( SummaryFilterType sumFilterType,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory sumVarType );
|
||||
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
||||
private:
|
||||
caf::PdmField<caf::AppEnum<SummaryFilterType>> m_filterType;
|
||||
caf::PdmField<QString> m_completeVarStringFilter;
|
||||
|
||||
caf::PdmField<QString> m_filterQuantityName;
|
||||
caf::PdmField<QString> m_regionNumberFilter;
|
||||
caf::PdmField<QString> m_regionNumber2Filter;
|
||||
caf::PdmField<QString> m_wellGroupNameFilter;
|
||||
caf::PdmField<QString> m_wellNameFilter;
|
||||
caf::PdmField<QString> m_wellSegmentNumberFilter;
|
||||
caf::PdmField<QString> m_lgrNameFilter;
|
||||
caf::PdmField<QString> m_cellIJKFilter;
|
||||
};
|
||||
@@ -40,7 +40,6 @@
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryCurveCollection.h"
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
#include "RimSummaryPlotAxisFormatter.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
#include "RimSummaryPlotFilterTextCurveSetEditor.h"
|
||||
|
||||
Reference in New Issue
Block a user