Rename TrackPlot/PlotTrack classes to Track

This commit is contained in:
Jacob Støren
2015-11-04 15:57:06 +01:00
parent b64d34c791
commit f77a92a77b
26 changed files with 126 additions and 126 deletions

View File

@@ -150,7 +150,7 @@ Qt::ItemFlags RiuDragDrop::flags(const QModelIndex &index) const
if (dynamic_cast<RimEclipseCase*>(uiItem) ||
dynamic_cast<RimWellLogPlotCurve*>(uiItem) ||
dynamic_cast<RimWellLogFileChannel*>(uiItem) ||
dynamic_cast<RimWellLogPlotTrack*>(uiItem))
dynamic_cast<RimWellLogTrack*>(uiItem))
{
// TODO: Remember to handle reservoir holding the main grid
itemflags |= Qt::ItemIsDragEnabled;
@@ -167,18 +167,18 @@ Qt::ItemFlags RiuDragDrop::flags(const QModelIndex &index) const
{
if (dynamic_cast<RimWellLogPlot*>(uiItem))
{
if (RiuTypedPdmObjects<RimWellLogPlotTrack>::containsTypedObjects(m_dragItems))
if (RiuTypedPdmObjects<RimWellLogTrack>::containsTypedObjects(m_dragItems))
{
itemflags |= Qt::ItemIsDropEnabled;
}
}
else if (dynamic_cast<RimWellLogPlotTrack*>(uiItem))
else if (dynamic_cast<RimWellLogTrack*>(uiItem))
{
if (RiuTypedPdmObjects<RimWellLogPlotCurve>::containsTypedObjects(m_dragItems))
{
itemflags |= Qt::ItemIsDropEnabled;
}
else if (RiuTypedPdmObjects<RimWellLogPlotTrack>::containsTypedObjects(m_dragItems))
else if (RiuTypedPdmObjects<RimWellLogTrack>::containsTypedObjects(m_dragItems))
{
itemflags |= Qt::ItemIsDropEnabled;
}
@@ -193,7 +193,7 @@ Qt::ItemFlags RiuDragDrop::flags(const QModelIndex &index) const
}
else if (m_proposedDropAction == Qt::CopyAction)
{
if (dynamic_cast<RimWellLogPlotTrack*>(uiItem))
if (dynamic_cast<RimWellLogTrack*>(uiItem))
{
if (RiuTypedPdmObjects<RimWellLogFileChannel>::containsTypedObjects(m_dragItems))
{
@@ -248,7 +248,7 @@ bool RiuDragDrop::dropMimeData(const QMimeData *data, Qt::DropAction action, int
return handleWellLogPlotCurveDrop(action, draggedObjects, wellLogPlotCurve);
}
RimWellLogPlotTrack* wellLogPlotTrack;
RimWellLogTrack* wellLogPlotTrack;
dropTarget->firstAnchestorOrThisOfType(wellLogPlotTrack);
if (wellLogPlotTrack)
{
@@ -333,7 +333,7 @@ bool RiuDragDrop::handleGridCaseGroupDrop(Qt::DropAction action, caf::PdmObjectG
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiuDragDrop::handleWellLogPlotTrackDrop(Qt::DropAction action, caf::PdmObjectGroup& draggedObjects, RimWellLogPlotTrack* trackTarget)
bool RiuDragDrop::handleWellLogPlotTrackDrop(Qt::DropAction action, caf::PdmObjectGroup& draggedObjects, RimWellLogTrack* trackTarget)
{
std::vector<RimWellLogFileChannel*> wellLogFileChannels = RiuTypedPdmObjects<RimWellLogFileChannel>::typedObjectsFromGroup(draggedObjects);
if (wellLogFileChannels.size() > 0)
@@ -355,7 +355,7 @@ bool RiuDragDrop::handleWellLogPlotTrackDrop(Qt::DropAction action, caf::PdmObje
}
}
std::vector<RimWellLogPlotTrack*> wellLogPlotTracks = RiuTypedPdmObjects<RimWellLogPlotTrack>::typedObjectsFromGroup(draggedObjects);
std::vector<RimWellLogTrack*> wellLogPlotTracks = RiuTypedPdmObjects<RimWellLogTrack>::typedObjectsFromGroup(draggedObjects);
if (wellLogPlotTracks.size() > 0)
{
if (action == Qt::MoveAction)
@@ -380,7 +380,7 @@ bool RiuDragDrop::handleWellLogPlotCurveDrop(Qt::DropAction action, caf::PdmObje
{
if (action == Qt::MoveAction)
{
RimWellLogPlotTrack* wellLogPlotTrack;
RimWellLogTrack* wellLogPlotTrack;
curveDropTarget->firstAnchestorOrThisOfType(wellLogPlotTrack);
RicWellLogPlotTrackFeatureImpl::moveCurvesToWellLogPlotTrack(wellLogPlotTrack, wellLogPlotCurves, curveDropTarget);
@@ -396,7 +396,7 @@ bool RiuDragDrop::handleWellLogPlotCurveDrop(Qt::DropAction action, caf::PdmObje
//--------------------------------------------------------------------------------------------------
bool RiuDragDrop::handleWellLogPlotDrop(Qt::DropAction action, caf::PdmObjectGroup& draggedObjects, RimWellLogPlot* wellLogPlotTarget)
{
std::vector<RimWellLogPlotTrack*> wellLogPlotTracks = RiuTypedPdmObjects<RimWellLogPlotTrack>::typedObjectsFromGroup(draggedObjects);
std::vector<RimWellLogTrack*> wellLogPlotTracks = RiuTypedPdmObjects<RimWellLogTrack>::typedObjectsFromGroup(draggedObjects);
if (wellLogPlotTracks.size() > 0)
{
if (action == Qt::MoveAction)

View File

@@ -32,7 +32,7 @@ namespace caf
class RimIdenticalGridCaseGroup;
class RimWellLogPlot;
class RimWellLogPlotTrack;
class RimWellLogTrack;
class RimWellLogPlotCurve;
//--------------------------------------------------------------------------------------------------
@@ -57,7 +57,7 @@ protected:
private:
void moveCasesToGridGroup(caf::PdmObjectGroup& objectGroup, RimIdenticalGridCaseGroup* gridCaseGroup);
bool handleGridCaseGroupDrop(Qt::DropAction action, caf::PdmObjectGroup& objectGroup, RimIdenticalGridCaseGroup* gridCaseGroup);
bool handleWellLogPlotTrackDrop(Qt::DropAction action, caf::PdmObjectGroup& objectGroup, RimWellLogPlotTrack* wellLogPlotTrack);
bool handleWellLogPlotTrackDrop(Qt::DropAction action, caf::PdmObjectGroup& objectGroup, RimWellLogTrack* wellLogPlotTrack);
bool handleWellLogPlotDrop(Qt::DropAction action, caf::PdmObjectGroup& objectGroup, RimWellLogPlot* wellLogPlot);
bool handleWellLogPlotCurveDrop(Qt::DropAction action, caf::PdmObjectGroup& objectGroup, RimWellLogPlotCurve* wellLogPlotCurve);

View File

@@ -73,7 +73,7 @@ RiuWellLogPlot::~RiuWellLogPlot()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogPlot::addTrackPlot(RiuWellLogTrackPlot* trackPlot)
void RiuWellLogPlot::addTrackPlot(RiuWellLogTrack* trackPlot)
{
// Insert the plot to the left of the scroll bar
insertTrackPlot(trackPlot, m_trackPlots.size());
@@ -82,7 +82,7 @@ void RiuWellLogPlot::addTrackPlot(RiuWellLogTrackPlot* trackPlot)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogPlot::insertTrackPlot(RiuWellLogTrackPlot* trackPlot, size_t index)
void RiuWellLogPlot::insertTrackPlot(RiuWellLogTrack* trackPlot, size_t index)
{
trackPlot->setParent(this);
@@ -113,7 +113,7 @@ void RiuWellLogPlot::insertTrackPlot(RiuWellLogTrackPlot* trackPlot, size_t inde
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogPlot::removeTrackPlot(RiuWellLogTrackPlot* trackPlot)
void RiuWellLogPlot::removeTrackPlot(RiuWellLogTrack* trackPlot)
{
if (!trackPlot) return;

View File

@@ -24,7 +24,7 @@
#include "cafPdmPointer.h"
class RimWellLogPlot;
class RiuWellLogTrackPlot;
class RiuWellLogTrack;
class QHBoxLayout;
class QScrollBar;
@@ -46,9 +46,9 @@ public:
RimWellLogPlot* ownerPlotDefinition();
void addTrackPlot(RiuWellLogTrackPlot* trackPlot);
void insertTrackPlot(RiuWellLogTrackPlot* trackPlot, size_t index);
void removeTrackPlot(RiuWellLogTrackPlot* trackPlot);
void addTrackPlot(RiuWellLogTrack* trackPlot);
void insertTrackPlot(RiuWellLogTrack* trackPlot, size_t index);
void removeTrackPlot(RiuWellLogTrack* trackPlot);
void setDepthZoomAndReplot(double minDepth, double maxDepth);
@@ -73,7 +73,7 @@ private:
QHBoxLayout* m_layout;
QScrollBar* m_scrollBar;
QList<QwtLegend*> m_legends;
QList<RiuWellLogTrackPlot*> m_trackPlots;
QList<RiuWellLogTrack*> m_trackPlots;
caf::PdmPointer<RimWellLogPlot> m_plotDefinition;
QTimer* m_scheduleUpdateChildrenLayoutTimer;
};

View File

@@ -48,7 +48,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuWellLogTrackPlot::RiuWellLogTrackPlot(RimWellLogPlotTrack* plotTrackDefinition, QWidget* parent)
RiuWellLogTrack::RiuWellLogTrack(RimWellLogTrack* plotTrackDefinition, QWidget* parent)
: QwtPlot(parent)
{
Q_ASSERT(plotTrackDefinition);
@@ -64,7 +64,7 @@ RiuWellLogTrackPlot::RiuWellLogTrackPlot(RimWellLogPlotTrack* plotTrackDefinitio
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuWellLogTrackPlot::~RiuWellLogTrackPlot()
RiuWellLogTrack::~RiuWellLogTrack()
{
m_grid->detach();
delete m_grid;
@@ -73,7 +73,7 @@ RiuWellLogTrackPlot::~RiuWellLogTrackPlot()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogTrackPlot::setDefaults()
void RiuWellLogTrack::setDefaults()
{
QPalette newPalette(palette());
newPalette.setColor(QPalette::Background, Qt::white);
@@ -130,7 +130,7 @@ void RiuWellLogTrackPlot::setDefaults()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogTrackPlot::setDepthZoom(double minDepth, double maxDepth)
void RiuWellLogTrack::setDepthZoom(double minDepth, double maxDepth)
{
// Note: Y-axis is inverted
setAxisScale(QwtPlot::yLeft, maxDepth, minDepth);
@@ -139,7 +139,7 @@ void RiuWellLogTrackPlot::setDepthZoom(double minDepth, double maxDepth)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogTrackPlot::setXRange(double min, double max)
void RiuWellLogTrack::setXRange(double min, double max)
{
setAxisScale(QwtPlot::xTop, min, max);
setAxisScale(QwtPlot::xBottom, min, max);
@@ -148,7 +148,7 @@ void RiuWellLogTrackPlot::setXRange(double min, double max)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogTrackPlot::setDepthTitle(const QString& title)
void RiuWellLogTrack::setDepthTitle(const QString& title)
{
QwtText axisTitleY = axisTitle(QwtPlot::yLeft);
axisTitleY.setText(title);
@@ -158,7 +158,7 @@ void RiuWellLogTrackPlot::setDepthTitle(const QString& title)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiuWellLogTrackPlot::eventFilter(QObject* watched, QEvent* event)
bool RiuWellLogTrack::eventFilter(QObject* watched, QEvent* event)
{
if (watched == canvas())
{
@@ -218,7 +218,7 @@ bool RiuWellLogTrackPlot::eventFilter(QObject* watched, QEvent* event)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogTrackPlot::focusInEvent(QFocusEvent* event)
void RiuWellLogTrack::focusInEvent(QFocusEvent* event)
{
if (m_plotTrackDefinition)
{
@@ -230,7 +230,7 @@ void RiuWellLogTrackPlot::focusInEvent(QFocusEvent* event)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogTrackPlot::selectClosestCurve(const QPoint& pos)
void RiuWellLogTrack::selectClosestCurve(const QPoint& pos)
{
QwtPlotCurve* closestCurve = NULL;
double distMin = DBL_MAX;
@@ -264,7 +264,7 @@ void RiuWellLogTrackPlot::selectClosestCurve(const QPoint& pos)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QSize RiuWellLogTrackPlot::sizeHint() const
QSize RiuWellLogTrack::sizeHint() const
{
return QSize(0, 0);
}
@@ -272,7 +272,7 @@ QSize RiuWellLogTrackPlot::sizeHint() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QSize RiuWellLogTrackPlot::minimumSizeHint() const
QSize RiuWellLogTrack::minimumSizeHint() const
{
return QSize(0, 0);
}
@@ -280,7 +280,7 @@ QSize RiuWellLogTrackPlot::minimumSizeHint() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiuWellLogTrackPlot::isRimTrackVisible()
bool RiuWellLogTrack::isRimTrackVisible()
{
if (m_plotTrackDefinition)
{

View File

@@ -22,7 +22,7 @@
#include "qwt_plot.h"
#include "cafPdmPointer.h"
class RimWellLogPlotTrack;
class RimWellLogTrack;
class QwtPlotGrid;
class QwtLegend;
@@ -33,13 +33,13 @@ class QEvent;
//
//
//==================================================================================================
class RiuWellLogTrackPlot : public QwtPlot
class RiuWellLogTrack : public QwtPlot
{
Q_OBJECT
public:
RiuWellLogTrackPlot(RimWellLogPlotTrack* plotTrackDefinition, QWidget* parent = NULL);
virtual ~RiuWellLogTrackPlot();
RiuWellLogTrack(RimWellLogTrack* plotTrackDefinition, QWidget* parent = NULL);
virtual ~RiuWellLogTrack();
void setDepthZoom(double minDepth, double maxDepth);
void setDepthTitle(const QString& title);
@@ -59,7 +59,7 @@ private:
void selectClosestCurve(const QPoint& pos);
private:
caf::PdmPointer<RimWellLogPlotTrack> m_plotTrackDefinition;
caf::PdmPointer<RimWellLogTrack> m_plotTrackDefinition;
QwtPlotGrid* m_grid;
};