mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improved naming following review
This commit is contained in:
@@ -172,8 +172,8 @@ RimPlotCurve::RimPlotCurve()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_symbolLabelPosition, "SymbolLabelPosition", "Symbol Label Position", "", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &m_stackCurve, "StackCurve", false, "Stack Curve", "", "", "" );
|
||||
CAF_PDM_InitField( &m_stackWithPhaseColors, "StackPhaseColors", false, " with Phase Colors", "", "", "" );
|
||||
CAF_PDM_InitField( &m_isStacked, "StackCurve", false, "Stack Curve", "", "", "" );
|
||||
CAF_PDM_InitField( &m_isStackedWithPhaseColors, "StackPhaseColors", false, " with Phase Colors", "", "", "" );
|
||||
|
||||
m_qwtPlotCurve = new RiuRimQwtPlotCurve( this );
|
||||
m_qwtCurveErrorBars = new QwtPlotIntervalCurve();
|
||||
@@ -264,18 +264,18 @@ void RimPlotCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField, co
|
||||
{
|
||||
updateCurveAppearance();
|
||||
}
|
||||
else if ( changedField == &m_stackCurve )
|
||||
else if ( changedField == &m_isStacked )
|
||||
{
|
||||
if ( !m_stackCurve() && m_fillStyle() != Qt::NoBrush )
|
||||
if ( !m_isStacked() && m_fillStyle() != Qt::NoBrush )
|
||||
{
|
||||
// Switch off area fill when turning off stacking.
|
||||
m_fillStyle = Qt::NoBrush;
|
||||
}
|
||||
stackingChanged.send( m_stackCurve() );
|
||||
stackingChanged.send( m_isStacked() );
|
||||
}
|
||||
else if ( changedField == &m_stackWithPhaseColors )
|
||||
else if ( changedField == &m_isStackedWithPhaseColors )
|
||||
{
|
||||
stackingColorsChanged.send( m_stackWithPhaseColors() );
|
||||
stackingColorsChanged.send( m_isStackedWithPhaseColors() );
|
||||
}
|
||||
|
||||
RiuPlotMainWindowTools::refreshToolbars();
|
||||
@@ -652,8 +652,8 @@ void RimPlotCurve::setSamplesFromTimeTAndYValues( const std::vector<time_t>& dat
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::appearanceUiOrdering( caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
uiOrdering.add( &m_stackCurve );
|
||||
if ( m_stackCurve() ) uiOrdering.add( &m_stackWithPhaseColors );
|
||||
uiOrdering.add( &m_isStacked );
|
||||
if ( m_isStacked() ) uiOrdering.add( &m_isStackedWithPhaseColors );
|
||||
|
||||
uiOrdering.add( &m_curveColor );
|
||||
uiOrdering.add( &m_pointSymbol );
|
||||
@@ -727,17 +727,17 @@ void RimPlotCurve::assignStackColor( size_t index, size_t count )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimPlotCurve::stacked() const
|
||||
bool RimPlotCurve::isStacked() const
|
||||
{
|
||||
return m_stackCurve();
|
||||
return m_isStacked();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimPlotCurve::stackWithPhaseColors() const
|
||||
bool RimPlotCurve::isStackedWithPhaseColors() const
|
||||
{
|
||||
return m_stackWithPhaseColors;
|
||||
return m_isStackedWithPhaseColors;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -123,8 +123,8 @@ public:
|
||||
|
||||
virtual RiaDefines::PhaseType phaseType() const;
|
||||
void assignStackColor( size_t index, size_t count );
|
||||
bool stacked() const;
|
||||
bool stackWithPhaseColors() const;
|
||||
bool isStacked() const;
|
||||
bool isStackedWithPhaseColors() const;
|
||||
|
||||
protected:
|
||||
virtual QString createCurveAutoName() = 0;
|
||||
@@ -196,6 +196,6 @@ protected:
|
||||
caf::PdmField<LabelPosition> m_symbolLabelPosition;
|
||||
caf::PdmField<cvf::Color3f> m_symbolEdgeColor;
|
||||
|
||||
caf::PdmField<bool> m_stackCurve;
|
||||
caf::PdmField<bool> m_stackWithPhaseColors;
|
||||
caf::PdmField<bool> m_isStacked;
|
||||
caf::PdmField<bool> m_isStackedWithPhaseColors;
|
||||
};
|
||||
|
||||
@@ -87,7 +87,6 @@
|
||||
#include "cafSelectionManager.h"
|
||||
#include "cvfAssert.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QWheelEvent>
|
||||
|
||||
#include <algorithm>
|
||||
@@ -730,7 +729,7 @@ void RimWellLogTrack::curveDataChanged( const caf::SignalEmitter* emitter )
|
||||
{
|
||||
for ( auto curve : m_curves )
|
||||
{
|
||||
if ( curve->stacked() )
|
||||
if ( curve->isStacked() )
|
||||
{
|
||||
updateStackedCurveData();
|
||||
break;
|
||||
@@ -745,7 +744,7 @@ void RimWellLogTrack::curveDataChanged( const caf::SignalEmitter* emitter )
|
||||
void RimWellLogTrack::curveVisibilityChanged( const caf::SignalEmitter* emitter, bool visible )
|
||||
{
|
||||
const RimWellLogCurve* curve = dynamic_cast<const RimWellLogCurve*>( emitter );
|
||||
if ( curve->stacked() )
|
||||
if ( curve->isStacked() )
|
||||
{
|
||||
updateStackedCurveData();
|
||||
}
|
||||
@@ -1101,7 +1100,6 @@ void RimWellLogTrack::addCurve( RimWellLogCurve* curve )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::insertCurve( RimWellLogCurve* curve, size_t index )
|
||||
{
|
||||
qDebug() << "Drag index: " << index;
|
||||
if ( index >= m_curves.size() )
|
||||
{
|
||||
addCurve( curve );
|
||||
@@ -2126,7 +2124,7 @@ std::map<int, std::vector<RimWellLogCurve*>> RimWellLogTrack::visibleStackedCurv
|
||||
{
|
||||
stackedCurves[wfrCurve->groupId()].push_back( wfrCurve );
|
||||
}
|
||||
else if ( curve->stacked() )
|
||||
else if ( curve->isStacked() )
|
||||
{
|
||||
stackedCurves[-1].push_back( curve );
|
||||
}
|
||||
@@ -2477,7 +2475,7 @@ void RimWellLogTrack::updateStackedCurveData()
|
||||
|
||||
curve->setOverrideCurveData( allStackedValues, plotDepthValues, polyLineStartStopIndices );
|
||||
curve->setZOrder( zPos );
|
||||
if ( curve->stackWithPhaseColors() )
|
||||
if ( curve->isStackedWithPhaseColors() )
|
||||
{
|
||||
curve->assignStackColor( stackIndex, curvePhaseCount[curve->phaseType()] );
|
||||
}
|
||||
|
||||
@@ -55,8 +55,7 @@ RimSummaryCurveCollection::RimSummaryCurveCollection()
|
||||
CAF_PDM_InitFieldNoDefault( &m_curves, "CollectionCurves", "Collection Curves", "", "", "" );
|
||||
m_curves.uiCapability()->setUiHidden( true );
|
||||
m_curves.uiCapability()->setUiTreeChildrenHidden( false );
|
||||
auto reorderability = caf::PdmFieldReorderCapability::addToField( &m_curves );
|
||||
reorderability->orderChanged.connect( this, &RimSummaryCurveCollection::onCurvesReordered );
|
||||
caf::PdmFieldReorderCapability::addToFieldWithCallback( &m_curves, this, &RimSummaryCurveCollection::onCurvesReordered );
|
||||
|
||||
CAF_PDM_InitField( &m_showCurves, "IsActive", true, "Show Curves", "", "", "" );
|
||||
m_showCurves.uiCapability()->setUiHidden( true );
|
||||
|
||||
@@ -541,7 +541,7 @@ std::vector<RimSummaryCurve*> RimSummaryPlot::visibleStackedSummaryCurvesForAxis
|
||||
std::copy_if( visibleCurves.begin(),
|
||||
visibleCurves.end(),
|
||||
std::back_inserter( visibleStackedCurves ),
|
||||
[]( RimSummaryCurve* curve ) { return curve->stacked(); } );
|
||||
[]( RimSummaryCurve* curve ) { return curve->isStacked(); } );
|
||||
|
||||
return visibleStackedCurves;
|
||||
}
|
||||
@@ -1427,7 +1427,7 @@ void RimSummaryPlot::updateStackedCurveDataForAxis( RiaDefines::PlotAxis plotAxi
|
||||
|
||||
curve->setOverrideCurveDataY( allTimeSteps, allStackedValues );
|
||||
curve->setZOrder( zPos );
|
||||
if ( curve->stackWithPhaseColors() )
|
||||
if ( curve->isStackedWithPhaseColors() )
|
||||
{
|
||||
curve->assignStackColor( stackIndex, curvePhaseCount[curve->phaseType()] );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user