mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3155 Implement grid lines settings for depth axis as well
* Done to "get away with" removing tick marks on all depth axes apart from the first track
This commit is contained in:
@@ -493,7 +493,7 @@ void RiuWellLogPlot::updateChildrenLayout()
|
||||
m_legends[tIdx]->setMaxColumns(legendColumns);
|
||||
m_legends[tIdx]->show();
|
||||
|
||||
m_trackPlots[tIdx]->enableVerticalAxisLabelsAndTitle(numTracksAlreadyShown == 0);
|
||||
m_trackPlots[tIdx]->enableDepthAxisLabelsAndTitle(numTracksAlreadyShown == 0);
|
||||
numTracksAlreadyShown++;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- Ceetron Solutions AS
|
||||
@@ -271,7 +271,7 @@ bool RiuWellLogTrack::isRimTrackVisible()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWellLogTrack::enableVerticalAxisLabelsAndTitle(bool enable)
|
||||
void RiuWellLogTrack::enableDepthAxisLabelsAndTitle(bool enable)
|
||||
{
|
||||
this->axisScaleDraw(QwtPlot::yLeft)->enableComponent(QwtAbstractScaleDraw::Ticks, enable);
|
||||
this->axisScaleDraw(QwtPlot::yLeft)->enableComponent(QwtAbstractScaleDraw::Labels, enable);
|
||||
@@ -292,7 +292,7 @@ int RiuWellLogTrack::widthScaleFactor() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWellLogTrack::enableGridLines(bool majorGridLines, bool minorGridLines)
|
||||
void RiuWellLogTrack::enableXGridLines(bool majorGridLines, bool minorGridLines)
|
||||
{
|
||||
QwtPlotItemList plotItems = this->itemList(QwtPlotItem::Rtti_PlotGrid);
|
||||
for (QwtPlotItem* plotItem : plotItems)
|
||||
@@ -306,6 +306,24 @@ void RiuWellLogTrack::enableGridLines(bool majorGridLines, bool minorGridLines)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWellLogTrack::enableDepthGridLines(bool majorGridLines, bool minorGridLines)
|
||||
{
|
||||
QwtPlotItemList plotItems = this->itemList(QwtPlotItem::Rtti_PlotGrid);
|
||||
for (QwtPlotItem* plotItem : plotItems)
|
||||
{
|
||||
QwtPlotGrid* grid = static_cast<QwtPlotGrid*>(plotItem);
|
||||
grid->setYAxis(QwtPlot::yLeft);
|
||||
grid->enableY(majorGridLines);
|
||||
grid->enableYMin(minorGridLines);
|
||||
grid->setMajorPen(Qt::lightGray, 1.0, Qt::SolidLine);
|
||||
grid->setMinorPen(Qt::lightGray, 1.0, Qt::DashLine);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -52,9 +52,10 @@ public:
|
||||
void setXRange(double min, double max);
|
||||
|
||||
bool isRimTrackVisible();
|
||||
void enableVerticalAxisLabelsAndTitle(bool enable);
|
||||
void enableDepthAxisLabelsAndTitle(bool enable);
|
||||
int widthScaleFactor() const;
|
||||
void enableGridLines(bool majorGridLines, bool minorGridLines);
|
||||
void enableXGridLines(bool majorGridLines, bool minorGridLines);
|
||||
void enableDepthGridLines(bool majorGridLines, bool minorGridLines);
|
||||
void setMajorAndMinorTickIntervals(double majorTickInterval, double minorTickInterval);
|
||||
void setAutoTickIntervalCounts(int maxMajorTickIntervalCount, int maxMinorTickIntervalCount);
|
||||
double getCurrentMajorTickInterval() const;
|
||||
|
||||
Reference in New Issue
Block a user