KChart::CartesianCoordinatePlane
#include <KChartCartesianCoordinatePlane.h>
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 ¢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 |
Public Member Functions inherited from KChart::AbstractCoordinatePlane | |
AbstractDiagram * | diagram () |
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) |
Chart * | parent () |
const Chart * | parent () const |
AbstractCoordinatePlane * | referenceCoordinatePlane () 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 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) | |
QBindable< QString > | bindableObjectName () |
bool | blockSignals (bool block) |
const QObjectList & | children () 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 () const const |
void | dumpObjectTree () const const |
QList< QByteArray > | dynamicPropertyNames () 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< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (Qt::FindChildOptions options) const const |
bool | inherits (const char *className) const const |
void | installEventFilter (QObject *filterObj) |
bool | isQuickItemType () const const |
bool | isWidgetType () const const |
bool | isWindowType () const const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const const |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
QVariant | property (const char *name) const const |
Q_CLASSINFO (Name, Value) | |
Q_EMIT Q_EMIT | |
Q_ENUM (...) | |
Q_ENUM_NS (...) | |
Q_ENUMS (...) | |
Q_FLAG (...) | |
Q_FLAG_NS (...) | |
Q_FLAGS (...) | |
Q_GADGET Q_GADGET | |
Q_GADGET_EXPORT (EXPORT_MACRO) | |
Q_INTERFACES (...) | |
Q_INVOKABLE Q_INVOKABLE | |
Q_MOC_INCLUDE Q_MOC_INCLUDE | |
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 | qobject_cast (const QObject *object) |
T | 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 | setObjectName (QAnyStringView name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | setProperty (const char *name, QVariant &&value) |
bool | signalsBlocked () const const |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType) |
QThread * | thread () 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) |
QLayout * | parentLayout () |
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 QLayout * | layout () |
virtual int | minimumHeightForWidth (int w) const const |
void | setAlignment (Qt::Alignment alignment) |
virtual QSpacerItem * | spacerItem () |
virtual QWidget * | widget () const const |
Protected Slots | |
void | slotLayoutChanged (KChart::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 |
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 |
QObject * | sender () 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 } |
Public Types inherited from QObject | |
typedef | QObjectList |
Properties inherited from QObject | |
objectName | |
Signals inherited from KChart::AbstractCoordinatePlane | |
void | boundariesChanged () |
void | destroyedCoordinatePlane (KChart::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 (KChart::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) |
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) |
Protected Attributes inherited from KChart::AbstractLayoutItem | |
QWidget * | mParent |
QLayout * | mParentLayout |
Detailed Description
Cartesian coordinate plane.
Definition at line 25 of file KChartCartesianCoordinatePlane.h.
Constructor & Destructor Documentation
◆ CartesianCoordinatePlane()
|
explicit |
Definition at line 55 of file KChartCartesianCoordinatePlane.cpp.
◆ ~CartesianCoordinatePlane()
|
override |
Definition at line 61 of file KChartCartesianCoordinatePlane.cpp.
Member Function Documentation
◆ addDiagram()
|
overridevirtual |
Adds a diagram to this coordinate plane.
- Parameters
-
diagram The diagram to add.
- See also
- replaceDiagram, takeDiagram
Reimplemented from KChart::AbstractCoordinatePlane.
Reimplemented in KChart::LeveyJenningsCoordinatePlane.
Definition at line 72 of file KChartCartesianCoordinatePlane.cpp.
◆ adjustedToMaxEmptyInnerPercentage()
|
protected |
Definition at line 168 of file KChartCartesianCoordinatePlane.cpp.
◆ adjustHorizontalRangeToData
|
slot |
Adjust horizontal range settings to the ranges covered by the model's data values.
- See also
- adjustRangesToData
Definition at line 653 of file KChartCartesianCoordinatePlane.cpp.
◆ 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 642 of file KChartCartesianCoordinatePlane.cpp.
◆ adjustVerticalRangeToData
|
slot |
Adjust vertical range settings to the ranges covered by the model's data values.
- See also
- adjustRangesToData
Definition at line 662 of file KChartCartesianCoordinatePlane.cpp.
◆ autoAdjustGridToZoom()
bool CartesianCoordinatePlane::autoAdjustGridToZoom | ( | ) | const |
Return the status of the built-in grid adjusting feature.
- See also
- setAutoAdjustGridToZoom
Definition at line 763 of file KChartCartesianCoordinatePlane.cpp.
◆ 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.
Definition at line 695 of file KChartCartesianCoordinatePlane.cpp.
◆ 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.
Definition at line 700 of file KChartCartesianCoordinatePlane.cpp.
◆ axesCalcModeX()
CartesianCoordinatePlane::AxesCalcMode CartesianCoordinatePlane::axesCalcModeX | ( | ) | const |
Definition at line 559 of file KChartCartesianCoordinatePlane.cpp.
◆ axesCalcModeY()
CartesianCoordinatePlane::AxesCalcMode CartesianCoordinatePlane::axesCalcModeY | ( | ) | const |
Definition at line 554 of file KChartCartesianCoordinatePlane.cpp.
◆ calculateRawDataBoundingRect()
|
protectedvirtual |
Definition at line 209 of file KChartCartesianCoordinatePlane.cpp.
◆ 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 340 of file KChartCartesianCoordinatePlane.cpp.
◆ doesIsometricScaling()
bool CartesianCoordinatePlane::doesIsometricScaling | ( | ) | const |
Definition at line 465 of file KChartCartesianCoordinatePlane.cpp.
◆ doneSetZoomCenter()
|
protected |
Definition at line 494 of file KChartCartesianCoordinatePlane.cpp.
◆ doneSetZoomFactorX()
|
protected |
Definition at line 470 of file KChartCartesianCoordinatePlane.cpp.
◆ doneSetZoomFactorY()
|
protected |
Definition at line 482 of file KChartCartesianCoordinatePlane.cpp.
◆ drawingArea()
|
protectedvirtual |
Definition at line 307 of file KChartCartesianCoordinatePlane.cpp.
◆ expandingDirections()
|
overridevirtual |
pure virtual in QLayoutItem
Reimplemented from KChart::AbstractCoordinatePlane.
Definition at line 884 of file KChartCartesianCoordinatePlane.cpp.
◆ getDataDimensionsList()
|
overrideprotectedvirtual |
Implements KChart::AbstractCoordinatePlane.
Definition at line 258 of file KChartCartesianCoordinatePlane.cpp.
◆ getRawDataBoundingRectFromDiagrams()
|
protected |
Definition at line 141 of file KChartCartesianCoordinatePlane.cpp.
◆ 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 724 of file KChartCartesianCoordinatePlane.cpp.
◆ handleFixedDataCoordinateSpaceRelation()
|
protected |
Definition at line 400 of file KChartCartesianCoordinatePlane.cpp.
◆ hasFixedDataCoordinateSpaceRelation()
bool CartesianCoordinatePlane::hasFixedDataCoordinateSpaceRelation | ( | ) | const |
Definition at line 382 of file KChartCartesianCoordinatePlane.cpp.
◆ hasHeightForWidth()
|
overrideprotectedvirtual |
Reimplemented from QLayoutItem.
Definition at line 890 of file KChartCartesianCoordinatePlane.cpp.
◆ 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.)
Definition at line 745 of file KChartCartesianCoordinatePlane.cpp.
◆ heightForWidth()
|
overrideprotectedvirtual |
Reimplemented from QLayoutItem.
Definition at line 895 of file KChartCartesianCoordinatePlane.cpp.
◆ 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.
Definition at line 632 of file KChartCartesianCoordinatePlane.cpp.
◆ isHorizontalRangeReversed()
bool CartesianCoordinatePlane::isHorizontalRangeReversed | ( | ) | const |
- Returns
- Whether the horizontal range is reversed or not
Definition at line 825 of file KChartCartesianCoordinatePlane.cpp.
◆ isVerticalRangeReversed()
bool CartesianCoordinatePlane::isVerticalRangeReversed | ( | ) | const |
- Returns
- Whether the vertical range is reversed or not
Definition at line 840 of file KChartCartesianCoordinatePlane.cpp.
◆ layoutDiagrams()
|
overrideprotectedvirtual |
Distribute the available space among the diagrams and axes.
Implements KChart::AbstractCoordinatePlane.
Definition at line 354 of file KChartCartesianCoordinatePlane.cpp.
◆ 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 319 of file KChartCartesianCoordinatePlane.cpp.
◆ paint()
|
overridevirtual |
reimpl
Implements KChart::AbstractLayoutItem.
Definition at line 85 of file KChartCartesianCoordinatePlane.cpp.
◆ 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 718 of file KChartCartesianCoordinatePlane.cpp.
◆ 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 751 of file KChartCartesianCoordinatePlane.cpp.
◆ 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
-
percentEmpty The maximal percentage of horizontal space that may be empty.
- See also
- horizontalRangeAutomaticallyAdjusted
- autoAdjustHorizontalRangeToData, adjustRangesToData
- setHorizontalRange, setVerticalRange
- setAutoAdjustVerticalRangeToData
Definition at line 671 of file KChartCartesianCoordinatePlane.cpp.
◆ 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
-
percentEmpty The maximal percentage of horizontal space that may be empty.
- See also
- verticalRangeAutomaticallyAdjusted
- autoAdjustVerticalRangeToData, adjustRangesToData
- setHorizontalRange, setVerticalRange
- setAutoAdjustHorizontalRangeToData
Definition at line 683 of file KChartCartesianCoordinatePlane.cpp.
◆ setAxesCalcModes()
void CartesianCoordinatePlane::setAxesCalcModes | ( | AxesCalcMode | mode | ) |
Specifies the calculation modes for all axes.
Definition at line 564 of file KChartCartesianCoordinatePlane.cpp.
◆ setAxesCalcModeX()
void CartesianCoordinatePlane::setAxesCalcModeX | ( | AxesCalcMode | mode | ) |
Specifies the calculation mode for all Abscissa axes.
Definition at line 588 of file KChartCartesianCoordinatePlane.cpp.
◆ setAxesCalcModeY()
void CartesianCoordinatePlane::setAxesCalcModeY | ( | AxesCalcMode | mode | ) |
Specifies the calculation mode for all Ordinate axes.
Definition at line 578 of file KChartCartesianCoordinatePlane.cpp.
◆ 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 375 of file KChartCartesianCoordinatePlane.cpp.
◆ setGeometry()
|
overridevirtual |
reimplemented from AbstractCoordinatePlane
Reimplemented from KChart::AbstractCoordinatePlane.
Definition at line 857 of file KChartCartesianCoordinatePlane.cpp.
◆ 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:
- 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 705 of file KChartCartesianCoordinatePlane.cpp.
◆ 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
-
range a pair of values representing the smallest and the largest horizontal value space coordinate displayed.
- See also
- setAutoAdjustHorizontalRangeToData, setVerticalRange
- GridAttributes::setAdjustBoundsToGrid()
Definition at line 608 of file KChartCartesianCoordinatePlane.cpp.
◆ 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
-
reverse Whether the horizontal range should be reversed or not
Definition at line 815 of file KChartCartesianCoordinatePlane.cpp.
◆ 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 456 of file KChartCartesianCoordinatePlane.cpp.
◆ 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
-
range a pair of values representing the smallest and the largest vertical value space coordinate displayed.
- See also
- setAutoAdjustVerticalRangeToData, setHorizontalRange
- GridAttributes::setAdjustBoundsToGrid()
Definition at line 620 of file KChartCartesianCoordinatePlane.cpp.
◆ 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
-
reverse Whether the vertical range should be reversed or not
Definition at line 830 of file KChartCartesianCoordinatePlane.cpp.
◆ 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 KChart auto-adjust the ranges, or this method can be used to disable this behavior.
Definition at line 387 of file KChartCartesianCoordinatePlane.cpp.
◆ setZoomCenter()
|
overridevirtual |
- See also
- zoomCenter, setZoomFactorX, setZoomFactorY
Reimplemented from KChart::AbstractCoordinatePlane.
Definition at line 530 of file KChartCartesianCoordinatePlane.cpp.
◆ setZoomFactors()
|
overridevirtual |
- See also
- setZoomFactorX,setZoomFactorY
Reimplemented from KChart::AbstractCoordinatePlane.
Definition at line 506 of file KChartCartesianCoordinatePlane.cpp.
◆ setZoomFactorX()
|
overridevirtual |
- See also
- zoomFactorX, setZoomCenter
Reimplemented from KChart::AbstractCoordinatePlane.
Definition at line 514 of file KChartCartesianCoordinatePlane.cpp.
◆ setZoomFactorY()
|
overridevirtual |
- See also
- zoomFactorY, setZoomCenter
Reimplemented from KChart::AbstractCoordinatePlane.
Definition at line 522 of file KChartCartesianCoordinatePlane.cpp.
◆ sharedAxisMasterPlane()
|
overridevirtual |
reimpl
Reimplemented from KChart::AbstractCoordinatePlane.
Definition at line 768 of file KChartCartesianCoordinatePlane.cpp.
◆ sizeHint()
|
overrideprotectedvirtual |
pure virtual in QLayoutItem
Reimplemented from KChart::AbstractCoordinatePlane.
Definition at line 904 of file KChartCartesianCoordinatePlane.cpp.
◆ slotLayoutChanged
|
protectedslot |
Definition at line 136 of file KChartCartesianCoordinatePlane.cpp.
◆ translate()
|
overridevirtual |
Translate the given point in value space coordinates to a position in pixel space.
- Parameters
-
diagramPoint The point in value coordinates.
- Returns
- The translated point.
Implements KChart::AbstractCoordinatePlane.
Definition at line 442 of file KChartCartesianCoordinatePlane.cpp.
◆ translateBack()
Definition at line 451 of file KChartCartesianCoordinatePlane.cpp.
◆ 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.
Definition at line 637 of file KChartCartesianCoordinatePlane.cpp.
◆ visibleDataRange()
QRectF CartesianCoordinatePlane::visibleDataRange | ( | ) | const |
Returns the currently visible data range.
Might be greater than the range of the grid.
Definition at line 845 of file KChartCartesianCoordinatePlane.cpp.
◆ visibleDiagramArea()
QRectF CartesianCoordinatePlane::visibleDiagramArea | ( | ) | const |
Returns the visible part of the diagram area, i.e.
- See also
- diagramArea
Definition at line 349 of file KChartCartesianCoordinatePlane.cpp.
◆ xAxisStartAtZero()
bool CartesianCoordinatePlane::xAxisStartAtZero | ( | ) | const |
Definition at line 395 of file KChartCartesianCoordinatePlane.cpp.
◆ zoomCenter()
|
overridevirtual |
- See also
- setZoomCenter, setZoomFactorX, setZoomFactorY
Reimplemented from KChart::AbstractCoordinatePlane.
Definition at line 538 of file KChartCartesianCoordinatePlane.cpp.
◆ zoomFactorX()
|
overridevirtual |
- See also
- setZoomFactorX, setZoomCenter
Reimplemented from KChart::AbstractCoordinatePlane.
Definition at line 543 of file KChartCartesianCoordinatePlane.cpp.
◆ zoomFactorY()
|
overridevirtual |
- See also
- setZoomFactorY, setZoomCenter
Reimplemented from KChart::AbstractCoordinatePlane.
Definition at line 548 of file KChartCartesianCoordinatePlane.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.