KChart

KChartLeveyJenningsDiagram.h
1 /*
2  * Copyright (C) 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
3  *
4  * This file is part of the KD Chart library.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <https://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef KCHARTLEVEYJENNINGSDIAGRAM_H
21 #define KCHARTLEVEYJENNINGSDIAGRAM_H
22 
23 #include "KChartLineDiagram.h"
24 #include "KChartLeveyJenningsCoordinatePlane.h"
25 
26 QT_BEGIN_NAMESPACE
27 class QPainter;
28 class QPolygonF;
29 class QSvgRenderer;
30 QT_END_NAMESPACE
31 
32 namespace KChart {
33 
34  class ThreeDLineAttributes;
35 
41 class KCHART_EXPORT LeveyJenningsDiagram : public LineDiagram
42 {
43  Q_OBJECT
44 
45  Q_DISABLE_COPY( LeveyJenningsDiagram )
46 // KCHART_DECLARE_PRIVATE_DERIVED_PARENT( LineDiagram, CartesianCoordinatePlane * )
47 
48  KCHART_DECLARE_DERIVED_DIAGRAM( LeveyJenningsDiagram, LeveyJenningsCoordinatePlane )
49 
50 
51 public:
52  explicit LeveyJenningsDiagram( QWidget* parent = nullptr, LeveyJenningsCoordinatePlane* plane = nullptr );
53  virtual ~LeveyJenningsDiagram();
54 
55 
59  LineDiagram * clone() const override;
60 
61  enum Symbol
62  {
63  OkDataPoint,
64  NotOkDataPoint,
65  LotChanged,
66  SensorChanged,
67  FluidicsPackChanged
68  };
69 
73  bool compare( const LeveyJenningsDiagram* other ) const;
74 
75 
80  void setLotChangedSymbolPosition( Qt::Alignment pos );
81 
85  Qt::Alignment lotChangedSymbolPosition() const;
86 
87 
92  void setFluidicsPackChangedSymbolPosition( Qt::Alignment pos );
93 
97  Qt::Alignment fluidicsPackChangedSymbolPosition() const;
98 
99 
104  void setSensorChangedSymbolPosition( Qt::Alignment pos );
105 
109  Qt::Alignment sensorChangedSymbolPosition() const;
110 
111 
115  void setExpectedMeanValue( float meanValue );
116 
120  float expectedMeanValue() const;
121 
122 
126  void setExpectedStandardDeviation( float sd );
127 
131  float expectedStandardDeviation() const;
132 
133 
137  float calculatedMeanValue() const;
138 
142  float calculatedStandardDeviation() const;
143 
144 
148  void setFluidicsPackChanges( const QVector< QDateTime >& changes );
149 
153  QVector< QDateTime > fluidicsPackChanges() const;
154 
155 
159  void setSensorChanges( const QVector< QDateTime >& changes );
160 
164  QVector< QDateTime > sensorChanges() const;
165 
166 
170  void setScanLinePen( const QPen& pen );
171 
175  QPen scanLinePen() const;
176 
177 
181  void setSymbol( Symbol symbol, const QString& filename );
182 
186  QString symbol( Symbol symbol ) const;
187 
188  /* \reimpl */
189  void setModel( QAbstractItemModel* model ) override;
190 
191 
195  QPair< QDateTime, QDateTime > timeRange() const;
196 
201  void setTimeRange( const QPair< QDateTime, QDateTime >& timeRange );
202 
203 protected:
204 
206  void paint( PaintContext* paintContext ) override;
207 
211  void drawChanges( PaintContext* paintContext );
212 
213 
221  virtual void drawDataPointSymbol( PaintContext* paintContext, const QPointF& pos, bool ok );
222 
229  virtual void drawLotChangeSymbol( PaintContext* paintContext, const QPointF& pos );
230 
237  virtual void drawSensorChangedSymbol( PaintContext* paintContext, const QPointF& pos );
238 
245  virtual void drawFluidicsPackChangedSymbol( PaintContext* paintContext, const QPointF& pos );
246 
247 
251  virtual QRectF iconRect() const;
252 
253 
257  QSvgRenderer* iconRenderer( Symbol symbol );
258 
259  /* \reimpl */
260 
262  const QPair<QPointF, QPointF> calculateDataBoundaries() const override;
263 
264 protected Q_SLOTS:
265  void calculateMeanAndStandardDeviation() const;
266 }; // End of class KChartLineDiagram
267 
268 }
269 
270 #endif // KCHARTLINEDIAGRAM_H
Class only listed here to document inheritance of some KChart classes.
Levey Jennings coordinate plane This is actually nothing real more than a plain cartesian coordinate ...
LeveyDiagram defines a Levey Jennings chart.
typedef Alignment
Stores information about painting diagrams.
LineDiagram defines a common line diagram.
Global namespace.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Sep 22 2020 22:36:46 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.