Tried to improve readability by renaming in the plot classes.

This commit is contained in:
Jacob Støren
2015-10-27 14:44:53 +01:00
parent 4a12eecd0c
commit 0a45354bd9
19 changed files with 222 additions and 225 deletions

View File

@@ -132,11 +132,11 @@ void RiuWellLogPlot::modifyWidthOfContainingMdiWindow(int widthChange)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogPlot::setDepthRangeAndReplot(double minDepth, double maxDepth)
void RiuWellLogPlot::setDepthZoomAndReplot(double minDepth, double maxDepth)
{
for (int tpIdx = 0; tpIdx < m_trackPlots.count(); tpIdx++)
{
m_trackPlots[tpIdx]->setDepthRange(minDepth, maxDepth);
m_trackPlots[tpIdx]->setDepthZoom(minDepth, maxDepth);
m_trackPlots[tpIdx]->replot();
}
@@ -168,10 +168,10 @@ void RiuWellLogPlot::slotSetMinDepth(int value)
{
double minimumDepth;
double maximumDepth;
m_plotDefinition->visibleDepthRange(&minimumDepth, &maximumDepth);
m_plotDefinition->depthZoomMinMax(&minimumDepth, &maximumDepth);
double delta = value - minimumDepth;
m_plotDefinition->setVisibleDepthRange(minimumDepth + delta, maximumDepth + delta);
m_plotDefinition->setDepthZoomMinMax(minimumDepth + delta, maximumDepth + delta);
}
//--------------------------------------------------------------------------------------------------

View File

@@ -49,7 +49,7 @@ public:
void insertTrackPlot(RiuWellLogTrackPlot* trackPlot, size_t index);
void removeTrackPlot(RiuWellLogTrackPlot* trackPlot);
void setDepthRangeAndReplot(double minDepth, double maxDepth);
void setDepthZoomAndReplot(double minDepth, double maxDepth);
private:
void updateScrollBar(double minDepth, double maxDepth);

View File

@@ -132,7 +132,7 @@ void RiuWellLogTrackPlot::setDefaults()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogTrackPlot::setDepthRange(double minDepth, double maxDepth)
void RiuWellLogTrackPlot::setDepthZoom(double minDepth, double maxDepth)
{
// Note: Y-axis is inverted
setAxisScale(QwtPlot::yLeft, maxDepth, minDepth);
@@ -185,11 +185,11 @@ bool RiuWellLogTrackPlot::eventFilter(QObject* watched, QEvent* event)
if (wheelEvent->delta() > 0)
{
plotDefinition->zoomDepth(RIU_SCROLLWHEEL_ZOOMFACTOR, zoomCenter);
plotDefinition->setDepthZoomByFactorAndCenter(RIU_SCROLLWHEEL_ZOOMFACTOR, zoomCenter);
}
else
{
plotDefinition->zoomDepth(1.0/RIU_SCROLLWHEEL_ZOOMFACTOR, zoomCenter);
plotDefinition->setDepthZoomByFactorAndCenter(1.0/RIU_SCROLLWHEEL_ZOOMFACTOR, zoomCenter);
}
}
else

View File

@@ -40,7 +40,7 @@ public:
RiuWellLogTrackPlot(RimWellLogPlotTrack* plotTrackDefinition, QWidget* parent = NULL);
virtual ~RiuWellLogTrackPlot();
void setDepthRange(double minDepth, double maxDepth);
void setDepthZoom(double minDepth, double maxDepth);
void setDepthTitle(const QString& title);
void setXRange(double min, double max);