mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Whitespace
This commit is contained in:
parent
7fe0b92839
commit
3acd426ead
File diff suppressed because it is too large
Load Diff
@ -3,17 +3,17 @@
|
|||||||
// Copyright (C) 2011- Statoil ASA
|
// Copyright (C) 2011- Statoil ASA
|
||||||
// Copyright (C) 2013- Ceetron Solutions AS
|
// Copyright (C) 2013- Ceetron Solutions AS
|
||||||
// Copyright (C) 2011-2012 Ceetron AS
|
// Copyright (C) 2011-2012 Ceetron AS
|
||||||
//
|
//
|
||||||
// ResInsight is free software: you can redistribute it and/or modify
|
// ResInsight is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
//
|
//
|
||||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||||
// for more details.
|
// for more details.
|
||||||
//
|
//
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
@ -29,22 +29,21 @@
|
|||||||
|
|
||||||
#include "cafPdmUiEditorHandle.h"
|
#include "cafPdmUiEditorHandle.h"
|
||||||
|
|
||||||
|
|
||||||
CAF_PDM_SOURCE_INIT(RimEclipsePropertyFilterCollection, "CellPropertyFilters");
|
CAF_PDM_SOURCE_INIT(RimEclipsePropertyFilterCollection, "CellPropertyFilters");
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimEclipsePropertyFilterCollection::RimEclipsePropertyFilterCollection()
|
RimEclipsePropertyFilterCollection::RimEclipsePropertyFilterCollection()
|
||||||
{
|
{
|
||||||
CAF_PDM_InitObject("Property Filters", ":/CellFilter_Values.png", "", "");
|
CAF_PDM_InitObject("Property Filters", ":/CellFilter_Values.png", "", "");
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&propertyFilters, "PropertyFilters", "Property Filters", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&propertyFilters, "PropertyFilters", "Property Filters", "", "", "");
|
||||||
propertyFilters.uiCapability()->setUiHidden(true);
|
propertyFilters.uiCapability()->setUiHidden(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimEclipsePropertyFilterCollection::~RimEclipsePropertyFilterCollection()
|
RimEclipsePropertyFilterCollection::~RimEclipsePropertyFilterCollection()
|
||||||
{
|
{
|
||||||
@ -52,7 +51,7 @@ RimEclipsePropertyFilterCollection::~RimEclipsePropertyFilterCollection()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimEclipseView* RimEclipsePropertyFilterCollection::reservoirView()
|
RimEclipseView* RimEclipsePropertyFilterCollection::reservoirView()
|
||||||
{
|
{
|
||||||
@ -63,13 +62,12 @@ RimEclipseView* RimEclipsePropertyFilterCollection::reservoirView()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipsePropertyFilterCollection::loadAndInitializePropertyFilters()
|
void RimEclipsePropertyFilterCollection::loadAndInitializePropertyFilters()
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < propertyFilters.size(); i++)
|
for (RimEclipsePropertyFilter* propertyFilter : propertyFilters)
|
||||||
{
|
{
|
||||||
RimEclipsePropertyFilter* propertyFilter = propertyFilters[i];
|
|
||||||
propertyFilter->resultDefinition()->setEclipseCase(reservoirView()->eclipseCase());
|
propertyFilter->resultDefinition()->setEclipseCase(reservoirView()->eclipseCase());
|
||||||
propertyFilter->initAfterRead();
|
propertyFilter->initAfterRead();
|
||||||
if (isActive() && propertyFilter->isActive())
|
if (isActive() && propertyFilter->isActive())
|
||||||
@ -81,7 +79,7 @@ void RimEclipsePropertyFilterCollection::loadAndInitializePropertyFilters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipsePropertyFilterCollection::initAfterRead()
|
void RimEclipsePropertyFilterCollection::initAfterRead()
|
||||||
{
|
{
|
||||||
@ -89,15 +87,14 @@ void RimEclipsePropertyFilterCollection::initAfterRead()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimEclipsePropertyFilterCollection::hasActiveFilters() const
|
bool RimEclipsePropertyFilterCollection::hasActiveFilters() const
|
||||||
{
|
{
|
||||||
if (!isActive) return false;
|
if (!isActive) return false;
|
||||||
|
|
||||||
for (size_t i = 0; i < propertyFilters.size(); i++)
|
for (RimEclipsePropertyFilter* propertyFilter : propertyFilters)
|
||||||
{
|
{
|
||||||
RimEclipsePropertyFilter* propertyFilter = propertyFilters[i];
|
|
||||||
if (propertyFilter->isActive() && propertyFilter->resultDefinition()->hasResult()) return true;
|
if (propertyFilter->isActive() && propertyFilter->resultDefinition()->hasResult()) return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,36 +108,33 @@ bool RimEclipsePropertyFilterCollection::hasActiveDynamicFilters() const
|
|||||||
{
|
{
|
||||||
if (!isActive) return false;
|
if (!isActive) return false;
|
||||||
|
|
||||||
for (size_t i = 0; i < propertyFilters.size(); i++)
|
for (RimEclipsePropertyFilter* propertyFilter : propertyFilters)
|
||||||
{
|
{
|
||||||
RimEclipsePropertyFilter* propertyFilter = propertyFilters[i];
|
|
||||||
if (propertyFilter->isActive() && propertyFilter->resultDefinition()->hasDynamicResult()) return true;
|
if (propertyFilter->isActive() && propertyFilter->resultDefinition()->hasDynamicResult()) return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimEclipsePropertyFilterCollection::isUsingFormationNames() const
|
bool RimEclipsePropertyFilterCollection::isUsingFormationNames() const
|
||||||
{
|
{
|
||||||
if ( !isActive ) return false;
|
if (!isActive) return false;
|
||||||
|
|
||||||
for ( size_t i = 0; i < propertyFilters.size(); i++ )
|
for (RimEclipsePropertyFilter* propertyFilter : propertyFilters)
|
||||||
{
|
{
|
||||||
RimEclipsePropertyFilter* propertyFilter = propertyFilters[i];
|
if (propertyFilter->isActive() && propertyFilter->resultDefinition()->resultType() == RiaDefines::FORMATION_NAMES &&
|
||||||
if ( propertyFilter->isActive()
|
propertyFilter->resultDefinition()->resultVariable() != RiaDefines::undefinedResultName())
|
||||||
&& propertyFilter->resultDefinition()->resultType() == RiaDefines::FORMATION_NAMES
|
return true;
|
||||||
&& propertyFilter->resultDefinition()->resultVariable() != RiaDefines::undefinedResultName()) return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipsePropertyFilterCollection::updateIconState()
|
void RimEclipsePropertyFilterCollection::updateIconState()
|
||||||
{
|
{
|
||||||
@ -151,8 +145,7 @@ void RimEclipsePropertyFilterCollection::updateIconState()
|
|||||||
if (view)
|
if (view)
|
||||||
{
|
{
|
||||||
RimViewController* viewController = view->viewController();
|
RimViewController* viewController = view->viewController();
|
||||||
if (viewController && (viewController->isPropertyFilterOveridden()
|
if (viewController && (viewController->isPropertyFilterOveridden() || viewController->isVisibleCellsOveridden()))
|
||||||
|| viewController->isVisibleCellsOveridden()))
|
|
||||||
{
|
{
|
||||||
activeIcon = false;
|
activeIcon = false;
|
||||||
}
|
}
|
||||||
@ -165,16 +158,15 @@ void RimEclipsePropertyFilterCollection::updateIconState()
|
|||||||
|
|
||||||
updateUiIconFromState(activeIcon);
|
updateUiIconFromState(activeIcon);
|
||||||
|
|
||||||
for (size_t i = 0; i < propertyFilters.size(); i++)
|
for (RimEclipsePropertyFilter* cellFilter : propertyFilters)
|
||||||
{
|
{
|
||||||
RimEclipsePropertyFilter* cellFilter = propertyFilters[i];
|
|
||||||
cellFilter->updateActiveState();
|
cellFilter->updateActiveState();
|
||||||
cellFilter->updateIconState();
|
cellFilter->updateIconState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipsePropertyFilterCollection::updateFromCurrentTimeStep()
|
void RimEclipsePropertyFilterCollection::updateFromCurrentTimeStep()
|
||||||
{
|
{
|
||||||
@ -183,4 +175,3 @@ void RimEclipsePropertyFilterCollection::updateFromCurrentTimeStep()
|
|||||||
cellFilter->updateFromCurrentTimeStep();
|
cellFilter->updateFromCurrentTimeStep();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user