![]() |
KD Chart API Documentation
3.1
|
Cartesian coordinate plane. More...
#include <KDChartCartesianCoordinatePlane.h>
Public Slots | |
void | adjustHorizontalRangeToData () |
void | adjustRangesToData () |
Adjust both, horizontal and vertical range settings to the ranges covered by the model's data values. More... | |
void | adjustVerticalRangeToData () |
![]() | |
void | layoutPlanes () |
void | relayout () |
void | setGridNeedsRecalculate () |
void | update () |
Public Member Functions | |
CartesianCoordinatePlane (Chart *parent=nullptr) | |
~CartesianCoordinatePlane () override | |
void | addDiagram (AbstractDiagram *diagram) override |
bool | autoAdjustGridToZoom () const |
unsigned int | autoAdjustHorizontalRangeToData () const |
Returns the maximal allowed percent of the horizontal space covered by the coordinate plane that may be empty. More... | |
unsigned int | autoAdjustVerticalRangeToData () const |
Returns the maximal allowed percent of the vertical space covered by the coordinate plane that may be empty. More... | |
AxesCalcMode | axesCalcModeX () const |
AxesCalcMode | axesCalcModeY () const |
QRectF | diagramArea () const |
bool | doesIsometricScaling () const |
Qt::Orientations | expandingDirections () const override |
const GridAttributes | gridAttributes (Qt::Orientation orientation) const |
bool | hasFixedDataCoordinateSpaceRelation () const |
bool | hasOwnGridAttributes (Qt::Orientation orientation) const |
QPair< qreal, qreal > | horizontalRange () const |
bool | isHorizontalRangeReversed () const |
bool | isVerticalRangeReversed () const |
QRectF | logicalArea () const |
void | paint (QPainter *) override |
void | resetGridAttributes (Qt::Orientation orientation) |
void | setAutoAdjustGridToZoom (bool autoAdjust) |
void | setAutoAdjustHorizontalRangeToData (unsigned int percentEmpty=67) |
Automatically adjust horizontal range settings to the ranges covered by the model's values, when ever the data have changed, and then emit horizontalRangeAutomaticallyAdjusted. More... | |
void | setAutoAdjustVerticalRangeToData (unsigned int percentEmpty=67) |
Automatically adjust vertical range settings to the ranges covered by the model's values, when ever the data have changed, and then emit verticalRangeAutomaticallyAdjusted. More... | |
void | setAxesCalcModes (AxesCalcMode mode) |
void | setAxesCalcModeX (AxesCalcMode mode) |
void | setAxesCalcModeY (AxesCalcMode mode) |
void | setFixedDataCoordinateSpaceRelation (bool fixed) |
void | setGeometry (const QRect &r) override |
void | setGridAttributes (Qt::Orientation orientation, const GridAttributes &) |
void | setHorizontalRange (const QPair< qreal, qreal > &range) |
Set the boundaries of the visible value space displayed in horizontal direction. More... | |
void | setHorizontalRangeReversed (bool reverse) |
void | setIsometricScaling (bool onOff) |
void | setVerticalRange (const QPair< qreal, qreal > &range) |
Set the boundaries of the visible value space displayed in vertical direction. More... | |
void | setVerticalRangeReversed (bool reverse) |
void | setXAxisStartAtZero (bool fixedStart) |
void | setZoomCenter (const QPointF ¢er) override |
void | setZoomFactors (qreal factorX, qreal factorY) override |
void | setZoomFactorX (qreal factor) override |
void | setZoomFactorY (qreal factor) override |
AbstractCoordinatePlane * | sharedAxisMasterPlane (QPainter *p=nullptr) override |
const QPointF | translate (const QPointF &diagramPoint) const override |
const QPointF | translateBack (const QPointF &screenPoint) const |
QPair< qreal, qreal > | verticalRange () const |
QRectF | visibleDataRange () const |
QRectF | visibleDiagramArea () const |
bool | xAxisStartAtZero () const |
QPointF | zoomCenter () const override |
qreal | zoomFactorX () const override |
qreal | zoomFactorY () const override |
![]() | |
~AbstractCoordinatePlane () override | |
AbstractDiagram * | diagram () |
AbstractDiagramList | diagrams () |
ConstAbstractDiagramList | diagrams () const |
Qt::Orientations | expandingDirections () const override |
QRect | geometry () const override |
GridAttributes | globalGridAttributes () const |
DataDimensionsList | gridDimensionsList () |
bool | isCornerSpacersEnabled () const |
bool | isEmpty () const override |
bool | isRubberBandZoomingEnabled () const |
bool | isVisiblePoint (const QPointF &point) const |
QSize | maximumSize () const override |
QSize | minimumSize () const override |
virtual void | mouseDoubleClickEvent (QMouseEvent *event) |
virtual void | mouseMoveEvent (QMouseEvent *event) |
virtual void | mousePressEvent (QMouseEvent *event) |
virtual void | mouseReleaseEvent (QMouseEvent *event) |
Chart * | parent () |
const Chart * | parent () const |
AbstractCoordinatePlane * | referenceCoordinatePlane () const |
virtual void | replaceDiagram (AbstractDiagram *diagram, AbstractDiagram *oldDiagram=nullptr) |
void | setCornerSpacersEnabled (bool enable) |
void | setGeometry (const QRect &r) override |
void | setGlobalGridAttributes (const GridAttributes &) |
void | setParent (Chart *parent) |
void | setReferenceCoordinatePlane (AbstractCoordinatePlane *plane) |
void | setRubberBandZoomingEnabled (bool enable) |
QSize | sizeHint () const override |
virtual void | takeDiagram (AbstractDiagram *diagram) |
![]() | |
~AbstractArea () override | |
virtual int | bottomOverlap (bool doNotRecalculate=false) const |
virtual int | leftOverlap (bool doNotRecalculate=false) const |
void | paintAll (QPainter &painter) override |
virtual void | paintIntoRect (QPainter &painter, const QRect &rect) |
Draws the background and frame, then calls paint(). More... | |
virtual int | rightOverlap (bool doNotRecalculate=false) const |
virtual int | topOverlap (bool doNotRecalculate=false) const |
![]() | |
void | alignToReferencePoint (const RelativePosition &position) |
BackgroundAttributes | backgroundAttributes () const |
bool | compare (const AbstractAreaBase *other) const |
FrameAttributes | frameAttributes () const |
void | getFrameLeadings (int &left, int &top, int &right, int &bottom) const |
virtual void | paintBackground (QPainter &painter, const QRect &rectangle) |
virtual void | paintFrame (QPainter &painter, const QRect &rectangle) |
void | setBackgroundAttributes (const BackgroundAttributes &a) |
void | setFrameAttributes (const FrameAttributes &a) |
![]() | |
AbstractLayoutItem (Qt::Alignment itemAlignment={}) | |
virtual void | paintCtx (PaintContext *context) |
QLayout * | parentLayout () |
void | removeFromParentLayout () |
void | setParentLayout (QLayout *lay) |
virtual void | setParentWidget (QWidget *widget) |
virtual void | sizeHintChanged () const |
Protected Slots | |
void | slotLayoutChanged (AbstractDiagram *) |
Protected Member Functions | |
QRectF | adjustedToMaxEmptyInnerPercentage (const QRectF &r, unsigned int percentX, unsigned int percentY) const |
virtual QRectF | calculateRawDataBoundingRect () const |
bool | doneSetZoomCenter (const QPointF ¢er) |
bool | doneSetZoomFactorX (qreal factor) |
bool | doneSetZoomFactorY (qreal factor) |
virtual QRectF | drawingArea () const |
DataDimensionsList | getDataDimensionsList () const override |
QRectF | getRawDataBoundingRectFromDiagrams () const |
void | handleFixedDataCoordinateSpaceRelation (const QRectF &geometry) |
bool | hasHeightForWidth () const override |
int | heightForWidth (int w) const override |
void | layoutDiagrams () override |
void | paintEvent (QPaintEvent *) |
QSize | sizeHint () const override |
![]() | |
AbstractCoordinatePlane (Chart *parent=nullptr) | |
![]() | |
AbstractArea () | |
QRect | areaGeometry () const override |
void | positionHasChanged () override |
![]() | |
AbstractAreaBase () | |
virtual | ~AbstractAreaBase () |
QRect | innerRect () const |
Additional Inherited Members | |
![]() | |
enum | AxesCalcMode { Linear , Logarithmic } |
![]() | |
void | boundariesChanged () |
void | destroyedCoordinatePlane (AbstractCoordinatePlane *) |
void | geometryChanged (QRect, QRect) |
void | internal_geometryChanged (QRect, QRect) |
void | needLayoutPlanes () |
void | needRelayout () |
void | needUpdate () |
void | propertiesChanged () |
void | viewportCoordinateSystemChanged () |
![]() | |
void | positionChanged (AbstractArea *) |
![]() | |
static void | paintBackgroundAttributes (QPainter &painter, const QRect &rectangle, const KDChart::BackgroundAttributes &attributes) |
static void | paintFrameAttributes (QPainter &painter, const QRect &rectangle, const KDChart::FrameAttributes &attributes) |
![]() | |
QWidget * | mParent = nullptr |
QLayout * | mParentLayout = nullptr |
Cartesian coordinate plane.
Definition at line 27 of file KDChartCartesianCoordinatePlane.h.
|
explicit |
Definition at line 42 of file KDChartCartesianCoordinatePlane.cpp.
|
override |
Definition at line 48 of file KDChartCartesianCoordinatePlane.cpp.
|
overridevirtual |
Adds a diagram to this coordinate plane.
diagram | The diagram to add. |
Reimplemented from KDChart::AbstractCoordinatePlane.
Reimplemented in KDChart::LeveyJenningsCoordinatePlane.
Definition at line 58 of file KDChartCartesianCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::addDiagram(), KDChart::AbstractCoordinatePlane::diagram(), KDChart::AbstractDiagram::layoutChanged(), KDChart::AbstractCoordinatePlane::propertiesChanged(), KDChart::AbstractDiagram::propertiesChanged(), and slotLayoutChanged().
Referenced by KDChart::LeveyJenningsCoordinatePlane::addDiagram().
|
protected |
Definition at line 151 of file KDChartCartesianCoordinatePlane.cpp.
References axesCalcModeX(), axesCalcModeY(), d, and KDChart::AbstractCoordinatePlane::Logarithmic.
Referenced by calculateRawDataBoundingRect().
|
slot |
Adjust horizontal range settings to the ranges covered by the model's data values.
Definition at line 633 of file KDChartCartesianCoordinatePlane.cpp.
References d, getRawDataBoundingRectFromDiagrams(), layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
|
slot |
Adjust both, horizontal and vertical range settings to the ranges covered by the model's data values.
Definition at line 622 of file KDChartCartesianCoordinatePlane.cpp.
References d, getRawDataBoundingRectFromDiagrams(), layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
|
slot |
Adjust vertical range settings to the ranges covered by the model's data values.
Definition at line 642 of file KDChartCartesianCoordinatePlane.cpp.
References d, getRawDataBoundingRectFromDiagrams(), layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
bool CartesianCoordinatePlane::autoAdjustGridToZoom | ( | ) | const |
Return the status of the built-in grid adjusting feature.
Definition at line 742 of file KDChartCartesianCoordinatePlane.cpp.
References d.
unsigned int CartesianCoordinatePlane::autoAdjustHorizontalRangeToData | ( | ) | const |
Returns the maximal allowed percent of the horizontal space covered by the coordinate plane that may be empty.
Definition at line 673 of file KDChartCartesianCoordinatePlane.cpp.
References d.
unsigned int CartesianCoordinatePlane::autoAdjustVerticalRangeToData | ( | ) | const |
Returns the maximal allowed percent of the vertical space covered by the coordinate plane that may be empty.
Definition at line 678 of file KDChartCartesianCoordinatePlane.cpp.
References d.
CartesianCoordinatePlane::AxesCalcMode CartesianCoordinatePlane::axesCalcModeX | ( | ) | const |
Definition at line 537 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by adjustedToMaxEmptyInnerPercentage(), and getDataDimensionsList().
CartesianCoordinatePlane::AxesCalcMode CartesianCoordinatePlane::axesCalcModeY | ( | ) | const |
Definition at line 532 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by adjustedToMaxEmptyInnerPercentage(), and getDataDimensionsList().
|
protectedvirtual |
Definition at line 191 of file KDChartCartesianCoordinatePlane.cpp.
References adjustedToMaxEmptyInnerPercentage(), d, and getRawDataBoundingRectFromDiagrams().
Referenced by getDataDimensionsList().
QRectF CartesianCoordinatePlane::diagramArea | ( | ) | const |
Returns the (physical) area occupied by the diagram. Unless zoom is applied (which is also true when a fixed data coordinate / space relation is used),
.
Definition at line 319 of file KDChartCartesianCoordinatePlane.cpp.
References d, and logicalArea().
Referenced by visibleDiagramArea().
bool CartesianCoordinatePlane::doesIsometricScaling | ( | ) | const |
Definition at line 444 of file KDChartCartesianCoordinatePlane.cpp.
References d.
|
protected |
Definition at line 473 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by handleFixedDataCoordinateSpaceRelation(), and setZoomCenter().
|
protected |
Definition at line 449 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by handleFixedDataCoordinateSpaceRelation(), setZoomFactors(), and setZoomFactorX().
|
protected |
Definition at line 461 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by handleFixedDataCoordinateSpaceRelation(), setZoomFactors(), and setZoomFactorY().
|
protectedvirtual |
Definition at line 287 of file KDChartCartesianCoordinatePlane.cpp.
References KDChart::AbstractArea::areaGeometry().
Referenced by layoutDiagrams(), paint(), setFixedDataCoordinateSpaceRelation(), setZoomCenter(), setZoomFactors(), setZoomFactorX(), setZoomFactorY(), visibleDataRange(), and visibleDiagramArea().
|
override |
Definition at line 855 of file KDChartCartesianCoordinatePlane.cpp.
References d.
|
overrideprotectedvirtual |
Implements KDChart::AbstractCoordinatePlane.
Definition at line 239 of file KDChartCartesianCoordinatePlane.cpp.
References axesCalcModeX(), axesCalcModeY(), calculateRawDataBoundingRect(), KDChart::AbstractDiagram::datasetDimension(), KDChart::AbstractCoordinatePlane::diagrams(), gridAttributes(), KDChart::GridAttributes::gridGranularitySequence(), KDChart::GridAttributes::gridStepWidth(), KDChart::GridAttributes::gridSubStepWidth(), and KDChart::AbstractCartesianDiagram::referenceDiagram().
|
protected |
Definition at line 122 of file KDChartCartesianCoordinatePlane.cpp.
References KDChart::AbstractDiagram::dataBoundaries(), KDChart::AbstractCoordinatePlane::diagram(), and KDChart::AbstractCoordinatePlane::diagrams().
Referenced by adjustHorizontalRangeToData(), adjustRangesToData(), adjustVerticalRangeToData(), and calculateRawDataBoundingRect().
const GridAttributes CartesianCoordinatePlane::gridAttributes | ( | Qt::Orientation | orientation | ) | const |
Definition at line 702 of file KDChartCartesianCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::globalGridAttributes(), and hasOwnGridAttributes().
Referenced by getDataDimensionsList().
|
protected |
Definition at line 379 of file KDChartCartesianCoordinatePlane.cpp.
References d, doneSetZoomCenter(), doneSetZoomFactorX(), doneSetZoomFactorY(), KDChart::AbstractCoordinatePlane::geometry(), KDChart::AbstractCoordinatePlane::propertiesChanged(), zoomCenter(), zoomFactorX(), and zoomFactorY().
Referenced by layoutDiagrams(), and setFixedDataCoordinateSpaceRelation().
bool CartesianCoordinatePlane::hasFixedDataCoordinateSpaceRelation | ( | ) | const |
Definition at line 361 of file KDChartCartesianCoordinatePlane.cpp.
References d.
|
overrideprotected |
Definition at line 861 of file KDChartCartesianCoordinatePlane.cpp.
References d.
bool CartesianCoordinatePlane::hasOwnGridAttributes | ( | Qt::Orientation | orientation | ) | const |
If false, the grid will use the global attributes set by AbstractCoordinatePlane::globalGridAttributes (or the default attributes, resp.)
Definition at line 723 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by gridAttributes().
|
overrideprotected |
Definition at line 866 of file KDChartCartesianCoordinatePlane.cpp.
References logicalArea().
Referenced by setGeometry(), and sizeHint().
QPair< qreal, qreal > CartesianCoordinatePlane::horizontalRange | ( | ) | const |
Definition at line 612 of file KDChartCartesianCoordinatePlane.cpp.
References d.
bool CartesianCoordinatePlane::isHorizontalRangeReversed | ( | ) | const |
Definition at line 797 of file KDChartCartesianCoordinatePlane.cpp.
References d.
bool CartesianCoordinatePlane::isVerticalRangeReversed | ( | ) | const |
Definition at line 812 of file KDChartCartesianCoordinatePlane.cpp.
References d.
|
overrideprotectedvirtual |
Distribute the available space among the diagrams and axes.
Implements KDChart::AbstractCoordinatePlane.
Definition at line 333 of file KDChartCartesianCoordinatePlane.cpp.
References d, drawingArea(), KDChart::AbstractCoordinatePlane::gridDimensionsList(), handleFixedDataCoordinateSpaceRelation(), logicalArea(), and KDChart::AbstractCoordinatePlane::update().
Referenced by adjustHorizontalRangeToData(), adjustRangesToData(), adjustVerticalRangeToData(), setAutoAdjustHorizontalRangeToData(), setAutoAdjustVerticalRangeToData(), setHorizontalRange(), setHorizontalRangeReversed(), setIsometricScaling(), setVerticalRange(), setVerticalRangeReversed(), and slotLayoutChanged().
QRectF CartesianCoordinatePlane::logicalArea | ( | ) | const |
Returns the logical area, i.e., the rectangle defined by the very top left and very bottom right coordinate.
Definition at line 298 of file KDChartCartesianCoordinatePlane.cpp.
References d, KDChart::DataDimension::distance(), KDChart::DataDimension::end, and KDChart::DataDimension::start.
Referenced by diagramArea(), heightForWidth(), layoutDiagrams(), setZoomCenter(), setZoomFactors(), setZoomFactorX(), and setZoomFactorY().
|
overridevirtual |
reimp
Implements KDChart::AbstractLayoutItem.
Definition at line 70 of file KDChartCartesianCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::diagrams(), drawingArea(), KDChart::PaintContext::setCoordinatePlane(), KDChart::PaintContext::setPainter(), and KDChart::PaintContext::setRectangle().
|
protected |
void CartesianCoordinatePlane::resetGridAttributes | ( | Qt::Orientation | orientation | ) |
Reset the attributes to be used for grid lines drawn in horizontal direction (or in vertical direction, resp.). By calling this method you specify that the global attributes set by AbstractCoordinatePlane::setGlobalGridAttributes be used.
Definition at line 696 of file KDChartCartesianCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::update().
void CartesianCoordinatePlane::setAutoAdjustGridToZoom | ( | bool | autoAdjust | ) |
Disable / re-enable the built-in grid adjusting feature.
By default additional lines will be drawn in a Linear grid when zooming in.
Definition at line 729 of file KDChartCartesianCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setAutoAdjustHorizontalRangeToData | ( | unsigned int | percentEmpty = 67 | ) |
Automatically adjust horizontal range settings to the ranges covered by the model's values, when ever the data have changed, and then emit horizontalRangeAutomaticallyAdjusted.
By default the horizontal range is adjusted automatically, if more than 67 percent of the available horizontal space would be empty otherwise.
Range setting is adjusted if more than percentEmpty
percent of the horizontal space covered by the coordinate plane would otherwise be empty. Automatic range adjusting can happen, when either all of the data are positive or all are negative.
Set percentEmpty to 100 to disable automatic range adjusting.
percentEmpty | The maximal percentage of horizontal space that may be empty. |
Definition at line 651 of file KDChartCartesianCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setAutoAdjustVerticalRangeToData | ( | unsigned int | percentEmpty = 67 | ) |
Automatically adjust vertical range settings to the ranges covered by the model's values, when ever the data have changed, and then emit verticalRangeAutomaticallyAdjusted.
By default the vertical range is adjusted automatically, if more than 67 percent of the available vertical space would be empty otherwise.
Range setting is adjusted if more than percentEmpty
percent of the horizontal space covered by the coordinate plane would otherwise be empty. Automatic range adjusting can happen, when either all of the data are positive or all are negative.
Set percentEmpty to 100 to disable automatic range adjusting.
percentEmpty | The maximal percentage of horizontal space that may be empty. |
Definition at line 662 of file KDChartCartesianCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setAxesCalcModes | ( | AxesCalcMode | mode | ) |
Specifies the calculation modes for all axes
Definition at line 542 of file KDChartCartesianCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::diagrams(), KDChart::AbstractCoordinatePlane::propertiesChanged(), slotLayoutChanged(), and KDChart::AbstractCoordinatePlane::viewportCoordinateSystemChanged().
void CartesianCoordinatePlane::setAxesCalcModeX | ( | AxesCalcMode | mode | ) |
Specifies the calculation mode for all Abscissa axes
Definition at line 566 of file KDChartCartesianCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::propertiesChanged(), and KDChart::AbstractCoordinatePlane::viewportCoordinateSystemChanged().
void CartesianCoordinatePlane::setAxesCalcModeY | ( | AxesCalcMode | mode | ) |
Specifies the calculation mode for all Ordinate axes
Definition at line 556 of file KDChartCartesianCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::propertiesChanged(), KDChart::AbstractCoordinatePlane::setGridNeedsRecalculate(), and KDChart::AbstractCoordinatePlane::viewportCoordinateSystemChanged().
void CartesianCoordinatePlane::setFixedDataCoordinateSpaceRelation | ( | bool | fixed | ) |
Allows to specify a fixed data-space / coordinate-space relation. If set to true then fixed bar widths are used, so you see more bars as the window is made wider.
This allows to completely restrict the size of bars in a graph such that, upon resizing a window, the graphs coordinate plane will grow (add more ticks to x- and y-coordinates) rather than have the image grow.
Definition at line 354 of file KDChartCartesianCoordinatePlane.cpp.
References d, drawingArea(), and handleFixedDataCoordinateSpaceRelation().
|
override |
reimplemented from AbstractCoordinatePlane
Definition at line 829 of file KDChartCartesianCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::diagram(), KDChart::AbstractCoordinatePlane::diagrams(), KDChart::AbstractCoordinatePlane::geometry(), heightForWidth(), KDChart::AbstractDiagram::resize(), and KDChart::AbstractCoordinatePlane::setGeometry().
void CartesianCoordinatePlane::setGridAttributes | ( | Qt::Orientation | orientation, |
const GridAttributes & | a | ||
) |
Set the attributes to be used for grid lines drawn in horizontal direction (or in vertical direction, resp.).
To disable horizontal grid painting, for example, your code should like this:
Definition at line 683 of file KDChartCartesianCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::propertiesChanged(), and KDChart::AbstractCoordinatePlane::update().
void CartesianCoordinatePlane::setHorizontalRange | ( | const QPair< qreal, qreal > & | range | ) |
Set the boundaries of the visible value space displayed in horizontal direction.
This is also known as the horizontal viewport.
By default the horizontal range is adjusted to the range covered by the model's data, see setAutoAdjustHorizontalRangeToData for details. Calling setHorizontalRange with a valid range disables this default automatic adjusting, while on the other hand automatic adjusting will set these ranges.
To disable use of this range you can either pass an empty pair by using the default constructor QPair() or you can set both values to the same which constitutes a null range.
range | a pair of values representing the smallest and the largest horizontal value space coordinate displayed. |
Definition at line 586 of file KDChartCartesianCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::boundariesChanged(), d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setHorizontalRangeReversed | ( | bool | reverse | ) |
Sets whether the horizontal range should be reversed or not, i.e. small values to the left and large values to the right (the default) or vice versa.
reverse | Whether the horizontal range should be reversed or not |
Definition at line 787 of file KDChartCartesianCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setIsometricScaling | ( | bool | onOff | ) |
If onOff
is true, enforce that X and Y distances are scaled by the same factor. This makes the plane's height a function of its width, and hasHeightForWidth() will return true.
Definition at line 435 of file KDChartCartesianCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setVerticalRange | ( | const QPair< qreal, qreal > & | range | ) |
Set the boundaries of the visible value space displayed in vertical direction.
This is also known as the vertical viewport.
By default the vertical range is adjusted to the range covered by the model's data, see setAutoAdjustVerticalRangeToData for details. Calling setVerticalRange with a valid range disables this default automatic adjusting, while on the other hand automatic adjusting will set these ranges.
To disable use of this range you can either pass an empty pair by using the default constructor QPair() or you can set setting both values to the same which constitutes a null range.
range | a pair of values representing the smallest and the largest vertical value space coordinate displayed. |
Definition at line 599 of file KDChartCartesianCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::boundariesChanged(), d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setVerticalRangeReversed | ( | bool | reverse | ) |
Sets whether the vertical range should be reversed or not, i.e. small values at the bottom and large values at the top (the default) or vice versa.
reverse | Whether the vertical range should be reversed or not |
Definition at line 802 of file KDChartCartesianCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setXAxisStartAtZero | ( | bool | fixedStart | ) |
Allows to fix the lower bound of X axis to zero when diagram is in first quadrant.
The default behavior is to lower x or y bound to be 0. If this behaviour is not wanted, either CartesianCoordinatePlane::setHorizontalRange could be used instead of letting KDChart auto-adjust the ranges, or this method can be used to disable this behavior.
Definition at line 366 of file KDChartCartesianCoordinatePlane.cpp.
References d.
|
overridevirtual |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 509 of file KDChartCartesianCoordinatePlane.cpp.
References d, doneSetZoomCenter(), drawingArea(), logicalArea(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
|
overridevirtual |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 485 of file KDChartCartesianCoordinatePlane.cpp.
References d, doneSetZoomFactorX(), doneSetZoomFactorY(), drawingArea(), logicalArea(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
|
overridevirtual |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 493 of file KDChartCartesianCoordinatePlane.cpp.
References d, doneSetZoomFactorX(), drawingArea(), logicalArea(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
|
overridevirtual |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 501 of file KDChartCartesianCoordinatePlane.cpp.
References d, doneSetZoomFactorY(), drawingArea(), logicalArea(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
|
overridevirtual |
reimp
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 747 of file KDChartCartesianCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::diagram(), KDChart::CartesianAxis::isAbscissa(), KDChart::CartesianAxis::isOrdinate(), and translate().
|
overrideprotected |
Definition at line 875 of file KDChartCartesianCoordinatePlane.cpp.
References d, heightForWidth(), and KDChart::AbstractCoordinatePlane::sizeHint().
|
protectedslot |
Definition at line 117 of file KDChartCartesianCoordinatePlane.cpp.
References layoutDiagrams().
Referenced by addDiagram(), and setAxesCalcModes().
|
overridevirtual |
Translate the given point in value space coordinates to a position in pixel space.
diagramPoint | The point in value coordinates. |
Implements KDChart::AbstractCoordinatePlane.
Definition at line 421 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by KDChart::CartesianAxis::paintCtx(), and sharedAxisMasterPlane().
const QPointF CartesianCoordinatePlane::translateBack | ( | const QPointF & | screenPoint | ) | const |
Definition at line 430 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by KDChart::LeveyJenningsCoordinatePlane::translateBack(), and visibleDataRange().
QPair< qreal, qreal > CartesianCoordinatePlane::verticalRange | ( | ) | const |
Definition at line 617 of file KDChartCartesianCoordinatePlane.cpp.
References d.
QRectF CartesianCoordinatePlane::visibleDataRange | ( | ) | const |
Returns the currently visible data range. Might be greater than the range of the grid.
Definition at line 817 of file KDChartCartesianCoordinatePlane.cpp.
References drawingArea(), and translateBack().
QRectF CartesianCoordinatePlane::visibleDiagramArea | ( | ) | const |
Returns the visible part of the diagram area, i.e.
Definition at line 328 of file KDChartCartesianCoordinatePlane.cpp.
References diagramArea(), and drawingArea().
Referenced by KDChart::Measure::sizeOfArea().
bool CartesianCoordinatePlane::xAxisStartAtZero | ( | ) | const |
Definition at line 374 of file KDChartCartesianCoordinatePlane.cpp.
References d.
|
overridevirtual |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 517 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by handleFixedDataCoordinateSpaceRelation().
|
overridevirtual |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 522 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by handleFixedDataCoordinateSpaceRelation().
|
overridevirtual |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 527 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by handleFixedDataCoordinateSpaceRelation().