11 #ifndef KDCHARTCARTESIANCOORDINATEPLANE_H
12 #define KDCHARTCARTESIANCOORDINATEPLANE_H
20 class AbstractDiagram;
48 void setIsometricScaling(
bool onOff);
50 bool doesIsometricScaling() const;
52 const QPointF
translate(const QPointF &diagramPoint) const override;
57 qreal zoomFactorX() const override;
61 qreal zoomFactorY() const override;
66 void setZoomFactors(qreal factorX, qreal factorY) override;
70 void setZoomFactorX(qreal factor) override;
74 void setZoomFactorY(qreal factor) override;
79 QPointF zoomCenter() const override;
84 void setZoomCenter(const QPointF ¢er) override;
95 void setFixedDataCoordinateSpaceRelation(
bool fixed);
96 bool hasFixedDataCoordinateSpaceRelation() const;
105 void setXAxisStartAtZero(
bool fixedStart);
106 bool xAxisStartAtZero() const;
143 void setHorizontalRange(const QPair<qreal, qreal> &range);
180 void setVerticalRange(const QPair<qreal, qreal> &range);
189 QPair<qreal, qreal> horizontalRange() const;
198 QPair<qreal, qreal> verticalRange() const;
220 void setAutoAdjustHorizontalRangeToData(
unsigned int percentEmpty = 67);
242 void setAutoAdjustVerticalRangeToData(
unsigned int percentEmpty = 67);
254 unsigned int autoAdjustHorizontalRangeToData() const;
266 unsigned int autoAdjustVerticalRangeToData() const;
289 void setGridAttributes(Qt::Orientation orientation, const
GridAttributes &);
302 void resetGridAttributes(Qt::Orientation orientation);
318 const
GridAttributes gridAttributes(Qt::Orientation orientation) const;
332 bool hasOwnGridAttributes(Qt::Orientation orientation) const;
341 void setAutoAdjustGridToZoom(
bool autoAdjust);
348 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && defined(Q_COMPILER_MANGLES_RETURN_TYPE)
349 const bool autoAdjustGridToZoom()
const;
351 bool autoAdjustGridToZoom()
const;
365 void paint(QPainter *)
override;
374 QRectF visibleDataRange()
const;
380 QRectF logicalArea()
const;
389 QRectF diagramArea()
const;
396 QRectF visibleDiagramArea()
const;
404 void setHorizontalRangeReversed(
bool reverse);
409 bool isHorizontalRangeReversed()
const;
417 void setVerticalRangeReversed(
bool reverse);
422 bool isVerticalRangeReversed()
const;
427 void setGeometry(
const QRect &r)
override;
430 Qt::Orientations expandingDirections()
const override;
441 void adjustRangesToData();
447 void adjustHorizontalRangeToData();
453 void adjustVerticalRangeToData();
456 QRectF getRawDataBoundingRectFromDiagrams()
const;
457 QRectF adjustedToMaxEmptyInnerPercentage(
458 const QRectF &r,
unsigned int percentX,
unsigned int percentY)
const;
459 virtual QRectF calculateRawDataBoundingRect()
const;
463 virtual QRectF drawingArea()
const;
466 const QPointF translateBack(
const QPointF &screenPoint)
const;
470 void layoutDiagrams()
override;
472 bool doneSetZoomFactorX(qreal factor);
473 bool doneSetZoomFactorY(qreal factor);
474 bool doneSetZoomCenter(
const QPointF ¢er);
476 void handleFixedDataCoordinateSpaceRelation(
const QRectF &geometry);
479 bool hasHeightForWidth()
const override;
480 int heightForWidth(
int w)
const override;
481 QSize sizeHint()
const override;
487 void setHasOwnGridAttributes(
488 Qt::Orientation orientation,
bool on);
#define KDCHART_DECLARE_PRIVATE_DERIVED_PARENT(X, ParentType)
QPointF translate(const TernaryPoint &point)
Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane,...
AbstractDiagram defines the interface for diagram classes.
Cartesian coordinate plane.
void paintEvent(QPaintEvent *)
A chart with one or more diagrams.
A set of attributes controlling the appearance of grids.
QList< DataDimension > DataDimensionsList