Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Oct 15, 2024
1 parent 590106c commit 30dd4d2
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,6 @@ void RimWellDistributionPlot::detachAllCurves()
// cvf::Trace::show("RimWellDistributionPlot::detachAllCurves()");
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmObject* RimWellDistributionPlot::findPdmObjectFromPlotCurve( const RiuPlotCurve* /*curve*/ ) const
{
// cvf::Trace::show("RimWellDistributionPlot::findPdmObjectFromQwtCurve()");
return nullptr;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand Down
23 changes: 11 additions & 12 deletions ApplicationLibCode/ProjectDataModel/Flow/RimWellDistributionPlot.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,17 @@ class RimWellDistributionPlot : public RimPlot
RiaDefines::PhaseType phase() const;

// RimPlot implementations
RiuPlotWidget* plotWidget() override;
void setAutoScaleXEnabled( bool enabled ) override;
void setAutoScaleYEnabled( bool enabled ) override;
void updateAxes() override;
void updateLegend() override;
void updatePlotWidgetFromAxisRanges() override;
void updateAxisRangesFromPlotWidget() override;
QString asciiDataForPlotExport() const override;
void reattachAllCurves() override;
void detachAllCurves() override;
caf::PdmObject* findPdmObjectFromPlotCurve( const RiuPlotCurve* curve ) const override;
void onAxisSelected( RiuPlotAxis axis, bool toggle ) override;
RiuPlotWidget* plotWidget() override;
void setAutoScaleXEnabled( bool enabled ) override;
void setAutoScaleYEnabled( bool enabled ) override;
void updateAxes() override;
void updateLegend() override;
void updatePlotWidgetFromAxisRanges() override;
void updateAxisRangesFromPlotWidget() override;
QString asciiDataForPlotExport() const override;
void reattachAllCurves() override;
void detachAllCurves() override;
void onAxisSelected( RiuPlotAxis axis, bool toggle ) override;

// RimPlotWindow implementations
QString description() const override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,24 +340,6 @@ void RimGridCrossPlot::setAutoScaleYEnabled( bool enabled )
m_yAxisProperties->setAutoZoom( enabled );
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmObject* RimGridCrossPlot::findPdmObjectFromPlotCurve( const RiuPlotCurve* plotCurve ) const
{
for ( auto dataSet : m_crossPlotDataSets )
{
for ( auto curve : dataSet->curves() )
{
if ( curve->isSameCurve( plotCurve ) )
{
return curve;
}
}
}
return nullptr;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,9 @@ class RimGridCrossPlot : public RimPlot, public RimNameConfigHolderInterface
void updatePlotWidgetFromAxisRanges() override;
void updateAxisRangesFromPlotWidget() override;

void setAutoScaleXEnabled( bool enabled ) override;
void setAutoScaleYEnabled( bool enabled ) override;
caf::PdmObject* findPdmObjectFromPlotCurve( const RiuPlotCurve* curve ) const override;
void onAxisSelected( RiuPlotAxis axis, bool toggle ) override;
void setAutoScaleXEnabled( bool enabled ) override;
void setAutoScaleYEnabled( bool enabled ) override;
void onAxisSelected( RiuPlotAxis axis, bool toggle ) override;

bool isDeletable() const override;
bool isCurveHighlightSupported() const override;
Expand Down
8 changes: 0 additions & 8 deletions ApplicationLibCode/ProjectDataModel/RimPlot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,6 @@ void RimPlot::updateAxisRangesFromPlotWidget()
{
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmObject* RimPlot::findPdmObjectFromPlotCurve( const RiuPlotCurve* curve ) const
{
return nullptr;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions ApplicationLibCode/ProjectDataModel/RimPlot.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ class RimPlot : public QObject, public RimPlotWindow
virtual void updatePlotWidgetFromAxisRanges();
virtual void updateAxisRangesFromPlotWidget();

virtual caf::PdmObject* findPdmObjectFromPlotCurve( const RiuPlotCurve* curve ) const;
virtual void handleDroppedObjects( const std::vector<caf::PdmObjectHandle*>& objects );
virtual void handleDroppedObjects( const std::vector<caf::PdmObjectHandle*>& objects );

virtual std::vector<RimPlotCurve*> visibleCurvesForLegend();
virtual bool isCurveHighlightSupported() const;
Expand Down
45 changes: 0 additions & 45 deletions ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,51 +368,6 @@ QString RimSummaryPlot::asciiDataForSummaryPlotExport( RiaDefines::DateTimePerio
return text;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmObject* RimSummaryPlot::findPdmObjectFromPlotCurve( const RiuPlotCurve* plotCurve ) const
{
for ( RimGridTimeHistoryCurve* curve : m_gridTimeHistoryCurves )
{
if ( curve->isSameCurve( plotCurve ) )
{
return curve;
}
}

for ( RimAsciiDataCurve* curve : m_asciiDataCurves )
{
if ( curve->isSameCurve( plotCurve ) )
{
return curve;
}
}

if ( m_summaryCurveCollection )
{
RimSummaryCurve* foundCurve = m_summaryCurveCollection->findRimCurveFromPlotCurve( plotCurve );

if ( foundCurve )
{
m_summaryCurveCollection->setCurrentSummaryCurve( foundCurve );

return foundCurve;
}
}

if ( m_ensembleCurveSetCollection )
{
RimSummaryCurve* foundCurve = m_ensembleCurveSetCollection->findRimCurveFromPlotCurve( plotCurve );

if ( foundCurve )
{
return foundCurve;
}
}
return nullptr;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,6 @@ class RimSummaryPlot : public RimPlot, public RimSummaryDataSourceStepping
void updatePlotWidgetFromAxisRanges() override;
void updateAxisRangesFromPlotWidget() override;

caf::PdmObject* findPdmObjectFromPlotCurve( const RiuPlotCurve* curve ) const override;

void onAxisSelected( RiuPlotAxis axis, bool toggle ) override;

static constexpr int precision()
Expand Down
16 changes: 0 additions & 16 deletions ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1994,22 +1994,6 @@ void RimWellLogTrack::zoomAll()
if ( plot ) plot->zoomAll();
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmObject* RimWellLogTrack::findPdmObjectFromPlotCurve( const RiuPlotCurve* curve ) const
{
for ( size_t idx = 0; idx < m_curves.size(); idx++ )
{
if ( m_curves[idx]->isSameCurve( curve ) )
{
return m_curves[idx];
}
}

return nullptr;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ class RimWellLogTrack : public RimPlot

RimWellPath* wellPathAttributeSource() const;

caf::PdmObject* findPdmObjectFromPlotCurve( const RiuPlotCurve* curve ) const override;

void setLogarithmicScale( bool enable );
bool isLogarithmicScale() const;

Expand Down

0 comments on commit 30dd4d2

Please sign in to comment.