9#include "KChartLeveyJenningsGridAttributes.h"
11#include "KChartMath_p.h"
32LeveyJenningsGridAttributes::Private::Private()
35 pens[ Calculated ].setColor(
Qt::blue );
39 visible[ Calculated ] =
true;
40 visible[ Expected ] =
true;
42 rangeBrushes[ LeveyJenningsGridAttributes::CriticalRange ] =
QBrush(
QColor( 255, 255, 192 ) );
43 rangeBrushes[ LeveyJenningsGridAttributes::OutOfRange ] =
QBrush(
QColor( 255, 128, 128 ) );
47LeveyJenningsGridAttributes::LeveyJenningsGridAttributes()
54 : _d( new Private( *r.d ) )
68LeveyJenningsGridAttributes::~LeveyJenningsGridAttributes()
70 delete _d; _d =
nullptr;
76 return isGridVisible( Expected ) == r.isGridVisible( Expected ) &&
77 isGridVisible( Calculated ) == r.isGridVisible( Calculated ) &&
78 gridPen( Expected ) == r.gridPen( Expected ) &&
79 gridPen( Calculated ) == r.gridPen( Calculated );
82void LeveyJenningsGridAttributes::setRangeBrush( Range range,
const QBrush& brush )
84 d->rangeBrushes[ range ] = brush;
87QBrush LeveyJenningsGridAttributes::rangeBrush( Range range )
const
89 return d->rangeBrushes[ range ];
93void LeveyJenningsGridAttributes::setGridVisible( GridType type,
bool visible )
95 d->visible[
type ] = visible;
98bool LeveyJenningsGridAttributes::isGridVisible( GridType type )
const
100 return d->visible[
type ];
103void LeveyJenningsGridAttributes::setGridPen( GridType type,
const QPen& pen )
105 d->pens[
type ] = pen;
109QPen LeveyJenningsGridAttributes::gridPen( GridType type )
const
111 return d->pens[
type ];
A set of attributes controlling the appearance of grids.
Type type(const QSqlDatabase &db)