(#486) Renamed "trace" to "track"

This commit is contained in:
Pål Hagen
2015-09-18 12:29:23 +02:00
parent ecf0d19110
commit 479b2083ef
26 changed files with 203 additions and 203 deletions

View File

@@ -19,11 +19,11 @@
#include "RiuWellLogPlot.h"
#include "RiuWellLogTracePlot.h"
#include "RiuWellLogTrackPlot.h"
#include "RiuMainWindow.h"
#include "RimWellLogPlot.h"
#include "RimWellLogPlotTrace.h"
#include "RimWellLogPlotTrack.h"
#include "cafPdmUiTreeView.h"
#include "cvfAssert.h"
@@ -69,11 +69,11 @@ RiuWellLogPlot::~RiuWellLogPlot()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogPlot::insertTracePlot(RiuWellLogTracePlot* tracePlot)
void RiuWellLogPlot::insertTrackPlot(RiuWellLogTrackPlot* trackPlot)
{
// Insert the plot to the left of the scroll bar
m_layout->insertWidget(m_layout->count() - 1, tracePlot);
m_tracePlots.append(tracePlot);
m_layout->insertWidget(m_layout->count() - 1, trackPlot);
m_trackPlots.append(trackPlot);
}
//--------------------------------------------------------------------------------------------------
@@ -81,10 +81,10 @@ void RiuWellLogPlot::insertTracePlot(RiuWellLogTracePlot* tracePlot)
//--------------------------------------------------------------------------------------------------
void RiuWellLogPlot::setDepthRangeAndReplot(double minDepth, double maxDepth)
{
for (int tpIdx = 0; tpIdx < m_tracePlots.count(); tpIdx++)
for (int tpIdx = 0; tpIdx < m_trackPlots.count(); tpIdx++)
{
m_tracePlots[tpIdx]->setDepthRange(minDepth, maxDepth);
m_tracePlots[tpIdx]->replot();
m_trackPlots[tpIdx]->setDepthRange(minDepth, maxDepth);
m_trackPlots[tpIdx]->replot();
}
updateScrollBar(minDepth, maxDepth);

View File

@@ -24,7 +24,7 @@
#include "cafPdmPointer.h"
class RimWellLogPlot;
class RiuWellLogTracePlot;
class RiuWellLogTrackPlot;
class QHBoxLayout;
class QScrollBar;
@@ -45,7 +45,7 @@ public:
RimWellLogPlot* ownerPlotDefinition();
void insertTracePlot(RiuWellLogTracePlot* tracePlot);
void insertTrackPlot(RiuWellLogTrackPlot* trackPlot);
void setDepthRangeAndReplot(double minDepth, double maxDepth);
@@ -58,7 +58,7 @@ private slots:
private:
QHBoxLayout* m_layout;
QScrollBar* m_scrollBar;
QList<RiuWellLogTracePlot*> m_tracePlots;
QList<RiuWellLogTrackPlot*> m_trackPlots;
caf::PdmPointer<RimWellLogPlot> m_plotDefinition;
};

View File

@@ -17,10 +17,10 @@
//
/////////////////////////////////////////////////////////////////////////////////
#include "RiuWellLogTracePlot.h"
#include "RiuWellLogTrackPlot.h"
#include "RimWellLogPlot.h"
#include "RimWellLogPlotTrace.h"
#include "RimWellLogPlotTrack.h"
#include "RimWellLogPlotCurve.h"
#include "RiuMainWindow.h"
@@ -47,11 +47,11 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuWellLogTracePlot::RiuWellLogTracePlot(RimWellLogPlotTrace* plotTraceDefinition, QWidget* parent)
RiuWellLogTrackPlot::RiuWellLogTrackPlot(RimWellLogPlotTrack* plotTrackDefinition, QWidget* parent)
: QwtPlot(parent)
{
Q_ASSERT(plotTraceDefinition);
m_plotTraceDefinition = plotTraceDefinition;
Q_ASSERT(plotTrackDefinition);
m_plotTrackDefinition = plotTrackDefinition;
m_grid = new QwtPlotGrid();
m_grid->attach(this);
@@ -66,7 +66,7 @@ RiuWellLogTracePlot::RiuWellLogTracePlot(RimWellLogPlotTrace* plotTraceDefinitio
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuWellLogTracePlot::~RiuWellLogTracePlot()
RiuWellLogTrackPlot::~RiuWellLogTrackPlot()
{
m_grid->detach();
delete m_grid;
@@ -75,7 +75,7 @@ RiuWellLogTracePlot::~RiuWellLogTracePlot()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogTracePlot::setDefaults()
void RiuWellLogTrackPlot::setDefaults()
{
QPalette newPalette(palette());
newPalette.setColor(QPalette::Background, Qt::white);
@@ -134,7 +134,7 @@ void RiuWellLogTracePlot::setDefaults()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogTracePlot::setDepthRange(double minDepth, double maxDepth)
void RiuWellLogTrackPlot::setDepthRange(double minDepth, double maxDepth)
{
// Note: Y-axis is inverted
setAxisScale(QwtPlot::yLeft, maxDepth, minDepth);
@@ -144,7 +144,7 @@ void RiuWellLogTracePlot::setDepthRange(double minDepth, double maxDepth)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogTracePlot::setDepthTitle(const QString& title)
void RiuWellLogTrackPlot::setDepthTitle(const QString& title)
{
QwtText axisTitleY = axisTitle(QwtPlot::yLeft);
axisTitleY.setText(title);
@@ -154,20 +154,20 @@ void RiuWellLogTracePlot::setDepthTitle(const QString& title)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiuWellLogTracePlot::eventFilter(QObject* watched, QEvent* event)
bool RiuWellLogTrackPlot::eventFilter(QObject* watched, QEvent* event)
{
if (watched == canvas())
{
QWheelEvent* wheelEvent = dynamic_cast<QWheelEvent*>(event);
if (wheelEvent)
{
if (!m_plotTraceDefinition)
if (!m_plotTrackDefinition)
{
return QwtPlot::eventFilter(watched, event);
}
RimWellLogPlot* plotDefinition;
m_plotTraceDefinition->firstAnchestorOrThisOfType(plotDefinition);
m_plotTrackDefinition->firstAnchestorOrThisOfType(plotDefinition);
if (!plotDefinition)
{
return QwtPlot::eventFilter(watched, event);
@@ -214,11 +214,11 @@ bool RiuWellLogTracePlot::eventFilter(QObject* watched, QEvent* event)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogTracePlot::focusInEvent(QFocusEvent* event)
void RiuWellLogTrackPlot::focusInEvent(QFocusEvent* event)
{
if (m_plotTraceDefinition)
if (m_plotTrackDefinition)
{
RiuMainWindow::instance()->projectTreeView()->selectAsCurrentItem(m_plotTraceDefinition);
RiuMainWindow::instance()->projectTreeView()->selectAsCurrentItem(m_plotTrackDefinition);
clearFocus();
}
}
@@ -226,7 +226,7 @@ void RiuWellLogTracePlot::focusInEvent(QFocusEvent* event)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogTracePlot::selectClosestCurve(const QPoint& pos)
void RiuWellLogTrackPlot::selectClosestCurve(const QPoint& pos)
{
QwtPlotCurve* closestCurve = NULL;
double distMin = DBL_MAX;
@@ -249,7 +249,7 @@ void RiuWellLogTracePlot::selectClosestCurve(const QPoint& pos)
if (closestCurve)
{
RimWellLogPlotCurve* selectedCurve = m_plotTraceDefinition->curveDefinitionFromCurve(closestCurve);
RimWellLogPlotCurve* selectedCurve = m_plotTrackDefinition->curveDefinitionFromCurve(closestCurve);
if (selectedCurve)
{
RiuMainWindow::instance()->projectTreeView()->selectAsCurrentItem(selectedCurve);
@@ -260,7 +260,7 @@ void RiuWellLogTracePlot::selectClosestCurve(const QPoint& pos)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QSize RiuWellLogTracePlot::sizeHint() const
QSize RiuWellLogTrackPlot::sizeHint() const
{
return QSize(0, 0);
}
@@ -268,7 +268,7 @@ QSize RiuWellLogTracePlot::sizeHint() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QSize RiuWellLogTracePlot::minimumSizeHint() const
QSize RiuWellLogTrackPlot::minimumSizeHint() const
{
return QSize(0, 0);
}

View File

@@ -21,7 +21,7 @@
#include "qwt_plot.h"
class RimWellLogPlotTrace;
class RimWellLogPlotTrack;
class QwtPlotGrid;
class QwtLegend;
@@ -29,16 +29,16 @@ class QEvent;
//==================================================================================================
//
// RiuWellLogTracePlot
//
//
//==================================================================================================
class RiuWellLogTracePlot : public QwtPlot
class RiuWellLogTrackPlot : public QwtPlot
{
Q_OBJECT
public:
RiuWellLogTracePlot(RimWellLogPlotTrace* plotTraceDefinition, QWidget* parent = NULL);
virtual ~RiuWellLogTracePlot();
RiuWellLogTrackPlot(RimWellLogPlotTrack* plotTrackDefinition, QWidget* parent = NULL);
virtual ~RiuWellLogTrackPlot();
void setDepthRange(double minDepth, double maxDepth);
void setDepthTitle(const QString& title);
@@ -54,7 +54,7 @@ private:
void selectClosestCurve(const QPoint& pos);
private:
RimWellLogPlotTrace* m_plotTraceDefinition;
RimWellLogPlotTrack* m_plotTrackDefinition;
QwtPlotGrid* m_grid;
QwtLegend* m_legend;
};