mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-15 18:02:12 -05:00
#3103 Make grid lines match major and minor interval and make the grid lines optional
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user