![]() |
KD Chart API Documentation
3.1
|
LeveyDiagram defines a Levey Jennings chart. More...
#include <KDChartLeveyJenningsDiagram.h>
Public Types | |
| enum | Symbol { OkDataPoint , NotOkDataPoint , LotChanged , SensorChanged , FluidicsPackChanged } |
Public Types inherited from KDChart::LineDiagram | |
| enum | LineType { Normal = 0 , Stacked = 1 , Percent = 2 } |
Public Member Functions | |
| LeveyJenningsDiagram (QWidget *parent=nullptr, LeveyJenningsCoordinatePlane *plane=nullptr) | |
| ~LeveyJenningsDiagram () override | |
| float | calculatedMeanValue () const |
| float | calculatedStandardDeviation () const |
| LineDiagram * | clone () const override |
| bool | compare (const LeveyJenningsDiagram *other) const |
| float | expectedMeanValue () const |
| float | expectedStandardDeviation () const |
| Qt::Alignment | fluidicsPackChangedSymbolPosition () const |
| QVector< QDateTime > | fluidicsPackChanges () const |
| Qt::Alignment | lotChangedSymbolPosition () const |
| QPen | scanLinePen () const |
| Qt::Alignment | sensorChangedSymbolPosition () const |
| QVector< QDateTime > | sensorChanges () const |
| void | setExpectedMeanValue (float meanValue) |
| void | setExpectedStandardDeviation (float sd) |
| void | setFluidicsPackChangedSymbolPosition (Qt::Alignment pos) |
| void | setFluidicsPackChanges (const QVector< QDateTime > &changes) |
| void | setLotChangedSymbolPosition (Qt::Alignment pos) |
| void | setModel (QAbstractItemModel *model) override |
| void | setScanLinePen (const QPen &pen) |
| void | setSensorChangedSymbolPosition (Qt::Alignment pos) |
| void | setSensorChanges (const QVector< QDateTime > &changes) |
| void | setSymbol (Symbol symbol, const QString &filename) |
| void | setTimeRange (const QPair< QDateTime, QDateTime > &timeRange) |
| QString | symbol (Symbol symbol) const |
| QPair< QDateTime, QDateTime > | timeRange () const |
Public Member Functions inherited from KDChart::LineDiagram | |
| LineDiagram (QWidget *parent=nullptr, CartesianCoordinatePlane *plane=nullptr) | |
| ~LineDiagram () override | |
| bool | centerDataPoints () const |
| bool | compare (const LineDiagram *other) const |
| LineAttributes | lineAttributes () const |
| LineAttributes | lineAttributes (const QModelIndex &index) const |
| LineAttributes | lineAttributes (int column) const |
| qreal | lineTension () const |
| int | numberOfAbscissaSegments () const override |
| int | numberOfOrdinateSegments () const override |
| void | resetLineAttributes (const QModelIndex &index) |
| void | resetLineAttributes (int column) |
| void | resize (const QSizeF &area) override |
| bool | reverseDatasetOrder () const |
| void | setCenterDataPoints (bool center) |
| void | setLineAttributes (const LineAttributes &a) |
| void | setLineAttributes (const QModelIndex &index, const LineAttributes &a) |
| void | setLineAttributes (int column, const LineAttributes &a) |
| void | setLineTension (qreal tenson) |
| void | setReverseDatasetOrder (bool reverse) |
| void | setThreeDLineAttributes (const QModelIndex &index, const ThreeDLineAttributes &a) |
| void | setThreeDLineAttributes (const ThreeDLineAttributes &a) |
| void | setThreeDLineAttributes (int column, const ThreeDLineAttributes &a) |
| void | setType (const LineType type) |
| void | setValueTrackerAttributes (const QModelIndex &index, const ValueTrackerAttributes &a) |
| ThreeDLineAttributes | threeDLineAttributes () const |
| ThreeDLineAttributes | threeDLineAttributes (const QModelIndex &index) const |
| ThreeDLineAttributes | threeDLineAttributes (int column) const |
| LineType | type () const |
| ValueTrackerAttributes | valueTrackerAttributes (const QModelIndex &index) const |
Public Member Functions inherited from KDChart::AbstractCartesianDiagram | |
| AbstractCartesianDiagram (QWidget *parent=nullptr, CartesianCoordinatePlane *plane=nullptr) | |
| ~AbstractCartesianDiagram () override | |
| virtual void | addAxis (CartesianAxis *axis) |
| virtual KDChart::CartesianAxisList | axes () const |
| bool | compare (const AbstractCartesianDiagram *other) const |
| virtual void | layoutPlanes () |
| virtual AbstractCartesianDiagram * | referenceDiagram () const |
| virtual QPointF | referenceDiagramOffset () const |
| void | setAttributesModel (AttributesModel *amodel) override |
| Sets an external AttributesModel on this diagram. More... | |
| void | setCoordinatePlane (AbstractCoordinatePlane *plane) override |
| void | setModel (QAbstractItemModel *model) override |
| virtual void | setReferenceDiagram (AbstractCartesianDiagram *diagram, const QPointF &offset=QPointF()) |
| void | setRootIndex (const QModelIndex &index) override |
| virtual void | takeAxis (CartesianAxis *axis) |
Public Member Functions inherited from KDChart::AbstractDiagram | |
| ~AbstractDiagram () override | |
| bool | allowOverlappingDataValueTexts () const |
| bool | antiAliasing () const |
| virtual AttributesModel * | attributesModel () const |
| QBrush | brush () const |
| QBrush | brush (const QModelIndex &index) const |
| QBrush | brush (int dataset) const |
| bool | compare (const AbstractDiagram *other) const |
| AbstractCoordinatePlane * | coordinatePlane () const |
| const QPair< QPointF, QPointF > | dataBoundaries () const |
| Return the bottom left and top right data point, that the diagram will display (unless the grid adjusts these values). More... | |
| void | dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector< int > &roles=QVector< int >()) override |
| QList< QBrush > | datasetBrushes () const |
| int | datasetDimension () const |
| QStringList | datasetLabels () const |
| QList< MarkerAttributes > | datasetMarkers () const |
| QList< QPen > | datasetPens () const |
| DataValueAttributes | dataValueAttributes () const |
| DataValueAttributes | dataValueAttributes (const QModelIndex &index) const |
| DataValueAttributes | dataValueAttributes (int dataset) const |
| void | doItemsLayout () override |
| int | horizontalOffset () const override |
| QModelIndex | indexAt (const QPoint &point) const override |
| QModelIndexList | indexesAt (const QPoint &point) const |
| QModelIndexList | indexesIn (const QRect &rect) const |
| bool | isHidden () const |
| bool | isHidden (const QModelIndex &index) const |
| bool | isHidden (int dataset) const |
| bool | isIndexHidden (const QModelIndex &index) const override |
| QStringList | itemRowLabels () const |
| QModelIndex | moveCursor (CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override |
| void | paintDataValueText (QPainter *painter, const QModelIndex &index, const QPointF &pos, qreal value) |
| void | paintMarker (QPainter *painter, const DataValueAttributes &a, const QModelIndex &index, const QPointF &pos) |
| virtual void | paintMarker (QPainter *painter, const MarkerAttributes &markerAttributes, const QBrush &brush, const QPen &, const QPointF &point, const QSizeF &size) |
| void | paintMarker (QPainter *painter, const QModelIndex &index, const QPointF &pos) |
| QPen | pen () const |
| QPen | pen (const QModelIndex &index) const |
| QPen | pen (int dataset) const |
| bool | percentMode () const |
| Returns whether this diagram is drawn in percent mode. More... | |
| void | scrollTo (const QModelIndex &index, ScrollHint hint=EnsureVisible) override |
| void | setAllowOverlappingDataValueTexts (bool allow) |
| void | setAntiAliasing (bool enabled) |
| void | setBrush (const QBrush &brush) |
| void | setBrush (const QModelIndex &index, const QBrush &brush) |
| void | setBrush (int dataset, const QBrush &brush) |
| Q_DECL_DEPRECATED void | setDatasetDimension (int dimension) |
| void | setDataValueAttributes (const DataValueAttributes &a) |
| void | setDataValueAttributes (const QModelIndex &index, const DataValueAttributes &a) |
| void | setDataValueAttributes (int dataset, const DataValueAttributes &a) |
| void | setHidden (bool hidden) |
| void | setHidden (const QModelIndex &index, bool hidden) |
| void | setHidden (int dataset, bool hidden) |
| void | setModel (QAbstractItemModel *model) override |
| void | setPen (const QModelIndex &index, const QPen &pen) |
| void | setPen (const QPen &pen) |
| void | setPen (int dataset, const QPen &pen) |
| Q_DECL_DEPRECATED void | setPercentMode (bool percent) |
| Deprecated method that turns the percent mode of this diagram on or off. More... | |
| void | setRootIndex (const QModelIndex &idx) override |
| Reimplemented for internal purposes. More... | |
| void | setSelection (const QRect &rect, QItemSelectionModel::SelectionFlags command) override |
| void | setSelectionModel (QItemSelectionModel *selectionModel) override |
| void | setUnitPrefix (const QString &prefix, int column, Qt::Orientation orientation) |
| void | setUnitPrefix (const QString &prefix, Qt::Orientation orientation) |
| void | setUnitSuffix (const QString &suffix, int column, Qt::Orientation orientation) |
| void | setUnitSuffix (const QString &suffix, Qt::Orientation orientation) |
| QString | unitPrefix (int column, Qt::Orientation orientation, bool fallback=false) const |
| QString | unitPrefix (Qt::Orientation orientation) const |
| QString | unitSuffix (int column, Qt::Orientation orientation, bool fallback=false) const |
| QString | unitSuffix (Qt::Orientation orientation) const |
| void | update () const |
| void | useDefaultColors () |
| void | useRainbowColors () |
| virtual bool | usesExternalAttributesModel () const |
| void | useSubduedColors () |
| int | verticalOffset () const override |
| QRect | visualRect (const QModelIndex &index) const override |
| virtual QRegion | visualRegion (const QModelIndex &index) const |
| QRegion | visualRegionForSelection (const QItemSelection &selection) const override |
Protected Slots | |
| void | calculateMeanAndStandardDeviation () const |
Protected Slots inherited from KDChart::AbstractCartesianDiagram | |
| void | connectAttributesModel (AttributesModel *) |
Protected Slots inherited from KDChart::AbstractDiagram | |
| void | setDataBoundariesDirty () const |
Protected Member Functions | |
| const QPair< QPointF, QPointF > | calculateDataBoundaries () const override |
| void | drawChanges (PaintContext *paintContext) |
| virtual void | drawDataPointSymbol (PaintContext *paintContext, const QPointF &pos, bool ok) |
| virtual void | drawFluidicsPackChangedSymbol (PaintContext *paintContext, const QPointF &pos) |
| virtual void | drawLotChangeSymbol (PaintContext *paintContext, const QPointF &pos) |
| virtual void | drawSensorChangedSymbol (PaintContext *paintContext, const QPointF &pos) |
| virtual QRectF | iconRect () const |
| QSvgRenderer * | iconRenderer (Symbol symbol) |
| void | paint (PaintContext *paintContext) override |
Protected Member Functions inherited from KDChart::LineDiagram | |
| const QPair< QPointF, QPointF > | calculateDataBoundaries () const override |
| void | paint (PaintContext *paintContext) override |
| void | paintEvent (QPaintEvent *) override |
| void | resizeEvent (QResizeEvent *) override |
| qreal | threeDItemDepth (const QModelIndex &index) const override |
| qreal | threeDItemDepth (int column) const override |
Protected Member Functions inherited from KDChart::AbstractDiagram | |
| AbstractDiagram (Private *p, QWidget *parent, AbstractCoordinatePlane *plane) | |
| AbstractDiagram (QWidget *parent=nullptr, AbstractCoordinatePlane *plane=nullptr) | |
| QModelIndex | attributesModelRootIndex () const |
| returns a QModelIndex pointing into the AttributesModel that corresponds to the root index of the diagram. More... | |
| virtual bool | checkInvariants (bool justReturnTheStatus=false) const |
| virtual Q_DECL_DEPRECATED void | paintDataValueTexts (QPainter *painter) |
| virtual Q_DECL_DEPRECATED void | paintMarkers (QPainter *painter) |
| void | setAttributesModelRootIndex (const QModelIndex &) |
| void | setDatasetDimensionInternal (int dimension) |
| Q_DECL_DEPRECATED qreal | valueForCell (int row, int column) const |
Additional Inherited Members | |
Signals inherited from KDChart::AbstractDiagram | |
| void | aboutToBeDestroyed () |
| void | attributesModelAboutToChange (AttributesModel *newModel, AttributesModel *oldModel) |
| void | boundariesChanged () |
| void | dataHidden () |
| void | layoutChanged (AbstractDiagram *) |
| void | modelDataChanged () |
| void | modelsChanged () |
| void | propertiesChanged () |
| void | viewportCoordinateSystemChanged () |
LeveyDiagram defines a Levey Jennings chart.
It provides different subtypes which are set using setType.
Definition at line 32 of file KDChartLeveyJenningsDiagram.h.
| Enumerator | |
|---|---|
| OkDataPoint | |
| NotOkDataPoint | |
| LotChanged | |
| SensorChanged | |
| FluidicsPackChanged | |
Definition at line 47 of file KDChartLeveyJenningsDiagram.h.
|
explicit |
Definition at line 40 of file KDChartLeveyJenningsDiagram.cpp.
Referenced by clone().
|
override |
Definition at line 69 of file KDChartLeveyJenningsDiagram.cpp.
|
overrideprotectedvirtual |
Reimplemented for internal purposes.
Implements KDChart::AbstractDiagram.
Definition at line 410 of file KDChartLeveyJenningsDiagram.cpp.
References d, and timeRange().
| float LeveyJenningsDiagram::calculatedMeanValue | ( | ) | const |
Returns the calculated mean values over all QC values.
Definition at line 290 of file KDChartLeveyJenningsDiagram.cpp.
References d.
| float LeveyJenningsDiagram::calculatedStandardDeviation | ( | ) | const |
Returns the calculated standard deviation over all QC values.
Definition at line 298 of file KDChartLeveyJenningsDiagram.cpp.
References d.
|
protectedslot |
Definition at line 345 of file KDChartLeveyJenningsDiagram.cpp.
References d.
Referenced by setModel().
|
overridevirtual |
Creates an exact copy of this diagram.
Reimplemented from KDChart::LineDiagram.
Definition at line 76 of file KDChartLeveyJenningsDiagram.cpp.
References LeveyJenningsDiagram(), and d.
| bool LeveyJenningsDiagram::compare | ( | const LeveyJenningsDiagram * | other | ) | const |
Returns true if both diagrams have the same settings.
Definition at line 82 of file KDChartLeveyJenningsDiagram.cpp.
|
protected |
Draws the fluidics pack and sensor changed symbols.
Definition at line 477 of file KDChartLeveyJenningsDiagram.cpp.
References d, drawFluidicsPackChangedSymbol(), drawSensorChangedSymbol(), and timeRange().
Referenced by paint().
|
protectedvirtual |
Draws a data point symbol for the data point at pos.
| ok | True, when the data point is ok, false otherwise (different symbol) |
| ctx | The PaintContext being used |
Definition at line 610 of file KDChartLeveyJenningsDiagram.cpp.
References KDChart::PaintContext::coordinatePlane(), iconRect(), iconRenderer(), NotOkDataPoint, OkDataPoint, KDChart::PaintContext::painter(), KDChart::AbstractCoordinatePlane::translate(), and KDChart::LineDiagram::type().
Referenced by paint().
|
protectedvirtual |
Draws a fluidics pack changed symbol for the data point at pos.
| ctx | The PaintContext being used |
Definition at line 662 of file KDChartLeveyJenningsDiagram.cpp.
References KDChart::PaintContext::coordinatePlane(), d, FluidicsPackChanged, iconRect(), iconRenderer(), KDChart::PaintContext::painter(), and KDChart::AbstractCoordinatePlane::translate().
Referenced by drawChanges().
|
protectedvirtual |
Draws a lot changed symbol for the data point at pos.
| ctx | The PaintContext being used |
Definition at line 628 of file KDChartLeveyJenningsDiagram.cpp.
References KDChart::PaintContext::coordinatePlane(), d, iconRect(), iconRenderer(), LotChanged, KDChart::PaintContext::painter(), and KDChart::AbstractCoordinatePlane::translate().
Referenced by paint().
|
protectedvirtual |
Draws a sensor changed symbol for the data point at pos.
| ctx | The PaintContext being used |
Definition at line 645 of file KDChartLeveyJenningsDiagram.cpp.
References KDChart::PaintContext::coordinatePlane(), d, iconRect(), iconRenderer(), KDChart::PaintContext::painter(), SensorChanged, and KDChart::AbstractCoordinatePlane::translate().
Referenced by drawChanges().
| float LeveyJenningsDiagram::expectedMeanValue | ( | ) | const |
Returns the expected mean values over all QC values.
Definition at line 261 of file KDChartLeveyJenningsDiagram.cpp.
References d.
Referenced by paint().
| float LeveyJenningsDiagram::expectedStandardDeviation | ( | ) | const |
Returns the expected standard deviation over all QC values.
Definition at line 282 of file KDChartLeveyJenningsDiagram.cpp.
References d.
| Qt::Alignment LeveyJenningsDiagram::fluidicsPackChangedSymbolPosition | ( | ) | const |
Returns the position of the fluidics pack changed symbol.
Definition at line 135 of file KDChartLeveyJenningsDiagram.cpp.
References d.
| QVector< QDateTime > LeveyJenningsDiagram::fluidicsPackChanges | ( | ) | const |
Returns the list of all fluidics pack changes.
Definition at line 176 of file KDChartLeveyJenningsDiagram.cpp.
References d.
|
protectedvirtual |
Returns the rectangle being used for drawing the icons
Definition at line 677 of file KDChartLeveyJenningsDiagram.cpp.
References KDChart::TextAttributes::calculatedFont(), KDChart::AbstractDiagram::coordinatePlane(), KDChartEnums::MeasureCalculationModeAuto, KDChartEnums::MeasureOrientationAuto, and KDChart::TextAttributes::setFontSize().
Referenced by drawDataPointSymbol(), drawFluidicsPackChangedSymbol(), drawLotChangeSymbol(), drawSensorChangedSymbol(), and paint().
|
protected |
Returns the SVG icon renderer for symbol
Definition at line 690 of file KDChartLeveyJenningsDiagram.cpp.
Referenced by drawDataPointSymbol(), drawFluidicsPackChangedSymbol(), drawLotChangeSymbol(), and drawSensorChangedSymbol().
| Qt::Alignment LeveyJenningsDiagram::lotChangedSymbolPosition | ( | ) | const |
Returns the position of the lot change symbol.
Definition at line 114 of file KDChartLeveyJenningsDiagram.cpp.
References d.
|
overrideprotectedvirtual |
Reimplemented for internal purposes.
Implements KDChart::AbstractDiagram.
Definition at line 495 of file KDChartLeveyJenningsDiagram.cpp.
References KDChart::AbstractDiagram::checkInvariants(), KDChart::PaintContext::coordinatePlane(), d, KDChart::AbstractDiagram::dataBoundaries(), drawChanges(), drawDataPointSymbol(), drawLotChangeSymbol(), expectedMeanValue(), iconRect(), KDChart::AbstractGrid::isBoundariesValid(), KDChart::PaintContext::painter(), KDChart::AbstractDiagram::pen(), KDChart::PaintContext::setCoordinatePlane(), KDChart::AbstractCoordinatePlane::sharedAxisMasterPlane(), timeRange(), and KDChart::AbstractCoordinatePlane::translate().
| QPen LeveyJenningsDiagram::scanLinePen | ( | ) | const |
Returns the pen being used for drawing the scan line.
Definition at line 208 of file KDChartLeveyJenningsDiagram.cpp.
References d.
| Qt::Alignment LeveyJenningsDiagram::sensorChangedSymbolPosition | ( | ) | const |
Returns the position of the sensor changed symbol.
Definition at line 156 of file KDChartLeveyJenningsDiagram.cpp.
References d.
| QVector< QDateTime > LeveyJenningsDiagram::sensorChanges | ( | ) | const |
Returns the list of all sensor changes.
Definition at line 240 of file KDChartLeveyJenningsDiagram.cpp.
References d.
| void LeveyJenningsDiagram::setExpectedMeanValue | ( | float | meanValue | ) |
Sets the expected mean value over all QC values to meanValue.
Definition at line 248 of file KDChartLeveyJenningsDiagram.cpp.
References d, and KDChart::AbstractDiagram::update().
| void LeveyJenningsDiagram::setExpectedStandardDeviation | ( | float | sd | ) |
Sets the expected standard deviaction over all QC values to sd.
Definition at line 269 of file KDChartLeveyJenningsDiagram.cpp.
References d, and KDChart::AbstractDiagram::update().
| void LeveyJenningsDiagram::setFluidicsPackChangedSymbolPosition | ( | Qt::Alignment | pos | ) |
Sets the position of the fluidics pack changed symbol to pos. Valid values are: Qt::AlignBottom (default), Qt::AlignTop.
Definition at line 123 of file KDChartLeveyJenningsDiagram.cpp.
References d, and KDChart::AbstractDiagram::update().
| void LeveyJenningsDiagram::setFluidicsPackChanges | ( | const QVector< QDateTime > & | changes | ) |
Sets the date/time of all fluidics pack changes to changes.
Definition at line 164 of file KDChartLeveyJenningsDiagram.cpp.
References d, and KDChart::AbstractDiagram::update().
| void LeveyJenningsDiagram::setLotChangedSymbolPosition | ( | Qt::Alignment | pos | ) |
Sets the position of the lot change symbol to pos. Valid values are: Qt::AlignTop (default), Qt::AlignBottom.
Definition at line 102 of file KDChartLeveyJenningsDiagram.cpp.
References d, and KDChart::AbstractDiagram::update().
|
override |
Definition at line 303 of file KDChartLeveyJenningsDiagram.cpp.
References calculateMeanAndStandardDeviation(), and KDChart::AbstractCartesianDiagram::setModel().
| void LeveyJenningsDiagram::setScanLinePen | ( | const QPen & | pen | ) |
Sets the pen used for drawing the scan line to pen
Definition at line 196 of file KDChartLeveyJenningsDiagram.cpp.
References d, KDChart::AbstractDiagram::pen(), and KDChart::AbstractDiagram::update().
| void LeveyJenningsDiagram::setSensorChangedSymbolPosition | ( | Qt::Alignment | pos | ) |
Sets the position of the sensor changed symbol to pos. Valid values are: Qt::AlignBottom (default), Qt::AlignTop.
Definition at line 144 of file KDChartLeveyJenningsDiagram.cpp.
References d, and KDChart::AbstractDiagram::update().
| void LeveyJenningsDiagram::setSensorChanges | ( | const QVector< QDateTime > & | changes | ) |
Sets the date/time of all sensor changes to changes.
Definition at line 184 of file KDChartLeveyJenningsDiagram.cpp.
References d, and KDChart::AbstractDiagram::update().
| void LeveyJenningsDiagram::setSymbol | ( | Symbol | symbol, |
| const QString & | filename | ||
| ) |
Sets the symbol being used for symbol to a SVG file filename.
Definition at line 224 of file KDChartLeveyJenningsDiagram.cpp.
References d, symbol(), and KDChart::AbstractDiagram::update().
| void LeveyJenningsDiagram::setTimeRange | ( | const QPair< QDateTime, QDateTime > & | timeRange | ) |
Sets the timeRange visible on the x axis. Set it to QPair< QDateTime, QDateTime >() to use the default auto calculation.
Definition at line 465 of file KDChartLeveyJenningsDiagram.cpp.
References d, timeRange(), and KDChart::AbstractDiagram::update().
| QString LeveyJenningsDiagram::symbol | ( | Symbol | symbol | ) | const |
Returns the SVG file name usef for symbol
Definition at line 216 of file KDChartLeveyJenningsDiagram.cpp.
References d.
Referenced by iconRenderer(), and setSymbol().
| QPair< QDateTime, QDateTime > LeveyJenningsDiagram::timeRange | ( | ) | const |
Returns the timerange of the diagram's data.
Definition at line 434 of file KDChartLeveyJenningsDiagram.cpp.
References ceilDay(), ceilHour(), d, floorDay(), and floorHour().
Referenced by calculateDataBoundaries(), drawChanges(), paint(), and setTimeRange().