KD Chart API Documentation 3.0
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KDChart::CartesianCoordinatePlane Class Reference

Cartesian coordinate plane. More...

#include <KDChartCartesianCoordinatePlane.h>

Inheritance diagram for KDChart::CartesianCoordinatePlane:
Inheritance graph
[legend]
Collaboration diagram for KDChart::CartesianCoordinatePlane:
Collaboration graph
[legend]

Public Slots

void adjustHorizontalRangeToData ()
 
void adjustRangesToData ()
 Adjust both, horizontal and vertical range settings to the ranges covered by the model's data values.
 
void adjustVerticalRangeToData ()
 
- Public Slots inherited from KDChart::AbstractCoordinatePlane
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.
 
unsigned int autoAdjustVerticalRangeToData () const
 Returns the maximal allowed percent of the vertical space covered by the coordinate plane that may be empty.
 
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, qrealhorizontalRange () 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.
 
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.
 
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.
 
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.
 
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, qrealverticalRange () 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 KDChart::AbstractCoordinatePlane
 ~AbstractCoordinatePlane () override
 
AbstractDiagramdiagram ()
 
AbstractDiagramList diagrams ()
 
ConstAbstractDiagramList diagrams () const
 
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 setGlobalGridAttributes (const GridAttributes &)
 
void setParent (Chart *parent)
 
void setReferenceCoordinatePlane (AbstractCoordinatePlane *plane)
 
void setRubberBandZoomingEnabled (bool enable)
 
virtual void takeDiagram (AbstractDiagram *diagram)
 
- Public Member Functions inherited from KDChart::AbstractArea
 ~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().
 
virtual int rightOverlap (bool doNotRecalculate=false) const
 
virtual int topOverlap (bool doNotRecalculate=false) const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
virtual ~QObject ()
 
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)
 
T findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< TfindChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< TfindChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< TfindChildren (const QString &name, 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
 
T qFindChild (const QObject *obj, const QString &name)
 
QList< TqFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< TqFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (const QObject *object)
 
qobject_cast (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 KDChart::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 KDChart::AbstractLayoutItem
 AbstractLayoutItem (Qt::Alignment itemAlignment={})
 
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)
 
virtual ~QLayoutItem ()
 
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 KDChart::AbstractCoordinatePlane
 AbstractCoordinatePlane (Chart *parent=nullptr)
 
- Protected Member Functions inherited from KDChart::AbstractArea
 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 KDChart::AbstractAreaBase
 AbstractAreaBase ()
 
virtual ~AbstractAreaBase ()
 
QRect innerRect () const
 

Additional Inherited Members

- Public Types inherited from KDChart::AbstractCoordinatePlane
enum  AxesCalcMode { Linear , Logarithmic }
 
- Signals inherited from KDChart::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 KDChart::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 *context, Functor functor, 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)
 
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, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction 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 KDChart::AbstractAreaBase
static void paintBackgroundAttributes (QPainter &painter, const QRect &rectangle, const KDChart::BackgroundAttributes &attributes)
 
static void paintFrameAttributes (QPainter &painter, const QRect &rectangle, const KDChart::FrameAttributes &attributes)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Attributes inherited from KDChart::AbstractLayoutItem
QWidgetmParent = nullptr
 
QLayoutmParentLayout = nullptr
 
- Properties inherited from QObject
 objectName
 

Detailed Description

Cartesian coordinate plane.

Definition at line 27 of file KDChartCartesianCoordinatePlane.h.

Constructor & Destructor Documentation

◆ CartesianCoordinatePlane()

CartesianCoordinatePlane::CartesianCoordinatePlane ( Chart parent = nullptr)
explicit

Definition at line 42 of file KDChartCartesianCoordinatePlane.cpp.

◆ ~CartesianCoordinatePlane()

CartesianCoordinatePlane::~CartesianCoordinatePlane ( )
override

Definition at line 48 of file KDChartCartesianCoordinatePlane.cpp.

Member Function Documentation

◆ addDiagram()

void CartesianCoordinatePlane::addDiagram ( AbstractDiagram diagram)
overridevirtual

◆ adjustedToMaxEmptyInnerPercentage()

QRectF CartesianCoordinatePlane::adjustedToMaxEmptyInnerPercentage ( const QRectF r,
unsigned int  percentX,
unsigned int  percentY 
) const
protected

◆ adjustHorizontalRangeToData

void CartesianCoordinatePlane::adjustHorizontalRangeToData ( )
slot

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

See also
adjustRangesToData

Definition at line 630 of file KDChartCartesianCoordinatePlane.cpp.

References d, getRawDataBoundingRectFromDiagrams(), layoutDiagrams(), KDChart::AbstractCoordinatePlane::propertiesChanged(), and QObject::qobject_cast().

◆ adjustRangesToData

void CartesianCoordinatePlane::adjustRangesToData ( )
slot

◆ adjustVerticalRangeToData

void CartesianCoordinatePlane::adjustVerticalRangeToData ( )
slot

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

See also
adjustRangesToData

Definition at line 639 of file KDChartCartesianCoordinatePlane.cpp.

References d, getRawDataBoundingRectFromDiagrams(), layoutDiagrams(), KDChart::AbstractCoordinatePlane::propertiesChanged(), and QObject::qobject_cast().

◆ autoAdjustGridToZoom()

bool CartesianCoordinatePlane::autoAdjustGridToZoom ( ) const

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

See also
setAutoAdjustGridToZoom

Definition at line 739 of file KDChartCartesianCoordinatePlane.cpp.

References d.

◆ autoAdjustHorizontalRangeToData()

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 670 of file KDChartCartesianCoordinatePlane.cpp.

References d.

◆ autoAdjustVerticalRangeToData()

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 675 of file KDChartCartesianCoordinatePlane.cpp.

References d.

◆ axesCalcModeX()

CartesianCoordinatePlane::AxesCalcMode CartesianCoordinatePlane::axesCalcModeX ( ) const

Definition at line 536 of file KDChartCartesianCoordinatePlane.cpp.

References d.

Referenced by adjustedToMaxEmptyInnerPercentage(), and getDataDimensionsList().

◆ axesCalcModeY()

CartesianCoordinatePlane::AxesCalcMode CartesianCoordinatePlane::axesCalcModeY ( ) const

Definition at line 531 of file KDChartCartesianCoordinatePlane.cpp.

References d.

Referenced by adjustedToMaxEmptyInnerPercentage(), and getDataDimensionsList().

◆ calculateRawDataBoundingRect()

QRectF CartesianCoordinatePlane::calculateRawDataBoundingRect ( ) const
protectedvirtual

◆ diagramArea()

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

.

See also
setFixedDataCoordinateSpaceRelation
drawingArea

Definition at line 318 of file KDChartCartesianCoordinatePlane.cpp.

References d, logicalArea(), QRectF::normalized(), and QObject::qobject_cast().

Referenced by visibleDiagramArea().

◆ doesIsometricScaling()

bool CartesianCoordinatePlane::doesIsometricScaling ( ) const

Definition at line 443 of file KDChartCartesianCoordinatePlane.cpp.

References d.

◆ doneSetZoomCenter()

bool CartesianCoordinatePlane::doneSetZoomCenter ( const QPointF center)
protected

Definition at line 472 of file KDChartCartesianCoordinatePlane.cpp.

References d.

Referenced by handleFixedDataCoordinateSpaceRelation(), and setZoomCenter().

◆ doneSetZoomFactorX()

bool CartesianCoordinatePlane::doneSetZoomFactorX ( qreal  factor)
protected

◆ doneSetZoomFactorY()

bool CartesianCoordinatePlane::doneSetZoomFactorY ( qreal  factor)
protected

◆ drawingArea()

QRectF CartesianCoordinatePlane::drawingArea ( ) const
protectedvirtual

◆ expandingDirections()

Qt::Orientations CartesianCoordinatePlane::expandingDirections ( ) const
overridevirtual

pure virtual in QLayoutItem

Reimplemented from KDChart::AbstractCoordinatePlane.

Definition at line 851 of file KDChartCartesianCoordinatePlane.cpp.

References d, Qt::Horizontal, and Qt::Vertical.

◆ getDataDimensionsList()

DataDimensionsList CartesianCoordinatePlane::getDataDimensionsList ( ) const
overrideprotectedvirtual

◆ getRawDataBoundingRectFromDiagrams()

QRectF CartesianCoordinatePlane::getRawDataBoundingRectFromDiagrams ( ) const
protected

◆ gridAttributes()

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 699 of file KDChartCartesianCoordinatePlane.cpp.

References d, KDChart::AbstractCoordinatePlane::globalGridAttributes(), hasOwnGridAttributes(), and Qt::Horizontal.

Referenced by getDataDimensionsList().

◆ handleFixedDataCoordinateSpaceRelation()

void CartesianCoordinatePlane::handleFixedDataCoordinateSpaceRelation ( const QRectF geometry)
protected

◆ hasFixedDataCoordinateSpaceRelation()

bool CartesianCoordinatePlane::hasFixedDataCoordinateSpaceRelation ( ) const

Definition at line 360 of file KDChartCartesianCoordinatePlane.cpp.

References d.

◆ hasHeightForWidth()

bool CartesianCoordinatePlane::hasHeightForWidth ( ) const
overrideprotectedvirtual

Reimplemented from QLayoutItem.

Definition at line 857 of file KDChartCartesianCoordinatePlane.cpp.

References d.

◆ hasOwnGridAttributes()

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 720 of file KDChartCartesianCoordinatePlane.cpp.

References d, and Qt::Horizontal.

Referenced by gridAttributes().

◆ heightForWidth()

int CartesianCoordinatePlane::heightForWidth ( int  w) const
overrideprotectedvirtual

Reimplemented from QLayoutItem.

Definition at line 862 of file KDChartCartesianCoordinatePlane.cpp.

References logicalArea(), and QObject::qobject_cast().

Referenced by setGeometry(), and sizeHint().

◆ horizontalRange()

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
KDChart::AbstractDiagram::dataBoundaries

Definition at line 609 of file KDChartCartesianCoordinatePlane.cpp.

References d, and QObject::qobject_cast().

◆ isHorizontalRangeReversed()

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

Definition at line 794 of file KDChartCartesianCoordinatePlane.cpp.

References d.

◆ isVerticalRangeReversed()

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

Definition at line 809 of file KDChartCartesianCoordinatePlane.cpp.

References d.

◆ layoutDiagrams()

void CartesianCoordinatePlane::layoutDiagrams ( )
overrideprotectedvirtual

◆ logicalArea()

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 297 of file KDChartCartesianCoordinatePlane.cpp.

References d, and QObject::qobject_cast().

Referenced by diagramArea(), heightForWidth(), layoutDiagrams(), setZoomCenter(), setZoomFactors(), setZoomFactorX(), and setZoomFactorY().

◆ paint()

void CartesianCoordinatePlane::paint ( QPainter painter)
overridevirtual

◆ paintEvent()

void KDChart::CartesianCoordinatePlane::paintEvent ( QPaintEvent )
protected

◆ resetGridAttributes()

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 693 of file KDChartCartesianCoordinatePlane.cpp.

References KDChart::AbstractCoordinatePlane::update().

◆ setAutoAdjustGridToZoom()

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 726 of file KDChartCartesianCoordinatePlane.cpp.

References d, KDChart::AbstractCoordinatePlane::propertiesChanged(), and QObject::qobject_cast().

◆ setAutoAdjustHorizontalRangeToData()

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 648 of file KDChartCartesianCoordinatePlane.cpp.

References d, layoutDiagrams(), KDChart::AbstractCoordinatePlane::propertiesChanged(), and QObject::qobject_cast().

◆ setAutoAdjustVerticalRangeToData()

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 659 of file KDChartCartesianCoordinatePlane.cpp.

References d, layoutDiagrams(), KDChart::AbstractCoordinatePlane::propertiesChanged(), and QObject::qobject_cast().

◆ setAxesCalcModes()

void CartesianCoordinatePlane::setAxesCalcModes ( AxesCalcMode  mode)

◆ setAxesCalcModeX()

void CartesianCoordinatePlane::setAxesCalcModeX ( AxesCalcMode  mode)

◆ setAxesCalcModeY()

void CartesianCoordinatePlane::setAxesCalcModeY ( AxesCalcMode  mode)

◆ setFixedDataCoordinateSpaceRelation()

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 353 of file KDChartCartesianCoordinatePlane.cpp.

References d, drawingArea(), and handleFixedDataCoordinateSpaceRelation().

◆ setGeometry()

void CartesianCoordinatePlane::setGeometry ( const QRect r)
overridevirtual

◆ setGridAttributes()

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 );
void setGridAttributes(Qt::Orientation orientation, const GridAttributes &)
A set of attributes controlling the appearance of grids.
T qobject_cast(QObject *object)
Horizontal
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 680 of file KDChartCartesianCoordinatePlane.cpp.

References d, Qt::Horizontal, KDChart::AbstractCoordinatePlane::propertiesChanged(), QObject::qobject_cast(), and KDChart::AbstractCoordinatePlane::update().

◆ setHorizontalRange()

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 smallest and the largest horizontal value space coordinate displayed.
See also
setAutoAdjustHorizontalRangeToData, setVerticalRange
GridAttributes::setAdjustBoundsToGrid()

Definition at line 583 of file KDChartCartesianCoordinatePlane.cpp.

References KDChart::AbstractCoordinatePlane::boundariesChanged(), d, layoutDiagrams(), KDChart::AbstractCoordinatePlane::propertiesChanged(), and QObject::qobject_cast().

◆ setHorizontalRangeReversed()

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 784 of file KDChartCartesianCoordinatePlane.cpp.

References d, layoutDiagrams(), KDChart::AbstractCoordinatePlane::propertiesChanged(), and QObject::qobject_cast().

◆ setIsometricScaling()

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 434 of file KDChartCartesianCoordinatePlane.cpp.

References d, layoutDiagrams(), KDChart::AbstractCoordinatePlane::propertiesChanged(), and QObject::qobject_cast().

◆ setVerticalRange()

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 smallest and the largest vertical value space coordinate displayed.
See also
setAutoAdjustVerticalRangeToData, setHorizontalRange
GridAttributes::setAdjustBoundsToGrid()

Definition at line 596 of file KDChartCartesianCoordinatePlane.cpp.

References KDChart::AbstractCoordinatePlane::boundariesChanged(), d, layoutDiagrams(), KDChart::AbstractCoordinatePlane::propertiesChanged(), and QObject::qobject_cast().

◆ setVerticalRangeReversed()

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 799 of file KDChartCartesianCoordinatePlane.cpp.

References d, layoutDiagrams(), KDChart::AbstractCoordinatePlane::propertiesChanged(), and QObject::qobject_cast().

◆ setXAxisStartAtZero()

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 365 of file KDChartCartesianCoordinatePlane.cpp.

References d, and QObject::qobject_cast().

◆ setZoomCenter()

void CartesianCoordinatePlane::setZoomCenter ( const QPointF center)
overridevirtual

◆ setZoomFactors()

void CartesianCoordinatePlane::setZoomFactors ( qreal  factorX,
qreal  factorY 
)
overridevirtual

◆ setZoomFactorX()

void CartesianCoordinatePlane::setZoomFactorX ( qreal  factor)
overridevirtual

◆ setZoomFactorY()

void CartesianCoordinatePlane::setZoomFactorY ( qreal  factor)
overridevirtual

◆ sharedAxisMasterPlane()

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

◆ sizeHint()

QSize CartesianCoordinatePlane::sizeHint ( ) const
overrideprotectedvirtual

◆ slotLayoutChanged

void CartesianCoordinatePlane::slotLayoutChanged ( AbstractDiagram )
protectedslot

Definition at line 117 of file KDChartCartesianCoordinatePlane.cpp.

References layoutDiagrams().

Referenced by addDiagram(), and setAxesCalcModes().

◆ translate()

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 KDChart::AbstractCoordinatePlane.

Definition at line 420 of file KDChartCartesianCoordinatePlane.cpp.

References d, and QObject::qobject_cast().

Referenced by KDChart::CartesianAxis::paintCtx(), and sharedAxisMasterPlane().

◆ translateBack()

const QPointF CartesianCoordinatePlane::translateBack ( const QPointF screenPoint) const

◆ verticalRange()

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
KDChart::AbstractDiagram::dataBoundaries

Definition at line 614 of file KDChartCartesianCoordinatePlane.cpp.

References d, and QObject::qobject_cast().

◆ visibleDataRange()

QRectF CartesianCoordinatePlane::visibleDataRange ( ) const

Returns the currently visible data range. Might be greater than the range of the grid.

Definition at line 814 of file KDChartCartesianCoordinatePlane.cpp.

References drawingArea(), QObject::qobject_cast(), QRectF::setBottomRight(), QRectF::setTopLeft(), and translateBack().

◆ visibleDiagramArea()

QRectF CartesianCoordinatePlane::visibleDiagramArea ( ) const

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

QRectF intersected(const QRectF &rectangle) const const
See also
diagramArea

Definition at line 327 of file KDChartCartesianCoordinatePlane.cpp.

References diagramArea(), drawingArea(), and QRectF::intersected().

◆ xAxisStartAtZero()

bool CartesianCoordinatePlane::xAxisStartAtZero ( ) const

Definition at line 373 of file KDChartCartesianCoordinatePlane.cpp.

References d.

◆ zoomCenter()

QPointF CartesianCoordinatePlane::zoomCenter ( ) const
overridevirtual

◆ zoomFactorX()

qreal CartesianCoordinatePlane::zoomFactorX ( ) const
overridevirtual
See also
setZoomFactorX, setZoomCenter

Reimplemented from KDChart::AbstractCoordinatePlane.

Definition at line 521 of file KDChartCartesianCoordinatePlane.cpp.

References d.

Referenced by handleFixedDataCoordinateSpaceRelation().

◆ zoomFactorY()

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

Reimplemented from KDChart::AbstractCoordinatePlane.

Definition at line 526 of file KDChartCartesianCoordinatePlane.cpp.

References d.

Referenced by handleFixedDataCoordinateSpaceRelation().


The documentation for this class was generated from the following files:

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated on Fri Feb 23 2024 00:03:00 for KD Chart API Documentation by doxygen 1.9.8