#3103 Make grid lines match major and minor interval and make the grid lines optional

This commit is contained in:
Gaute Lindkvist committed 2018-07-02 09:51:10 +02:00
1 parent 8c445388b8
commit 707a7a91e6
6 files changed
+81 -18

No files matched your search

@@ -288,3 +288,20 @@ int RiuWellLogTrack::widthScaleFactor() const
return 1;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogTrack::enableGridLines(bool majorGridLines, bool minorGridLines)
{
QwtPlotItemList plotItems = this->itemList(QwtPlotItem::Rtti_PlotGrid);
for (QwtPlotItem* plotItem : plotItems)
{
QwtPlotGrid* grid = static_cast<QwtPlotGrid*>(plotItem);
grid->setXAxis(QwtPlot::xTop);
grid->enableX(majorGridLines);
grid->enableXMin(minorGridLines);
grid->setMajorPen(Qt::lightGray, 1.0, Qt::SolidLine);
grid->setMinorPen(Qt::lightGray, 1.0, Qt::DashLine);
}
}