(#490) Added user description field to well log plot tracks

This commit is contained in:
Pål Hagen 2015-09-18 11:07:21 +02:00
parent 2653bcf1a9
commit 59efb31523
4 changed files with 24 additions and 1 deletions

View File

@ -51,6 +51,7 @@ void RicNewWellLogPlotFeature::onActionTriggered(bool isChecked)
RimWellLogPlotTrace* plotTrace = new RimWellLogPlotTrace();
plot->addTrace(plotTrace);
plotTrace->setDescription(QString("Track %1").arg(plot->traceCount()));
plot->loadDataAndUpdate();
plot->updateConnectedEditors();

View File

@ -51,7 +51,7 @@ void RicNewWellLogPlotTraceFeature::onActionTriggered(bool isChecked)
{
RimWellLogPlotTrace* plotTrace = new RimWellLogPlotTrace;
wellLogPlot->addTrace(plotTrace);
plotTrace->setUiName(QString("Trace %1").arg(wellLogPlot->traceCount()));
plotTrace->setDescription(QString("Track %1").arg(wellLogPlot->traceCount()));
wellLogPlot->updateConnectedEditors();
RicNewWellLogCurveExtractionFeature::addCurve(plotTrace);

View File

@ -44,6 +44,8 @@ RimWellLogPlotTrace::RimWellLogPlotTrace()
{
CAF_PDM_InitObject("Trace", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_userName, "TrackDescription", "Name", "", "", "");
CAF_PDM_InitField(&m_show, "Show", true, "Show trace", "", "", "");
m_show.uiCapability()->setUiHidden(true);
@ -62,6 +64,14 @@ RimWellLogPlotTrace::~RimWellLogPlotTrace()
delete m_viewer;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrace::setDescription(const QString& description)
{
m_userName = description;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -86,6 +96,14 @@ caf::PdmFieldHandle* RimWellLogPlotTrace::objectToggleField()
return &m_show;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimWellLogPlotTrace::userDescriptionField()
{
return &m_userName;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -43,6 +43,8 @@ public:
RimWellLogPlotTrace();
virtual ~RimWellLogPlotTrace();
void setDescription(const QString& description);
void addCurve(RimWellLogPlotCurve* curve);
size_t curveCount() { return curves.size(); }
@ -64,9 +66,11 @@ protected:
// Overridden PDM methods
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
virtual caf::PdmFieldHandle* objectToggleField();
virtual caf::PdmFieldHandle* userDescriptionField();
private:
caf::PdmField<bool> m_show;
caf::PdmField<QString> m_userName;
caf::PdmChildArrayField<RimWellLogPlotCurve*> curves;
caf::PdmField<double> m_minimumValue;
caf::PdmField<double> m_maximumValue;