![]() |
KD Chart API Documentation
3.1
|
Base class for any diagram type. More...
#include <KDChartAbstractPieDiagram.h>
Public Member Functions | |
| AbstractPieDiagram (QWidget *parent=nullptr, PolarCoordinatePlane *plane=nullptr) | |
| ~AbstractPieDiagram () override | |
| bool | autoRotateLabels () const |
| bool | compare (const AbstractPieDiagram *other) const |
| qreal | granularity () const |
| PieAttributes | pieAttributes () const |
| PieAttributes | pieAttributes (const QModelIndex &index) const |
| PieAttributes | pieAttributes (int column) const |
| void | setAutoRotateLabels (bool autoRotate) |
| void | setGranularity (qreal value) |
| void | setPieAttributes (const PieAttributes &a) |
| void | setPieAttributes (const QModelIndex &index, const PieAttributes &a) |
| void | setPieAttributes (int column, const PieAttributes &a) |
| Q_DECL_DEPRECATED void | setStartPosition (int degrees) |
| void | setThreeDPieAttributes (const QModelIndex &index, const ThreeDPieAttributes &a) |
| void | setThreeDPieAttributes (const ThreeDPieAttributes &a) |
| void | setThreeDPieAttributes (int column, const ThreeDPieAttributes &a) |
| Q_DECL_DEPRECATED int | startPosition () const |
| ThreeDPieAttributes | threeDPieAttributes () const |
| ThreeDPieAttributes | threeDPieAttributes (const QModelIndex &index) const |
| ThreeDPieAttributes | threeDPieAttributes (int column) const |
Public Member Functions inherited from KDChart::AbstractPolarDiagram | |
| AbstractPolarDiagram (QWidget *parent=nullptr, PolarCoordinatePlane *plane=nullptr) | |
| ~AbstractPolarDiagram () override | |
| int | columnCount () const |
| virtual qreal | numberOfDatasets () const |
| virtual qreal | numberOfGridRings () const =0 |
| virtual qreal | numberOfValuesPerDataset () const =0 |
| const PolarCoordinatePlane * | polarCoordinatePlane () const |
| int | rowCount () const |
| virtual qreal | valueTotals () const =0 |
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 |
| virtual void | paint (PaintContext *paintContext)=0 |
| 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... | |
| virtual void | resize (const QSizeF &area)=0 |
| void | scrollTo (const QModelIndex &index, ScrollHint hint=EnsureVisible) override |
| void | setAllowOverlappingDataValueTexts (bool allow) |
| void | setAntiAliasing (bool enabled) |
| virtual void | setAttributesModel (AttributesModel *model) |
| Sets an external AttributesModel on this diagram. More... | |
| void | setBrush (const QBrush &brush) |
| void | setBrush (const QModelIndex &index, const QBrush &brush) |
| void | setBrush (int dataset, const QBrush &brush) |
| virtual void | setCoordinatePlane (AbstractCoordinatePlane *plane) |
| 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 |
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 () |
Protected Slots inherited from KDChart::AbstractDiagram | |
| void | setDataBoundariesDirty () const |
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 const QPair< QPointF, QPointF > | calculateDataBoundaries () const =0 |
| 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 |
Base class for any diagram type.
Definition at line 23 of file KDChartAbstractPieDiagram.h.
|
explicit |
Definition at line 32 of file KDChartAbstractPieDiagram.cpp.
|
override |
Definition at line 38 of file KDChartAbstractPieDiagram.cpp.
| bool AbstractPieDiagram::autoRotateLabels | ( | ) | const |
Definition at line 98 of file KDChartAbstractPieDiagram.cpp.
References d.
| bool AbstractPieDiagram::compare | ( | const AbstractPieDiagram * | other | ) | const |
Returns true if both diagrams have the same settings.
Definition at line 46 of file KDChartAbstractPieDiagram.cpp.
References granularity(), and startPosition().
| qreal AbstractPieDiagram::granularity | ( | ) | const |
Definition at line 74 of file KDChartAbstractPieDiagram.cpp.
References d.
Referenced by compare(), and KDChart::RingDiagram::paint().
| PieAttributes AbstractPieDiagram::pieAttributes | ( | ) | const |
Definition at line 121 of file KDChartAbstractPieDiagram.cpp.
References d, and KDChart::PieAttributesRole.
Referenced by KDChart::PieDiagram::calculateDataBoundaries(), KDChart::RingDiagram::calculateDataBoundaries(), KDChart::RingDiagram::paint(), and pieAttributes().
| PieAttributes AbstractPieDiagram::pieAttributes | ( | const QModelIndex & | index | ) | const |
Definition at line 134 of file KDChartAbstractPieDiagram.cpp.
References d, and KDChart::PieAttributesRole.
| PieAttributes AbstractPieDiagram::pieAttributes | ( | int | column | ) | const |
Definition at line 126 of file KDChartAbstractPieDiagram.cpp.
References d, pieAttributes(), and KDChart::PieAttributesRole.
| void AbstractPieDiagram::setAutoRotateLabels | ( | bool | autoRotate | ) |
If this property is set, and if a pie's TextAttributes have no rotation set, its labels will automatically be rotated according to the pie's angle.
Definition at line 93 of file KDChartAbstractPieDiagram.cpp.
References d.
| void AbstractPieDiagram::setGranularity | ( | qreal | value | ) |
Set the granularity: the smaller the granularity the more your diagram segments will show facettes instead of rounded segments.
| value | the granularity value between 0.05 (one twentieth of a degree) and 36.0 (one tenth of a full circle), other values will be interpreted as 1.0. |
Definition at line 69 of file KDChartAbstractPieDiagram.cpp.
References d.
| void AbstractPieDiagram::setPieAttributes | ( | const PieAttributes & | a | ) |
Definition at line 103 of file KDChartAbstractPieDiagram.cpp.
References d, KDChart::AbstractDiagram::layoutChanged(), and KDChart::PieAttributesRole.
| void AbstractPieDiagram::setPieAttributes | ( | const QModelIndex & | index, |
| const PieAttributes & | a | ||
| ) |
Definition at line 115 of file KDChartAbstractPieDiagram.cpp.
References d, KDChart::AbstractDiagram::layoutChanged(), and KDChart::PieAttributesRole.
| void AbstractPieDiagram::setPieAttributes | ( | int | column, |
| const PieAttributes & | a | ||
| ) |
Definition at line 109 of file KDChartAbstractPieDiagram.cpp.
References d, KDChart::AbstractDiagram::layoutChanged(), and KDChart::PieAttributesRole.
| void AbstractPieDiagram::setStartPosition | ( | int | degrees | ) |
Definition at line 81 of file KDChartAbstractPieDiagram.cpp.
| void AbstractPieDiagram::setThreeDPieAttributes | ( | const QModelIndex & | index, |
| const ThreeDPieAttributes & | a | ||
| ) |
Definition at line 154 of file KDChartAbstractPieDiagram.cpp.
References KDChart::AbstractDiagram::layoutChanged(), and KDChart::ThreeDPieAttributesRole.
| void AbstractPieDiagram::setThreeDPieAttributes | ( | const ThreeDPieAttributes & | a | ) |
Definition at line 142 of file KDChartAbstractPieDiagram.cpp.
References d, KDChart::AbstractDiagram::layoutChanged(), and KDChart::ThreeDPieAttributesRole.
| void AbstractPieDiagram::setThreeDPieAttributes | ( | int | column, |
| const ThreeDPieAttributes & | a | ||
| ) |
Definition at line 148 of file KDChartAbstractPieDiagram.cpp.
References d, KDChart::AbstractDiagram::layoutChanged(), and KDChart::ThreeDPieAttributesRole.
| int AbstractPieDiagram::startPosition | ( | ) | const |
Definition at line 87 of file KDChartAbstractPieDiagram.cpp.
Referenced by compare().
| ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes | ( | ) | const |
Definition at line 160 of file KDChartAbstractPieDiagram.cpp.
References d, and KDChart::ThreeDPieAttributesRole.
Referenced by threeDPieAttributes().
| ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes | ( | const QModelIndex & | index | ) | const |
Definition at line 173 of file KDChartAbstractPieDiagram.cpp.
References d, and KDChart::ThreeDPieAttributesRole.
| ThreeDPieAttributes AbstractPieDiagram::threeDPieAttributes | ( | int | column | ) | const |
Definition at line 165 of file KDChartAbstractPieDiagram.cpp.
References d, threeDPieAttributes(), and KDChart::ThreeDPieAttributesRole.