![]() |
KD Chart API Documentation
3.1
|
Polar coordinate plane. More...
#include <KDChartPolarCoordinatePlane.h>
Public Types | |
typedef QList< CoordinateTransformation > | CoordinateTransformationList |
![]() | |
enum | AxesCalcMode { Linear , Logarithmic } |
Public Member Functions | |
PolarCoordinatePlane (Chart *parent=nullptr) | |
~PolarCoordinatePlane () override | |
void | addDiagram (AbstractDiagram *diagram) override |
qreal | angleUnit () const |
const GridAttributes | gridAttributes (bool circular) const |
bool | hasOwnGridAttributes (bool circular) const |
void | paint (QPainter *) override |
qreal | radiusUnit () const |
void | resetGridAttributes (bool circular) |
void | setGridAttributes (bool circular, const GridAttributes &) |
void | setStartPosition (qreal degrees) |
Specify the rotation of the coordinate plane. More... | |
void | setZoomCenter (const QPointF ¢er) override |
void | setZoomFactors (qreal factorX, qreal factorY) override |
void | setZoomFactorX (qreal factor) override |
void | setZoomFactorY (qreal factor) override |
qreal | startPosition () const |
const QPointF | translate (const QPointF &diagramPoint) const override |
const QPointF | translatePolar (const QPointF &diagramPoint) const |
QPointF | zoomCenter () const override |
qreal | zoomFactorX () const override |
qreal | zoomFactorY () const override |
![]() | |
~AbstractCoordinatePlane () override | |
AbstractDiagram * | diagram () |
AbstractDiagramList | diagrams () |
ConstAbstractDiagramList | diagrams () const |
Qt::Orientations | expandingDirections () const override |
QRect | geometry () const override |
GridAttributes | globalGridAttributes () const |
DataDimensionsList | gridDimensionsList () |
bool | isCornerSpacersEnabled () const |
bool | isEmpty () const override |
bool | isRubberBandZoomingEnabled () const |
bool | isVisiblePoint (const QPointF &point) const |
QSize | maximumSize () const override |
QSize | minimumSize () const override |
virtual void | mouseDoubleClickEvent (QMouseEvent *event) |
virtual void | mouseMoveEvent (QMouseEvent *event) |
virtual void | mousePressEvent (QMouseEvent *event) |
virtual void | mouseReleaseEvent (QMouseEvent *event) |
Chart * | parent () |
const Chart * | parent () const |
AbstractCoordinatePlane * | referenceCoordinatePlane () const |
virtual void | replaceDiagram (AbstractDiagram *diagram, AbstractDiagram *oldDiagram=nullptr) |
void | setCornerSpacersEnabled (bool enable) |
void | setGeometry (const QRect &r) override |
void | setGlobalGridAttributes (const GridAttributes &) |
void | setParent (Chart *parent) |
void | setReferenceCoordinatePlane (AbstractCoordinatePlane *plane) |
void | setRubberBandZoomingEnabled (bool enable) |
virtual AbstractCoordinatePlane * | sharedAxisMasterPlane (QPainter *p=nullptr) |
QSize | sizeHint () const override |
virtual void | takeDiagram (AbstractDiagram *diagram) |
![]() | |
~AbstractArea () override | |
virtual int | bottomOverlap (bool doNotRecalculate=false) const |
virtual int | leftOverlap (bool doNotRecalculate=false) const |
void | paintAll (QPainter &painter) override |
virtual void | paintIntoRect (QPainter &painter, const QRect &rect) |
Draws the background and frame, then calls paint(). More... | |
virtual int | rightOverlap (bool doNotRecalculate=false) const |
virtual int | topOverlap (bool doNotRecalculate=false) const |
![]() | |
void | alignToReferencePoint (const RelativePosition &position) |
BackgroundAttributes | backgroundAttributes () const |
bool | compare (const AbstractAreaBase *other) const |
FrameAttributes | frameAttributes () const |
void | getFrameLeadings (int &left, int &top, int &right, int &bottom) const |
virtual void | paintBackground (QPainter &painter, const QRect &rectangle) |
virtual void | paintFrame (QPainter &painter, const QRect &rectangle) |
void | setBackgroundAttributes (const BackgroundAttributes &a) |
void | setFrameAttributes (const FrameAttributes &a) |
![]() | |
AbstractLayoutItem (Qt::Alignment itemAlignment={}) | |
virtual void | paintCtx (PaintContext *context) |
QLayout * | parentLayout () |
void | removeFromParentLayout () |
void | setParentLayout (QLayout *lay) |
virtual void | setParentWidget (QWidget *widget) |
virtual void | sizeHintChanged () const |
Protected Slots | |
void | adjustZoomAndRepaint () |
void | slotLayoutChanged (AbstractDiagram *diagram) |
Protected Member Functions | |
DataDimensionsList | getDataDimensionsList () const override |
void | layoutDiagrams () override |
void | paintEvent (QPaintEvent *) |
void | resizeEvent (QResizeEvent *) |
![]() | |
AbstractCoordinatePlane (Chart *parent=nullptr) | |
![]() | |
AbstractArea () | |
QRect | areaGeometry () const override |
void | positionHasChanged () override |
![]() | |
AbstractAreaBase () | |
virtual | ~AbstractAreaBase () |
QRect | innerRect () const |
Additional Inherited Members | |
![]() | |
void | layoutPlanes () |
void | relayout () |
void | setGridNeedsRecalculate () |
void | update () |
![]() | |
void | boundariesChanged () |
void | destroyedCoordinatePlane (AbstractCoordinatePlane *) |
void | geometryChanged (QRect, QRect) |
void | internal_geometryChanged (QRect, QRect) |
void | needLayoutPlanes () |
void | needRelayout () |
void | needUpdate () |
void | propertiesChanged () |
void | viewportCoordinateSystemChanged () |
![]() | |
void | positionChanged (AbstractArea *) |
![]() | |
static void | paintBackgroundAttributes (QPainter &painter, const QRect &rectangle, const KDChart::BackgroundAttributes &attributes) |
static void | paintFrameAttributes (QPainter &painter, const QRect &rectangle, const KDChart::FrameAttributes &attributes) |
![]() | |
QWidget * | mParent = nullptr |
QLayout * | mParentLayout = nullptr |
Polar coordinate plane.
Definition at line 24 of file KDChartPolarCoordinatePlane.h.
Definition at line 33 of file KDChartPolarCoordinatePlane.h.
|
explicit |
Definition at line 35 of file KDChartPolarCoordinatePlane.cpp.
|
override |
Definition at line 41 of file KDChartPolarCoordinatePlane.cpp.
|
overridevirtual |
Adds a diagram to this coordinate plane.
diagram | The diagram to add. |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 51 of file KDChartPolarCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::addDiagram(), KDChart::AbstractCoordinatePlane::diagram(), KDChart::AbstractDiagram::layoutChanged(), and slotLayoutChanged().
|
protectedslot |
Definition at line 121 of file KDChartPolarCoordinatePlane.cpp.
References d, setZoomFactors(), and KDChart::AbstractCoordinatePlane::update().
qreal PolarCoordinatePlane::angleUnit | ( | ) | const |
Definition at line 194 of file KDChartPolarCoordinatePlane.cpp.
References d.
Referenced by layoutDiagrams().
|
overrideprotectedvirtual |
Implements KDChart::AbstractCoordinatePlane.
Definition at line 291 of file KDChartPolarCoordinatePlane.cpp.
const GridAttributes KDChart::PolarCoordinatePlane::gridAttributes | ( | bool | circular | ) | const |
Definition at line 320 of file KDChartPolarCoordinatePlane.cpp.
References d.
bool KDChart::PolarCoordinatePlane::hasOwnGridAttributes | ( | bool | circular | ) | const |
If false, the grid will use the global attributes set by AbstractCoordinatePlane::globalGridAttributes (or the default attributes, resp.)
Definition at line 355 of file KDChartPolarCoordinatePlane.cpp.
References d.
|
overrideprotectedvirtual |
Distribute the available space among the diagrams and axes.
Implements KDChart::AbstractCoordinatePlane.
Definition at line 134 of file KDChartPolarCoordinatePlane.cpp.
References angleUnit(), KDChart::AbstractArea::areaGeometry(), d, KDChart::AbstractCoordinatePlane::diagram(), KDChart::AbstractCoordinatePlane::diagrams(), radiusUnit(), startPosition(), KDChart::AbstractCoordinatePlane::update(), and KDChart::CoordinateTransformation::zoom.
Referenced by resizeEvent(), and slotLayoutChanged().
|
overridevirtual |
reimp
Implements KDChart::AbstractLayoutItem.
Definition at line 60 of file KDChartPolarCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::diagrams(), KDChart::AbstractCoordinatePlane::geometry(), KDChart::PolarDiagram::paint(), KDChart::PaintContext::setCoordinatePlane(), KDChart::PaintContext::setPainter(), KDChart::PaintContext::setRectangle(), zoomFactorX(), and zoomFactorY().
|
protected |
qreal PolarCoordinatePlane::radiusUnit | ( | ) | const |
Definition at line 201 of file KDChartPolarCoordinatePlane.cpp.
References d.
Referenced by layoutDiagrams().
void KDChart::PolarCoordinatePlane::resetGridAttributes | ( | bool | circular | ) |
Reset the attributes to be used for grid lines drawn in circular direction (or in sagittal direction, resp.). By calling this method you specify that the global attributes set by AbstractCoordinatePlane::setGlobalGridAttributes be used.
Definition at line 313 of file KDChartPolarCoordinatePlane.cpp.
|
protected |
Definition at line 128 of file KDChartPolarCoordinatePlane.cpp.
References d, and layoutDiagrams().
void KDChart::PolarCoordinatePlane::setGridAttributes | ( | bool | circular, |
const GridAttributes & | a | ||
) |
Set the attributes to be used for grid lines drawn in circular direction (or in sagittal direction, resp.).
To disable circular grid painting, for example, your code should like this:
Definition at line 300 of file KDChartPolarCoordinatePlane.cpp.
References d.
void PolarCoordinatePlane::setStartPosition | ( | qreal | degrees | ) |
Specify the rotation of the coordinate plane.
In a pie diagram this indicates the position where the first pie starts, in a polar diagram it specifies the Zero position of the circular axis:
Definition at line 214 of file KDChartPolarCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::diagram().
|
overridevirtual |
Set the point (in value coordinates) to be used as the center point in zoom operations.
center | The point to use. |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 280 of file KDChartPolarCoordinatePlane.cpp.
References d, KDChart::ZoomParameters::xCenter, KDChart::ZoomParameters::yCenter, and KDChart::CoordinateTransformation::zoom.
|
overridevirtual |
Sets both zoom factors in one go.
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 247 of file KDChartPolarCoordinatePlane.cpp.
References setZoomFactorX(), and setZoomFactorY().
Referenced by adjustZoomAndRepaint().
|
overridevirtual |
Sets the zoom factor in horizontal direction, that is applied to all coordinate transformations.
factor | The new zoom factor |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 253 of file KDChartPolarCoordinatePlane.cpp.
References d, KDChart::ZoomParameters::xFactor, and KDChart::CoordinateTransformation::zoom.
Referenced by setZoomFactors().
|
overridevirtual |
Sets the zoom factor in vertical direction, that is applied to all coordinate transformations.
factor | The new zoom factor |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 263 of file KDChartPolarCoordinatePlane.cpp.
References d, KDChart::ZoomParameters::yFactor, and KDChart::CoordinateTransformation::zoom.
Referenced by setZoomFactors().
|
protectedslot |
Definition at line 208 of file KDChartPolarCoordinatePlane.cpp.
References d, and layoutDiagrams().
Referenced by addDiagram().
qreal PolarCoordinatePlane::startPosition | ( | ) | const |
Retrieve the rotation of the coordinate plane.
Definition at line 226 of file KDChartPolarCoordinatePlane.cpp.
References d.
Referenced by layoutDiagrams(), and KDChart::RingDiagram::paint().
|
overridevirtual |
Translate the given point in value space coordinates to a position in pixel space.
diagramPoint | The point in value coordinates. |
Implements KDChart::AbstractCoordinatePlane.
Definition at line 180 of file KDChartPolarCoordinatePlane.cpp.
References d.
const QPointF PolarCoordinatePlane::translatePolar | ( | const QPointF & | diagramPoint | ) | const |
Definition at line 187 of file KDChartPolarCoordinatePlane.cpp.
References d.
|
overridevirtual |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 273 of file KDChartPolarCoordinatePlane.cpp.
References d.
|
overridevirtual |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 233 of file KDChartPolarCoordinatePlane.cpp.
References d.
Referenced by paint().
|
overridevirtual |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 240 of file KDChartPolarCoordinatePlane.cpp.
References d.
Referenced by paint().