File indexing completed on 2024-12-15 04:02:31

0001 /*
0002  * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
0003  *
0004  * This file is part of the KD Chart library.
0005  *
0006  * SPDX-License-Identifier: GPL-2.0-or-later
0007  */
0008 
0009 #include "KChartLeveyJenningsDiagram_p.h"
0010 
0011 #include "KChartDataValueAttributes.h"
0012 
0013 using namespace KChart;
0014 
0015 LeveyJenningsDiagram::Private::Private( const Private& rhs )
0016     : LineDiagram::Private( rhs ),
0017       lotChangedPosition( rhs.lotChangedPosition ),
0018       fluidicsPackChangedPosition( rhs.fluidicsPackChangedPosition ),
0019       sensorChangedPosition( rhs.sensorChangedPosition ),
0020       fluidicsPackChanges( rhs.fluidicsPackChanges ),
0021       sensorChanges( rhs.sensorChanges ),
0022       scanLinePen( rhs.scanLinePen ),
0023       icons( rhs.icons ),
0024       expectedMeanValue( rhs.expectedMeanValue ),
0025       expectedStandardDeviation( rhs.expectedStandardDeviation )
0026 {
0027 }
0028 
0029 void LeveyJenningsDiagram::Private::setYAxisRange() const
0030 {
0031     CartesianCoordinatePlane* const plane = static_cast< CartesianCoordinatePlane* >( diagram->coordinatePlane() );
0032     if ( plane == nullptr )
0033         return;
0034 
0035     plane->setVerticalRange( QPair< qreal, qreal >( expectedMeanValue - 4 * expectedStandardDeviation, 
0036                                                     expectedMeanValue + 4 * expectedStandardDeviation ) );
0037 }