mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Move faults into subfolder. Remove obsolete code.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
|
||||
set (SOURCE_GROUP_HEADER_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFaultInView.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFaultInViewCollection.h
|
||||
)
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFaultInView.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFaultInViewCollection.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
${SOURCE_GROUP_HEADER_FILES}
|
||||
)
|
||||
|
||||
list(APPEND CODE_SOURCE_FILES
|
||||
${SOURCE_GROUP_SOURCE_FILES}
|
||||
)
|
||||
|
||||
source_group( "ProjectDataModel\\Faults" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake )
|
||||
118
ApplicationLibCode/ProjectDataModel/Faults/RimFaultInView.cpp
Normal file
118
ApplicationLibCode/ProjectDataModel/Faults/RimFaultInView.cpp
Normal file
@@ -0,0 +1,118 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) Statoil ASA
|
||||
// Copyright (C) Ceetron Solutions AS
|
||||
//
|
||||
// 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 "RimFaultInView.h"
|
||||
|
||||
#include "RigFault.h"
|
||||
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimFaultInView, "Fault" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFaultInView::RimFaultInView()
|
||||
{
|
||||
CAF_PDM_InitObject( "RimFault", ":/draw_style_faults_24x24.png", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &name, "FaultName", "Name", "", "", "" );
|
||||
name.uiCapability()->setUiHidden( true );
|
||||
name.uiCapability()->setUiReadOnly( true );
|
||||
|
||||
CAF_PDM_InitField( &showFault, "ShowFault", true, "Show Fault", "", "", "" );
|
||||
showFault.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitField( &faultColor, "Color", cvf::Color3f( 0.588f, 0.588f, 0.804f ), "Fault Color", "", "", "" );
|
||||
|
||||
m_rigFault = nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFaultInView::~RimFaultInView()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimFaultInView::userDescriptionField()
|
||||
{
|
||||
return &name;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaultInView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
{
|
||||
this->updateUiIconFromToggleField();
|
||||
|
||||
if ( &faultColor == changedField || &showFault == changedField )
|
||||
{
|
||||
RimEclipseView* reservoirView = nullptr;
|
||||
|
||||
this->firstAncestorOrThisOfType( reservoirView );
|
||||
|
||||
if ( reservoirView )
|
||||
{
|
||||
reservoirView->scheduleCreateDisplayModelAndRedraw();
|
||||
reservoirView->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaultInView::initAfterRead()
|
||||
{
|
||||
this->updateUiIconFromToggleField();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimFaultInView::objectToggleField()
|
||||
{
|
||||
return &showFault;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaultInView::setFaultGeometry( const RigFault* faultGeometry )
|
||||
{
|
||||
m_rigFault = faultGeometry;
|
||||
|
||||
this->name = faultGeometry->name();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigFault* RimFaultInView::faultGeometry() const
|
||||
{
|
||||
return m_rigFault;
|
||||
}
|
||||
60
ApplicationLibCode/ProjectDataModel/Faults/RimFaultInView.h
Normal file
60
ApplicationLibCode/ProjectDataModel/Faults/RimFaultInView.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) Statoil ASA
|
||||
// Copyright (C) Ceetron Solutions AS
|
||||
//
|
||||
// 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 "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmPointer.h"
|
||||
|
||||
// Include to make Pdm work for cvf::Color
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
|
||||
class RigFault;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimFaultInView : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RimFaultInView();
|
||||
~RimFaultInView() override;
|
||||
|
||||
void setFaultGeometry( const RigFault* faultGeometry );
|
||||
const RigFault* faultGeometry() const;
|
||||
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void initAfterRead() override;
|
||||
|
||||
caf::PdmField<bool> showFault;
|
||||
|
||||
caf::PdmField<QString> name;
|
||||
|
||||
caf::PdmField<cvf::Color3f> faultColor;
|
||||
|
||||
private:
|
||||
const RigFault* m_rigFault;
|
||||
};
|
||||
@@ -0,0 +1,328 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) Statoil ASA
|
||||
// Copyright (C) Ceetron Solutions AS
|
||||
//
|
||||
// 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 "RimFaultInViewCollection.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaResultNames.h"
|
||||
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimFaultInView.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
#include "cafPdmFieldCvfMat4d.h"
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template <>
|
||||
void AppEnum<RimFaultInViewCollection::FaultFaceCullingMode>::setUp()
|
||||
{
|
||||
addItem( RimFaultInViewCollection::FAULT_BACK_FACE_CULLING, "FAULT_BACK_FACE_CULLING", "Cell behind fault" );
|
||||
addItem( RimFaultInViewCollection::FAULT_FRONT_FACE_CULLING, "FAULT_FRONT_FACE_CULLING", "Cell in front of fault" );
|
||||
addItem( RimFaultInViewCollection::FAULT_NO_FACE_CULLING, "FAULT_NO_FACE_CULLING", "Show both" );
|
||||
setDefault( RimFaultInViewCollection::FAULT_NO_FACE_CULLING );
|
||||
}
|
||||
} // namespace caf
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimFaultInViewCollection, "Faults" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFaultInViewCollection::RimFaultInViewCollection()
|
||||
{
|
||||
CAF_PDM_InitObject( "Faults", ":/draw_style_faults_24x24.png", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &showFaultCollection, "Active", true, "Active", "", "", "" );
|
||||
showFaultCollection.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitField( &showFaultFaces, "ShowFaultFaces", true, "Show Defined faces", "", "", "" );
|
||||
CAF_PDM_InitField( &showOppositeFaultFaces, "ShowOppositeFaultFaces", true, "Show Opposite Faces", "", "", "" );
|
||||
CAF_PDM_InitField( &m_showFaultsOutsideFilters, "ShowFaultsOutsideFilters", true, "Show Faults Outside Filters", "", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &faultResult,
|
||||
"FaultFaceCulling",
|
||||
caf::AppEnum<RimFaultInViewCollection::FaultFaceCullingMode>(
|
||||
RimFaultInViewCollection::FAULT_BACK_FACE_CULLING ),
|
||||
"Dynamic Face Selection",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
|
||||
CAF_PDM_InitField( &showFaultLabel, "ShowFaultLabel", false, "Show Labels", "", "", "" );
|
||||
cvf::Color3f defWellLabelColor = RiaApplication::instance()->preferences()->defaultWellLabelColor();
|
||||
CAF_PDM_InitField( &faultLabelColor, "FaultLabelColor", defWellLabelColor, "Label Color", "", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &showNNCs, "ShowNNCs", true, "Show NNCs", "", "", "" );
|
||||
CAF_PDM_InitField( &hideNncsWhenNoResultIsAvailable,
|
||||
"HideNncsWhenNoResultIsAvailable",
|
||||
true,
|
||||
"Hide NNC Geometry if No NNC Result is Available",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &faults, "Faults", "Faults", "", "", "" );
|
||||
faults.uiCapability()->setUiHidden( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFaultInViewCollection::~RimFaultInViewCollection()
|
||||
{
|
||||
faults.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaultInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
{
|
||||
this->updateUiIconFromToggleField();
|
||||
|
||||
if ( &faultLabelColor == changedField )
|
||||
{
|
||||
parentView()->scheduleReservoirGridGeometryRegen();
|
||||
parentView()->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
|
||||
}
|
||||
|
||||
if ( &showFaultFaces == changedField || &showOppositeFaultFaces == changedField ||
|
||||
&showFaultCollection == changedField || &showFaultLabel == changedField ||
|
||||
&m_showFaultsOutsideFilters == changedField || &faultLabelColor == changedField ||
|
||||
&faultResult == changedField || &showNNCs == changedField || &hideNncsWhenNoResultIsAvailable == changedField )
|
||||
{
|
||||
parentView()->scheduleCreateDisplayModelAndRedraw();
|
||||
parentView()->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
|
||||
}
|
||||
|
||||
if ( &showFaultLabel == changedField )
|
||||
{
|
||||
RiuMainWindow::instance()->refreshDrawStyleActions();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimFaultInViewCollection::objectToggleField()
|
||||
{
|
||||
return &showFaultCollection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFaultInView* RimFaultInViewCollection::findFaultByName( QString name )
|
||||
{
|
||||
for ( size_t i = 0; i < this->faults().size(); ++i )
|
||||
{
|
||||
if ( this->faults()[i]->name() == name )
|
||||
{
|
||||
return this->faults()[i];
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// A comparing function used to sort Faults in the RimFaultCollection::syncronizeFaults() method
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool faultComparator( const cvf::ref<RigFault>& a, const cvf::ref<RigFault>& b )
|
||||
{
|
||||
CVF_TIGHT_ASSERT( a.notNull() && b.notNull() );
|
||||
|
||||
int compareValue = a->name().compare( b->name(), Qt::CaseInsensitive );
|
||||
|
||||
return ( compareValue < 0 );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaultInViewCollection::syncronizeFaults()
|
||||
{
|
||||
if ( !( parentView() && parentView()->mainGrid() ) ) return;
|
||||
|
||||
const caf::ColorTable& colorTable = RiaColorTables::faultsPaletteColors();
|
||||
|
||||
const cvf::Collection<RigFault> constRigFaults = parentView()->mainGrid()->faults();
|
||||
|
||||
cvf::Collection<RigFault> rigFaults;
|
||||
{
|
||||
cvf::Collection<RigFault> sortedFaults( constRigFaults );
|
||||
|
||||
std::sort( sortedFaults.begin(), sortedFaults.end(), faultComparator );
|
||||
|
||||
cvf::ref<RigFault> undefinedFaults;
|
||||
cvf::ref<RigFault> undefinedFaultsWInactive;
|
||||
|
||||
for ( size_t i = 0; i < sortedFaults.size(); i++ )
|
||||
{
|
||||
QString faultName = sortedFaults[i]->name();
|
||||
if ( faultName.compare( RiaResultNames::undefinedGridFaultName(), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
undefinedFaults = sortedFaults[i];
|
||||
}
|
||||
|
||||
if ( faultName.startsWith( RiaResultNames::undefinedGridFaultName(), Qt::CaseInsensitive ) &&
|
||||
faultName.contains( "Inactive" ) )
|
||||
{
|
||||
undefinedFaultsWInactive = sortedFaults[i];
|
||||
}
|
||||
}
|
||||
|
||||
if ( undefinedFaults.notNull() )
|
||||
{
|
||||
sortedFaults.erase( undefinedFaults.p() );
|
||||
rigFaults.push_back( undefinedFaults.p() );
|
||||
}
|
||||
|
||||
if ( undefinedFaultsWInactive.notNull() )
|
||||
{
|
||||
sortedFaults.erase( undefinedFaultsWInactive.p() );
|
||||
rigFaults.push_back( undefinedFaultsWInactive.p() );
|
||||
}
|
||||
|
||||
for ( size_t i = 0; i < sortedFaults.size(); i++ )
|
||||
{
|
||||
rigFaults.push_back( sortedFaults[i].p() );
|
||||
}
|
||||
}
|
||||
|
||||
// Find faults with
|
||||
|
||||
std::vector<caf::PdmPointer<RimFaultInView>> newFaults;
|
||||
|
||||
// Find corresponding fault from data model, or create a new
|
||||
for ( size_t fIdx = 0; fIdx < rigFaults.size(); ++fIdx )
|
||||
{
|
||||
RimFaultInView* rimFault = this->findFaultByName( rigFaults[fIdx]->name() );
|
||||
|
||||
if ( !rimFault )
|
||||
{
|
||||
rimFault = new RimFaultInView();
|
||||
rimFault->faultColor = colorTable.cycledColor3f( fIdx );
|
||||
QString faultName = rigFaults[fIdx]->name();
|
||||
|
||||
if ( faultName.startsWith( RiaResultNames::undefinedGridFaultName(), Qt::CaseInsensitive ) &&
|
||||
faultName.contains( "Inactive" ) )
|
||||
{
|
||||
rimFault->showFault = false; // Turn fault against inactive cells off by default
|
||||
}
|
||||
}
|
||||
|
||||
rimFault->setFaultGeometry( rigFaults[fIdx].p() );
|
||||
|
||||
newFaults.push_back( rimFault );
|
||||
}
|
||||
|
||||
this->faults().clear();
|
||||
this->faults().insert( 0, newFaults );
|
||||
|
||||
QString toolTip = QString( "Fault count (%1)" ).arg( newFaults.size() );
|
||||
setUiToolTip( toolTip );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimFaultInViewCollection::isGridVisualizationMode() const
|
||||
{
|
||||
return parentView()->isGridVisualizationMode();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaultInViewCollection::uiOrderingFaults( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
bool isGridVizMode = isGridVisualizationMode();
|
||||
|
||||
faultResult.uiCapability()->setUiReadOnly( isGridVizMode );
|
||||
showFaultFaces.uiCapability()->setUiReadOnly( isGridVizMode );
|
||||
showOppositeFaultFaces.uiCapability()->setUiReadOnly( isGridVizMode );
|
||||
|
||||
caf::PdmUiGroup* ffviz = uiOrdering.addNewGroup( "Fault Face Visibility" );
|
||||
ffviz->setCollapsedByDefault( true );
|
||||
ffviz->add( &showFaultFaces );
|
||||
ffviz->add( &showOppositeFaultFaces );
|
||||
ffviz->add( &faultResult );
|
||||
|
||||
caf::PdmUiGroup* nncViz = uiOrdering.addNewGroup( "NNC Visibility" );
|
||||
nncViz->setCollapsedByDefault( true );
|
||||
nncViz->add( &showNNCs );
|
||||
nncViz->add( &hideNncsWhenNoResultIsAvailable );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaultInViewCollection::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
caf::PdmUiGroup* labs = uiOrdering.addNewGroup( "Fault Labels" );
|
||||
labs->add( &showFaultLabel );
|
||||
labs->add( &faultLabelColor );
|
||||
|
||||
caf::PdmUiGroup* adv = uiOrdering.addNewGroup( "Fault Options" );
|
||||
adv->add( &m_showFaultsOutsideFilters );
|
||||
|
||||
uiOrderingFaults( uiConfigName, uiOrdering );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseView* RimFaultInViewCollection::parentView() const
|
||||
{
|
||||
RimEclipseView* view = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted( view );
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimFaultInViewCollection::isShowingFaultsAndFaultsOutsideFilters() const
|
||||
{
|
||||
if ( !showFaultCollection ) return false;
|
||||
|
||||
return m_showFaultsOutsideFilters;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFaultInViewCollection::setShowFaultsOutsideFilter( bool show )
|
||||
{
|
||||
m_showFaultsOutsideFilters = show;
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) Statoil ASA
|
||||
// Copyright (C) Ceetron Solutions AS
|
||||
//
|
||||
// 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 to make Pdm work for cvf::Color
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
class RimEclipseView;
|
||||
class RimFaultInView;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimFaultInViewCollection : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
enum FaultFaceCullingMode
|
||||
{
|
||||
FAULT_BACK_FACE_CULLING,
|
||||
FAULT_FRONT_FACE_CULLING,
|
||||
FAULT_NO_FACE_CULLING
|
||||
};
|
||||
|
||||
public:
|
||||
RimFaultInViewCollection();
|
||||
~RimFaultInViewCollection() override;
|
||||
|
||||
void syncronizeFaults();
|
||||
|
||||
bool isGridVisualizationMode() const;
|
||||
|
||||
bool isShowingFaultsAndFaultsOutsideFilters() const;
|
||||
void setShowFaultsOutsideFilter( bool show );
|
||||
|
||||
caf::PdmField<bool> showFaultFaces;
|
||||
caf::PdmField<bool> showOppositeFaultFaces;
|
||||
|
||||
caf::PdmField<caf::AppEnum<FaultFaceCullingMode>> faultResult;
|
||||
|
||||
caf::PdmField<bool> showFaultLabel;
|
||||
caf::PdmField<cvf::Color3f> faultLabelColor;
|
||||
|
||||
caf::PdmField<bool> showFaultCollection;
|
||||
caf::PdmField<bool> showNNCs;
|
||||
caf::PdmField<bool> hideNncsWhenNoResultIsAvailable;
|
||||
|
||||
caf::PdmChildArrayField<RimFaultInView*> faults;
|
||||
RimFaultInView* findFaultByName( QString name );
|
||||
|
||||
void uiOrderingFaults( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
|
||||
private:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
RimEclipseView* parentView() const;
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> m_showFaultsOutsideFilters;
|
||||
};
|
||||
Reference in New Issue
Block a user