Skip to content

Commit

Permalink
(#396) Showing default legend on top of the plot
Browse files Browse the repository at this point in the history
  • Loading branch information
palhagen committed Aug 31, 2015
1 parent adba5ba commit 65f0c5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ApplicationCode/UserInterface/RiuWellLogTracePlot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "RiuWellLogTracePlot.h"

#include "qwt_plot_grid.h"
#include "qwt_legend.h"
#include "qwt_scale_engine.h"
#include "qwt_plot_magnifier.h"
#include "qwt_plot_panner.h"
Expand All @@ -33,6 +34,9 @@ RiuWellLogTracePlot::RiuWellLogTracePlot(QWidget* parent)
m_grid = new QwtPlotGrid();
m_grid->attach(this);

m_legend = new QwtLegend(this);
insertLegend(m_legend, QwtPlot::TopLegend);

QwtPlotMagnifier* magnifierDepth = new QwtPlotMagnifier(canvas());
magnifierDepth->setWheelModifiers(Qt::ControlModifier);
magnifierDepth->setAxisEnabled(QwtPlot::yLeft, true);
Expand Down
4 changes: 3 additions & 1 deletion ApplicationCode/UserInterface/RiuWellLogTracePlot.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "qwt_plot.h"

class QwtPlotGrid;
class QwtLegend;

//==================================================================================================
//
Expand All @@ -40,6 +41,7 @@ class RiuWellLogTracePlot : public QwtPlot
void setDefaults();

private:
QwtPlotGrid* m_grid;
QwtPlotGrid* m_grid;
QwtLegend* m_legend;
};

0 comments on commit 65f0c5f

Please sign in to comment.