20 #include "KChartLeveyJenningsGridAttributes.h" 22 #include "KChartMath_p.h" 43 LeveyJenningsGridAttributes::Private::Private()
46 pens[ Calculated ].setColor(
Qt::blue );
50 visible[ Calculated ] =
true;
51 visible[ Expected ] =
true;
53 rangeBrushes[ LeveyJenningsGridAttributes::CriticalRange ] =
QBrush(
QColor( 255, 255, 192 ) );
54 rangeBrushes[ LeveyJenningsGridAttributes::OutOfRange ] =
QBrush(
QColor( 255, 128, 128 ) );
58 LeveyJenningsGridAttributes::LeveyJenningsGridAttributes()
65 : _d( new Private( *r.d ) )
79 LeveyJenningsGridAttributes::~LeveyJenningsGridAttributes()
81 delete _d; _d =
nullptr;
87 return isGridVisible( Expected ) == r.isGridVisible( Expected ) &&
88 isGridVisible( Calculated ) == r.isGridVisible( Calculated ) &&
89 gridPen( Expected ) == r.gridPen( Expected ) &&
90 gridPen( Calculated ) == r.gridPen( Calculated );
93 void LeveyJenningsGridAttributes::setRangeBrush( Range range,
const QBrush& brush )
95 d->rangeBrushes[ range ] = brush;
98 QBrush LeveyJenningsGridAttributes::rangeBrush( Range range )
const 100 return d->rangeBrushes[ range ];
104 void LeveyJenningsGridAttributes::setGridVisible( GridType type,
bool visible )
106 d->visible[ type ] = visible;
109 bool LeveyJenningsGridAttributes::isGridVisible( GridType type )
const 111 return d->visible[ type ];
114 void LeveyJenningsGridAttributes::setGridPen( GridType type,
const QPen& pen )
116 d->pens[ type ] = pen;
120 QPen LeveyJenningsGridAttributes::gridPen( GridType type )
const 122 return d->pens[ type ];
A set of attributes controlling the appearance of grids.