2015-08-28 07:25:14 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
|
|
|
//
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "RiuWellLogTracePlot.h"
|
|
|
|
|
2015-08-31 04:39:59 -05:00
|
|
|
#include "qwt_plot_grid.h"
|
|
|
|
|
2015-08-28 07:25:14 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RiuWellLogTracePlot::RiuWellLogTracePlot(QWidget* parent)
|
|
|
|
: QwtPlot(parent)
|
|
|
|
{
|
2015-08-31 04:39:59 -05:00
|
|
|
m_grid = new QwtPlotGrid();
|
|
|
|
m_grid->attach(this);
|
|
|
|
|
2015-08-31 02:34:41 -05:00
|
|
|
setDefaults();
|
2015-08-28 07:25:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RiuWellLogTracePlot::~RiuWellLogTracePlot()
|
|
|
|
{
|
2015-08-31 04:39:59 -05:00
|
|
|
m_grid->detach();
|
|
|
|
delete m_grid;
|
2015-08-28 07:25:14 -05:00
|
|
|
}
|
2015-08-31 02:34:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RiuWellLogTracePlot::setDefaults()
|
|
|
|
{
|
|
|
|
QPalette newPalette(palette());
|
|
|
|
newPalette.setColor(QPalette::Background, Qt::white);
|
|
|
|
setPalette(newPalette);
|
|
|
|
|
|
|
|
setAutoFillBackground(true);
|
|
|
|
setCanvasBackground(Qt::white);
|
2015-08-31 02:42:29 -05:00
|
|
|
|
|
|
|
QFrame* canvasFrame = dynamic_cast<QFrame*>(canvas());
|
|
|
|
if (canvasFrame)
|
|
|
|
{
|
|
|
|
canvasFrame->setFrameShape(QFrame::NoFrame);
|
|
|
|
}
|
2015-08-31 04:39:59 -05:00
|
|
|
|
|
|
|
QPen gridPen(Qt::SolidLine);
|
|
|
|
gridPen.setColor(Qt::lightGray);
|
|
|
|
m_grid->setPen(gridPen);
|
2015-08-31 05:34:08 -05:00
|
|
|
|
|
|
|
enableAxis(QwtPlot::xTop, true);
|
|
|
|
enableAxis(QwtPlot::yLeft, true);
|
|
|
|
enableAxis(QwtPlot::xBottom, false);
|
|
|
|
enableAxis(QwtPlot::yRight, false);
|
2015-08-31 02:34:41 -05:00
|
|
|
}
|