mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#490) Added user description field to well log plot tracks
This commit is contained in:
parent
2653bcf1a9
commit
59efb31523
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user