mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-16 10:22:15 -05:00
Basic well log plot functionality with dummy data up & running
Traces can be added to and deleted from well log plots, and curves with dummy data can be added and deleted. TODO: Replace dummy data with real well log data and data extracted from the model.
This commit is contained in:
1 parent
3f09c1bc66
commit
9d4f9d617f
10 files changed
+172
-34
No files matched your search
@@ -24,6 +24,8 @@
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogPlotTrace.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -46,28 +48,12 @@ RiuWellLogPlot::~RiuWellLogPlot()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWellLogPlot::update(const RimWellLogPlot& plot)
|
||||
RiuWellLogTracePlot* RiuWellLogPlot::createTracePlot()
|
||||
{
|
||||
clear();
|
||||
RiuWellLogTracePlot* tracePlot = new RiuWellLogTracePlot(this);
|
||||
|
||||
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();
|
||||
m_layout->addWidget(tracePlot);
|
||||
m_tracePlots.append(tracePlot);
|
||||
|
||||
return tracePlot;
|
||||
}
|
||||
@@ -39,11 +39,10 @@ public:
|
||||
RiuWellLogPlot(QWidget* parent = NULL);
|
||||
virtual ~RiuWellLogPlot();
|
||||
|
||||
void update(const RimWellLogPlot& plot);
|
||||
void clear();
|
||||
RiuWellLogTracePlot* createTracePlot();
|
||||
|
||||
private:
|
||||
QHBoxLayout* m_layout;
|
||||
QList<RiuWellLogTracePlot*> m_children;
|
||||
QList<RiuWellLogTracePlot*> m_tracePlots;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user