KChart::AbstractCoordinatePlane
#include <KChartAbstractCoordinatePlane.h>
Public Types | |
enum | AxesCalcMode { Linear , Logarithmic } |
Signals | |
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 *) |
Public Slots | |
void | layoutPlanes () |
void | relayout () |
void | setGridNeedsRecalculate () |
void | update () |
Protected Member Functions | |
AbstractCoordinatePlane (Chart *parent=nullptr) | |
virtual DataDimensionsList | getDataDimensionsList () const =0 |
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 |
Detailed Description
Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane, TernaryCoordinatePlane.
Definition at line 30 of file KChartAbstractCoordinatePlane.h.
Member Enumeration Documentation
◆ AxesCalcMode
enum KChart::AbstractCoordinatePlane::AxesCalcMode |
Definition at line 39 of file KChartAbstractCoordinatePlane.h.
Constructor & Destructor Documentation
◆ AbstractCoordinatePlane()
|
explicitprotected |
Definition at line 37 of file KChartAbstractCoordinatePlane.cpp.
◆ ~AbstractCoordinatePlane()
|
override |
Definition at line 44 of file KChartAbstractCoordinatePlane.cpp.
Member Function Documentation
◆ addDiagram()
|
virtual |
Adds a diagram to this coordinate plane.
- Parameters
-
diagram The diagram to add.
- See also
- replaceDiagram, takeDiagram
Reimplemented in KChart::CartesianCoordinatePlane, KChart::LeveyJenningsCoordinatePlane, KChart::PolarCoordinatePlane, and KChart::TernaryCoordinatePlane.
Definition at line 57 of file KChartAbstractCoordinatePlane.cpp.
◆ destroyedCoordinatePlane
|
signal |
Emitted when this coordinate plane is destroyed.
◆ diagram()
AbstractDiagram * AbstractCoordinatePlane::diagram | ( | ) |
- Returns
- The first diagram associated with this coordinate plane.
Definition at line 114 of file KChartAbstractCoordinatePlane.cpp.
◆ diagrams() [1/2]
AbstractDiagramList AbstractCoordinatePlane::diagrams | ( | ) |
- Returns
- The list of diagrams associated with this coordinate plane.
Definition at line 124 of file KChartAbstractCoordinatePlane.cpp.
◆ diagrams() [2/2]
ConstAbstractDiagramList AbstractCoordinatePlane::diagrams | ( | ) | const |
- Returns
- The list of diagrams associated with this coordinate plane.
Definition at line 129 of file KChartAbstractCoordinatePlane.cpp.
◆ expandingDirections()
|
overridevirtual |
pure virtual in QLayoutItem
Implements QLayoutItem.
Reimplemented in KChart::CartesianCoordinatePlane.
Definition at line 195 of file KChartAbstractCoordinatePlane.cpp.
◆ geometry()
|
overridevirtual |
pure virtual in QLayoutItem
Implements QLayoutItem.
Definition at line 232 of file KChartAbstractCoordinatePlane.cpp.
◆ geometryChanged
Emitted after the geometry of the Coordinate Plane has been changed.
and control has returned to the event loop.
Parameters are the old geometry, the new geometry.
◆ globalGridAttributes()
GridAttributes KChart::AbstractCoordinatePlane::globalGridAttributes | ( | ) | const |
- Returns
- The grid attributes used by this coordinate plane.
Definition at line 147 of file KChartAbstractCoordinatePlane.cpp.
◆ gridDimensionsList()
KChart::DataDimensionsList KChart::AbstractCoordinatePlane::gridDimensionsList | ( | ) |
Returns the dimensions used for drawing the grid lines.
Returned data is the result of (cached) grid calculations, so - if you need that information for your own tasks - make sure to call again this function after every data modification that has changed the data range, since grid calculation is based upon the data range, thus the grid start/end might have changed if the data was changed.
- Note
- Returned list will contain different numbers of DataDimension, depending on the kind of coordinate plane used. For CartesianCoordinatePlane two DataDimension are returned: the first representing grid lines in X direction (matching the Abscissa axes) and the second indicating vertical grid lines (or Ordinate axes, resp.).
- Returns
- The dimensions used for drawing the grid lines.
- See also
- DataDimension
Definition at line 152 of file KChartAbstractCoordinatePlane.cpp.
◆ isCornerSpacersEnabled()
bool KChart::AbstractCoordinatePlane::isCornerSpacersEnabled | ( | ) | const |
- Returns
- Whether this plane should have spacers in the corners formed by the presence of axes.
Definition at line 279 of file KChartAbstractCoordinatePlane.cpp.
◆ isEmpty()
|
overridevirtual |
pure virtual in QLayoutItem
Implements QLayoutItem.
Definition at line 188 of file KChartAbstractCoordinatePlane.cpp.
◆ isRubberBandZoomingEnabled()
bool KChart::AbstractCoordinatePlane::isRubberBandZoomingEnabled | ( | ) | const |
- Returns
- Whether zooming with a rubber band using the mouse is enabled.
Definition at line 266 of file KChartAbstractCoordinatePlane.cpp.
◆ isVisiblePoint()
Tests, if a point is visible on the coordinate plane.
- Note
- Before calling this function the point must have been translated into coordinate plane space.
Definition at line 410 of file KChartAbstractCoordinatePlane.cpp.
◆ layoutDiagrams()
Distribute the available space among the diagrams and axes.
Implemented in KChart::CartesianCoordinatePlane, KChart::PolarCoordinatePlane, and KChart::TernaryCoordinatePlane.
◆ layoutPlanes
|
slot |
Calling layoutPlanes() on the plane triggers the global KChart::Chart::slotLayoutPlanes()
Definition at line 249 of file KChartAbstractCoordinatePlane.cpp.
◆ maximumSize()
|
overridevirtual |
pure virtual in QLayoutItem
Implements QLayoutItem.
Definition at line 200 of file KChartAbstractCoordinatePlane.cpp.
◆ minimumSize()
|
overridevirtual |
pure virtual in QLayoutItem
Implements QLayoutItem.
Definition at line 207 of file KChartAbstractCoordinatePlane.cpp.
◆ mouseDoubleClickEvent()
|
virtual |
Definition at line 324 of file KChartAbstractCoordinatePlane.cpp.
◆ mouseMoveEvent()
|
virtual |
Definition at line 391 of file KChartAbstractCoordinatePlane.cpp.
◆ mousePressEvent()
|
virtual |
Definition at line 284 of file KChartAbstractCoordinatePlane.cpp.
◆ mouseReleaseEvent()
|
virtual |
Definition at line 338 of file KChartAbstractCoordinatePlane.cpp.
◆ needLayoutPlanes
|
signal |
Emitted when plane needs to trigger the Chart's layouting of the coord.
planes.
◆ needRelayout
|
signal |
Emitted when plane needs to trigger the Chart's layouting.
◆ needUpdate
|
signal |
Emitted when plane needs to update its drawings.
◆ parent() [1/2]
KChart::Chart * KChart::AbstractCoordinatePlane::parent | ( | ) |
Definition at line 182 of file KChartAbstractCoordinatePlane.cpp.
◆ parent() [2/2]
const KChart::Chart * KChart::AbstractCoordinatePlane::parent | ( | ) | const |
Definition at line 177 of file KChartAbstractCoordinatePlane.cpp.
◆ propertiesChanged
|
signal |
Emitted upon change of a property of the Coordinate Plane or any of its components.
◆ referenceCoordinatePlane()
AbstractCoordinatePlane * KChart::AbstractCoordinatePlane::referenceCoordinatePlane | ( | ) | const |
There are two ways, in which planes can be caused to interact, in where they are put layouting wise: The first is the reference plane.
If such a reference plane is set, on a plane, it will use the same cell in the layout as that one. In addition to this, planes can share an axis. In that case they will be laid out in relation to each other as suggested by the position of the axis. If, for example Plane1 and Plane2 share an axis at position Left, that will result in the layout: Axis Plane1 Plane 2, vertically. If Plane1 also happens to be Plane2's reference plane, both planes are drawn over each other. The reference plane concept allows two planes to share the same space even if neither has any axis, and in case there are shared axis, it is used to decided, whether the planes should be painted on top of each other or laid out vertically or horizontally next to each other.
- Returns
- The reference coordinate plane associated with this one.
Definition at line 167 of file KChartAbstractCoordinatePlane.cpp.
◆ relayout
|
slot |
Calling relayout() on the plane triggers the global KChart::Chart::slotRelayout()
Definition at line 243 of file KChartAbstractCoordinatePlane.cpp.
◆ replaceDiagram()
|
virtual |
Replaces the old diagram, or appends the diagram, it there is none yet.
- Parameters
-
diagram The diagram to be used instead of the old diagram. This parameter must not be zero, or the method will do nothing. oldDiagram The diagram to be removed by the new diagram. This diagram will be deleted automatically. If the parameter is omitted, the very first diagram will be replaced. In case, there was no diagram yet, the new diagram will just be added.
- Note
- If you want to re-use the old diagram, call takeDiagram and addDiagram, instead of using replaceDiagram.
- See also
- addDiagram, takeDiagram
Definition at line 77 of file KChartAbstractCoordinatePlane.cpp.
◆ setCornerSpacersEnabled()
void KChart::AbstractCoordinatePlane::setCornerSpacersEnabled | ( | bool | enable | ) |
Enables or disables the use of spacers in the plane corners.
Definition at line 271 of file KChartAbstractCoordinatePlane.cpp.
◆ setGeometry()
pure virtual in QLayoutItem
- Note
- Do not call this function directly, unless you know exactly what you are doing. Geometry management is done by KChart's internal layouting measures.
Implements QLayoutItem.
Reimplemented in KChart::CartesianCoordinatePlane.
Definition at line 219 of file KChartAbstractCoordinatePlane.cpp.
◆ setGlobalGridAttributes()
void KChart::AbstractCoordinatePlane::setGlobalGridAttributes | ( | const GridAttributes & | a | ) |
Set the grid attributes to be used by this coordinate plane.
To disable grid painting, for example, your code should like this:
Definition at line 141 of file KChartAbstractCoordinatePlane.cpp.
◆ setGridNeedsRecalculate
|
slot |
Used by the chart to clear the cached grid data.
Definition at line 157 of file KChartAbstractCoordinatePlane.cpp.
◆ setParent()
void KChart::AbstractCoordinatePlane::setParent | ( | KChart::Chart * | parent | ) |
Called internally by KChart::Chart.
Definition at line 172 of file KChartAbstractCoordinatePlane.cpp.
◆ setReferenceCoordinatePlane()
void KChart::AbstractCoordinatePlane::setReferenceCoordinatePlane | ( | AbstractCoordinatePlane * | plane | ) |
Set another coordinate plane to be used as the reference plane for this one.
- Parameters
-
plane The coordinate plane to be used the reference plane for this one.
- See also
- referenceCoordinatePlane
Definition at line 162 of file KChartAbstractCoordinatePlane.cpp.
◆ setRubberBandZoomingEnabled()
void KChart::AbstractCoordinatePlane::setRubberBandZoomingEnabled | ( | bool | enable | ) |
Enables or disables zooming with a rubber band using the mouse.
Definition at line 255 of file KChartAbstractCoordinatePlane.cpp.
◆ setZoomCenter()
Set the point (in value coordinates) to be used as the center point in zoom operations.
- Parameters
-
center The point to use.
Reimplemented in KChart::CartesianCoordinatePlane, and KChart::PolarCoordinatePlane.
Definition at line 165 of file KChartAbstractCoordinatePlane.h.
◆ setZoomFactors()
|
inlinevirtual |
Sets both zoom factors in one go.
- See also
- setZoomFactorX,setZoomFactorY
Reimplemented in KChart::CartesianCoordinatePlane, and KChart::PolarCoordinatePlane.
Definition at line 138 of file KChartAbstractCoordinatePlane.h.
◆ setZoomFactorX()
Sets the zoom factor in horizontal direction, that is applied to all coordinate transformations.
- Parameters
-
factor The new zoom factor
Reimplemented in KChart::CartesianCoordinatePlane, and KChart::PolarCoordinatePlane.
Definition at line 145 of file KChartAbstractCoordinatePlane.h.
◆ setZoomFactorY()
Sets the zoom factor in vertical direction, that is applied to all coordinate transformations.
- Parameters
-
factor The new zoom factor
Reimplemented in KChart::CartesianCoordinatePlane, and KChart::PolarCoordinatePlane.
Definition at line 152 of file KChartAbstractCoordinatePlane.h.
◆ sharedAxisMasterPlane()
|
virtual |
Reimplemented in KChart::CartesianCoordinatePlane.
Definition at line 415 of file KChartAbstractCoordinatePlane.cpp.
◆ sizeHint()
|
overridevirtual |
pure virtual in QLayoutItem
Implements QLayoutItem.
Reimplemented in KChart::CartesianCoordinatePlane.
Definition at line 212 of file KChartAbstractCoordinatePlane.cpp.
◆ takeDiagram()
|
virtual |
Removes the diagram from the plane, without deleting it.
The plane no longer owns the diagram, so it is the caller's responsibility to delete the diagram.
- See also
- addDiagram, replaceDiagram
Definition at line 98 of file KChartAbstractCoordinatePlane.cpp.
◆ translate()
|
pure virtual |
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.
Implemented in KChart::CartesianCoordinatePlane, KChart::PolarCoordinatePlane, and KChart::TernaryCoordinatePlane.
◆ update
|
slot |
Calling update() on the plane triggers the global KChart::Chart::update()
Definition at line 237 of file KChartAbstractCoordinatePlane.cpp.
◆ viewportCoordinateSystemChanged
|
signal |
Emitted upon change of the view coordinate system.
◆ zoomCenter()
- Returns
- The center point (in value coordinates) of the coordinate plane, that is used for zoom operations.
Reimplemented in KChart::CartesianCoordinatePlane, and KChart::PolarCoordinatePlane.
Definition at line 158 of file KChartAbstractCoordinatePlane.h.
◆ zoomFactorX()
|
inlinevirtual |
- Returns
- The zoom factor in horizontal direction, that is applied to all coordinate transformations.
Reimplemented in KChart::CartesianCoordinatePlane, and KChart::PolarCoordinatePlane.
Definition at line 126 of file KChartAbstractCoordinatePlane.h.
◆ zoomFactorY()
|
inlinevirtual |
- Returns
- The zoom factor in vertical direction, that is applied to all coordinate transformations.
Reimplemented in KChart::CartesianCoordinatePlane, and KChart::PolarCoordinatePlane.
Definition at line 132 of file KChartAbstractCoordinatePlane.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:40:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.