mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Depth plot as docking widget (#9909)
* Add docked depth result plot for eclipse data * Update dock layout defaults
This commit is contained in:
committed by
Magne Sjaastad
parent
b4f492e2fe
commit
98caeba776
@@ -319,3 +319,29 @@ QList<QwtLegendData> RiuQwtPlotTools::createLegendData( const std::vector<RimPlo
|
||||
|
||||
return legendDataList;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuQwtPlotTools::enableGridLines( QwtPlot* plot, QwtAxis::Position axis, bool enableMajor, bool enableMinor )
|
||||
{
|
||||
QwtPlotItemList plotItems = plot->itemList( QwtPlotItem::Rtti_PlotGrid );
|
||||
for ( QwtPlotItem* plotItem : plotItems )
|
||||
{
|
||||
auto* grid = static_cast<QwtPlotGrid*>( plotItem );
|
||||
if ( axis == QwtAxis::XTop || axis == QwtAxis::XBottom )
|
||||
{
|
||||
grid->setXAxis( axis );
|
||||
grid->enableX( enableMajor );
|
||||
grid->enableXMin( enableMinor );
|
||||
}
|
||||
else
|
||||
{
|
||||
grid->setYAxis( axis );
|
||||
grid->enableY( enableMajor );
|
||||
grid->enableYMin( enableMinor );
|
||||
}
|
||||
grid->setMajorPen( Qt::lightGray, 1.0, Qt::SolidLine );
|
||||
grid->setMinorPen( Qt::lightGray, 1.0, Qt::DashLine );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user