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

@ -120,7 +120,7 @@ void RicDeleteItemExec::redo()
wellLogPlot->zoomAllDepth(); wellLogPlot->zoomAllDepth();
} }
RimWellLogPlotTrack* wellLogPlotTrack; RimWellLogTrack* wellLogPlotTrack;
parentObj->firstAnchestorOrThisOfType(wellLogPlotTrack); parentObj->firstAnchestorOrThisOfType(wellLogPlotTrack);
if (wellLogPlotTrack) if (wellLogPlotTrack)
{ {

View File

@ -68,7 +68,7 @@ void RicAddWellLogToPlotFeature::onActionTriggered(bool isChecked)
RimWellLogPlot* plot = RicNewWellLogPlotFeatureImpl::createWellLogPlot(); RimWellLogPlot* plot = RicNewWellLogPlotFeatureImpl::createWellLogPlot();
RimWellLogPlotTrack* plotTrack = new RimWellLogPlotTrack(); RimWellLogTrack* plotTrack = new RimWellLogTrack();
plot->addTrack(plotTrack); plot->addTrack(plotTrack);
plotTrack->setDescription(QString("Track %1").arg(plot->trackCount())); plotTrack->setDescription(QString("Track %1").arg(plot->trackCount()));

View File

@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT(RicDeleteWellLogPlotTrackFeature, "RicDeleteWellLogPlotTrack
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RicDeleteWellLogPlotTrackFeature::isCommandEnabled() bool RicDeleteWellLogPlotTrackFeature::isCommandEnabled()
{ {
std::vector<RimWellLogPlotTrack*> selection; std::vector<RimWellLogTrack*> selection;
caf::SelectionManager::instance()->objectsByType(&selection); caf::SelectionManager::instance()->objectsByType(&selection);
if (selection.size() > 0) if (selection.size() > 0)
@ -55,12 +55,12 @@ bool RicDeleteWellLogPlotTrackFeature::isCommandEnabled()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicDeleteWellLogPlotTrackFeature::onActionTriggered(bool isChecked) void RicDeleteWellLogPlotTrackFeature::onActionTriggered(bool isChecked)
{ {
std::vector<RimWellLogPlotTrack*> selection; std::vector<RimWellLogTrack*> selection;
caf::SelectionManager::instance()->objectsByType(&selection); caf::SelectionManager::instance()->objectsByType(&selection);
for (size_t i = 0; i < selection.size(); i++) for (size_t i = 0; i < selection.size(); i++)
{ {
RimWellLogPlotTrack* track = selection[i]; RimWellLogTrack* track = selection[i];
RimWellLogPlot* wellLogPlot = NULL; RimWellLogPlot* wellLogPlot = NULL;
track->firstAnchestorOrThisOfType(wellLogPlot); track->firstAnchestorOrThisOfType(wellLogPlot);

View File

@ -54,7 +54,7 @@ bool RicNewWellLogCurveExtractionFeature::isCommandEnabled()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicNewWellLogCurveExtractionFeature::onActionTriggered(bool isChecked) void RicNewWellLogCurveExtractionFeature::onActionTriggered(bool isChecked)
{ {
RimWellLogPlotTrack* wellLogPlotTrack = selectedWellLogPlotTrack(); RimWellLogTrack* wellLogPlotTrack = selectedWellLogPlotTrack();
if (wellLogPlotTrack) if (wellLogPlotTrack)
{ {
addCurve(wellLogPlotTrack, NULL, NULL); addCurve(wellLogPlotTrack, NULL, NULL);
@ -64,7 +64,7 @@ void RicNewWellLogCurveExtractionFeature::onActionTriggered(bool isChecked)
RimWellPath* wellPath = selectedWellPath(); RimWellPath* wellPath = selectedWellPath();
if (wellPath) if (wellPath)
{ {
RimWellLogPlotTrack* wellLogPlotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack(); RimWellLogTrack* wellLogPlotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack();
RimWellLogExtractionCurve* plotCurve = addCurve(wellLogPlotTrack, RiaApplication::instance()->activeReservoirView(), wellPath); RimWellLogExtractionCurve* plotCurve = addCurve(wellLogPlotTrack, RiaApplication::instance()->activeReservoirView(), wellPath);
plotCurve->updatePlotData(); plotCurve->updatePlotData();
@ -84,9 +84,9 @@ void RicNewWellLogCurveExtractionFeature::setupActionLook(QAction* actionToSetup
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimWellLogPlotTrack* RicNewWellLogCurveExtractionFeature::selectedWellLogPlotTrack() const RimWellLogTrack* RicNewWellLogCurveExtractionFeature::selectedWellLogPlotTrack() const
{ {
std::vector<RimWellLogPlotTrack*> selection; std::vector<RimWellLogTrack*> selection;
caf::SelectionManager::instance()->objectsByType(&selection); caf::SelectionManager::instance()->objectsByType(&selection);
return selection.size() > 0 ? selection[0] : NULL; return selection.size() > 0 ? selection[0] : NULL;
} }
@ -115,7 +115,7 @@ bool RicNewWellLogCurveExtractionFeature::caseAvailable() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimWellLogExtractionCurve* RicNewWellLogCurveExtractionFeature::addCurve(RimWellLogPlotTrack* plotTrack, RimView* view, RimWellPath* wellPath) RimWellLogExtractionCurve* RicNewWellLogCurveExtractionFeature::addCurve(RimWellLogTrack* plotTrack, RimView* view, RimWellPath* wellPath)
{ {
CVF_ASSERT(plotTrack); CVF_ASSERT(plotTrack);

View File

@ -22,7 +22,7 @@
#include "cafCmdFeature.h" #include "cafCmdFeature.h"
class RimWellLogExtractionCurve; class RimWellLogExtractionCurve;
class RimWellLogPlotTrack; class RimWellLogTrack;
class RimWellPath; class RimWellPath;
class RimView; class RimView;
@ -34,7 +34,7 @@ class RicNewWellLogCurveExtractionFeature : public caf::CmdFeature
CAF_CMD_HEADER_INIT; CAF_CMD_HEADER_INIT;
public: public:
static RimWellLogExtractionCurve* addCurve(RimWellLogPlotTrack* plotTrack, RimView* view, RimWellPath* wellPath); static RimWellLogExtractionCurve* addCurve(RimWellLogTrack* plotTrack, RimView* view, RimWellPath* wellPath);
protected: protected:
@ -44,7 +44,7 @@ protected:
virtual void setupActionLook( QAction* actionToSetup ); virtual void setupActionLook( QAction* actionToSetup );
private: private:
RimWellLogPlotTrack* selectedWellLogPlotTrack() const; RimWellLogTrack* selectedWellLogPlotTrack() const;
RimWellPath* selectedWellPath() const; RimWellPath* selectedWellPath() const;
bool caseAvailable() const; bool caseAvailable() const;
}; };

View File

@ -56,7 +56,7 @@ bool RicNewWellLogFileCurveFeature::isCommandEnabled()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicNewWellLogFileCurveFeature::onActionTriggered(bool isChecked) void RicNewWellLogFileCurveFeature::onActionTriggered(bool isChecked)
{ {
RimWellLogPlotTrack* wellLogPlotTrack = selectedWellLogPlotTrack(); RimWellLogTrack* wellLogPlotTrack = selectedWellLogPlotTrack();
if (wellLogPlotTrack) if (wellLogPlotTrack)
{ {
addCurve(wellLogPlotTrack); addCurve(wellLogPlotTrack);
@ -66,7 +66,7 @@ void RicNewWellLogFileCurveFeature::onActionTriggered(bool isChecked)
RimWellPath* wellPath = selectedWellPathWithLogFile(); RimWellPath* wellPath = selectedWellPathWithLogFile();
if (wellPath) if (wellPath)
{ {
RimWellLogPlotTrack* wellLogPlotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack(); RimWellLogTrack* wellLogPlotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack();
RimWellLogFileCurve* plotCurve = addCurve(wellLogPlotTrack); RimWellLogFileCurve* plotCurve = addCurve(wellLogPlotTrack);
plotCurve->setWellPath(wellPath); plotCurve->setWellPath(wellPath);
plotCurve->updateConnectedEditors(); plotCurve->updateConnectedEditors();
@ -85,9 +85,9 @@ void RicNewWellLogFileCurveFeature::setupActionLook(QAction* actionToSetup)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimWellLogPlotTrack* RicNewWellLogFileCurveFeature::selectedWellLogPlotTrack() const RimWellLogTrack* RicNewWellLogFileCurveFeature::selectedWellLogPlotTrack() const
{ {
std::vector<RimWellLogPlotTrack*> selection; std::vector<RimWellLogTrack*> selection;
caf::SelectionManager::instance()->objectsByType(&selection); caf::SelectionManager::instance()->objectsByType(&selection);
return selection.size() > 0 ? selection[0] : NULL; return selection.size() > 0 ? selection[0] : NULL;
} }
@ -140,7 +140,7 @@ bool RicNewWellLogFileCurveFeature::wellLogFilesAvailable() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimWellLogFileCurve* RicNewWellLogFileCurveFeature::addCurve(RimWellLogPlotTrack* plotTrack) RimWellLogFileCurve* RicNewWellLogFileCurveFeature::addCurve(RimWellLogTrack* plotTrack)
{ {
CVF_ASSERT(plotTrack); CVF_ASSERT(plotTrack);
@ -162,7 +162,7 @@ RimWellLogFileCurve* RicNewWellLogFileCurveFeature::addCurve(RimWellLogPlotTrack
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicNewWellLogFileCurveFeature::addWellLogChannelsToPlotTrack(RimWellLogPlotTrack* plotTrack, const std::vector<RimWellLogFileChannel*>& wellLogFileChannels) void RicNewWellLogFileCurveFeature::addWellLogChannelsToPlotTrack(RimWellLogTrack* plotTrack, const std::vector<RimWellLogFileChannel*>& wellLogFileChannels)
{ {
for (size_t cIdx = 0; cIdx < wellLogFileChannels.size(); cIdx++) for (size_t cIdx = 0; cIdx < wellLogFileChannels.size(); cIdx++)
{ {

View File

@ -23,7 +23,7 @@
#include <vector> #include <vector>
class RimWellLogPlotTrack; class RimWellLogTrack;
class RimWellLogFileCurve; class RimWellLogFileCurve;
class RimWellPath; class RimWellPath;
class RimWellLogFileChannel; class RimWellLogFileChannel;
@ -37,9 +37,9 @@ class RicNewWellLogFileCurveFeature : public caf::CmdFeature
CAF_CMD_HEADER_INIT; CAF_CMD_HEADER_INIT;
public: public:
static RimWellLogFileCurve* addCurve(RimWellLogPlotTrack* plotTrack); static RimWellLogFileCurve* addCurve(RimWellLogTrack* plotTrack);
static void addWellLogChannelsToPlotTrack(RimWellLogPlotTrack* plotTrack, const std::vector<RimWellLogFileChannel*>& wellLogFileChannels); static void addWellLogChannelsToPlotTrack(RimWellLogTrack* plotTrack, const std::vector<RimWellLogFileChannel*>& wellLogFileChannels);
protected: protected:
// Overrides // Overrides
@ -48,7 +48,7 @@ protected:
virtual void setupActionLook( QAction* actionToSetup ); virtual void setupActionLook( QAction* actionToSetup );
private: private:
RimWellLogPlotTrack* selectedWellLogPlotTrack() const; RimWellLogTrack* selectedWellLogPlotTrack() const;
RimWellPath* selectedWellPathWithLogFile() const; RimWellPath* selectedWellPathWithLogFile() const;
bool wellLogFilesAvailable() const; bool wellLogFilesAvailable() const;
}; };

View File

@ -50,7 +50,7 @@ bool RicNewWellLogPlotFeature::isCommandEnabled()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicNewWellLogPlotFeature::onActionTriggered(bool isChecked) void RicNewWellLogPlotFeature::onActionTriggered(bool isChecked)
{ {
RimWellLogPlotTrack* plotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack(); RimWellLogTrack* plotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack();
RicNewWellLogCurveExtractionFeature::addCurve(plotTrack, NULL, NULL); RicNewWellLogCurveExtractionFeature::addCurve(plotTrack, NULL, NULL);
} }

View File

@ -83,11 +83,11 @@ RimWellLogPlot* RicNewWellLogPlotFeatureImpl::createWellLogPlot()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimWellLogPlotTrack* RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack() RimWellLogTrack* RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack()
{ {
RimWellLogPlot* plot = createWellLogPlot(); RimWellLogPlot* plot = createWellLogPlot();
RimWellLogPlotTrack* plotTrack = new RimWellLogPlotTrack(); RimWellLogTrack* plotTrack = new RimWellLogTrack();
plot->addTrack(plotTrack); plot->addTrack(plotTrack);
plotTrack->setDescription(QString("Track %1").arg(plot->trackCount())); plotTrack->setDescription(QString("Track %1").arg(plot->trackCount()));

View File

@ -22,7 +22,7 @@
class RimMainPlotCollection; class RimMainPlotCollection;
class RimWellLogPlotCollection; class RimWellLogPlotCollection;
class RimWellLogPlot; class RimWellLogPlot;
class RimWellLogPlotTrack; class RimWellLogTrack;
//================================================================================================== //==================================================================================================
/// ///
@ -34,5 +34,5 @@ public:
static RimMainPlotCollection* mainPlotCollection(); static RimMainPlotCollection* mainPlotCollection();
static RimWellLogPlotCollection* wellLogPlotCollection(); static RimWellLogPlotCollection* wellLogPlotCollection();
static RimWellLogPlot* createWellLogPlot(); static RimWellLogPlot* createWellLogPlot();
static RimWellLogPlotTrack* createWellLogPlotTrack(); static RimWellLogTrack* createWellLogPlotTrack();
}; };

View File

@ -49,7 +49,7 @@ void RicNewWellLogPlotTrackFeature::onActionTriggered(bool isChecked)
RimWellLogPlot* wellLogPlot = selectedWellLogPlot(); RimWellLogPlot* wellLogPlot = selectedWellLogPlot();
if (wellLogPlot) if (wellLogPlot)
{ {
RimWellLogPlotTrack* plotTrack = new RimWellLogPlotTrack; RimWellLogTrack* plotTrack = new RimWellLogTrack;
wellLogPlot->addTrack(plotTrack); wellLogPlot->addTrack(plotTrack);
plotTrack->setDescription(QString("Track %1").arg(wellLogPlot->trackCount())); plotTrack->setDescription(QString("Track %1").arg(wellLogPlot->trackCount()));

View File

@ -30,20 +30,20 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicWellLogPlotTrackFeatureImpl::moveCurvesToWellLogPlotTrack(RimWellLogPlotTrack* destTrack, void RicWellLogPlotTrackFeatureImpl::moveCurvesToWellLogPlotTrack(RimWellLogTrack* destTrack,
const std::vector<RimWellLogPlotCurve*>& curves, const std::vector<RimWellLogPlotCurve*>& curves,
RimWellLogPlotCurve* curveToInsertAfter) RimWellLogPlotCurve* curveToInsertAfter)
{ {
CVF_ASSERT(destTrack ); CVF_ASSERT(destTrack );
std::set<RimWellLogPlotTrack*> srcTracks; std::set<RimWellLogTrack*> srcTracks;
std::set<RimWellLogPlot*> srcPlots; std::set<RimWellLogPlot*> srcPlots;
for (size_t cIdx = 0; cIdx < curves.size(); cIdx++) for (size_t cIdx = 0; cIdx < curves.size(); cIdx++)
{ {
RimWellLogPlotCurve* curve = curves[cIdx]; RimWellLogPlotCurve* curve = curves[cIdx];
RimWellLogPlotTrack* wellLogPlotTrack; RimWellLogTrack* wellLogPlotTrack;
curve->firstAnchestorOrThisOfType(wellLogPlotTrack); curve->firstAnchestorOrThisOfType(wellLogPlotTrack);
if (wellLogPlotTrack) if (wellLogPlotTrack)
{ {
@ -69,7 +69,7 @@ void RicWellLogPlotTrackFeatureImpl::moveCurvesToWellLogPlotTrack(RimWellLogPlot
(*pIt)->calculateAvailableDepthRange(); (*pIt)->calculateAvailableDepthRange();
} }
for (std::set<RimWellLogPlotTrack*>::iterator tIt = srcTracks.begin(); tIt != srcTracks.end(); ++tIt) for (std::set<RimWellLogTrack*>::iterator tIt = srcTracks.begin(); tIt != srcTracks.end(); ++tIt)
{ {
(*tIt)->zoomAllXAndZoomAllDepthOnOwnerPlot(); (*tIt)->zoomAllXAndZoomAllDepthOnOwnerPlot();
} }
@ -83,8 +83,8 @@ void RicWellLogPlotTrackFeatureImpl::moveCurvesToWellLogPlotTrack(RimWellLogPlot
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicWellLogPlotTrackFeatureImpl::moveTracksToWellLogPlot(RimWellLogPlot* dstWellLogPlot, void RicWellLogPlotTrackFeatureImpl::moveTracksToWellLogPlot(RimWellLogPlot* dstWellLogPlot,
const std::vector<RimWellLogPlotTrack*>& tracksToMove, const std::vector<RimWellLogTrack*>& tracksToMove,
RimWellLogPlotTrack* trackToInsertAfter) RimWellLogTrack* trackToInsertAfter)
{ {
CVF_ASSERT(dstWellLogPlot); CVF_ASSERT(dstWellLogPlot);
@ -92,7 +92,7 @@ void RicWellLogPlotTrackFeatureImpl::moveTracksToWellLogPlot(RimWellLogPlot* dst
for (size_t tIdx = 0; tIdx < tracksToMove.size(); tIdx++) for (size_t tIdx = 0; tIdx < tracksToMove.size(); tIdx++)
{ {
RimWellLogPlotTrack* track = tracksToMove[tIdx]; RimWellLogTrack* track = tracksToMove[tIdx];
RimWellLogPlot* srcPlot; RimWellLogPlot* srcPlot;
track->firstAnchestorOrThisOfType(srcPlot); track->firstAnchestorOrThisOfType(srcPlot);

View File

@ -22,7 +22,7 @@
#include <vector> #include <vector>
class RimWellLogPlot; class RimWellLogPlot;
class RimWellLogPlotTrack; class RimWellLogTrack;
class RimWellLogPlotCurve; class RimWellLogPlotCurve;
//================================================================================================== //==================================================================================================
@ -32,10 +32,10 @@ class RicWellLogPlotTrackFeatureImpl
{ {
public: public:
static void moveCurvesToWellLogPlotTrack(RimWellLogPlotTrack* dstTrack, static void moveCurvesToWellLogPlotTrack(RimWellLogTrack* dstTrack,
const std::vector<RimWellLogPlotCurve*>& curves, const std::vector<RimWellLogPlotCurve*>& curves,
RimWellLogPlotCurve* insertAfterCurve); RimWellLogPlotCurve* insertAfterCurve);
static void moveTracksToWellLogPlot(RimWellLogPlot* wellLogPlot, static void moveTracksToWellLogPlot(RimWellLogPlot* wellLogPlot,
const std::vector<RimWellLogPlotTrack*>& tracks, const std::vector<RimWellLogTrack*>& tracks,
RimWellLogPlotTrack* trackToInsertAfter); RimWellLogTrack* trackToInsertAfter);
}; };

View File

@ -814,7 +814,7 @@ void RimProject::actionsBasedOnSelection(QMenu& contextMenu)
commandIds << "RicNewWellLogPlotTrackFeature"; commandIds << "RicNewWellLogPlotTrackFeature";
commandIds << "RicDeleteItemFeature"; commandIds << "RicDeleteItemFeature";
} }
else if (dynamic_cast<RimWellLogPlotTrack*>(uiItem)) else if (dynamic_cast<RimWellLogTrack*>(uiItem))
{ {
commandIds << "RicNewWellLogCurveExtractionFeature"; commandIds << "RicNewWellLogCurveExtractionFeature";
commandIds << "RicNewWellLogFileCurveFeature"; commandIds << "RicNewWellLogFileCurveFeature";

View File

@ -167,7 +167,7 @@ caf::PdmFieldHandle* RimWellLogPlot::objectToggleField()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlot::addTrack(RimWellLogPlotTrack* track) void RimWellLogPlot::addTrack(RimWellLogTrack* track)
{ {
m_tracks.push_back(track); m_tracks.push_back(track);
if (m_viewer) if (m_viewer)
@ -182,7 +182,7 @@ void RimWellLogPlot::addTrack(RimWellLogPlotTrack* track)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlot::insertTrack(RimWellLogPlotTrack* track, size_t index) void RimWellLogPlot::insertTrack(RimWellLogTrack* track, size_t index)
{ {
m_tracks.insert(index, track); m_tracks.insert(index, track);
@ -198,7 +198,7 @@ void RimWellLogPlot::insertTrack(RimWellLogPlotTrack* track, size_t index)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlot::removeTrack(RimWellLogPlotTrack* track) void RimWellLogPlot::removeTrack(RimWellLogTrack* track)
{ {
if (track) if (track)
{ {
@ -210,11 +210,11 @@ void RimWellLogPlot::removeTrack(RimWellLogPlotTrack* track)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlot::moveTracks(RimWellLogPlotTrack* insertAfterTrack, const std::vector<RimWellLogPlotTrack*>& tracksToMove) void RimWellLogPlot::moveTracks(RimWellLogTrack* insertAfterTrack, const std::vector<RimWellLogTrack*>& tracksToMove)
{ {
for (size_t tIdx = 0; tIdx < tracksToMove.size(); tIdx++) for (size_t tIdx = 0; tIdx < tracksToMove.size(); tIdx++)
{ {
RimWellLogPlotTrack* track = tracksToMove[tIdx]; RimWellLogTrack* track = tracksToMove[tIdx];
RimWellLogPlot* wellLogPlot; RimWellLogPlot* wellLogPlot;
track->firstAnchestorOrThisOfType(wellLogPlot); track->firstAnchestorOrThisOfType(wellLogPlot);
@ -534,7 +534,7 @@ QString RimWellLogPlot::depthPlotTitle() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
size_t RimWellLogPlot::trackIndex(RimWellLogPlotTrack* track) size_t RimWellLogPlot::trackIndex(RimWellLogTrack* track)
{ {
return m_tracks.index(track); return m_tracks.index(track);
} }

View File

@ -27,7 +27,7 @@
#include <QPointer> #include <QPointer>
class RiuWellLogPlot; class RiuWellLogPlot;
class RimWellLogPlotTrack; class RimWellLogTrack;
//================================================================================================== //==================================================================================================
@ -56,12 +56,12 @@ public:
caf::PdmField< std::vector<int> > windowGeometry; caf::PdmField< std::vector<int> > windowGeometry;
void addTrack(RimWellLogPlotTrack* track); void addTrack(RimWellLogTrack* track);
void insertTrack(RimWellLogPlotTrack* track, size_t index); void insertTrack(RimWellLogTrack* track, size_t index);
size_t trackCount() { return m_tracks.size();} size_t trackCount() { return m_tracks.size();}
void removeTrack(RimWellLogPlotTrack* track); void removeTrack(RimWellLogTrack* track);
size_t trackIndex(RimWellLogPlotTrack* track); size_t trackIndex(RimWellLogTrack* track);
void moveTracks(RimWellLogPlotTrack* insertAfterTrack, const std::vector<RimWellLogPlotTrack*>& tracksToMove); void moveTracks(RimWellLogTrack* insertAfterTrack, const std::vector<RimWellLogTrack*>& tracksToMove);
void loadDataAndUpdate(); void loadDataAndUpdate();
void updateTracks(); void updateTracks();
@ -101,7 +101,7 @@ private:
caf::PdmField<bool> m_showWindow; caf::PdmField<bool> m_showWindow;
caf::PdmField<QString> m_userName; caf::PdmField<QString> m_userName;
caf::PdmField< caf::AppEnum< DepthTypeEnum > > m_depthType; caf::PdmField< caf::AppEnum< DepthTypeEnum > > m_depthType;
caf::PdmChildArrayField<RimWellLogPlotTrack*> m_tracks; caf::PdmChildArrayField<RimWellLogTrack*> m_tracks;
caf::PdmField<double> m_minVisibleDepth; caf::PdmField<double> m_minVisibleDepth;
caf::PdmField<double> m_maxVisibleDepth; caf::PdmField<double> m_maxVisibleDepth;

View File

@ -132,7 +132,7 @@ void RimWellLogPlotCurve::updateCurveVisibility()
wellLogPlot->calculateAvailableDepthRange(); wellLogPlot->calculateAvailableDepthRange();
} }
RimWellLogPlotTrack* wellLogPlotTrack; RimWellLogTrack* wellLogPlotTrack;
this->firstAnchestorOrThisOfType(wellLogPlotTrack); this->firstAnchestorOrThisOfType(wellLogPlotTrack);
if (wellLogPlotTrack) if (wellLogPlotTrack)
{ {
@ -157,7 +157,7 @@ void RimWellLogPlotCurve::updatePlotConfiguration()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlotCurve::setQwtTrack(RiuWellLogTrackPlot* plot) void RimWellLogPlotCurve::setQwtTrack(RiuWellLogTrack* plot)
{ {
m_ownerQwtTrack = plot; m_ownerQwtTrack = plot;
if (m_showCurve) if (m_showCurve)
@ -274,7 +274,7 @@ void RimWellLogPlotCurve::zoomAllOwnerTrackAndPlot()
wellLogPlot->zoomAllDepth(); wellLogPlot->zoomAllDepth();
} }
RimWellLogPlotTrack* plotTrack; RimWellLogTrack* plotTrack;
firstAnchestorOrThisOfType(plotTrack); firstAnchestorOrThisOfType(plotTrack);
if (plotTrack) if (plotTrack)
{ {

View File

@ -28,7 +28,7 @@
#include <vector> #include <vector>
class RigWellLogCurveData; class RigWellLogCurveData;
class RiuWellLogTrackPlot; class RiuWellLogTrack;
class RiuWellLogPlotCurve; class RiuWellLogPlotCurve;
class QwtPlotCurve; class QwtPlotCurve;
class QString; class QString;
@ -49,7 +49,7 @@ public:
bool depthRange(double* minimumDepth, double* maximumDepth) const; bool depthRange(double* minimumDepth, double* maximumDepth) const;
bool valueRange(double* minimumValue, double* maximumValue) const; bool valueRange(double* minimumValue, double* maximumValue) const;
void setQwtTrack(RiuWellLogTrackPlot* plot); void setQwtTrack(RiuWellLogTrack* plot);
void detachQwtCurve(); void detachQwtCurve();
bool isCurveVisible() const; bool isCurveVisible() const;
@ -81,7 +81,7 @@ protected:
virtual void initAfterRead(); virtual void initAfterRead();
QPointer<RiuWellLogTrackPlot> m_ownerQwtTrack; QPointer<RiuWellLogTrack> m_ownerQwtTrack;
RiuWellLogPlotCurve* m_qwtPlotCurve; RiuWellLogPlotCurve* m_qwtPlotCurve;
cvf::ref<RigWellLogCurveData> m_curveData; cvf::ref<RigWellLogCurveData> m_curveData;

View File

@ -35,12 +35,12 @@
#define RI_LOGPLOTTRACK_MAXX_DEFAULT 100.0 #define RI_LOGPLOTTRACK_MAXX_DEFAULT 100.0
CAF_PDM_SOURCE_INIT(RimWellLogPlotTrack, "WellLogPlotTrack"); CAF_PDM_SOURCE_INIT(RimWellLogTrack, "WellLogPlotTrack");
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimWellLogPlotTrack::RimWellLogPlotTrack() RimWellLogTrack::RimWellLogTrack()
{ {
CAF_PDM_InitObject("Track", ":/WellLogTrack16x16.png", "", ""); CAF_PDM_InitObject("Track", ":/WellLogTrack16x16.png", "", "");
@ -60,7 +60,7 @@ RimWellLogPlotTrack::RimWellLogPlotTrack()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimWellLogPlotTrack::~RimWellLogPlotTrack() RimWellLogTrack::~RimWellLogTrack()
{ {
delete m_wellLogTrackPlotWidget; delete m_wellLogTrackPlotWidget;
} }
@ -68,7 +68,7 @@ RimWellLogPlotTrack::~RimWellLogPlotTrack()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrack::setDescription(const QString& description) void RimWellLogTrack::setDescription(const QString& description)
{ {
m_userName = description; m_userName = description;
} }
@ -76,7 +76,7 @@ void RimWellLogPlotTrack::setDescription(const QString& description)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{ {
if (changedField == &m_show) if (changedField == &m_show)
{ {
@ -104,7 +104,7 @@ void RimWellLogPlotTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimWellLogPlotTrack::objectToggleField() caf::PdmFieldHandle* RimWellLogTrack::objectToggleField()
{ {
return &m_show; return &m_show;
} }
@ -112,7 +112,7 @@ caf::PdmFieldHandle* RimWellLogPlotTrack::objectToggleField()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimWellLogPlotTrack::userDescriptionField() caf::PdmFieldHandle* RimWellLogTrack::userDescriptionField()
{ {
return &m_userName; return &m_userName;
} }
@ -120,7 +120,7 @@ caf::PdmFieldHandle* RimWellLogPlotTrack::userDescriptionField()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrack::addCurve(RimWellLogPlotCurve* curve) void RimWellLogTrack::addCurve(RimWellLogPlotCurve* curve)
{ {
curves.push_back(curve); curves.push_back(curve);
@ -133,7 +133,7 @@ void RimWellLogPlotTrack::addCurve(RimWellLogPlotCurve* curve)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrack::insertCurve(RimWellLogPlotCurve* curve, size_t index) void RimWellLogTrack::insertCurve(RimWellLogPlotCurve* curve, size_t index)
{ {
curves.insert(index, curve); curves.insert(index, curve);
// Todo: Mark curve data to use either TVD or MD // Todo: Mark curve data to use either TVD or MD
@ -147,7 +147,7 @@ void RimWellLogPlotTrack::insertCurve(RimWellLogPlotCurve* curve, size_t index)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrack::removeCurve(RimWellLogPlotCurve* curve) void RimWellLogTrack::removeCurve(RimWellLogPlotCurve* curve)
{ {
size_t index = curves.index(curve); size_t index = curves.index(curve);
if ( index < curves.size()) if ( index < curves.size())
@ -161,7 +161,7 @@ void RimWellLogPlotTrack::removeCurve(RimWellLogPlotCurve* curve)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RiuWellLogTrackPlot* RimWellLogPlotTrack::viewer() RiuWellLogTrack* RimWellLogTrack::viewer()
{ {
return m_wellLogTrackPlotWidget; return m_wellLogTrackPlotWidget;
} }
@ -169,7 +169,7 @@ RiuWellLogTrackPlot* RimWellLogPlotTrack::viewer()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrack::availableDepthRange(double* minimumDepth, double* maximumDepth) void RimWellLogTrack::availableDepthRange(double* minimumDepth, double* maximumDepth)
{ {
double minDepth = HUGE_VAL; double minDepth = HUGE_VAL;
double maxDepth = -HUGE_VAL; double maxDepth = -HUGE_VAL;
@ -202,7 +202,7 @@ void RimWellLogPlotTrack::availableDepthRange(double* minimumDepth, double* maxi
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrack::loadDataAndUpdate() void RimWellLogTrack::loadDataAndUpdate()
{ {
CVF_ASSERT(m_wellLogTrackPlotWidget); CVF_ASSERT(m_wellLogTrackPlotWidget);
@ -222,11 +222,11 @@ void RimWellLogPlotTrack::loadDataAndUpdate()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrack::recreateViewer() void RimWellLogTrack::recreateViewer()
{ {
if (m_wellLogTrackPlotWidget == NULL) if (m_wellLogTrackPlotWidget == NULL)
{ {
m_wellLogTrackPlotWidget = new RiuWellLogTrackPlot(this); m_wellLogTrackPlotWidget = new RiuWellLogTrack(this);
for (size_t cIdx = 0; cIdx < curves.size(); ++cIdx) for (size_t cIdx = 0; cIdx < curves.size(); ++cIdx)
{ {
@ -238,7 +238,7 @@ void RimWellLogPlotTrack::recreateViewer()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrack::detachAllCurves() void RimWellLogTrack::detachAllCurves()
{ {
for (size_t cIdx = 0; cIdx < curves.size(); ++cIdx) for (size_t cIdx = 0; cIdx < curves.size(); ++cIdx)
{ {
@ -249,7 +249,7 @@ void RimWellLogPlotTrack::detachAllCurves()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrack::zoomAllXAndZoomAllDepthOnOwnerPlot() void RimWellLogTrack::zoomAllXAndZoomAllDepthOnOwnerPlot()
{ {
if (m_wellLogTrackPlotWidget) if (m_wellLogTrackPlotWidget)
{ {
@ -269,7 +269,7 @@ void RimWellLogPlotTrack::zoomAllXAndZoomAllDepthOnOwnerPlot()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrack::alignDepthZoomToPlotAndZoomAllX() void RimWellLogTrack::alignDepthZoomToPlotAndZoomAllX()
{ {
if (m_wellLogTrackPlotWidget) if (m_wellLogTrackPlotWidget)
{ {
@ -292,7 +292,7 @@ void RimWellLogPlotTrack::alignDepthZoomToPlotAndZoomAllX()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrack::zoomAllXAxis() void RimWellLogTrack::zoomAllXAxis()
{ {
double minValue = HUGE_VAL; double minValue = HUGE_VAL;
double maxValue = -HUGE_VAL; double maxValue = -HUGE_VAL;
@ -333,7 +333,7 @@ void RimWellLogPlotTrack::zoomAllXAxis()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimWellLogPlotCurve* RimWellLogPlotTrack::curveDefinitionFromCurve(const QwtPlotCurve* curve) const RimWellLogPlotCurve* RimWellLogTrack::curveDefinitionFromCurve(const QwtPlotCurve* curve) const
{ {
for (size_t idx = 0; idx < curves.size(); idx++) for (size_t idx = 0; idx < curves.size(); idx++)
{ {
@ -349,7 +349,7 @@ RimWellLogPlotCurve* RimWellLogPlotTrack::curveDefinitionFromCurve(const QwtPlot
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrack::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) void RimWellLogTrack::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
{ {
uiOrdering.add(&m_userName); uiOrdering.add(&m_userName);
@ -361,7 +361,7 @@ void RimWellLogPlotTrack::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
size_t RimWellLogPlotTrack::curveIndex(RimWellLogPlotCurve* curve) size_t RimWellLogTrack::curveIndex(RimWellLogPlotCurve* curve)
{ {
return curves.index(curve); return curves.index(curve);
} }
@ -369,7 +369,7 @@ size_t RimWellLogPlotTrack::curveIndex(RimWellLogPlotCurve* curve)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RimWellLogPlotTrack::isVisible() bool RimWellLogTrack::isVisible()
{ {
return m_show; return m_show;
} }

View File

@ -28,7 +28,7 @@
#include <vector> #include <vector>
class RimWellLogPlotCurve; class RimWellLogPlotCurve;
class RiuWellLogTrackPlot; class RiuWellLogTrack;
class QwtPlotCurve; class QwtPlotCurve;
@ -36,12 +36,12 @@ class QwtPlotCurve;
/// ///
/// ///
//================================================================================================== //==================================================================================================
class RimWellLogPlotTrack : public caf::PdmObject class RimWellLogTrack : public caf::PdmObject
{ {
CAF_PDM_HEADER_INIT; CAF_PDM_HEADER_INIT;
public: public:
RimWellLogPlotTrack(); RimWellLogTrack();
virtual ~RimWellLogPlotTrack(); virtual ~RimWellLogTrack();
void setDescription(const QString& description); void setDescription(const QString& description);
bool isVisible(); bool isVisible();
@ -61,7 +61,7 @@ public:
void alignDepthZoomToPlotAndZoomAllX(); void alignDepthZoomToPlotAndZoomAllX();
void zoomAllXAxis(); void zoomAllXAxis();
RiuWellLogTrackPlot* viewer(); RiuWellLogTrack* viewer();
RimWellLogPlotCurve* curveDefinitionFromCurve(const QwtPlotCurve* curve) const; RimWellLogPlotCurve* curveDefinitionFromCurve(const QwtPlotCurve* curve) const;
@ -81,5 +81,5 @@ private:
caf::PdmField<double> m_visibleXRangeMin; caf::PdmField<double> m_visibleXRangeMin;
caf::PdmField<double> m_visibleXRangeMax; caf::PdmField<double> m_visibleXRangeMax;
QPointer<RiuWellLogTrackPlot> m_wellLogTrackPlotWidget; QPointer<RiuWellLogTrack> m_wellLogTrackPlotWidget;
}; };

View File

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

View File

@ -32,7 +32,7 @@ namespace caf
class RimIdenticalGridCaseGroup; class RimIdenticalGridCaseGroup;
class RimWellLogPlot; class RimWellLogPlot;
class RimWellLogPlotTrack; class RimWellLogTrack;
class RimWellLogPlotCurve; class RimWellLogPlotCurve;
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -57,7 +57,7 @@ protected:
private: private:
void moveCasesToGridGroup(caf::PdmObjectGroup& objectGroup, RimIdenticalGridCaseGroup* gridCaseGroup); void moveCasesToGridGroup(caf::PdmObjectGroup& objectGroup, RimIdenticalGridCaseGroup* gridCaseGroup);
bool handleGridCaseGroupDrop(Qt::DropAction action, 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 handleWellLogPlotDrop(Qt::DropAction action, caf::PdmObjectGroup& objectGroup, RimWellLogPlot* wellLogPlot);
bool handleWellLogPlotCurveDrop(Qt::DropAction action, caf::PdmObjectGroup& objectGroup, RimWellLogPlotCurve* wellLogPlotCurve); 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 // Insert the plot to the left of the scroll bar
insertTrackPlot(trackPlot, m_trackPlots.size()); 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); 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; if (!trackPlot) return;

View File

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

View File

@ -48,7 +48,7 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RiuWellLogTrackPlot::RiuWellLogTrackPlot(RimWellLogPlotTrack* plotTrackDefinition, QWidget* parent) RiuWellLogTrack::RiuWellLogTrack(RimWellLogTrack* plotTrackDefinition, QWidget* parent)
: QwtPlot(parent) : QwtPlot(parent)
{ {
Q_ASSERT(plotTrackDefinition); Q_ASSERT(plotTrackDefinition);
@ -64,7 +64,7 @@ RiuWellLogTrackPlot::RiuWellLogTrackPlot(RimWellLogPlotTrack* plotTrackDefinitio
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RiuWellLogTrackPlot::~RiuWellLogTrackPlot() RiuWellLogTrack::~RiuWellLogTrack()
{ {
m_grid->detach(); m_grid->detach();
delete m_grid; delete m_grid;
@ -73,7 +73,7 @@ RiuWellLogTrackPlot::~RiuWellLogTrackPlot()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RiuWellLogTrackPlot::setDefaults() void RiuWellLogTrack::setDefaults()
{ {
QPalette newPalette(palette()); QPalette newPalette(palette());
newPalette.setColor(QPalette::Background, Qt::white); 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 // Note: Y-axis is inverted
setAxisScale(QwtPlot::yLeft, maxDepth, minDepth); 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::xTop, min, max);
setAxisScale(QwtPlot::xBottom, 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); QwtText axisTitleY = axisTitle(QwtPlot::yLeft);
axisTitleY.setText(title); 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()) 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) 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; QwtPlotCurve* closestCurve = NULL;
double distMin = DBL_MAX; 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); return QSize(0, 0);
} }
@ -272,7 +272,7 @@ QSize RiuWellLogTrackPlot::sizeHint() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
QSize RiuWellLogTrackPlot::minimumSizeHint() const QSize RiuWellLogTrack::minimumSizeHint() const
{ {
return QSize(0, 0); return QSize(0, 0);
} }
@ -280,7 +280,7 @@ QSize RiuWellLogTrackPlot::minimumSizeHint() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RiuWellLogTrackPlot::isRimTrackVisible() bool RiuWellLogTrack::isRimTrackVisible()
{ {
if (m_plotTrackDefinition) if (m_plotTrackDefinition)
{ {

View File

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