Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef KDCHARTLEVEYJENNINGSDIAGRAM_H
00024 #define KDCHARTLEVEYJENNINGSDIAGRAM_H
00025
00026 #include "../KDChartLineDiagram.h"
00027 #include "KDChartLeveyJenningsCoordinatePlane.h"
00028
00029 class QPainter;
00030 class QPolygonF;
00031 class QSvgRenderer;
00032
00033 namespace KDChart {
00034
00035 class ThreeDLineAttributes;
00036
00042 class KDCHART_EXPORT LeveyJenningsDiagram : public LineDiagram
00043 {
00044 Q_OBJECT
00045
00046 Q_DISABLE_COPY( LeveyJenningsDiagram )
00047
00048
00049 KDCHART_DECLARE_DERIVED_DIAGRAM( LeveyJenningsDiagram, LeveyJenningsCoordinatePlane )
00050
00051
00052 public:
00053 explicit LeveyJenningsDiagram( QWidget* parent = 0, LeveyJenningsCoordinatePlane* plane = 0 );
00054 virtual ~LeveyJenningsDiagram();
00055
00056 virtual LineDiagram * clone() const;
00057
00058 enum Symbol
00059 {
00060 OkDataPoint,
00061 NotOkDataPoint,
00062 LotChanged,
00063 SensorChanged,
00064 FluidicsPackChanged
00065 };
00066
00070 bool compare( const LeveyJenningsDiagram* other ) const;
00071
00072 void setLotChangedSymbolPosition( Qt::Alignment pos );
00073 Qt::Alignment lotChangedSymbolPosition() const;
00074
00075 void setFluidicsPackChangedSymbolPosition( Qt::Alignment pos );
00076 Qt::Alignment fluidicsPackChangedSymbolPosition() const;
00077
00078 void setSensorChangedSymbolPosition( Qt::Alignment pos );
00079 Qt::Alignment sensorChangedSymbolPosition() const;
00080
00081 void setExpectedMeanValue( float meanValue );
00082 float expectedMeanValue() const;
00083
00084 void setExpectedStandardDeviation( float sd );
00085 float expectedStandardDeviation() const;
00086
00087 float calculatedMeanValue() const;
00088 float calculatedStandardDeviation() const;
00089
00090 void setFluidicsPackChanges( const QVector< QDateTime >& changes );
00091 QVector< QDateTime > fluidicsPackChanges() const;
00092
00093 void setSensorChanges( const QVector< QDateTime >& changes );
00094 QVector< QDateTime > sensorChanges() const;
00095
00096 void setScanLinePen( const QPen& pen );
00097 QPen scanLinePen() const;
00098
00099 void setSymbol( Symbol symbol, const QString& filename );
00100 QString symbol( Symbol symbol ) const;
00101
00102
00103 void setModel( QAbstractItemModel* model );
00104
00105 QPair< QDateTime, QDateTime > timeRange() const;
00106 void setTimeRange( const QPair< QDateTime, QDateTime >& timeRange );
00107
00108 protected:
00109 void paint( PaintContext* paintContext );
00110 void drawChanges( PaintContext* paintContext );
00111
00112 virtual void drawDataPointSymbol( PaintContext* paintContext, const QPointF& pos, bool ok );
00113 virtual void drawLotChangeSymbol( PaintContext* paintContext, const QPointF& pos );
00114 virtual void drawSensorChangedSymbol( PaintContext* paintContext, const QPointF& pos );
00115 virtual void drawFluidicsPackChangedSymbol( PaintContext* paintContext, const QPointF& pos );
00116
00117 virtual QRectF iconRect() const;
00118
00119 QSvgRenderer* iconRenderer( Symbol symbol );
00120
00122 const QPair<QPointF, QPointF> calculateDataBoundaries() const;
00123
00124 protected Q_SLOTS:
00125 void calculateMeanAndStandardDeviation() const;
00126 };
00127
00128 }
00129
00130 #endif // KDCHARTLINEDIAGRAM_H