mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Code cleanup
This commit is contained in:
@@ -55,13 +55,7 @@
|
||||
RiuMohrsCirclePlot::RiuMohrsCirclePlot(QWidget* parent)
|
||||
: QwtPlot(parent)
|
||||
{
|
||||
|
||||
|
||||
setDefaults();
|
||||
|
||||
//setPrincipalsAndRedrawCircles(40, 30, 20);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -70,6 +64,7 @@ RiuMohrsCirclePlot::RiuMohrsCirclePlot(QWidget* parent)
|
||||
RiuMohrsCirclePlot::~RiuMohrsCirclePlot()
|
||||
{
|
||||
deleteCircles();
|
||||
|
||||
delete m_rescaler;
|
||||
}
|
||||
|
||||
@@ -155,16 +150,6 @@ void RiuMohrsCirclePlot::redrawCircles()
|
||||
deleteCircles();
|
||||
createMohrCircles();
|
||||
|
||||
QwtPlotMarker* lineXPlotMarker = new QwtPlotMarker("LineX");
|
||||
lineXPlotMarker->setLineStyle(QwtPlotMarker::HLine);
|
||||
lineXPlotMarker->setYValue(0);
|
||||
lineXPlotMarker->attach(this);
|
||||
|
||||
QwtPlotMarker* lineYPlotMarker = new QwtPlotMarker("LineY");
|
||||
lineYPlotMarker->setLineStyle(QwtPlotMarker::VLine);
|
||||
lineYPlotMarker->setXValue(0);
|
||||
lineYPlotMarker->attach(this);
|
||||
|
||||
caf::ColorTable colors = RiaColorTables::mohrsCirclePaletteColors();
|
||||
|
||||
for (size_t i = 0; i < m_mohrCircles.size(); i++)
|
||||
@@ -192,7 +177,6 @@ void RiuMohrsCirclePlot::redrawCircles()
|
||||
this->replot();
|
||||
m_rescaler->rescale();
|
||||
this->plotLayout()->setAlignCanvasToScales(true);
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -257,6 +241,16 @@ void RiuMohrsCirclePlot::setDefaults()
|
||||
enableAxis(QwtPlot::yLeft, true);
|
||||
enableAxis(QwtPlot::xTop, false);
|
||||
enableAxis(QwtPlot::yRight, false);
|
||||
|
||||
QwtPlotMarker* lineXPlotMarker = new QwtPlotMarker("LineX");
|
||||
lineXPlotMarker->setLineStyle(QwtPlotMarker::HLine);
|
||||
lineXPlotMarker->setYValue(0);
|
||||
lineXPlotMarker->attach(this);
|
||||
|
||||
QwtPlotMarker* lineYPlotMarker = new QwtPlotMarker("LineY");
|
||||
lineYPlotMarker->setLineStyle(QwtPlotMarker::VLine);
|
||||
lineYPlotMarker->setXValue(0);
|
||||
lineYPlotMarker->attach(this);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "cafCmdFeatureMenuBuilder.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfAssert.h"
|
||||
#include "cvfColor3.h"
|
||||
|
||||
#include "qwt_date_scale_draw.h"
|
||||
|
||||
@@ -61,8 +61,8 @@ public:
|
||||
void deleteAllCurves();
|
||||
|
||||
protected:
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
virtual QSize sizeHint() const override;
|
||||
virtual QSize minimumSizeHint() const override;
|
||||
virtual void contextMenuEvent(QContextMenuEvent *) override;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user