(#411) Added description/name field to well log plot

Setting default name when adding through command feature.
This commit is contained in:
Pål Hagen 2015-09-04 16:45:09 +02:00
parent 752c4071b9
commit 15d34498e3
3 changed files with 20 additions and 6 deletions

View File

@ -50,12 +50,14 @@ void RicNewWellLogPlotFeature::onActionTriggered(bool isChecked)
if (wellLogPlotColl)
{
RimWellLogPlot* plot = new RimWellLogPlot();
RimWellLogPlotTrace* plotrace = new RimWellLogPlotTrace();
plot->addTrace(plotrace);
plot->loadDataAndUpdate();
wellLogPlotColl->wellLogPlots().push_back(plot);
RimWellLogPlotTrace* plotrace = new RimWellLogPlotTrace();
plot->addTrace(plotrace);
plot->setDescription(QString("Well Log Plot %1").arg(wellLogPlotCollection()->wellLogPlots.size()));
plot->loadDataAndUpdate();
RiaApplication::instance()->project()->updateConnectedEditors();
RiuMainWindow::instance()->setCurrentObjectInTreeView(plot);
}

View File

@ -48,6 +48,7 @@ RimWellLogPlot::RimWellLogPlot()
CAF_PDM_InitField(&showWindow, "ShowWindow", true, "Show well log plot", "", "", "");
showWindow.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&m_userName, "PlotDescription", "Name", "", "", "");
CAF_PDM_InitField(&m_minimumVisibleDepth, "MinimumDepth", 0.0, "Minimum depth", "", "", "");
CAF_PDM_InitField(&m_maximumVisibleDepth, "MaximumDepth", 1000.0, "Maximum depth", "", "", "");
@ -330,3 +331,11 @@ void RimWellLogPlot::detachAllCurves()
traces[tIdx]->detachAllCurves();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogPlot::setDescription(const QString& description)
{
m_userName = description;
}

View File

@ -40,6 +40,8 @@ public:
RimWellLogPlot();
virtual ~RimWellLogPlot();
void setDescription(const QString& description);
void addTrace(RimWellLogPlotTrace* trace);
size_t traceCount() { return traces.size();}
@ -82,8 +84,9 @@ private:
caf::PdmChildArrayField<RimWellLogPlotTrace*> traces;
caf::PdmField<double> m_minimumVisibleDepth;
caf::PdmField<double> m_maximumVisibleDepth;
caf::PdmField<QString> m_userName;
caf::PdmField<double> m_minimumVisibleDepth;
caf::PdmField<double> m_maximumVisibleDepth;
double m_depthRangeMinimum;
double m_depthRangeMaximum;