KD Chart 2  [rev.2.6]
KDChartLeveyJenningsDiagram.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** Copyright (C) 2001-2018 Klaralvdalens Datakonsult AB. All rights reserved.
3 **
4 ** This file is part of the KD Chart library.
5 **
6 ** Licensees holding valid commercial KD Chart licenses may use this file in
7 ** accordance with the KD Chart Commercial License Agreement provided with
8 ** the Software.
9 **
10 **
11 ** This file may be distributed and/or modified under the terms of the
12 ** GNU General Public License version 2 and version 3 as published by the
13 ** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** Contact info@kdab.com if any conditions of this licensing are not
19 ** clear to you.
20 **
21 **********************************************************************/
22 
23 #ifndef KDCHARTLEVEYJENNINGSDIAGRAM_H
24 #define KDCHARTLEVEYJENNINGSDIAGRAM_H
25 
26 #include "KDChartLineDiagram.h"
28 
29 QT_BEGIN_NAMESPACE
30 class QPainter;
31 class QPolygonF;
32 class QSvgRenderer;
33 QT_END_NAMESPACE
34 
35 namespace KDChart {
36 
37  class ThreeDLineAttributes;
38 
44 class KDCHART_EXPORT LeveyJenningsDiagram : public LineDiagram
45 {
46  Q_OBJECT
47 
48  Q_DISABLE_COPY( LeveyJenningsDiagram )
49 // KDCHART_DECLARE_PRIVATE_DERIVED_PARENT( LineDiagram, CartesianCoordinatePlane * )
50 
52 
53 
54 public:
55  explicit LeveyJenningsDiagram( QWidget* parent = 0, LeveyJenningsCoordinatePlane* plane = 0 );
56  virtual ~LeveyJenningsDiagram();
57 
58  virtual LineDiagram * clone() const;
59 
60  enum Symbol
61  {
66  FluidicsPackChanged
67  };
68 
72  bool compare( const LeveyJenningsDiagram* other ) const;
73 
74  void setLotChangedSymbolPosition( Qt::Alignment pos );
75  Qt::Alignment lotChangedSymbolPosition() const;
76 
77  void setFluidicsPackChangedSymbolPosition( Qt::Alignment pos );
78  Qt::Alignment fluidicsPackChangedSymbolPosition() const;
79 
80  void setSensorChangedSymbolPosition( Qt::Alignment pos );
81  Qt::Alignment sensorChangedSymbolPosition() const;
82 
83  void setExpectedMeanValue( float meanValue );
84  float expectedMeanValue() const;
85 
86  void setExpectedStandardDeviation( float sd );
87  float expectedStandardDeviation() const;
88 
89  float calculatedMeanValue() const;
90  float calculatedStandardDeviation() const;
91 
92  void setFluidicsPackChanges( const QVector< QDateTime >& changes );
93  QVector< QDateTime > fluidicsPackChanges() const;
94 
95  void setSensorChanges( const QVector< QDateTime >& changes );
96  QVector< QDateTime > sensorChanges() const;
97 
98  void setScanLinePen( const QPen& pen );
99  QPen scanLinePen() const;
100 
101  void setSymbol( Symbol symbol, const QString& filename );
102  QString symbol( Symbol symbol ) const;
103 
104  /* \reimpl */
105  void setModel( QAbstractItemModel* model );
106 
107  QPair< QDateTime, QDateTime > timeRange() const;
108  void setTimeRange( const QPair< QDateTime, QDateTime >& timeRange );
109 
110 protected:
111  void paint( PaintContext* paintContext );
112  void drawChanges( PaintContext* paintContext );
113 
114  virtual void drawDataPointSymbol( PaintContext* paintContext, const QPointF& pos, bool ok );
115  virtual void drawLotChangeSymbol( PaintContext* paintContext, const QPointF& pos );
116  virtual void drawSensorChangedSymbol( PaintContext* paintContext, const QPointF& pos );
117  virtual void drawFluidicsPackChangedSymbol( PaintContext* paintContext, const QPointF& pos );
118 
119  virtual QRectF iconRect() const;
120 
121  QSvgRenderer* iconRenderer( Symbol symbol );
122 
124  const QPair<QPointF, QPointF> calculateDataBoundaries() const;
125 
126 protected Q_SLOTS:
127  void calculateMeanAndStandardDeviation() const;
128 }; // End of class KDChartLineDiagram
129 
130 }
131 
132 #endif // KDCHARTLINEDIAGRAM_H
Levey Jennings coordinate plane This is actually nothing real more than a plain cartesian coordinate ...
LeveyDiagram defines a Levey Jennings chart.
LineDiagram defines a common line diagram.
Stores information about painting diagrams.
#define KDCHART_DECLARE_DERIVED_DIAGRAM(X, PLANE)
Class only listed here to document inheritance of some KDChart classes.

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-chart/