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;
69 virtual qreal zoomFactorX() const;
73 virtual qreal zoomFactorY() const;
78 virtual
void setZoomFactors( qreal factorX, qreal factorY );
82 virtual
void setZoomFactorX( qreal factor );
86 virtual
void setZoomFactorY( qreal factor );
91 virtual QPointF zoomCenter() const;
96 virtual
void setZoomCenter( const QPointF& center );
107 void setFixedDataCoordinateSpaceRelation(
bool fixed );
108 bool hasFixedDataCoordinateSpaceRelation() const;
117 void setXAxisStartAtZero(
bool fixedStart);
118 bool xAxisStartAtZero() const;
151 void setHorizontalRange( const
QPair<qreal, qreal> & range );
184 void setVerticalRange( const
QPair<qreal, qreal> & range );
193 QPair<qreal, qreal> horizontalRange() const;
202 QPair<qreal, qreal> verticalRange() const;
224 void setAutoAdjustHorizontalRangeToData(
unsigned int percentEmpty = 67 );
246 void setAutoAdjustVerticalRangeToData(
unsigned int percentEmpty = 67 );
258 unsigned int autoAdjustHorizontalRangeToData() const;
270 unsigned int autoAdjustVerticalRangeToData() const;
294 void setGridAttributes( Qt::Orientation orientation, const
GridAttributes & );
307 void resetGridAttributes( Qt::Orientation orientation );
323 const GridAttributes gridAttributes( Qt::Orientation orientation ) const;
337 bool hasOwnGridAttributes( Qt::Orientation orientation ) const;
346 void setAutoAdjustGridToZoom(
bool autoAdjust );
353 #if QT_VERSION < 0x040400 || defined(Q_COMPILER_MANGLES_RETURN_TYPE)
354 const bool autoAdjustGridToZoom()
const;
356 bool autoAdjustGridToZoom()
const;
370 virtual void paint( QPainter* );
379 QRectF visibleDataRange()
const;
385 QRectF logicalArea()
const;
394 QRectF diagramArea()
const;
401 QRectF visibleDiagramArea()
const;
409 void setHorizontalRangeReversed(
bool reverse );
414 bool isHorizontalRangeReversed()
const;
422 void setVerticalRangeReversed(
bool reverse );
427 bool isVerticalRangeReversed()
const;
432 void setGeometry(
const QRect& r );
435 Qt::Orientations expandingDirections()
const;
447 void adjustRangesToData();
453 void adjustHorizontalRangeToData();
459 void adjustVerticalRangeToData();
462 QRectF getRawDataBoundingRectFromDiagrams()
const;
463 QRectF adjustedToMaxEmptyInnerPercentage(
464 const QRectF& r,
unsigned int percentX,
unsigned int percentY )
const;
465 virtual QRectF calculateRawDataBoundingRect()
const;
469 virtual QRectF drawingArea()
const;
471 const QPointF translateBack(
const QPointF& screenPoint )
const;
473 void paintEvent ( QPaintEvent* );
474 void layoutDiagrams();
476 bool doneSetZoomFactorX( qreal factor );
477 bool doneSetZoomFactorY( qreal factor );
478 bool doneSetZoomCenter(
const QPointF& center );
480 void handleFixedDataCoordinateSpaceRelation(
const QRectF& geometry );
483 bool hasHeightForWidth()
const;
484 int heightForWidth(
int w )
const;
485 QSize sizeHint()
const;
491 void setHasOwnGridAttributes(
492 Qt::Orientation orientation,
bool on );