23 #ifndef KDCHARTABSTRACTDIAGRAM_H 24 #define KDCHARTABSTRACTDIAGRAM_H 28 #include <QAbstractItemView> 36 class AbstractCoordinatePlane;
37 class AttributesModel;
38 class DataValueAttributes;
62 Private *p,
QWidget* parent, AbstractCoordinatePlane* plane );
64 QWidget* parent = 0, AbstractCoordinatePlane* plane = 0 );
89 const
QPair<QPointF, QPointF> dataBoundaries() const;
106 virtual
void resize ( const QSizeF& area ) = 0;
109 void setModel ( QAbstractItemModel * model ) override;
112 void setSelectionModel( QItemSelectionModel* selectionModel ) override;
150 virtual
bool usesExternalAttributesModel() const;
166 void setRootIndex ( const QModelIndex& idx ) override;
169 QRect visualRect(const QModelIndex &index) const override;
171 void scrollTo(const QModelIndex &index, ScrollHint hint = EnsureVisible) override;
173 QModelIndex indexAt(const QPoint &point) const override;
175 QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override;
177 int horizontalOffset() const override;
179 int verticalOffset() const override;
181 bool isIndexHidden(const QModelIndex &index) const override;
183 void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command) override;
185 QRegion visualRegionForSelection(const QItemSelection &selection) const override;
186 virtual QRegion visualRegion(const QModelIndex &index) const;
188 #if QT_VERSION < 0x050000 189 virtual void dataChanged(
const QModelIndex &topLeft,
const QModelIndex &bottomRight);
191 void dataChanged(
const QModelIndex &topLeft,
const QModelIndex &bottomRight,
const QVector<int> &roles =
QVector<int>())
override;
194 void doItemsLayout()
override;
202 AbstractCoordinatePlane* coordinatePlane()
const;
210 virtual void setCoordinatePlane( AbstractCoordinatePlane* plane );
226 void setHidden(
const QModelIndex & index,
bool hidden );
240 void setHidden(
int dataset,
bool hidden );
253 void setHidden(
bool hidden );
261 bool isHidden()
const;
270 bool isHidden(
int dataset )
const;
279 bool isHidden(
const QModelIndex & index )
const;
288 void setDataValueAttributes(
const QModelIndex & index,
337 void setPen(
const QModelIndex& index,
const QPen& pen );
344 void setPen(
int dataset,
const QPen& pen );
350 void setPen(
const QPen& pen );
366 QPen pen(
int dataset )
const;
374 QPen pen(
const QModelIndex& index )
const;
382 void setBrush(
const QModelIndex& index,
const QBrush& brush);
389 void setBrush(
int dataset,
const QBrush& brush );
395 void setBrush(
const QBrush& brush);
403 QBrush brush()
const;
411 QBrush brush(
int dataset )
const;
419 QBrush brush(
const QModelIndex& index )
const;
427 void setUnitPrefix(
const QString& prefix,
int column, Qt::Orientation orientation );
433 void setUnitPrefix(
const QString& prefix, Qt::Orientation orientation );
441 void setUnitSuffix(
const QString& suffix,
int column, Qt::Orientation orientation );
447 void setUnitSuffix(
const QString& suffix, Qt::Orientation orientation );
457 QString unitPrefix(
int column, Qt::Orientation orientation,
bool fallback =
false )
const;
463 QString unitPrefix( Qt::Orientation orientation )
const;
473 QString unitSuffix(
int column, Qt::Orientation orientation,
bool fallback =
false )
const;
479 QString unitSuffix( Qt::Orientation orientation )
const;
485 void setAllowOverlappingDataValueTexts(
bool allow );
490 bool allowOverlappingDataValueTexts()
const;
497 void setAntiAliasing(
bool enabled );
503 bool antiAliasing()
const;
511 void useDefaultColors();
518 void useRainbowColors();
525 void useSubduedColors();
531 QStringList itemRowLabels()
const;
537 QStringList datasetLabels()
const;
583 void setPercentMode(
bool percent );
597 bool percentMode()
const;
599 virtual void paintMarker( QPainter* painter,
601 const QBrush& brush,
const QPen&,
602 const QPointF& point,
const QSizeF& size );
618 int datasetDimension()
const;
626 void setDatasetDimension(
int dimension );
629 void setDatasetDimensionInternal(
int dimension );
635 const QModelIndex& index,
636 const QPointF& pos );
637 void paintMarker( QPainter* painter,
638 const QModelIndex& index,
639 const QPointF& pos );
640 void paintDataValueText( QPainter* painter,
const QModelIndex& index,
641 const QPointF& pos, qreal value );
647 QModelIndexList indexesAt(
const QPoint& point )
const;
648 QModelIndexList indexesIn(
const QRect& rect )
const;
651 virtual bool checkInvariants(
bool justReturnTheStatus=
false )
const;
655 void setDataBoundariesDirty()
const;
665 virtual void paintDataValueTexts( QPainter* painter );
673 virtual void paintMarkers( QPainter* painter );
674 void setAttributesModelRootIndex(
const QModelIndex& );
675 QModelIndex attributesModelRootIndex()
const;
684 qreal valueForCell(
int row,
int column )
const;
701 void aboutToBeDestroyed();
704 void modelsChanged();
711 void modelDataChanged();
717 void propertiesChanged();
720 void boundariesChanged();
722 void viewportCoordinateSystemChanged();
725 QModelIndex conditionallyMapFromSource(
const QModelIndex & sourceIndex )
const;
Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane, TernaryCoordinatePlane.
Diagram attributes dealing with data value labels.
#define KDCHART_DECLARE_PRIVATE_BASE_POLYMORPHIC(X)
PrivateAttributesModel(QAbstractItemModel *model, QObject *parent=0)
QList< AbstractDiagram * > AbstractDiagramList
AbstractDiagram defines the interface for diagram classes.
Class only listed here to document inheritance of some KDChart classes.
A proxy model used for decorating data with attributes.
QList< const AbstractDiagram * > ConstAbstractDiagramList
Stores information about painting diagrams.
A set of attributes controlling the appearance of data set markers.
Class only listed here to document inheritance of some KDChart classes.
Cartesian coordinate plane.
Internally used class just adding a special constructor used by AbstractDiagram.