KChart::CartesianCoordinatePlane

#include <KChartCartesianCoordinatePlane.h>

Inheritance diagram for KChart::CartesianCoordinatePlane:

Public Slots

void adjustHorizontalRangeToData ()
 
void adjustRangesToData ()
 
void adjustVerticalRangeToData ()
 
- Public Slots inherited from KChart::AbstractCoordinatePlane
void layoutPlanes ()
 
void relayout ()
 
void setGridNeedsRecalculate ()
 
void update ()
 

Public Member Functions

 CartesianCoordinatePlane (Chart *parent=nullptr)
 
void addDiagram (AbstractDiagram *diagram) override
 
bool autoAdjustGridToZoom () const
 
unsigned int autoAdjustHorizontalRangeToData () const
 
unsigned int autoAdjustVerticalRangeToData () const
 
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)
 
void setAutoAdjustVerticalRangeToData (unsigned int percentEmpty=67)
 
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)
 
void setHorizontalRangeReversed (bool reverse)
 
void setIsometricScaling (bool onOff)
 
void setVerticalRange (const QPair< qreal, qreal > &range)
 
void setVerticalRangeReversed (bool reverse)
 
void setXAxisStartAtZero (bool fixedStart)
 
void setZoomCenter (const QPointF &center) override
 
void setZoomFactors (qreal factorX, qreal factorY) override
 
void setZoomFactorX (qreal factor) override
 
void setZoomFactorY (qreal factor) override
 
AbstractCoordinatePlanesharedAxisMasterPlane (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
 
- Public Member Functions inherited from KChart::AbstractCoordinatePlane
AbstractDiagramdiagram ()
 
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)
 
Chartparent ()
 
const Chartparent () const
 
AbstractCoordinatePlanereferenceCoordinatePlane () 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)
 
- Public Member Functions inherited from KChart::AbstractArea
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)
 
virtual int rightOverlap (bool doNotRecalculate=false) const
 
virtual int topOverlap (bool doNotRecalculate=false) const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 
- Public Member Functions inherited from KChart::AbstractAreaBase
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)
 
- Public Member Functions inherited from KChart::AbstractLayoutItem
 AbstractLayoutItem (Qt::Alignment itemAlignment=Qt::Alignment())
 
virtual void paintCtx (PaintContext *context)
 
QLayoutparentLayout ()
 
void removeFromParentLayout ()
 
void setParentLayout (QLayout *lay)
 
virtual void setParentWidget (QWidget *widget)
 
virtual void sizeHintChanged () const
 
- Public Member Functions inherited from QLayoutItem
 QLayoutItem (Qt::Alignment alignment)
 
Qt::Alignment alignment () const const
 
virtual QSizePolicy::ControlTypes controlTypes () const const
 
virtual void invalidate ()
 
virtual QLayoutlayout ()
 
virtual int minimumHeightForWidth (int w) const const
 
void setAlignment (Qt::Alignment alignment)
 
virtual QSpacerItemspacerItem ()
 
virtual QWidgetwidget ()
 

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 &center)
 
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
 
- Protected Member Functions inherited from KChart::AbstractCoordinatePlane
 AbstractCoordinatePlane (Chart *parent=nullptr)
 
- Protected Member Functions inherited from KChart::AbstractArea
QRect areaGeometry () const override
 
void positionHasChanged () override
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 
- Protected Member Functions inherited from KChart::AbstractAreaBase
QRect innerRect () const
 

Additional Inherited Members

- Public Types inherited from KChart::AbstractCoordinatePlane
enum  AxesCalcMode { Linear, Logarithmic }
 
- Properties inherited from QObject
 objectName
 
- Signals inherited from KChart::AbstractCoordinatePlane
void boundariesChanged ()
 
void destroyedCoordinatePlane (AbstractCoordinatePlane *)
 
void geometryChanged (QRect, QRect)
 
void internal_geometryChanged (QRect, QRect)
 
void needLayoutPlanes ()
 
void needRelayout ()
 
void needUpdate ()
 
void propertiesChanged ()
 
void viewportCoordinateSystemChanged ()
 
- Signals inherited from KChart::AbstractArea
void positionChanged (AbstractArea *)
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Static Public Member Functions inherited from KChart::AbstractAreaBase
static void paintBackgroundAttributes (QPainter &painter, const QRect &rectangle, const KChart::BackgroundAttributes &attributes)
 
static void paintFrameAttributes (QPainter &painter, const QRect &rectangle, const KChart::FrameAttributes &attributes)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Attributes inherited from KChart::AbstractLayoutItem
QWidgetmParent
 
QLayoutmParentLayout
 

Detailed Description

Cartesian coordinate plane.

Definition at line 36 of file KChartCartesianCoordinatePlane.h.

Member Function Documentation

void CartesianCoordinatePlane::addDiagram ( AbstractDiagram diagram)
overridevirtual

Adds a diagram to this coordinate plane.

Parameters
diagramThe diagram to add.
See also
replaceDiagram, takeDiagram

Reimplemented from KChart::AbstractCoordinatePlane.

Reimplemented in KChart::LeveyJenningsCoordinatePlane.

Definition at line 83 of file KChartCartesianCoordinatePlane.cpp.

void CartesianCoordinatePlane::adjustHorizontalRangeToData ( )
slot

Adjust horizontal range settings to the ranges covered by the model's data values.

See also
adjustRangesToData

Definition at line 662 of file KChartCartesianCoordinatePlane.cpp.

void CartesianCoordinatePlane::adjustRangesToData ( )
slot

Adjust both, horizontal and vertical range settings to the ranges covered by the model's data values.

See also
setHorizontalRange, setVerticalRange
adjustHorizontalRangeToData, adjustVerticalRangeToData
setAutoAdjustHorizontalRangeToData, setAutoAdjustVerticalRangeToData

Definition at line 651 of file KChartCartesianCoordinatePlane.cpp.

void CartesianCoordinatePlane::adjustVerticalRangeToData ( )
slot

Adjust vertical range settings to the ranges covered by the model's data values.

See also
adjustRangesToData

Definition at line 671 of file KChartCartesianCoordinatePlane.cpp.

bool CartesianCoordinatePlane::autoAdjustGridToZoom ( ) const

Return the status of the built-in grid adjusting feature.

See also
setAutoAdjustGridToZoom

Definition at line 772 of file KChartCartesianCoordinatePlane.cpp.

unsigned int CartesianCoordinatePlane::autoAdjustHorizontalRangeToData ( ) const

Returns the maximal allowed percent of the horizontal space covered by the coordinate plane that may be empty.

Returns
A percent value indicating how much of the horizontal space may be empty. If more than this is empty, automatic range adjusting is applied. A return value of 100 indicates that no such automatic adjusting is done at all.
See also
setAutoAdjustHorizontalRangeToData, adjustRangesToData

Definition at line 704 of file KChartCartesianCoordinatePlane.cpp.

unsigned int CartesianCoordinatePlane::autoAdjustVerticalRangeToData ( ) const

Returns the maximal allowed percent of the vertical space covered by the coordinate plane that may be empty.

Returns
A percent value indicating how much of the vertical space may be empty. If more than this is empty, automatic range adjusting is applied. A return value of 100 indicates that no such automatic adjusting is done at all.
See also
setAutoAdjustVerticalRangeToData, adjustRangesToData

Definition at line 709 of file KChartCartesianCoordinatePlane.cpp.

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),

diagramArea() == drawingArea()

.

See also
setFixedDataCoordinateSpaceRelation
drawingArea

Definition at line 350 of file KChartCartesianCoordinatePlane.cpp.

const GridAttributes CartesianCoordinatePlane::gridAttributes ( Qt::Orientation  orientation) const
Returns
The attributes used for grid lines drawn in horizontal direction (or in vertical direction, resp.).
Note
This function always returns a valid set of grid attributes: If no special grid attributes were set foe this orientation the global attributes are returned, as returned by AbstractCoordinatePlane::globalGridAttributes.
See also
setGridAttributes
resetGridAttributes
AbstractCoordinatePlane::globalGridAttributes
hasOwnGridAttributes

Definition at line 733 of file KChartCartesianCoordinatePlane.cpp.

bool CartesianCoordinatePlane::hasOwnGridAttributes ( Qt::Orientation  orientation) const
Returns
Returns whether the grid attributes have been set for the respective direction via setGridAttributes( orientation ).

If false, the grid will use the global attributes set by AbstractCoordinatePlane::globalGridAttributes (or the default attributes, resp.)

See also
setGridAttributes
resetGridAttributes
AbstractCoordinatePlane::globalGridAttributes

Definition at line 754 of file KChartCartesianCoordinatePlane.cpp.

QPair< qreal, qreal > CartesianCoordinatePlane::horizontalRange ( ) const
Returns
The largest and smallest visible horizontal value space value. If this is not explicitly set,or if both values are the same, the plane will use the union of the dataBoundaries of all associated diagrams.
See also
KChart::AbstractDiagram::dataBoundaries

Definition at line 641 of file KChartCartesianCoordinatePlane.cpp.

bool CartesianCoordinatePlane::isHorizontalRangeReversed ( ) const
Returns
Whether the horizontal range is reversed or not

Definition at line 834 of file KChartCartesianCoordinatePlane.cpp.

bool CartesianCoordinatePlane::isVerticalRangeReversed ( ) const
Returns
Whether the vertical range is reversed or not

Definition at line 849 of file KChartCartesianCoordinatePlane.cpp.

void CartesianCoordinatePlane::layoutDiagrams ( )
overrideprotectedvirtual

Distribute the available space among the diagrams and axes.

Implements KChart::AbstractCoordinatePlane.

Definition at line 364 of file KChartCartesianCoordinatePlane.cpp.

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 329 of file KChartCartesianCoordinatePlane.cpp.

void CartesianCoordinatePlane::paint ( QPainter painter)
overridevirtual

reimpl

Implements KChart::AbstractLayoutItem.

Definition at line 96 of file KChartCartesianCoordinatePlane.cpp.

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.

See also
setGridAttributes, gridAttributes
setAutoAdjustGridToZoom
AbstractCoordinatePlane::globalGridAttributes
hasOwnGridAttributes

Definition at line 727 of file KChartCartesianCoordinatePlane.cpp.

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.

See also
autoAdjustGridToZoom, setGridAttributes

Definition at line 760 of file KChartCartesianCoordinatePlane.cpp.

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.

Parameters
percentEmptyThe maximal percentage of horizontal space that may be empty.
See also
horizontalRangeAutomaticallyAdjusted
autoAdjustHorizontalRangeToData, adjustRangesToData
setHorizontalRange, setVerticalRange
setAutoAdjustVerticalRangeToData

Definition at line 680 of file KChartCartesianCoordinatePlane.cpp.

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.

Parameters
percentEmptyThe maximal percentage of horizontal space that may be empty.
See also
verticalRangeAutomaticallyAdjusted
autoAdjustVerticalRangeToData, adjustRangesToData
setHorizontalRange, setVerticalRange
setAutoAdjustHorizontalRangeToData

Definition at line 692 of file KChartCartesianCoordinatePlane.cpp.

void CartesianCoordinatePlane::setAxesCalcModes ( AxesCalcMode  mode)

Specifies the calculation modes for all axes.

Definition at line 574 of file KChartCartesianCoordinatePlane.cpp.

void CartesianCoordinatePlane::setAxesCalcModeX ( AxesCalcMode  mode)

Specifies the calculation mode for all Abscissa axes.

Definition at line 597 of file KChartCartesianCoordinatePlane.cpp.

void CartesianCoordinatePlane::setAxesCalcModeY ( AxesCalcMode  mode)

Specifies the calculation mode for all Ordinate axes.

Definition at line 587 of file KChartCartesianCoordinatePlane.cpp.

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 385 of file KChartCartesianCoordinatePlane.cpp.

void CartesianCoordinatePlane::setGeometry ( const QRect r)
overridevirtual

reimplemented from AbstractCoordinatePlane

Implements QLayoutItem.

Definition at line 866 of file KChartCartesianCoordinatePlane.cpp.

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:

GridAttributes ga = plane->gridAttributes( Qt::Horizontal );
ga.setGridVisible( false );
Note
setGridAttributes overwrites the global attributes that were set by AbstractCoordinatePlane::setGlobalGridAttributes. To re-activate these global attributes you can call resetGridAttributes.
See also
resetGridAttributes, gridAttributes
setAutoAdjustGridToZoom
AbstractCoordinatePlane::setGlobalGridAttributes
hasOwnGridAttributes

Definition at line 714 of file KChartCartesianCoordinatePlane.cpp.

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.

Note
By default the visible data range often is larger than the range calculated from the data model (or set by setHoriz.|Vert.Range(), resp.). This is due to the built-in grid calculation feature: The visible start/end values get adjusted so that they match a main-grid line. You can turn this feature off for any of the four bounds by calling GridAttributes::setAdjustBoundsToGrid() for either the global grid-attributes or for the horizontal/vertical attrs separately.
To set only one of the ends of the range to a fixed value while keeping the other dynamically adjusted, use std::numeric_limits< qreal >::quiet_NaN() for the dynamic value.
If you use user defined vertical ranges together with logarithmic scale, only positive values are supported. If you set it to negative values, the result is undefined.
Parameters
rangea pair of values representing the smalles and the largest horizontal value space coordinate displayed.
See also
setAutoAdjustHorizontalRangeToData, setVerticalRange
GridAttributes::setAdjustBoundsToGrid()

Definition at line 617 of file KChartCartesianCoordinatePlane.cpp.

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.

Parameters
reverseWhether the horizontal range should be reversed or not

Definition at line 824 of file KChartCartesianCoordinatePlane.cpp.

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 466 of file KChartCartesianCoordinatePlane.cpp.

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.

Note
By default the visible data range often is larger than the range calculated from the data model (or set by setHoriz.|Vert.Range(), resp.). This is due to the built-in grid calculation feature: The visible start/end values get adjusted so that they match a main-grid line. You can turn this feature off for any of the four bounds by calling GridAttributes::setAdjustBoundsToGrid() for either the global grid-attributes or for the horizontal/vertical attrs separately.
To set only one of the ends of the range to a fixed value while keeping the other dynamically adjusted, use std::numeric_limits< qreal >::quiet_NaN() for the dynamic value.
If you use user defined vertical ranges together with logarithmic scale, only positive values are supported. If you set it to negative values, the result is undefined.
Parameters
rangea pair of values representing the smalles and the largest vertical value space coordinate displayed.
See also
setAutoAdjustVerticalRangeToData, setHorizontalRange
GridAttributes::setAdjustBoundsToGrid()

Definition at line 629 of file KChartCartesianCoordinatePlane.cpp.

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.

Parameters
reverseWhether the vertical range should be reversed or not

Definition at line 839 of file KChartCartesianCoordinatePlane.cpp.

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 KChart auto-adjust the ranges, or this method can be used to disable this behavior.

Definition at line 397 of file KChartCartesianCoordinatePlane.cpp.

void CartesianCoordinatePlane::setZoomCenter ( const QPointF center)
overridevirtual
void CartesianCoordinatePlane::setZoomFactors ( qreal  factorX,
qreal  factorY 
)
overridevirtual
void CartesianCoordinatePlane::setZoomFactorX ( qreal  factor)
overridevirtual
See also
zoomFactorX, setZoomCenter

Reimplemented from KChart::AbstractCoordinatePlane.

Definition at line 524 of file KChartCartesianCoordinatePlane.cpp.

void CartesianCoordinatePlane::setZoomFactorY ( qreal  factor)
overridevirtual
See also
zoomFactorY, setZoomCenter

Reimplemented from KChart::AbstractCoordinatePlane.

Definition at line 532 of file KChartCartesianCoordinatePlane.cpp.

AbstractCoordinatePlane * CartesianCoordinatePlane::sharedAxisMasterPlane ( QPainter p = nullptr)
overridevirtual

reimpl

Reimplemented from KChart::AbstractCoordinatePlane.

Definition at line 777 of file KChartCartesianCoordinatePlane.cpp.

const QPointF CartesianCoordinatePlane::translate ( const QPointF diagramPoint) const
overridevirtual

Translate the given point in value space coordinates to a position in pixel space.

Parameters
diagramPointThe point in value coordinates.
Returns
The translated point.

Implements KChart::AbstractCoordinatePlane.

Definition at line 452 of file KChartCartesianCoordinatePlane.cpp.

QPair< qreal, qreal > CartesianCoordinatePlane::verticalRange ( ) const
Returns
The largest and smallest visible horizontal value space value. If this is not explicitly set, or if both values are the same, the plane will use the union of the dataBoundaries of all associated diagrams.
See also
KChart::AbstractDiagram::dataBoundaries

Definition at line 646 of file KChartCartesianCoordinatePlane.cpp.

QRectF CartesianCoordinatePlane::visibleDataRange ( ) const

Returns the currently visible data range.

Might be greater than the range of the grid.

Definition at line 854 of file KChartCartesianCoordinatePlane.cpp.

QRectF CartesianCoordinatePlane::visibleDiagramArea ( ) const

Returns the visible part of the diagram area, i.e.

diagramArea().intersected( drawingArea() )
See also
diagramArea

Definition at line 359 of file KChartCartesianCoordinatePlane.cpp.

QPointF CartesianCoordinatePlane::zoomCenter ( ) const
overridevirtual
qreal CartesianCoordinatePlane::zoomFactorX ( ) const
overridevirtual
qreal CartesianCoordinatePlane::zoomFactorY ( ) const
overridevirtual

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Oct 21 2020 22:41:07 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.