mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#396) Showing default legend on top of the plot
This commit is contained in:
parent
adba5ba6fc
commit
65f0c5fb42
@ -20,6 +20,7 @@
|
|||||||
#include "RiuWellLogTracePlot.h"
|
#include "RiuWellLogTracePlot.h"
|
||||||
|
|
||||||
#include "qwt_plot_grid.h"
|
#include "qwt_plot_grid.h"
|
||||||
|
#include "qwt_legend.h"
|
||||||
#include "qwt_scale_engine.h"
|
#include "qwt_scale_engine.h"
|
||||||
#include "qwt_plot_magnifier.h"
|
#include "qwt_plot_magnifier.h"
|
||||||
#include "qwt_plot_panner.h"
|
#include "qwt_plot_panner.h"
|
||||||
@ -33,6 +34,9 @@ RiuWellLogTracePlot::RiuWellLogTracePlot(QWidget* parent)
|
|||||||
m_grid = new QwtPlotGrid();
|
m_grid = new QwtPlotGrid();
|
||||||
m_grid->attach(this);
|
m_grid->attach(this);
|
||||||
|
|
||||||
|
m_legend = new QwtLegend(this);
|
||||||
|
insertLegend(m_legend, QwtPlot::TopLegend);
|
||||||
|
|
||||||
QwtPlotMagnifier* magnifierDepth = new QwtPlotMagnifier(canvas());
|
QwtPlotMagnifier* magnifierDepth = new QwtPlotMagnifier(canvas());
|
||||||
magnifierDepth->setWheelModifiers(Qt::ControlModifier);
|
magnifierDepth->setWheelModifiers(Qt::ControlModifier);
|
||||||
magnifierDepth->setAxisEnabled(QwtPlot::yLeft, true);
|
magnifierDepth->setAxisEnabled(QwtPlot::yLeft, true);
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "qwt_plot.h"
|
#include "qwt_plot.h"
|
||||||
|
|
||||||
class QwtPlotGrid;
|
class QwtPlotGrid;
|
||||||
|
class QwtLegend;
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
//
|
//
|
||||||
@ -40,6 +41,7 @@ private:
|
|||||||
void setDefaults();
|
void setDefaults();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QwtPlotGrid* m_grid;
|
QwtPlotGrid* m_grid;
|
||||||
|
QwtLegend* m_legend;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user