ResInsight/ApplicationCode/ProjectDataModel/RimWellLogPlotNameConfig.cpp

136 lines
5.8 KiB
C++
Raw Normal View History

2018-08-07 06:34:13 -05:00
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2018- Equinor 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 "RimWellLogPlotNameConfig.h"
//==================================================================================================
2019-09-06 06:17:36 -05:00
///
///
2018-08-07 06:34:13 -05:00
//==================================================================================================
2019-09-06 06:17:36 -05:00
CAF_PDM_SOURCE_INIT( RimWellLogPlotNameConfig, "RimWellLogPlotNameConfig" );
2018-08-07 06:34:13 -05:00
//--------------------------------------------------------------------------------------------------
2019-09-06 06:17:36 -05:00
///
2018-08-07 06:34:13 -05:00
//--------------------------------------------------------------------------------------------------
RimWellLogPlotNameConfig::RimWellLogPlotNameConfig()
2019-11-25 05:38:00 -06:00
: RimNameConfig( "Well Log Plot" )
2018-08-07 06:34:13 -05:00
{
2019-09-06 06:17:36 -05:00
CAF_PDM_InitObject( "Well Log Plot Name Generator", "", "", "" );
2018-08-07 06:34:13 -05:00
2019-09-06 06:17:36 -05:00
CAF_PDM_InitField( &m_addCaseName, "AddCaseName", false, "Add Case Name", "", "", "" );
CAF_PDM_InitField( &m_addWellName, "AddWellName", false, "Add Well Name", "", "", "" );
CAF_PDM_InitField( &m_addTimestep, "AddTimeStep", false, "Add Time Step", "", "", "" );
CAF_PDM_InitField( &m_addAirGap, "AddAirGap", false, "Add Air Gap", "", "", "" );
CAF_PDM_InitField( &m_addWaterDepth, "AddWaterDepth", false, "Add Water Depth", "", "", "" );
2018-08-07 06:34:13 -05:00
}
//--------------------------------------------------------------------------------------------------
2019-09-06 06:17:36 -05:00
///
2018-08-07 06:34:13 -05:00
//--------------------------------------------------------------------------------------------------
bool RimWellLogPlotNameConfig::addCaseName() const
{
return m_addCaseName();
}
//--------------------------------------------------------------------------------------------------
2019-09-06 06:17:36 -05:00
///
2018-08-07 06:34:13 -05:00
//--------------------------------------------------------------------------------------------------
bool RimWellLogPlotNameConfig::addWellName() const
{
return m_addWellName();
}
//--------------------------------------------------------------------------------------------------
2019-09-06 06:17:36 -05:00
///
2018-08-07 06:34:13 -05:00
//--------------------------------------------------------------------------------------------------
bool RimWellLogPlotNameConfig::addTimeStep() const
{
return m_addTimestep();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimWellLogPlotNameConfig::addAirGap() const
{
return m_addAirGap();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimWellLogPlotNameConfig::addWaterDepth() const
{
return m_addWaterDepth();
}
//--------------------------------------------------------------------------------------------------
///
2018-08-07 06:34:13 -05:00
//--------------------------------------------------------------------------------------------------
2019-11-25 05:38:00 -06:00
void RimWellLogPlotNameConfig::setAutoNameTags( bool addCaseName,
bool addWellName,
bool addTimeStep,
bool addAirGap,
bool addWaterDepth )
{
m_addCaseName = addCaseName;
m_addWellName = addWellName;
m_addTimestep = addTimeStep;
m_addAirGap = addAirGap;
m_addWaterDepth = addWaterDepth;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogPlotNameConfig::setFieldVisibility( bool caseNameVisible,
bool wellNameVisible,
bool timeStepVisible,
bool airGapVisible,
bool waterDepthVisible )
{
m_addCaseName.uiCapability()->setUiHidden( !caseNameVisible );
m_addWellName.uiCapability()->setUiHidden( !wellNameVisible );
m_addTimestep.uiCapability()->setUiHidden( !timeStepVisible );
m_addAirGap.uiCapability()->setUiHidden( !airGapVisible );
m_addWaterDepth.uiCapability()->setUiHidden( !waterDepthVisible );
}
2019-11-25 05:38:00 -06:00
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogPlotNameConfig::doEnableAllAutoNameTags( bool enable )
2018-08-07 06:34:13 -05:00
{
2019-11-25 05:38:00 -06:00
setAutoNameTags( enable, enable, enable, enable, enable );
2018-08-07 06:34:13 -05:00
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
2019-09-06 06:17:36 -05:00
void RimWellLogPlotNameConfig::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
{
2019-09-06 06:17:36 -05:00
RimNameConfig::defineUiOrdering( uiConfigName, uiOrdering );
2019-11-25 05:38:00 -06:00
2019-09-06 06:17:36 -05:00
uiOrdering.add( &m_addCaseName );
uiOrdering.add( &m_addWellName );
uiOrdering.add( &m_addTimestep );
uiOrdering.add( &m_addAirGap );
uiOrdering.add( &m_addWaterDepth );
}