#6575 Show title and legends are on in RFT/PLT

This commit is contained in:
Gaute Lindkvist
2020-09-24 18:49:41 +02:00
parent 46bbfec0d3
commit 79e3cfac7a
3 changed files with 23 additions and 22 deletions

View File

@@ -114,6 +114,7 @@ RimWellPltPlot::RimWellPltPlot()
CAF_PDM_InitFieldNoDefault( &m_selectedSourcesForIo, "Sources", "Sources", "", "", "" );
m_selectedSourcesForIo.uiCapability()->setUiHidden( true );
m_selectedSourcesForIo.uiCapability()->setUiTreeHidden( true );
CAF_PDM_InitFieldNoDefault( &m_selectedTimeSteps, "TimeSteps", "Time Steps", "", "", "" );
m_selectedTimeSteps.uiCapability()->setUiEditorTypeName( caf::PdmUiTreeSelectionEditor::uiEditorTypeName() );
@@ -125,7 +126,7 @@ RimWellPltPlot::RimWellPltPlot()
CAF_PDM_InitFieldNoDefault( &m_phases, "Phases", "Phases", "", "", "" );
m_phases.uiCapability()->setUiEditorTypeName( caf::PdmUiTreeSelectionEditor::uiEditorTypeName() );
m_phases = std::vector<caf::AppEnum<FlowPhase>>( {FLOW_PHASE_OIL, FLOW_PHASE_GAS, FLOW_PHASE_WATER} );
m_phases = std::vector<caf::AppEnum<FlowPhase>>( { FLOW_PHASE_OIL, FLOW_PHASE_GAS, FLOW_PHASE_WATER } );
m_phases.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
m_nameConfig->setCustomName( "PLT Plot" );
@@ -135,7 +136,8 @@ RimWellPltPlot::RimWellPltPlot()
m_isOnLoad = true;
m_plotLegendsHorizontal = false;
setAvailableDepthTypes( {RiaDefines::DepthTypeEnum::MEASURED_DEPTH} );
setAvailableDepthTypes( { RiaDefines::DepthTypeEnum::MEASURED_DEPTH } );
setPlotTitleVisible( true );
}
//--------------------------------------------------------------------------------------------------
@@ -958,7 +960,7 @@ void RimWellPltPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
//--------------------------------------------------------------------------------------------------
void RimWellPltPlot::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName )
{
// uiTreeOrdering.skipRemainingChildren( true );
uiTreeOrdering.skipRemainingChildren( true );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -124,11 +124,13 @@ RimWellRftPlot::RimWellRftPlot()
// TODO: may want to support TRUE_VERTICAL_DEPTH_RKB in the future
// It was developed for regular well log plots and requires some more work for RFT plots.
setAvailableDepthTypes( {RiaDefines::DepthTypeEnum::MEASURED_DEPTH, RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH} );
setAvailableDepthTypes( { RiaDefines::DepthTypeEnum::MEASURED_DEPTH, RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH } );
m_nameConfig->setCustomName( "RFT Plot" );
m_plotLegendsHorizontal = false;
setPlotTitleVisible( true );
this->setAsPlotMdiWindow();
m_isOnLoad = true;
}
@@ -379,7 +381,7 @@ void RimWellRftPlot::updateEditorsFromCurves()
selectedSources.insert( curveDef.address() );
auto newTimeStepMap = std::map<QDateTime, std::set<RifDataSourceForRftPlt>>{
{curveDef.timeStep(), std::set<RifDataSourceForRftPlt>{curveDef.address()}}};
{ curveDef.timeStep(), std::set<RifDataSourceForRftPlt>{ curveDef.address() } } };
RimWellPlotTools::addTimeStepsToMap( selectedTimeStepsMap, newTimeStepMap );
selectedTimeSteps.insert( curveDef.timeStep() );
}
@@ -1274,12 +1276,12 @@ void RimWellRftPlot::defineCurveColorsAndSymbols( const std::set<RiaRftPltCurveD
std::vector<cvf::Color3f> colorTable;
RiaColorTables::summaryCurveDefaultPaletteColors().color3fArray().toStdVector( &colorTable );
std::vector<RiuQwtSymbol::PointSymbolEnum> symbolTable = {RiuQwtSymbol::SYMBOL_ELLIPSE,
RiuQwtSymbol::SYMBOL_RECT,
RiuQwtSymbol::SYMBOL_DIAMOND,
RiuQwtSymbol::SYMBOL_CROSS,
RiuQwtSymbol::SYMBOL_XCROSS,
RiuQwtSymbol::SYMBOL_STAR1};
std::vector<RiuQwtSymbol::PointSymbolEnum> symbolTable = { RiuQwtSymbol::SYMBOL_ELLIPSE,
RiuQwtSymbol::SYMBOL_RECT,
RiuQwtSymbol::SYMBOL_DIAMOND,
RiuQwtSymbol::SYMBOL_CROSS,
RiuQwtSymbol::SYMBOL_XCROSS,
RiuQwtSymbol::SYMBOL_STAR1 };
// Add new curves
for ( const RiaRftPltCurveDefinition& curveDefToAdd : allCurveDefs )

View File

@@ -86,7 +86,8 @@ RimDepthTrackPlot::RimDepthTrackPlot()
m_commonDataSource.xmlCapability()->disableIO();
m_commonDataSource = new RimWellLogCurveCommonDataSource;
CAF_PDM_InitScriptableField( &m_showPlotWindowTitle_OBSOLETE, "ShowTitleInPlot", true, "Show Title", "", "", "" );
CAF_PDM_InitScriptableField( &m_showPlotWindowTitle_OBSOLETE, "ShowTitleInPlot", false, "Show Title", "", "", "" );
m_showPlotWindowTitle_OBSOLETE.xmlCapability()->setIOWritable( false );
CAF_PDM_InitField( &m_plotWindowTitle, "PlotDescription", QString( "" ), "Name", "", "", "" );
m_plotWindowTitle.xmlCapability()->setIOWritable( false );
@@ -120,10 +121,10 @@ RimDepthTrackPlot::RimDepthTrackPlot()
auto reorderability = caf::PdmFieldReorderCapability::addToField( &m_plots );
reorderability->orderChanged.connect( this, &RimDepthTrackPlot::onPlotsReordered );
m_availableDepthUnits = {RiaDefines::DepthUnitType::UNIT_METER, RiaDefines::DepthUnitType::UNIT_FEET};
m_availableDepthTypes = {RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH,
RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB};
m_availableDepthUnits = { RiaDefines::DepthUnitType::UNIT_METER, RiaDefines::DepthUnitType::UNIT_FEET };
m_availableDepthTypes = { RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH,
RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB };
m_minAvailableDepth = HUGE_VAL;
m_maxAvailableDepth = -HUGE_VAL;
@@ -167,8 +168,6 @@ RimDepthTrackPlot& RimDepthTrackPlot::operator=( RimDepthTrackPlot&& rhs )
// children. This only happens for some plots that used to own a plot but now inherits the plot.
// They had their own description at top level which we don't want to overwrite.
m_showPlotWindowTitle_OBSOLETE = rhs.m_showPlotWindowTitle_OBSOLETE;
auto dataSource = rhs.m_commonDataSource();
rhs.m_commonDataSource.removeChildObject( dataSource );
m_commonDataSource = dataSource;
@@ -889,9 +888,9 @@ void RimDepthTrackPlot::initAfterRead()
m_depthAxisGridVisibility = AXIS_GRID_MAJOR_AND_MINOR;
}
if ( !m_showPlotWindowTitle_OBSOLETE() )
if ( m_showPlotWindowTitle_OBSOLETE() )
{
m_showPlotTitle = false;
m_showPlotTitle = true;
}
if ( !m_plotWindowTitle().isEmpty() )
@@ -968,8 +967,6 @@ void RimDepthTrackPlot::insertPlot( RimPlot* plot, size_t index )
m_viewer->insertPlot( plot->viewer(), index );
}
plot->setShowWindow( true );
plot->setLegendsVisible( false );
onPlotAdditionOrRemoval();
}
}