#4258 Rename Grid Cross Plot "Curve Sets" to "Data Sets". Also renamed code

* Kept XML-strings to avoid breaking compatibility
This commit is contained in:
Gaute Lindkvist 2019-03-29 13:17:39 +01:00
parent 014f389fe3
commit 59229b89b7
25 changed files with 266 additions and 266 deletions

View File

@ -155,7 +155,7 @@ public:
virtual int tabCount() const override
{
CVF_ASSERT(m_crossPlot.notNull() && "Need to check that provider is valid");
return (int)m_crossPlot->curveSets().size();
return (int)m_crossPlot->dataSets().size();
}
private:

View File

@ -1,18 +1,18 @@
set (SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCrossPlotFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCrossPlotCurveSetFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicSwapGridCrossPlotCurveSetAxesFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicPasteGridCrossPlotCurveSetFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCrossPlotDataSetFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicSwapGridCrossPlotDataSetAxesFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicPasteGridCrossPlotDataSetFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicCreateSaturationPressurePlotsFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicSaturationPressureUi.h
)
set (SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCrossPlotFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCrossPlotCurveSetFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicSwapGridCrossPlotCurveSetAxesFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicPasteGridCrossPlotCurveSetFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicCreateGridCrossPlotDataSetFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicSwapGridCrossPlotDataSetAxesFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicPasteGridCrossPlotDataSetFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicCreateSaturationPressurePlotsFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicSaturationPressureUi.cpp
)

View File

@ -15,12 +15,12 @@
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RicCreateGridCrossPlotCurveSetFeature.h"
#include "RicCreateGridCrossPlotDataSetFeature.h"
#include "RiaApplication.h"
#include "RimGridCrossPlot.h"
#include "RimGridCrossPlotCurveSet.h"
#include "RimGridCrossPlotDataSet.h"
#include "RimProject.h"
#include "RiuPlotMainWindowTools.h"
@ -29,12 +29,12 @@
#include <QAction>
CAF_CMD_SOURCE_INIT(RicCreateGridCrossPlotCurveSetFeature, "RicCreateGridCrossPlotCurveSetFeature");
CAF_CMD_SOURCE_INIT(RicCreateGridCrossPlotDataSetFeature, "RicCreateGridCrossPlotDataSetFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicCreateGridCrossPlotCurveSetFeature::isCommandEnabled()
bool RicCreateGridCrossPlotDataSetFeature::isCommandEnabled()
{
return caf::SelectionManager::instance()->selectedItemOfType<RimGridCrossPlot>() != nullptr;
}
@ -42,22 +42,22 @@ bool RicCreateGridCrossPlotCurveSetFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicCreateGridCrossPlotCurveSetFeature::onActionTriggered(bool isChecked)
void RicCreateGridCrossPlotDataSetFeature::onActionTriggered(bool isChecked)
{
RimGridCrossPlot* crossPlot = caf::SelectionManager::instance()->selectedItemOfType<RimGridCrossPlot>();
RimGridCrossPlotCurveSet* curveSet = crossPlot->createCurveSet();
curveSet->loadDataAndUpdate(true);
RimGridCrossPlotDataSet* dataSet = crossPlot->createDataSet();
dataSet->loadDataAndUpdate(true);
RiaApplication::instance()->getOrCreateMainPlotWindow();
RiuPlotMainWindowTools::selectAsCurrentItem(curveSet);
RiuPlotMainWindowTools::selectAsCurrentItem(dataSet);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicCreateGridCrossPlotCurveSetFeature::setupActionLook(QAction* actionToSetup)
void RicCreateGridCrossPlotDataSetFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setText("New Cross Plot Curve Set");
actionToSetup->setText("New Data Set");
actionToSetup->setIcon(QIcon(":/WellLogCurve16x16.png"));
}

View File

@ -22,7 +22,7 @@
//==================================================================================================
///
//==================================================================================================
class RicCreateGridCrossPlotCurveSetFeature : public caf::CmdFeature
class RicCreateGridCrossPlotDataSetFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;

View File

@ -22,7 +22,7 @@
#include "RimEclipseView.h"
#include "RimGridCrossPlot.h"
#include "RimGridCrossPlotCollection.h"
#include "RimGridCrossPlotCurveSet.h"
#include "RimGridCrossPlotDataSet.h"
#include "RimGridView.h"
#include "RimMainPlotCollection.h"
#include "RimProject.h"
@ -59,11 +59,11 @@ void RicCreateGridCrossPlotFeature::onActionTriggered(bool isChecked)
launchedFromPlotCollection = false;
}
RimGridCrossPlot* plot = collection->createGridCrossPlot();
RimGridCrossPlotCurveSet* curveSet = plot->createCurveSet();
RimGridCrossPlotDataSet* dataSet = plot->createDataSet();
if (!launchedFromPlotCollection)
{
curveSet->setCellFilterView(RiaApplication::instance()->activeGridView());
dataSet->setCellFilterView(RiaApplication::instance()->activeGridView());
}
plot->loadDataAndUpdate();

View File

@ -16,11 +16,11 @@
//
/////////////////////////////////////////////////////////////////////////////////
#include "RicPasteGridCrossPlotCurveSetFeature.h"
#include "RicPasteGridCrossPlotDataSetFeature.h"
#include "RiaApplication.h"
#include "RimGridCrossPlot.h"
#include "RimGridCrossPlotCurveSet.h"
#include "RimGridCrossPlotDataSet.h"
#include "RiuPlotMainWindowTools.h"
#include "OperationsUsingObjReferences/RicPasteFeatureImpl.h"
@ -30,14 +30,14 @@
#include <QAction>
CAF_CMD_SOURCE_INIT(RicPasteGridCrossPlotCurveSetFeature, "RicPasteGridCrossPlotCurveSetFeature");
CAF_CMD_SOURCE_INIT(RicPasteGridCrossPlotDataSetFeature, "RicPasteGridCrossPlotDataSetFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicPasteGridCrossPlotCurveSetFeature::isCommandEnabled()
bool RicPasteGridCrossPlotDataSetFeature::isCommandEnabled()
{
auto curvesOnClipboard = gridCrossPlotCurveSetsOnClipboard();
auto curvesOnClipboard = gridCrossPlotDataSetsOnClipboard();
if (curvesOnClipboard.empty()) return false;
return caf::SelectionManager::instance()->selectedItemAncestorOfType<RimGridCrossPlot>() != nullptr;
@ -46,27 +46,27 @@ bool RicPasteGridCrossPlotCurveSetFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicPasteGridCrossPlotCurveSetFeature::onActionTriggered(bool isChecked)
void RicPasteGridCrossPlotDataSetFeature::onActionTriggered(bool isChecked)
{
RimGridCrossPlot* crossPlot = caf::SelectionManager::instance()->selectedItemAncestorOfType<RimGridCrossPlot>();
if (crossPlot)
{
auto curvesOnClipboard = gridCrossPlotCurveSetsOnClipboard();
auto curvesOnClipboard = gridCrossPlotDataSetsOnClipboard();
if (!curvesOnClipboard.empty())
{
RimGridCrossPlotCurveSet* objectToSelect = nullptr;
RimGridCrossPlotDataSet* objectToSelect = nullptr;
for (RimGridCrossPlotCurveSet* crossPlotCurveSet : gridCrossPlotCurveSetsOnClipboard())
for (RimGridCrossPlotDataSet* dataSet : gridCrossPlotDataSetsOnClipboard())
{
RimGridCrossPlotCurveSet* newCurveSet = dynamic_cast<RimGridCrossPlotCurveSet*>(
crossPlotCurveSet->xmlCapability()->copyByXmlSerialization(caf::PdmDefaultObjectFactory::instance()));
RimGridCrossPlotDataSet* newDataSet = dynamic_cast<RimGridCrossPlotDataSet*>(
dataSet->xmlCapability()->copyByXmlSerialization(caf::PdmDefaultObjectFactory::instance()));
crossPlot->addCurveSet(newCurveSet);
newCurveSet->resolveReferencesRecursively();
newCurveSet->initAfterReadRecursively();
crossPlot->addDataSet(newDataSet);
newDataSet->resolveReferencesRecursively();
newDataSet->initAfterReadRecursively();
objectToSelect = newCurveSet;
objectToSelect = newDataSet;
}
@ -82,21 +82,21 @@ void RicPasteGridCrossPlotCurveSetFeature::onActionTriggered(bool isChecked)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicPasteGridCrossPlotCurveSetFeature::setupActionLook(QAction* actionToSetup)
void RicPasteGridCrossPlotDataSetFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setText("Paste Cross Plot Curve Set");
actionToSetup->setText("Paste Data Set");
RicPasteFeatureImpl::setIconAndShortcuts(actionToSetup);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<caf::PdmPointer<RimGridCrossPlotCurveSet>> RicPasteGridCrossPlotCurveSetFeature::gridCrossPlotCurveSetsOnClipboard()
std::vector<caf::PdmPointer<RimGridCrossPlotDataSet>> RicPasteGridCrossPlotDataSetFeature::gridCrossPlotDataSetsOnClipboard()
{
caf::PdmObjectGroup objectGroup;
RicPasteFeatureImpl::findObjectsFromClipboardRefs(&objectGroup);
std::vector<caf::PdmPointer<RimGridCrossPlotCurveSet>> typedObjects;
std::vector<caf::PdmPointer<RimGridCrossPlotDataSet>> typedObjects;
objectGroup.objectsByType(&typedObjects);
return typedObjects;

View File

@ -21,12 +21,12 @@
#include "cafCmdFeature.h"
#include "cafPdmPointer.h"
class RimGridCrossPlotCurveSet;
class RimGridCrossPlotDataSet;
//==================================================================================================
///
//==================================================================================================
class RicPasteGridCrossPlotCurveSetFeature : public caf::CmdFeature
class RicPasteGridCrossPlotDataSetFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
@ -36,7 +36,7 @@ protected:
void setupActionLook(QAction* actionToSetup) override;
private:
static std::vector<caf::PdmPointer<RimGridCrossPlotCurveSet>> gridCrossPlotCurveSetsOnClipboard();
static std::vector<caf::PdmPointer<RimGridCrossPlotDataSet>> gridCrossPlotDataSetsOnClipboard();
};

View File

@ -1,27 +1,27 @@
#include "RicSwapGridCrossPlotCurveSetAxesFeature.h"
#include "RicSwapGridCrossPlotDataSetAxesFeature.h"
#include "RimGridCrossPlot.h"
#include "RimGridCrossPlotCurveSet.h"
#include "RimGridCrossPlotDataSet.h"
#include <cafSelectionManager.h>
#include <QAction>
CAF_CMD_SOURCE_INIT(RicSwapGridCrossPlotCurveSetAxesFeature, "RicSwapGridCrossPlotCurveSetAxesFeature");
CAF_CMD_SOURCE_INIT(RicSwapGridCrossPlotDataSetAxesFeature, "RicSwapGridCrossPlotDataSetAxesFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicSwapGridCrossPlotCurveSetAxesFeature::isCommandEnabled()
bool RicSwapGridCrossPlotDataSetAxesFeature::isCommandEnabled()
{
if (caf::SelectionManager::instance()->selectedItemOfType<RimGridCrossPlotCurveSet>())
if (caf::SelectionManager::instance()->selectedItemOfType<RimGridCrossPlotDataSet>())
{
return true;
}
else if (caf::SelectionManager::instance()->selectedItemOfType<RimGridCrossPlot>())
{
auto plot = caf::SelectionManager::instance()->selectedItemOfType<RimGridCrossPlot>();
if (!plot->curveSets().empty())
if (!plot->dataSets().empty())
return true;
}
return false;
@ -30,12 +30,12 @@ bool RicSwapGridCrossPlotCurveSetAxesFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicSwapGridCrossPlotCurveSetAxesFeature::onActionTriggered(bool isChecked)
void RicSwapGridCrossPlotDataSetAxesFeature::onActionTriggered(bool isChecked)
{
if (caf::SelectionManager::instance()->selectedItemOfType<RimGridCrossPlotCurveSet>())
if (caf::SelectionManager::instance()->selectedItemOfType<RimGridCrossPlotDataSet>())
{
auto curveSet = caf::SelectionManager::instance()->selectedItemOfType<RimGridCrossPlotCurveSet>();
curveSet->swapAxisProperties(true);
auto dataSet = caf::SelectionManager::instance()->selectedItemOfType<RimGridCrossPlotDataSet>();
dataSet->swapAxisProperties(true);
}
else if (caf::SelectionManager::instance()->selectedItemOfType<RimGridCrossPlot>())
{
@ -47,9 +47,9 @@ void RicSwapGridCrossPlotCurveSetAxesFeature::onActionTriggered(bool isChecked)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicSwapGridCrossPlotCurveSetAxesFeature::setupActionLook(QAction* actionToSetup)
void RicSwapGridCrossPlotDataSetAxesFeature::setupActionLook(QAction* actionToSetup)
{
if (caf::SelectionManager::instance()->selectedItemOfType<RimGridCrossPlotCurveSet>())
if (caf::SelectionManager::instance()->selectedItemOfType<RimGridCrossPlotDataSet>())
{
actionToSetup->setText("Swap Axis Properties");
}

View File

@ -22,7 +22,7 @@
//==================================================================================================
///
//==================================================================================================
class RicSwapGridCrossPlotCurveSetAxesFeature : public caf::CmdFeature
class RicSwapGridCrossPlotDataSetAxesFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;

View File

@ -24,7 +24,7 @@
#include "RimEnsembleCurveSet.h"
#include "RimFractureTemplate.h"
#include "RimGeoMechView.h"
#include "RimGridCrossPlotCurveSet.h"
#include "RimGridCrossPlotDataSet.h"
#include "RimIntersection.h"
#include "RimIntersectionBox.h"
#include "RimMimeData.h"
@ -171,7 +171,7 @@ bool RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported(caf::PdmObject
{
return true;
}
else if (dynamic_cast<RimGridCrossPlotCurveSet*>(pdmObject))
else if (dynamic_cast<RimGridCrossPlotDataSet*>(pdmObject))
{
return true;
}

View File

@ -35,7 +35,7 @@
#include "RimGeoMechView.h"
#include "RimGridTimeHistoryCurve.h"
#include "RimGridCrossPlot.h"
#include "RimGridCrossPlotCurveSet.h"
#include "RimGridCrossPlotDataSet.h"
#include "RimIdenticalGridCaseGroup.h"
#include "RimIntersection.h"
#include "RimIntersectionBox.h"
@ -134,7 +134,7 @@ bool isDeletable(caf::PdmUiItem* uiItem)
if (dynamic_cast<RimReachCircleAnnotation*>(uiItem)) return true;
if (dynamic_cast<RimPolylinesAnnotation*>(uiItem)) return true;
if (dynamic_cast<RimGridCrossPlot*>(uiItem)) return true;
if (dynamic_cast<RimGridCrossPlotCurveSet*>(uiItem)) return true;
if (dynamic_cast<RimGridCrossPlotDataSet*>(uiItem)) return true;
return false;
}

View File

@ -3,7 +3,7 @@ set (SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlot.h
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCollection.h
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCurve.h
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCurveSet.h
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotDataSet.h
${CMAKE_CURRENT_LIST_DIR}/RimSaturationPressurePlot.h
${CMAKE_CURRENT_LIST_DIR}/RimSaturationPressurePlotCollection.h
)
@ -12,7 +12,7 @@ set (SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlot.cpp
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCollection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCurve.cpp
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotCurveSet.cpp
${CMAKE_CURRENT_LIST_DIR}/RimGridCrossPlotDataSet.cpp
${CMAKE_CURRENT_LIST_DIR}/RimSaturationPressurePlot.cpp
${CMAKE_CURRENT_LIST_DIR}/RimSaturationPressurePlotCollection.cpp
)

View File

@ -23,7 +23,7 @@
#include "RiuQwtPlotTools.h"
#include "RimGridCrossPlotCurve.h"
#include "RimGridCrossPlotCurveSet.h"
#include "RimGridCrossPlotDataSet.h"
#include "RimPlotAxisProperties.h"
#include "cafPdmUiCheckBoxEditor.h"
@ -67,8 +67,8 @@ RimGridCrossPlot::RimGridCrossPlot()
m_yAxisProperties->setNameAndAxis("Y-Axis", QwtPlot::yLeft);
m_yAxisProperties->setEnableTitleTextSettings(false);
CAF_PDM_InitFieldNoDefault(&m_crossPlotCurveSets, "CrossPlotCurve", "Cross Plot Data Set", "", "", "");
m_crossPlotCurveSets.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&m_crossPlotDataSets, "CrossPlotCurve", "Cross Plot Data Set", "", "", "");
m_crossPlotDataSets.uiCapability()->setUiHidden(true);
m_nameConfig = new RimGridCrossPlotNameConfig(this);
}
@ -85,26 +85,26 @@ RimGridCrossPlot::~RimGridCrossPlot()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimGridCrossPlotCurveSet* RimGridCrossPlot::createCurveSet()
RimGridCrossPlotDataSet* RimGridCrossPlot::createDataSet()
{
RimGridCrossPlotCurveSet* curveSet = new RimGridCrossPlotCurveSet();
m_crossPlotCurveSets.push_back(curveSet);
return curveSet;
RimGridCrossPlotDataSet* dataSet = new RimGridCrossPlotDataSet();
m_crossPlotDataSets.push_back(dataSet);
return dataSet;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RimGridCrossPlot::indexOfCurveSet(const RimGridCrossPlotCurveSet* curveSetToCheck) const
int RimGridCrossPlot::indexOfDataSet(const RimGridCrossPlotDataSet* dataSetToCheck) const
{
int index = 0;
for (auto curveSet : m_crossPlotCurveSets())
for (auto dataSet : m_crossPlotDataSets())
{
if (curveSet == curveSetToCheck)
if (dataSet == dataSetToCheck)
{
return index;
}
if (curveSet->isChecked() && curveSet->visibleCurveCount() > 0u)
if (dataSet->isChecked() && dataSet->visibleCurveCount() > 0u)
{
index++;
}
@ -115,17 +115,17 @@ int RimGridCrossPlot::indexOfCurveSet(const RimGridCrossPlotCurveSet* curveSetTo
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlot::addCurveSet(RimGridCrossPlotCurveSet* curveSet)
void RimGridCrossPlot::addDataSet(RimGridCrossPlotDataSet* dataSet)
{
m_crossPlotCurveSets.push_back(curveSet);
m_crossPlotDataSets.push_back(dataSet);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimGridCrossPlotCurveSet*> RimGridCrossPlot::curveSets() const
std::vector<RimGridCrossPlotDataSet*> RimGridCrossPlot::dataSets() const
{
return m_crossPlotCurveSets.childObjects();
return m_crossPlotDataSets.childObjects();
}
//--------------------------------------------------------------------------------------------------
@ -186,12 +186,12 @@ void RimGridCrossPlot::reattachCurvesToQwtAndReplot()
{
if (m_qwtPlot)
{
for (auto curveSet : m_crossPlotCurveSets)
for (auto dataSet : m_crossPlotDataSets)
{
curveSet->detachAllCurves();
if (curveSet->isChecked())
dataSet->detachAllCurves();
if (dataSet->isChecked())
{
curveSet->setParentQwtPlotNoReplot(m_qwtPlot);
dataSet->setParentQwtPlotNoReplot(m_qwtPlot);
}
}
updateAxisDisplay();
@ -212,22 +212,22 @@ QString RimGridCrossPlot::createAutoName() const
if (m_nameConfig->addDataSetNames())
{
QStringList dataSetStrings;
std::map<RimGridCrossPlotCurveSet::NameComponents, std::set<QString>> allNameComponents;
for (auto curveSet : m_crossPlotCurveSets)
std::map<RimGridCrossPlotDataSet::NameComponents, std::set<QString>> allNameComponents;
for (auto dataSet : m_crossPlotDataSets)
{
if (curveSet->isChecked())
if (dataSet->isChecked())
{
QStringList componentList;
auto curveSetNameComponents = curveSet->nameComponents();
auto dataSetNameComponents = dataSet->nameComponents();
for (auto curveSetNameComponent : curveSetNameComponents)
for (auto dataSetNameComponent : dataSetNameComponents)
{
if (!curveSetNameComponent.second.isEmpty())
if (!dataSetNameComponent.second.isEmpty())
{
if (allNameComponents[curveSetNameComponent.first].count(curveSetNameComponent.second) == 0u)
if (allNameComponents[dataSetNameComponent.first].count(dataSetNameComponent.second) == 0u)
{
componentList += curveSetNameComponent.second;
allNameComponents[curveSetNameComponent.first].insert(curveSetNameComponent.second);
componentList += dataSetNameComponent.second;
allNameComponents[dataSetNameComponent.first].insert(dataSetNameComponent.second);
}
}
}
@ -273,9 +273,9 @@ caf::PdmFieldHandle* RimGridCrossPlot::userDescriptionField()
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlot::detachAllCurves()
{
for (auto curveSet : m_crossPlotCurveSets())
for (auto dataSet : m_crossPlotDataSets())
{
curveSet->detachAllCurves();
dataSet->detachAllCurves();
}
}
@ -345,9 +345,9 @@ void RimGridCrossPlot::setAutoZoomForAllAxes(bool enableAutoZoom)
//--------------------------------------------------------------------------------------------------
caf::PdmObject* RimGridCrossPlot::findRimPlotObjectFromQwtCurve(const QwtPlotCurve* qwtCurve) const
{
for (auto curveSet : m_crossPlotCurveSets)
for (auto dataSet : m_crossPlotDataSets)
{
for (auto curve : curveSet->curves())
for (auto curve : dataSet->curves())
{
if (curve->qwtPlotCurve() == qwtCurve)
{
@ -367,9 +367,9 @@ QWidget* RimGridCrossPlot::createViewWidget(QWidget* mainWindowParent)
{
m_qwtPlot = new RiuGridCrossQwtPlot(this, mainWindowParent);
for (auto curveSet : m_crossPlotCurveSets)
for (auto dataSet : m_crossPlotDataSets)
{
curveSet->setParentQwtPlotNoReplot(m_qwtPlot);
dataSet->setParentQwtPlotNoReplot(m_qwtPlot);
}
m_qwtPlot->replot();
}
@ -397,10 +397,10 @@ void RimGridCrossPlot::onLoadDataAndUpdate()
{
updateMdiWindowVisibility();
for (auto curveSet : m_crossPlotCurveSets)
for (auto dataSet : m_crossPlotDataSets)
{
curveSet->loadDataAndUpdate(false);
curveSet->updateConnectedEditors();
dataSet->loadDataAndUpdate(false);
dataSet->updateConnectedEditors();
}
updateCurveNamesAndPlotTitle();
@ -436,7 +436,7 @@ void RimGridCrossPlot::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrderi
axisFolder->add(&m_xAxisProperties);
axisFolder->add(&m_yAxisProperties);
uiTreeOrdering.add(&m_crossPlotCurveSets);
uiTreeOrdering.add(&m_crossPlotDataSets);
uiTreeOrdering.skipRemainingChildren(true);
}
@ -450,9 +450,9 @@ void RimGridCrossPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
{
if (changedField == &m_legendFontSize)
{
for (auto curveSet : m_crossPlotCurveSets)
for (auto dataSet : m_crossPlotDataSets)
{
curveSet->updateLegendIcons();
dataSet->updateLegendIcons();
}
}
onLoadDataAndUpdate();
@ -504,9 +504,9 @@ void RimGridCrossPlot::updatePlot()
updateAxisDisplay();
for (auto curveSet : m_crossPlotCurveSets)
for (auto dataSet : m_crossPlotDataSets)
{
curveSet->setParentQwtPlotNoReplot(m_qwtPlot);
dataSet->setParentQwtPlotNoReplot(m_qwtPlot);
}
if (m_showLegend())
@ -533,9 +533,9 @@ void RimGridCrossPlot::updatePlot()
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlot::updateCurveNamesAndPlotTitle()
{
for (size_t i = 0; i < m_crossPlotCurveSets.size(); ++i)
for (size_t i = 0; i < m_crossPlotDataSets.size(); ++i)
{
m_crossPlotCurveSets[i]->updateCurveNames(i, m_crossPlotCurveSets.size());
m_crossPlotDataSets[i]->updateCurveNames(i, m_crossPlotDataSets.size());
}
if (m_qwtPlot)
@ -563,9 +563,9 @@ void RimGridCrossPlot::swapAxes()
m_yAxisProperties = xAxisProperties;
m_xAxisProperties = yAxisProperties;
for (auto curveSet : m_crossPlotCurveSets)
for (auto dataSet : m_crossPlotDataSets)
{
curveSet->swapAxisProperties(false);
dataSet->swapAxisProperties(false);
}
loadDataAndUpdate();
@ -576,11 +576,11 @@ void RimGridCrossPlot::swapAxes()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimGridCrossPlot::asciiTitleForPlotExport(int curveSetIndex) const
QString RimGridCrossPlot::asciiTitleForPlotExport(int dataSetIndex) const
{
if ((size_t)curveSetIndex < m_crossPlotCurveSets.size())
if ((size_t)dataSetIndex < m_crossPlotDataSets.size())
{
return m_crossPlotCurveSets[curveSetIndex]->createAutoName();
return m_crossPlotDataSets[dataSetIndex]->createAutoName();
}
return "Data invalid";
}
@ -588,9 +588,9 @@ QString RimGridCrossPlot::asciiTitleForPlotExport(int curveSetIndex) const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimGridCrossPlot::asciiDataForPlotExport(int curveSetIndex) const
QString RimGridCrossPlot::asciiDataForPlotExport(int dataSetIndex) const
{
if ((size_t)curveSetIndex < m_crossPlotCurveSets.size())
if ((size_t)dataSetIndex < m_crossPlotDataSets.size())
{
QString asciiData;
QTextStream stringStream(&asciiData);
@ -601,7 +601,7 @@ QString RimGridCrossPlot::asciiDataForPlotExport(int curveSetIndex) const
formatter.setTableRowLineAppendText("");
formatter.setColumnSpacing(3);
m_crossPlotCurveSets[curveSetIndex]->exportFormattedData(formatter);
m_crossPlotDataSets[dataSetIndex]->exportFormattedData(formatter);
formatter.tableCompleted();
return asciiData;
}
@ -657,11 +657,11 @@ int RimGridCrossPlot::legendFontSize() const
QString RimGridCrossPlot::xAxisParameterString() const
{
QStringList xAxisParams;
for (auto curveSet : m_crossPlotCurveSets)
for (auto dataSet : m_crossPlotDataSets)
{
if (curveSet->isChecked() && curveSet->sampleCount() > 0u)
if (dataSet->isChecked() && dataSet->sampleCount() > 0u)
{
xAxisParams.push_back(curveSet->xAxisName());
xAxisParams.push_back(dataSet->xAxisName());
}
}
@ -681,11 +681,11 @@ QString RimGridCrossPlot::xAxisParameterString() const
QString RimGridCrossPlot::yAxisParameterString() const
{
QStringList yAxisParams;
for (auto curveSet : m_crossPlotCurveSets)
for (auto dataSet : m_crossPlotDataSets)
{
if (curveSet->isChecked() && curveSet->sampleCount() > 0u)
if (dataSet->isChecked() && dataSet->sampleCount() > 0u)
{
yAxisParams.push_back(curveSet->yAxisName());
yAxisParams.push_back(dataSet->yAxisName());
}
}
@ -827,11 +827,11 @@ void RimGridCrossPlot::updateAxisFromQwt(RiaDefines::PlotAxis axisType)
std::vector<const QwtPlotCurve*> RimGridCrossPlot::visibleQwtCurves() const
{
std::vector<const QwtPlotCurve*> plotCurves;
for (auto curveSet : m_crossPlotCurveSets)
for (auto dataSet : m_crossPlotDataSets)
{
if (curveSet->isChecked())
if (dataSet->isChecked())
{
for (auto curve : curveSet->curves())
for (auto curve : dataSet->curves())
{
if (curve->isCurveVisible())
{

View File

@ -29,7 +29,7 @@
#include <QPointer>
class RimPlotAxisProperties;
class RimGridCrossPlotCurveSet;
class RimGridCrossPlotDataSet;
class RiuGridCrossQwtPlot;
class RimGridCrossPlotNameConfig : public RimNameConfig
@ -53,11 +53,11 @@ public:
RimGridCrossPlot();
~RimGridCrossPlot();
RimGridCrossPlotCurveSet* createCurveSet();
int indexOfCurveSet(const RimGridCrossPlotCurveSet* curveSet) const;
void addCurveSet(RimGridCrossPlotCurveSet* curveSet);
RimGridCrossPlotDataSet* createDataSet();
int indexOfDataSet(const RimGridCrossPlotDataSet* dataSet) const;
void addDataSet(RimGridCrossPlotDataSet* dataSet);
std::vector<RimGridCrossPlotCurveSet*> curveSets() const;
std::vector<RimGridCrossPlotDataSet*> dataSets() const;
QWidget* viewWidget() override;
QImage snapshotWindowContent() override;
@ -72,8 +72,8 @@ public:
void performAutoNameUpdate() override;
void updateCurveNamesAndPlotTitle();
void swapAxes();
QString asciiTitleForPlotExport(int curveSetIndex) const;
QString asciiDataForPlotExport(int curveSetIndex) const;
QString asciiTitleForPlotExport(int dataSetIndex) const;
QString asciiDataForPlotExport(int dataSetIndex) const;
RiuGridCrossQwtPlot* qwtPlot() const;
bool isXAxisLogarithmic() const;
bool isYAxisLogarithmic() const;
@ -123,7 +123,7 @@ private:
caf::PdmChildField<RimPlotAxisProperties*> m_yAxisProperties;
caf::PdmChildField<RimPlotAxisProperties*> m_xAxisProperties;
caf::PdmChildArrayField<RimGridCrossPlotCurveSet*> m_crossPlotCurveSets;
caf::PdmChildArrayField<RimGridCrossPlotDataSet*> m_crossPlotDataSets;
QPointer<RiuGridCrossQwtPlot> m_qwtPlot;

View File

@ -46,7 +46,7 @@ CAF_PDM_SOURCE_INIT(RimGridCrossPlotCurve, "GridCrossPlotCurve");
///
//--------------------------------------------------------------------------------------------------
RimGridCrossPlotCurve::RimGridCrossPlotCurve()
: m_curveSetIndex(0)
: m_dataSetIndex(0)
, m_groupIndex(0)
{
CAF_PDM_InitObject("Cross Plot Points", ":/WellLogCurve16x16.png", "", "");
@ -59,10 +59,10 @@ RimGridCrossPlotCurve::RimGridCrossPlotCurve()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurve::setGroupingInformation(int curveSetIndex, int categoryIndex)
void RimGridCrossPlotCurve::setGroupingInformation(int dataSetIndex, int groupIndex)
{
m_curveSetIndex = curveSetIndex;
m_groupIndex = categoryIndex;
m_dataSetIndex = dataSetIndex;
m_groupIndex = groupIndex;
}
//--------------------------------------------------------------------------------------------------
@ -124,7 +124,7 @@ void RimGridCrossPlotCurve::setBlackAndWhiteLegendIcons(bool blackAndWhite)
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurve::determineSymbol()
{
RiuQwtSymbol::PointSymbolEnum symbol = RiuQwtSymbol::cycledSymbolStyle(m_curveSetIndex);
RiuQwtSymbol::PointSymbolEnum symbol = RiuQwtSymbol::cycledSymbolStyle(m_dataSetIndex);
setSymbol(symbol);
}

View File

@ -40,7 +40,7 @@ class RimGridCrossPlotCurve : public RimPlotCurve
public:
RimGridCrossPlotCurve();
~RimGridCrossPlotCurve() override = default;
void setGroupingInformation(int curveSetIndex, int groupIndex);
void setGroupingInformation(int dataSetIndex, int groupIndex);
void setSamples(const std::vector<double>& xValues, const std::vector<double>& yValues);
void setCurveAutoAppearance();
@ -58,7 +58,7 @@ protected:
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
private:
int m_curveSetIndex;
int m_dataSetIndex;
int m_groupIndex;
};

View File

@ -16,7 +16,7 @@
//
/////////////////////////////////////////////////////////////////////////////////
#include "RimGridCrossPlotCurveSet.h"
#include "RimGridCrossPlotDataSet.h"
#include "RiaApplication.h"
#include "RiaColorTables.h"
@ -62,12 +62,12 @@
#include <QString>
CAF_PDM_SOURCE_INIT(RimGridCrossPlotCurveSet, "GridCrossPlotCurveSet");
CAF_PDM_SOURCE_INIT(RimGridCrossPlotDataSet, "GridCrossPlotCurveSet");
namespace caf
{
template<>
void RimGridCrossPlotCurveSet::CurveGroupingEnum::setUp()
void RimGridCrossPlotDataSet::CurveGroupingEnum::setUp()
{
addItem(RigGridCrossPlotCurveGrouping::NO_GROUPING, "NONE", "Nothing");
addItem(RigGridCrossPlotCurveGrouping::GROUP_BY_TIME, "TIME", "Time Step");
@ -80,7 +80,7 @@ void RimGridCrossPlotCurveSet::CurveGroupingEnum::setUp()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimGridCrossPlotCurveSet::RimGridCrossPlotCurveSet()
RimGridCrossPlotDataSet::RimGridCrossPlotDataSet()
{
CAF_PDM_InitObject("Cross Plot Data Set", ":/WellLogCurve16x16.png", "", "");
@ -114,7 +114,7 @@ RimGridCrossPlotCurveSet::RimGridCrossPlotCurveSet()
m_groupingProperty->setTernaryEnabled(false);
CAF_PDM_InitFieldNoDefault(&m_nameConfig, "NameConfig", "Name", "", "", "");
m_nameConfig = new RimGridCrossPlotCurveSetNameConfig(this);
m_nameConfig = new RimGridCrossPlotDataSetNameConfig(this);
m_nameConfig.uiCapability()->setUiTreeHidden(true);
m_nameConfig.uiCapability()->setUiTreeChildrenHidden(true);
@ -136,7 +136,7 @@ RimGridCrossPlotCurveSet::RimGridCrossPlotCurveSet()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::setCellFilterView(RimGridView* cellFilterView)
void RimGridCrossPlotDataSet::setCellFilterView(RimGridView* cellFilterView)
{
m_cellFilterView = cellFilterView;
auto eclipseView = dynamic_cast<RimEclipseView*>(m_cellFilterView());
@ -167,7 +167,7 @@ void RimGridCrossPlotCurveSet::setCellFilterView(RimGridView* cellFilterView)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::loadDataAndUpdate(bool updateParentPlot)
void RimGridCrossPlotDataSet::loadDataAndUpdate(bool updateParentPlot)
{
onLoadDataAndUpdate(updateParentPlot);
}
@ -175,7 +175,7 @@ void RimGridCrossPlotCurveSet::loadDataAndUpdate(bool updateParentPlot)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::setParentQwtPlotNoReplot(QwtPlot* parent)
void RimGridCrossPlotDataSet::setParentQwtPlotNoReplot(QwtPlot* parent)
{
for (auto& curve : m_crossPlotCurves())
{
@ -186,7 +186,7 @@ void RimGridCrossPlotCurveSet::setParentQwtPlotNoReplot(QwtPlot* parent)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimGridCrossPlotCurveSet::xAxisName() const
QString RimGridCrossPlotDataSet::xAxisName() const
{
return m_xAxisProperty->resultVariableUiShortName();
}
@ -194,7 +194,7 @@ QString RimGridCrossPlotCurveSet::xAxisName() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimGridCrossPlotCurveSet::yAxisName() const
QString RimGridCrossPlotDataSet::yAxisName() const
{
return m_yAxisProperty->resultVariableUiShortName();
}
@ -202,7 +202,7 @@ QString RimGridCrossPlotCurveSet::yAxisName() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimGridCrossPlotCurveSet::infoText() const
QString RimGridCrossPlotDataSet::infoText() const
{
if (!m_case()) return "";
@ -232,17 +232,17 @@ QString RimGridCrossPlotCurveSet::infoText() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RimGridCrossPlotCurveSet::indexInPlot() const
int RimGridCrossPlotDataSet::indexInPlot() const
{
RimGridCrossPlot* parent;
this->firstAncestorOrThisOfTypeAsserted(parent);
return parent->indexOfCurveSet(this);
return parent->indexOfDataSet(this);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimGridCrossPlotCurveSet::createAutoName() const
QString RimGridCrossPlotDataSet::createAutoName() const
{
if (m_case() == nullptr)
{
@ -282,7 +282,7 @@ QString RimGridCrossPlotCurveSet::createAutoName() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimGridCrossPlotCurveSet::groupTitle() const
QString RimGridCrossPlotDataSet::groupTitle() const
{
if (m_grouping != NO_GROUPING)
{
@ -294,7 +294,7 @@ QString RimGridCrossPlotCurveSet::groupTitle() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimGridCrossPlotCurveSet::groupParameter() const
QString RimGridCrossPlotDataSet::groupParameter() const
{
if (m_grouping() == GROUP_BY_TIME)
{
@ -314,7 +314,7 @@ QString RimGridCrossPlotCurveSet::groupParameter() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::detachAllCurves()
void RimGridCrossPlotDataSet::detachAllCurves()
{
for (auto curve : m_crossPlotCurves())
{
@ -325,7 +325,7 @@ void RimGridCrossPlotCurveSet::detachAllCurves()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::cellFilterViewUpdated()
void RimGridCrossPlotDataSet::cellFilterViewUpdated()
{
if (m_cellFilterView())
{
@ -336,7 +336,7 @@ void RimGridCrossPlotCurveSet::cellFilterViewUpdated()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimRegularLegendConfig* RimGridCrossPlotCurveSet::legendConfig() const
RimRegularLegendConfig* RimGridCrossPlotDataSet::legendConfig() const
{
return m_groupingProperty->legendConfig();
}
@ -344,7 +344,7 @@ RimRegularLegendConfig* RimGridCrossPlotCurveSet::legendConfig() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimGridCrossPlotCurve*> RimGridCrossPlotCurveSet::curves() const
std::vector<RimGridCrossPlotCurve*> RimGridCrossPlotDataSet::curves() const
{
return m_crossPlotCurves.childObjects();
}
@ -352,7 +352,7 @@ std::vector<RimGridCrossPlotCurve*> RimGridCrossPlotCurveSet::curves() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimGridCrossPlotCurveSet::caseNameString() const
QString RimGridCrossPlotDataSet::caseNameString() const
{
if (m_case())
{
@ -364,7 +364,7 @@ QString RimGridCrossPlotCurveSet::caseNameString() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimGridCrossPlotCurveSet::axisVariableString() const
QString RimGridCrossPlotDataSet::axisVariableString() const
{
return QString("%1 x %2").arg(xAxisName(), yAxisName());
}
@ -372,7 +372,7 @@ QString RimGridCrossPlotCurveSet::axisVariableString() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimGridCrossPlotCurveSet::timeStepString() const
QString RimGridCrossPlotDataSet::timeStepString() const
{
// If using time categorization, the time step will be included as a category, so skip it here.
if (m_grouping() != RigGridCrossPlotCurveGrouping::GROUP_BY_TIME)
@ -392,7 +392,7 @@ QString RimGridCrossPlotCurveSet::timeStepString() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<QString> RimGridCrossPlotCurveSet::groupStrings() const
std::vector<QString> RimGridCrossPlotDataSet::groupStrings() const
{
std::vector<QString> groupStrings;
for (auto curve : m_crossPlotCurves())
@ -405,9 +405,9 @@ std::vector<QString> RimGridCrossPlotCurveSet::groupStrings() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::map<RimGridCrossPlotCurveSet::NameComponents, QString> RimGridCrossPlotCurveSet::nameComponents() const
std::map<RimGridCrossPlotDataSet::NameComponents, QString> RimGridCrossPlotDataSet::nameComponents() const
{
std::map<RimGridCrossPlotCurveSet::NameComponents, QString> componentNames;
std::map<RimGridCrossPlotDataSet::NameComponents, QString> componentNames;
if (m_nameConfig->addCaseName()) componentNames[GCP_CASE_NAME] = caseNameString();
if (m_nameConfig->addAxisVariables()) componentNames[GCP_AXIS_VARIABLES] = axisVariableString();
if (m_nameConfig->addTimestep()) componentNames[GCP_TIME_STEP] = timeStepString();
@ -419,7 +419,7 @@ std::map<RimGridCrossPlotCurveSet::NameComponents, QString> RimGridCrossPlotCurv
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::initAfterRead()
void RimGridCrossPlotDataSet::initAfterRead()
{
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(m_case());
if (eclipseCase)
@ -434,7 +434,7 @@ void RimGridCrossPlotCurveSet::initAfterRead()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::onLoadDataAndUpdate(bool updateParentPlot)
void RimGridCrossPlotDataSet::onLoadDataAndUpdate(bool updateParentPlot)
{
updateDataSetName();
@ -500,7 +500,7 @@ void RimGridCrossPlotCurveSet::onLoadDataAndUpdate(bool updateParentPlot)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::assignCurveDataGroups(const RigEclipseCrossPlotResult& result)
void RimGridCrossPlotDataSet::assignCurveDataGroups(const RigEclipseCrossPlotResult& result)
{
m_groupedResults.clear();
@ -557,7 +557,7 @@ void RimGridCrossPlotCurveSet::assignCurveDataGroups(const RigEclipseCrossPlotRe
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::createCurves(const RigEclipseCrossPlotResult& result)
void RimGridCrossPlotDataSet::createCurves(const RigEclipseCrossPlotResult& result)
{
if (!groupingEnabled())
{
@ -614,7 +614,7 @@ void RimGridCrossPlotCurveSet::createCurves(const RigEclipseCrossPlotResult& res
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::fillCurveDataInExistingCurves(const RigEclipseCrossPlotResult& result)
void RimGridCrossPlotDataSet::fillCurveDataInExistingCurves(const RigEclipseCrossPlotResult& result)
{
if (!groupingEnabled())
{
@ -643,7 +643,7 @@ void RimGridCrossPlotCurveSet::fillCurveDataInExistingCurves(const RigEclipseCro
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::destroyCurves()
void RimGridCrossPlotDataSet::destroyCurves()
{
detachAllCurves();
m_crossPlotCurves.deleteAllChildObjects();
@ -652,7 +652,7 @@ void RimGridCrossPlotCurveSet::destroyCurves()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RimGridCrossPlotCurveSet::visibleCurveCount() const
size_t RimGridCrossPlotDataSet::visibleCurveCount() const
{
size_t visibleCurves = 0;
for (auto curve : m_crossPlotCurves)
@ -665,7 +665,7 @@ size_t RimGridCrossPlotCurveSet::visibleCurveCount() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RimGridCrossPlotCurveSet::sampleCount() const
size_t RimGridCrossPlotDataSet::sampleCount() const
{
size_t sampleCount = 0;
for (auto curve : m_crossPlotCurves)
@ -678,7 +678,7 @@ size_t RimGridCrossPlotCurveSet::sampleCount() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimGridCrossPlotCurveSet::createGroupName(size_t groupIndex) const
QString RimGridCrossPlotDataSet::createGroupName(size_t groupIndex) const
{
if (groupingByCategoryResult())
{
@ -698,7 +698,7 @@ QString RimGridCrossPlotCurveSet::createGroupName(size_t groupIndex) const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::map<int, cvf::UByteArray> RimGridCrossPlotCurveSet::calculateCellVisibility(RimEclipseCase* eclipseCase) const
std::map<int, cvf::UByteArray> RimGridCrossPlotDataSet::calculateCellVisibility(RimEclipseCase* eclipseCase) const
{
std::map<int, cvf::UByteArray> timeStepCellVisibilityMap;
if (m_cellFilterView)
@ -768,7 +768,7 @@ std::map<int, cvf::UByteArray> RimGridCrossPlotCurveSet::calculateCellVisibility
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
void RimGridCrossPlotDataSet::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
{
uiOrdering.add(&m_case);
if (m_case)
@ -804,7 +804,7 @@ void RimGridCrossPlotCurveSet::defineUiOrdering(QString uiConfigName, caf::PdmUi
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
void RimGridCrossPlotDataSet::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue)
{
@ -877,7 +877,7 @@ void RimGridCrossPlotCurveSet::fieldChangedByUi(const caf::PdmFieldHandle* chang
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo> RimGridCrossPlotCurveSet::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
QList<caf::PdmOptionItemInfo> RimGridCrossPlotDataSet::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly)
{
QList<caf::PdmOptionItemInfo> options;
@ -942,7 +942,7 @@ QList<caf::PdmOptionItemInfo> RimGridCrossPlotCurveSet::calculateValueOptions(co
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::updateLegendRange()
void RimGridCrossPlotDataSet::updateLegendRange()
{
legendConfig()->setTitle(groupParameter());
legendConfig()->disableAllTimeStepsRange(!hasMultipleTimeSteps());
@ -992,11 +992,11 @@ void RimGridCrossPlotCurveSet::updateLegendRange()
m_groupingProperty->updateLegendData(eclipseCase, m_timeStep());
}
}
parent->qwtPlot()->addOrUpdateCurveSetLegend(this);
parent->qwtPlot()->addOrUpdateDataSetLegend(this);
}
else
{
parent->qwtPlot()->removeCurveSetLegend(this);
parent->qwtPlot()->removeDataSetLegend(this);
}
}
}
@ -1004,7 +1004,7 @@ void RimGridCrossPlotCurveSet::updateLegendRange()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::updateLegendIcons()
void RimGridCrossPlotDataSet::updateLegendIcons()
{
for (auto curve : m_crossPlotCurves)
{
@ -1016,7 +1016,7 @@ void RimGridCrossPlotCurveSet::updateLegendIcons()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimGridCrossPlotCurveSet::groupingByCategoryResult() const
bool RimGridCrossPlotDataSet::groupingByCategoryResult() const
{
if (m_grouping == GROUP_BY_FORMATION || m_grouping == GROUP_BY_TIME)
{
@ -1032,7 +1032,7 @@ bool RimGridCrossPlotCurveSet::groupingByCategoryResult() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimGridCrossPlotCurveSet::groupingEnabled() const
bool RimGridCrossPlotDataSet::groupingEnabled() const
{
if (m_grouping != NO_GROUPING)
{
@ -1048,7 +1048,7 @@ bool RimGridCrossPlotCurveSet::groupingEnabled() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::swapAxisProperties(bool updatePlot)
void RimGridCrossPlotDataSet::swapAxisProperties(bool updatePlot)
{
RimEclipseResultDefinition* xAxisProperties = m_xAxisProperty();
RimEclipseResultDefinition* yAxisProperties = m_yAxisProperty();
@ -1065,7 +1065,7 @@ void RimGridCrossPlotCurveSet::swapAxisProperties(bool updatePlot)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::exportFormattedData(RifEclipseDataTableFormatter& formatter) const
void RimGridCrossPlotDataSet::exportFormattedData(RifEclipseDataTableFormatter& formatter) const
{
if (m_groupedResults.empty()) return;
@ -1115,7 +1115,7 @@ void RimGridCrossPlotCurveSet::exportFormattedData(RifEclipseDataTableFormatter&
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimGridCrossPlotCurveSet::isXAxisLogarithmic() const
bool RimGridCrossPlotDataSet::isXAxisLogarithmic() const
{
RimGridCrossPlot* parent = nullptr;
firstAncestorOrThisOfTypeAsserted(parent);
@ -1125,7 +1125,7 @@ bool RimGridCrossPlotCurveSet::isXAxisLogarithmic() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimGridCrossPlotCurveSet::isYAxisLogarithmic() const
bool RimGridCrossPlotDataSet::isYAxisLogarithmic() const
{
RimGridCrossPlot* parent = nullptr;
firstAncestorOrThisOfTypeAsserted(parent);
@ -1135,7 +1135,7 @@ bool RimGridCrossPlotCurveSet::isYAxisLogarithmic() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::configureForPressureSaturationCurves(RimEclipseResultCase* eclipseCase,
void RimGridCrossPlotDataSet::configureForPressureSaturationCurves(RimEclipseResultCase* eclipseCase,
const QString& dynamicResultName)
{
m_case = eclipseCase;
@ -1161,7 +1161,7 @@ void RimGridCrossPlotCurveSet::configureForPressureSaturationCurves(RimEclipseRe
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::addCellFilter(RimPlotCellFilter* cellFilter)
void RimGridCrossPlotDataSet::addCellFilter(RimPlotCellFilter* cellFilter)
{
m_plotCellFilterCollection->addCellFilter(cellFilter);
}
@ -1169,7 +1169,7 @@ void RimGridCrossPlotCurveSet::addCellFilter(RimPlotCellFilter* cellFilter)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::setCustomColor(const cvf::Color3f color)
void RimGridCrossPlotDataSet::setCustomColor(const cvf::Color3f color)
{
m_useCustomColor = true;
m_customColor = color;
@ -1178,7 +1178,7 @@ void RimGridCrossPlotCurveSet::setCustomColor(const cvf::Color3f color)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::triggerPlotNameUpdateAndReplot()
void RimGridCrossPlotDataSet::triggerPlotNameUpdateAndReplot()
{
RimGridCrossPlot* parent;
this->firstAncestorOrThisOfType(parent);
@ -1193,17 +1193,17 @@ void RimGridCrossPlotCurveSet::triggerPlotNameUpdateAndReplot()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::updateCurveNames(size_t curveSetIndex, size_t curveSetCount)
void RimGridCrossPlotDataSet::updateCurveNames(size_t dataSetIndex, size_t dataSetCount)
{
for (size_t i = 0; i < m_crossPlotCurves.size(); ++i)
{
QString curveSetName = createAutoName();
if (curveSetName.isEmpty())
QString dataSetName = createAutoName();
if (dataSetName.isEmpty())
{
if (curveSetCount > 1u)
curveSetName = QString("Curve Set #%1").arg(curveSetIndex + 1);
if (dataSetCount > 1u)
dataSetName = QString("DataSet #%1").arg(dataSetIndex + 1);
else
curveSetName = "Curve Set";
dataSetName = "Data Set";
}
auto curve = m_crossPlotCurves[i];
@ -1211,11 +1211,11 @@ void RimGridCrossPlotCurveSet::updateCurveNames(size_t curveSetIndex, size_t cur
{
QString curveGroupName = createGroupName(curve->groupIndex());
curve->setCustomName(curveGroupName);
curve->setLegendEntryText(curveSetName);
curve->setLegendEntryText(dataSetName);
}
else
{
curve->setCustomName(curveSetName);
curve->setCustomName(dataSetName);
}
curve->updateCurveNameAndUpdatePlotLegendAndTitle();
}
@ -1224,7 +1224,7 @@ void RimGridCrossPlotCurveSet::updateCurveNames(size_t curveSetIndex, size_t cur
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::updateDataSetName()
void RimGridCrossPlotDataSet::updateDataSetName()
{
this->setName(createAutoName());
}
@ -1232,7 +1232,7 @@ void RimGridCrossPlotCurveSet::updateDataSetName()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::performAutoNameUpdate()
void RimGridCrossPlotDataSet::performAutoNameUpdate()
{
updateDataSetName();
triggerPlotNameUpdateAndReplot();
@ -1241,7 +1241,7 @@ void RimGridCrossPlotCurveSet::performAutoNameUpdate()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::setDefaults()
void RimGridCrossPlotDataSet::setDefaults()
{
RimProject* project = RiaApplication::instance()->project();
if (project)
@ -1266,7 +1266,7 @@ void RimGridCrossPlotCurveSet::setDefaults()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::defineEditorAttribute(const caf::PdmFieldHandle* field,
void RimGridCrossPlotDataSet::defineEditorAttribute(const caf::PdmFieldHandle* field,
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute)
{
@ -1275,7 +1275,7 @@ void RimGridCrossPlotCurveSet::defineEditorAttribute(const caf::PdmFieldHandle*
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
void RimGridCrossPlotDataSet::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
{
if (groupingEnabled())
{
@ -1295,7 +1295,7 @@ void RimGridCrossPlotCurveSet::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTr
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimGridCrossPlotCurveSet::hasMultipleTimeSteps() const
bool RimGridCrossPlotDataSet::hasMultipleTimeSteps() const
{
return m_timeStep() == -1 && (m_xAxisProperty->hasDynamicResult() || m_yAxisProperty->hasDynamicResult());
}
@ -1303,7 +1303,7 @@ bool RimGridCrossPlotCurveSet::hasMultipleTimeSteps() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSet::filterInvalidCurveValues(RigEclipseCrossPlotResult* result)
void RimGridCrossPlotDataSet::filterInvalidCurveValues(RigEclipseCrossPlotResult* result)
{
bool xLog = isXAxisLogarithmic();
bool yLog = isYAxisLogarithmic();
@ -1335,15 +1335,15 @@ void RimGridCrossPlotCurveSet::filterInvalidCurveValues(RigEclipseCrossPlotResul
}
}
CAF_PDM_SOURCE_INIT(RimGridCrossPlotCurveSetNameConfig, "RimGridCrossPlotCurveSetNameConfig");
CAF_PDM_SOURCE_INIT(RimGridCrossPlotDataSetNameConfig, "RimGridCrossPlotCurveSetNameConfig");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimGridCrossPlotCurveSetNameConfig::RimGridCrossPlotCurveSetNameConfig(RimNameConfigHolderInterface* parent)
RimGridCrossPlotDataSetNameConfig::RimGridCrossPlotDataSetNameConfig(RimNameConfigHolderInterface* parent)
: RimNameConfig(parent)
{
CAF_PDM_InitObject("Cross Plot Curve Set NameGenerator", "", "", "");
CAF_PDM_InitObject("Cross Plot Data Set NameGenerator", "", "", "");
CAF_PDM_InitField(&addCaseName, "AddCaseName", true, "Add Case Name", "", "", "");
CAF_PDM_InitField(&addAxisVariables, "AddAxisVariables", true, "Add Axis Variables", "", "", "");
@ -1356,7 +1356,7 @@ RimGridCrossPlotCurveSetNameConfig::RimGridCrossPlotCurveSetNameConfig(RimNameCo
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlotCurveSetNameConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
void RimGridCrossPlotDataSetNameConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
{
uiOrdering.add(&addCaseName);
uiOrdering.add(&addAxisVariables);

View File

@ -53,12 +53,12 @@ class QString;
class RimPlotCellFilterCollection;
class RimPlotCellFilter;
class RimGridCrossPlotCurveSetNameConfig : public RimNameConfig
class RimGridCrossPlotDataSetNameConfig : public RimNameConfig
{
CAF_PDM_HEADER_INIT;
public:
RimGridCrossPlotCurveSetNameConfig(RimNameConfigHolderInterface* parent = nullptr);
RimGridCrossPlotDataSetNameConfig(RimNameConfigHolderInterface* parent = nullptr);
caf::PdmField<bool> addCaseName;
caf::PdmField<bool> addAxisVariables;
@ -73,7 +73,7 @@ protected:
///
///
//==================================================================================================
class RimGridCrossPlotCurveSet : public RimCheckableNamedObject, public RimNameConfigHolderInterface
class RimGridCrossPlotDataSet : public RimCheckableNamedObject, public RimNameConfigHolderInterface
{
CAF_PDM_HEADER_INIT;
@ -89,8 +89,8 @@ public:
};
public:
RimGridCrossPlotCurveSet();
~RimGridCrossPlotCurveSet() = default;
RimGridCrossPlotDataSet();
~RimGridCrossPlotDataSet() = default;
void setCellFilterView(RimGridView* cellFilterView);
void loadDataAndUpdate(bool updateParentPlot);
@ -117,7 +117,7 @@ public:
std::map<NameComponents, QString> nameComponents() const;
void updateCurveNames(size_t curveSetIndex, size_t curveSetCount);
void updateCurveNames(size_t dataSetIndex, size_t dataSetCount);
void updateLegendRange();
void updateLegendIcons();
bool groupingByCategoryResult() const;
@ -172,7 +172,7 @@ private:
caf::PdmChildField<RimEclipseResultDefinition*> m_yAxisProperty;
caf::PdmChildField<RimEclipseCellColors*> m_groupingProperty;
caf::PdmChildField<RimGridCrossPlotCurveSetNameConfig*> m_nameConfig;
caf::PdmChildField<RimGridCrossPlotDataSetNameConfig*> m_nameConfig;
caf::PdmChildArrayField<RimGridCrossPlotCurve*> m_crossPlotCurves;

View File

@ -24,7 +24,7 @@
#include "RimEclipseResultCase.h"
#include "RimEclipseResultDefinition.h"
#include "RimGridCrossPlotCurveSet.h"
#include "RimGridCrossPlotDataSet.h"
#include "RimPlotAxisAnnotation.h"
#include "RimPlotAxisProperties.h"
@ -65,7 +65,7 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion(RiaDefines::Poros
{
// Blue PRESSURE curve with data for specified EQLNUM value
RimGridCrossPlotCurveSet* curveSet = createCurveSet();
RimGridCrossPlotDataSet* curveSet = createDataSet();
curveSet->configureForPressureSaturationCurves(eclipseResultCase, "PRESSURE");
cvf::Color3f curveColor = RiaColorTables::summaryCurveBluePaletteColors().cycledColor3f(0);
@ -80,7 +80,7 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion(RiaDefines::Poros
{
// Red dew pressure (PDEW) curve with data for specified EQLNUM value, filtered on depth by gasOilContact
RimGridCrossPlotCurveSet* curveSet = createCurveSet();
RimGridCrossPlotDataSet* curveSet = createDataSet();
curveSet->configureForPressureSaturationCurves(eclipseResultCase, "PDEW");
cvf::Color3f curveColor = RiaColorTables::summaryCurveRedPaletteColors().cycledColor3f(0);
@ -113,7 +113,7 @@ void RimSaturationPressurePlot::assignCaseAndEquilibriumRegion(RiaDefines::Poros
// Green bubble point pressure (PBUB) curve with data for specified EQLNUM value, filtered on depth between gasOilContact
// and waterOilContactDepth
RimGridCrossPlotCurveSet* curveSet = createCurveSet();
RimGridCrossPlotDataSet* curveSet = createDataSet();
curveSet->configureForPressureSaturationCurves(eclipseResultCase, "PBUB");
cvf::Color3f curveColor = RiaColorTables::summaryCurveGreenPaletteColors().cycledColor3f(0);

View File

@ -60,7 +60,7 @@
#include "RimGridCollection.h"
#include "RimGridCrossPlot.h"
#include "RimGridCrossPlotCollection.h"
#include "RimGridCrossPlotCurveSet.h"
#include "RimGridCrossPlotDataSet.h"
#include "RimIdenticalGridCaseGroup.h"
#include "RimIntersection.h"
#include "RimIntersectionBox.h"
@ -480,16 +480,16 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
}
else if (dynamic_cast<RimGridCrossPlot*>(uiItem))
{
menuBuilder << "RicPasteGridCrossPlotCurveSetFeature";
menuBuilder << "RicPasteGridCrossPlotDataSetFeature";
menuBuilder << "Separator";
menuBuilder << "RicCreateGridCrossPlotCurveSetFeature";
menuBuilder << "RicSwapGridCrossPlotCurveSetAxesFeature";
menuBuilder << "RicCreateGridCrossPlotDataSetFeature";
menuBuilder << "RicSwapGridCrossPlotDataSetAxesFeature";
}
else if (dynamic_cast<RimGridCrossPlotCurveSet*>(uiItem))
else if (dynamic_cast<RimGridCrossPlotDataSet*>(uiItem))
{
menuBuilder << "RicPasteGridCrossPlotCurveSetFeature";
menuBuilder << "RicPasteGridCrossPlotDataSetFeature";
menuBuilder << "Separator";
menuBuilder << "RicSwapGridCrossPlotCurveSetAxesFeature";
menuBuilder << "RicSwapGridCrossPlotDataSetAxesFeature";
}
else if (dynamic_cast<RimSummaryPlot*>(uiItem)) // This is also the definition for RimSummaryCrossPlot
{

View File

@ -41,7 +41,7 @@
#include "RimEclipseView.h"
#include "RimFlowDiagSolution.h"
#include "RimGridCrossPlot.h"
#include "RimGridCrossPlotCurveSet.h"
#include "RimGridCrossPlotDataSet.h"
#include "RimGridTimeHistoryCurve.h"
#include "RimIntersectionCollection.h"
#include "RimPlotCurve.h"
@ -377,7 +377,7 @@ void RimEclipseResultDefinition::updateAnyFieldHasChanged()
cellColors->updateConnectedEditors();
}
RimGridCrossPlotCurveSet* crossPlotCurveSet = nullptr;
RimGridCrossPlotDataSet* crossPlotCurveSet = nullptr;
this->firstAncestorOrThisOfType(crossPlotCurveSet);
if (crossPlotCurveSet)
{
@ -493,7 +493,7 @@ void RimEclipseResultDefinition::loadDataAndUpdate()
}
}
RimGridCrossPlotCurveSet* crossPlotCurveSet = nullptr;
RimGridCrossPlotDataSet* crossPlotCurveSet = nullptr;
this->firstAncestorOrThisOfType(crossPlotCurveSet);
if (crossPlotCurveSet)
{

View File

@ -56,7 +56,7 @@
#include "RimFracture.h"
#include "RimFractureTemplateCollection.h"
#include "RimGridCollection.h"
#include "RimGridCrossPlotCurveSet.h"
#include "RimGridCrossPlotDataSet.h"
#include "RimIntersection.h"
#include "RimIntersectionCollection.h"
#include "RimOilField.h"
@ -563,7 +563,7 @@ void RimEclipseView::createDisplayModel()
}
}
std::vector<RimGridCrossPlotCurveSet*> curveSets;
std::vector<RimGridCrossPlotDataSet*> curveSets;
this->objectsWithReferringPtrFieldsOfType(curveSets);
for (auto curveSet : curveSets)
{

View File

@ -31,7 +31,7 @@
#include "RimEnsembleCurveSetColorManager.h"
#include "RimEclipseView.h"
#include "RimGeoMechResultDefinition.h"
#include "RimGridCrossPlotCurveSet.h"
#include "RimGridCrossPlotDataSet.h"
#include "RimIntersectionCollection.h"
#include "RimStimPlanColors.h"
#include "RimViewLinker.h"
@ -258,7 +258,7 @@ void RimRegularLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changed
ensembleCurveSet->onLegendDefinitionChanged();
}
RimGridCrossPlotCurveSet* crossPlotCurveSet;
RimGridCrossPlotDataSet* crossPlotCurveSet;
firstAncestorOrThisOfType(crossPlotCurveSet);
if (crossPlotCurveSet)
{
@ -877,7 +877,7 @@ QList<caf::PdmOptionItemInfo> RimRegularLegendConfig::calculateValueOptions(cons
this->firstAncestorOrThisOfType(ensembleCurveSet);
if (ensembleCurveSet) hasEnsembleCurveSetParent = true;
RimGridCrossPlotCurveSet* crossPlotCurveSet = nullptr;
RimGridCrossPlotDataSet* crossPlotCurveSet = nullptr;
this->firstAncestorOrThisOfType(crossPlotCurveSet);
bool isCategoryResult = false;

View File

@ -23,7 +23,7 @@
#include "RiuWidgetDragger.h"
#include "RimGridCrossPlot.h"
#include "RimGridCrossPlotCurveSet.h"
#include "RimGridCrossPlotDataSet.h"
#include "RimGridCrossPlotCurve.h"
#include "RimRegularLegendConfig.h"
@ -76,15 +76,15 @@ RiuGridCrossQwtPlot::~RiuGridCrossQwtPlot()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuGridCrossQwtPlot::addOrUpdateCurveSetLegend(RimGridCrossPlotCurveSet* curveSet)
void RiuGridCrossQwtPlot::addOrUpdateDataSetLegend(RimGridCrossPlotDataSet* dataSet)
{
RiuCvfOverlayItemWidget* overlayWidget = nullptr;
auto it = m_legendWidgets.find(curveSet);
auto it = m_legendWidgets.find(dataSet);
if (it == m_legendWidgets.end() || it->second == nullptr)
{
overlayWidget = new RiuCvfOverlayItemWidget(this, canvas());
m_legendWidgets[curveSet] = overlayWidget;
m_legendWidgets[dataSet] = overlayWidget;
}
else
{
@ -93,7 +93,7 @@ void RiuGridCrossQwtPlot::addOrUpdateCurveSetLegend(RimGridCrossPlotCurveSet* cu
if (overlayWidget)
{
caf::TitledOverlayFrame* overlayItem = curveSet->legendConfig()->titledOverlayFrame();
caf::TitledOverlayFrame* overlayItem = dataSet->legendConfig()->titledOverlayFrame();
resizeOverlayItemToFitPlot(overlayItem);
overlayWidget->updateFromOverlayItem(overlayItem);
}
@ -103,9 +103,9 @@ void RiuGridCrossQwtPlot::addOrUpdateCurveSetLegend(RimGridCrossPlotCurveSet* cu
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuGridCrossQwtPlot::removeCurveSetLegend(RimGridCrossPlotCurveSet* curveSetToShowLegendFor)
void RiuGridCrossQwtPlot::removeDataSetLegend(RimGridCrossPlotDataSet* dataSetToShowLegendFor)
{
auto it = m_legendWidgets.find(curveSetToShowLegendFor);
auto it = m_legendWidgets.find(dataSetToShowLegendFor);
if (it != m_legendWidgets.end())
{
if (it->second != nullptr) it->second->deleteLater();
@ -126,15 +126,15 @@ void RiuGridCrossQwtPlot::updateLegendSizesToMatchPlot()
bool anyLegendResized = false;
for (RimGridCrossPlotCurveSet* curveSet : crossPlot->curveSets())
for (RimGridCrossPlotDataSet* dataSet : crossPlot->dataSets())
{
if (!curveSet->isChecked() || !curveSet->legendConfig()->showLegend()) continue;
if (!dataSet->isChecked() || !dataSet->legendConfig()->showLegend()) continue;
auto pairIt = m_legendWidgets.find(curveSet);
auto pairIt = m_legendWidgets.find(dataSet);
if (pairIt != m_legendWidgets.end())
{
RiuCvfOverlayItemWidget* overlayWidget = pairIt->second;
caf::TitledOverlayFrame* overlayItem = curveSet->legendConfig()->titledOverlayFrame();
caf::TitledOverlayFrame* overlayItem = dataSet->legendConfig()->titledOverlayFrame();
if (resizeOverlayItemToFitPlot(overlayItem))
{
anyLegendResized = true;
@ -183,10 +183,10 @@ void RiuGridCrossQwtPlot::updateInfoBoxLayout()
if (crossPlot->showInfoBox())
{
QStringList curveInfoTexts;
for (auto curveSet : crossPlot->curveSets())
for (auto dataSet : crossPlot->dataSets())
{
QString curveInfoText = curveSet->infoText();
if (curveSet->isChecked() && !curveInfoText.isEmpty())
QString curveInfoText = dataSet->infoText();
if (dataSet->isChecked() && !curveInfoText.isEmpty())
{
curveInfoTexts += curveInfoText;
}
@ -246,17 +246,17 @@ void RiuGridCrossQwtPlot::updateLegendLayout()
std::set<QString> legendTypes;
for (RimGridCrossPlotCurveSet* curveSet : crossPlot->curveSets())
for (RimGridCrossPlotDataSet* dataSet : crossPlot->dataSets())
{
if (!curveSet->isChecked() || !curveSet->legendConfig()->showLegend()) continue;
if (!dataSet->isChecked() || !dataSet->legendConfig()->showLegend()) continue;
auto pairIt = m_legendWidgets.find(curveSet);
auto pairIt = m_legendWidgets.find(dataSet);
if (pairIt != m_legendWidgets.end())
{
RiuCvfOverlayItemWidget* overlayWidget = pairIt->second;
// Show only one copy of each legend type
if (!legendTypes.count(curveSet->groupParameter()))
if (!legendTypes.count(dataSet->groupParameter()))
{
if (ypos + overlayWidget->height() + spacing > this->canvas()->height())
{
@ -270,7 +270,7 @@ void RiuGridCrossQwtPlot::updateLegendLayout()
ypos += pairIt->second->height() + spacing;
maxColumnWidth = std::max(maxColumnWidth, pairIt->second->width());
legendTypes.insert(curveSet->groupParameter());
legendTypes.insert(dataSet->groupParameter());
}
}
}
@ -326,7 +326,7 @@ void RiuGridCrossQwtPlot::contextMenuEvent(QContextMenuEvent* event)
caf::SelectionManager::instance()->setSelectedItem(ownerViewWindow());
menuBuilder << "RicSwapGridCrossPlotCurveSetAxesFeature";
menuBuilder << "RicSwapGridCrossPlotDataSetAxesFeature";
menuBuilder << "Separator";
menuBuilder << "RicShowPlotDataFeature";
@ -389,12 +389,12 @@ bool RiuGridCrossQwtPlot::curveText(const QwtPlotCurve* curve,
{
*curveTitle = crossPlotCurve->curveName();
RimGridCrossPlotCurveSet* curveSet = nullptr;
crossPlotCurve->firstAncestorOrThisOfType(curveSet);
if (curveSet)
RimGridCrossPlotDataSet* dataSet = nullptr;
crossPlotCurve->firstAncestorOrThisOfType(dataSet);
if (dataSet)
{
*xParamName = curveSet->xAxisName();
*yParamName = curveSet->yAxisName();
*xParamName = dataSet->xAxisName();
*yParamName = dataSet->yAxisName();
return true;
}
}

View File

@ -27,7 +27,7 @@
#include <memory>
class RimGridCrossPlotCurveSet;
class RimGridCrossPlotDataSet;
class RimPlotAxisProperties;
class RiuCvfOverlayItemWidget;
class RiuDraggableOverlayFrame;
@ -50,8 +50,8 @@ class RiuGridCrossQwtPlot : public RiuQwtPlot
public:
RiuGridCrossQwtPlot(RimViewWindow* ownerViewWindow, QWidget* parent = nullptr);
~RiuGridCrossQwtPlot();
void addOrUpdateCurveSetLegend(RimGridCrossPlotCurveSet* curveSetToShowLegendFor);
void removeCurveSetLegend(RimGridCrossPlotCurveSet* curveSetToShowLegendFor);
void addOrUpdateDataSetLegend(RimGridCrossPlotDataSet* dataSetToShowLegendFor);
void removeDataSetLegend(RimGridCrossPlotDataSet* dataSetToShowLegendFor);
void updateLegendSizesToMatchPlot();
void updateAnnotationObjects(RimPlotAxisProperties* axisProperties);
@ -67,12 +67,12 @@ protected:
void clearSampleSelection() override;
bool curveText(const QwtPlotCurve* curve, QString* curveTitle, QString* xParamName, QString* yParamName) const;
private:
typedef caf::PdmPointer<RimGridCrossPlotCurveSet> CurveSetPtr;
typedef caf::PdmPointer<RimGridCrossPlotDataSet> DataSetPtr;
typedef QPointer<RiuCvfOverlayItemWidget> LegendPtr;
typedef QPointer<RiuDraggableOverlayFrame> InfoBoxPtr;
InfoBoxPtr m_infoBox;
std::map<CurveSetPtr, LegendPtr> m_legendWidgets;
std::map<DataSetPtr, LegendPtr> m_legendWidgets;
std::unique_ptr<RiuPlotAnnotationTool> m_annotationTool;
QwtPlotMarker* m_selectedPointMarker;