23 #ifndef KDCHARTCARTESIANCOORDINATEPLANE_H 24 #define KDCHARTCARTESIANCOORDINATEPLANE_H 32 class AbstractDiagram;
47 friend class CartesianGrid;
60 void setIsometricScaling (
bool onOff );
62 bool doesIsometricScaling() const;
64 const QPointF
translate ( const QPointF& diagramPoint ) const override;
69 qreal zoomFactorX() const override;
73 qreal zoomFactorY() const override;
78 void setZoomFactors( qreal factorX, qreal factorY ) override;
82 void setZoomFactorX( qreal factor ) override;
86 void setZoomFactorY( qreal factor ) override;
91 QPointF zoomCenter() const override;
96 void setZoomCenter( const QPointF& center ) override;
107 void setFixedDataCoordinateSpaceRelation(
bool fixed );
108 bool hasFixedDataCoordinateSpaceRelation() const;
117 void setXAxisStartAtZero(
bool fixedStart);
118 bool xAxisStartAtZero() const;
155 void setHorizontalRange( const
QPair<qreal, qreal> & range );
192 void setVerticalRange( const
QPair<qreal, qreal> & range );
201 QPair<qreal, qreal> horizontalRange() const;
210 QPair<qreal, qreal> verticalRange() const;
232 void setAutoAdjustHorizontalRangeToData(
unsigned int percentEmpty = 67 );
254 void setAutoAdjustVerticalRangeToData(
unsigned int percentEmpty = 67 );
266 unsigned int autoAdjustHorizontalRangeToData() const;
278 unsigned int autoAdjustVerticalRangeToData() const;
302 void setGridAttributes( Qt::Orientation orientation, const
GridAttributes & );
315 void resetGridAttributes( Qt::Orientation orientation );
331 const GridAttributes gridAttributes( Qt::Orientation orientation ) const;
345 bool hasOwnGridAttributes( Qt::Orientation orientation ) const;
354 void setAutoAdjustGridToZoom(
bool autoAdjust );
361 #if QT_VERSION < 0x040400 || defined(Q_COMPILER_MANGLES_RETURN_TYPE) 362 const bool autoAdjustGridToZoom()
const;
364 bool autoAdjustGridToZoom()
const;
378 void paint( QPainter* )
override;
387 QRectF visibleDataRange()
const;
393 QRectF logicalArea()
const;
402 QRectF diagramArea()
const;
409 QRectF visibleDiagramArea()
const;
417 void setHorizontalRangeReversed(
bool reverse );
422 bool isHorizontalRangeReversed()
const;
430 void setVerticalRangeReversed(
bool reverse );
435 bool isVerticalRangeReversed()
const;
440 void setGeometry(
const QRect& r )
override;
443 Qt::Orientations expandingDirections()
const override;
455 void adjustRangesToData();
461 void adjustHorizontalRangeToData();
467 void adjustVerticalRangeToData();
470 QRectF getRawDataBoundingRectFromDiagrams()
const;
471 QRectF adjustedToMaxEmptyInnerPercentage(
472 const QRectF& r,
unsigned int percentX,
unsigned int percentY )
const;
473 virtual QRectF calculateRawDataBoundingRect()
const;
477 virtual QRectF drawingArea()
const;
479 const QPointF translateBack(
const QPointF& screenPoint )
const;
481 void paintEvent ( QPaintEvent* );
482 void layoutDiagrams()
override;
484 bool doneSetZoomFactorX( qreal factor );
485 bool doneSetZoomFactorY( qreal factor );
486 bool doneSetZoomCenter(
const QPointF& center );
488 void handleFixedDataCoordinateSpaceRelation(
const QRectF& geometry );
491 bool hasHeightForWidth()
const override;
492 int heightForWidth(
int w )
const override;
493 QSize sizeHint()
const override;
499 void setHasOwnGridAttributes(
500 Qt::Orientation orientation,
bool on );
Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane, TernaryCoordinatePlane.
A chart with one or more diagrams.
AbstractDiagram defines the interface for diagram classes.
The class for cartesian axes.
QPointF translate(const TernaryPoint &point)
A set of attributes controlling the appearance of grids.
Cartesian coordinate plane.
#define KDCHART_DECLARE_PRIVATE_DERIVED_PARENT(X, ParentType)