mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Well log plots now contain one plot per trace
This commit is contained in:
@@ -19,12 +19,21 @@
|
||||
|
||||
#include "RiuWellLogPlot.h"
|
||||
|
||||
#include "RiuWellLogTracePlot.h"
|
||||
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogPlotTrace.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuWellLogPlot::RiuWellLogPlot(QWidget* parent)
|
||||
: QwtPlot(parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
m_layout = new QHBoxLayout(this);
|
||||
setLayout(m_layout);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -33,3 +42,32 @@ RiuWellLogPlot::RiuWellLogPlot(QWidget* parent)
|
||||
RiuWellLogPlot::~RiuWellLogPlot()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWellLogPlot::update(const RimWellLogPlot& plot)
|
||||
{
|
||||
clear();
|
||||
|
||||
for (size_t traceIdx = 0; traceIdx < plot.traces.size(); traceIdx++)
|
||||
{
|
||||
RiuWellLogTracePlot* tracePlot = new RiuWellLogTracePlot(this);
|
||||
m_layout->addWidget(tracePlot);
|
||||
m_children.append(tracePlot);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWellLogPlot::clear()
|
||||
{
|
||||
for (int childIdx = 0; childIdx < m_children.size(); childIdx++)
|
||||
{
|
||||
m_layout->removeWidget(m_children[childIdx]);
|
||||
delete m_children[childIdx];
|
||||
}
|
||||
|
||||
m_children.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user