KD Chart API Documentation 3.1
|
#include <KDChartCartesianAxis.h>
Public Types | |
enum | Position { Bottom , Top , Right , Left } |
Public Slots | |
void | setCachedSizeDirty () const |
virtual int | tickLength (bool subUnitTicks=false) const |
Public Slots inherited from KDChart::AbstractAxis | |
void | update () |
The class for cartesian axes.
For being useful, axes need to be assigned to a diagram, see AbstractCartesianDiagram::addAxis and AbstractCartesianDiagram::takeAxis.
Definition at line 30 of file KDChartCartesianAxis.h.
Enumerator | |
---|---|
Bottom | |
Top | |
Right | |
Left |
Definition at line 38 of file KDChartCartesianAxis.h.
|
explicit |
C'tor of the class for cartesian axes.
Definition at line 370 of file KDChartCartesianAxis.cpp.
|
override |
Definition at line 376 of file KDChartCartesianAxis.cpp.
References d, KDChart::AbstractAxis::diagram(), and QObject::qobject_cast().
Returns the currently set axis annotations.
Definition at line 1114 of file KDChartCartesianAxis.cpp.
References d.
Referenced by setAnnotations().
bool CartesianAxis::compare | ( | const CartesianAxis * | other | ) | const |
Returns true if both axes have the same settings.
Definition at line 398 of file KDChartCartesianAxis.cpp.
References KDChart::AbstractAxis::compare(), position(), QObject::qobject_cast(), titleText(), and titleTextAttributes().
int CartesianAxis::customTickLength | ( | ) | const |
Returns the length of custom ticks on the axis.
Definition at line 1103 of file KDChartCartesianAxis.cpp.
References d.
Returns the currently set custom ticks on the axis.
Definition at line 1129 of file KDChartCartesianAxis.cpp.
References d.
|
overridevirtual |
pure virtual in QLayoutItem
Implements QLayoutItem.
Definition at line 922 of file KDChartCartesianAxis.cpp.
References Bottom, Qt::Horizontal, Left, Qt::Orientations, position(), QObject::qobject_cast(), Right, Top, and Qt::Vertical.
|
overridevirtual |
pure virtual in QLayoutItem
Implements KDChart::AbstractAxis.
Definition at line 1088 of file KDChartCartesianAxis.cpp.
References d.
Referenced by KDChart::LeveyJenningsAxis::paintAsAbscissa(), KDChart::LeveyJenningsAxis::paintAsOrdinate(), and paintCtx().
bool CartesianAxis::hasDefaultTitleTextAttributes | ( | ) | const |
Definition at line 453 of file KDChartCartesianAxis.cpp.
References d.
Referenced by titleTextAttributes().
|
virtual |
Definition at line 515 of file KDChartCartesianAxis.cpp.
References Bottom, d, Left, position(), QObject::qobject_cast(), referenceDiagramIsBarDiagram(), Right, Top, and Qt::Vertical.
Referenced by isOrdinate(), KDChart::LeveyJenningsAxis::paintAsAbscissa(), and paintCtx().
|
overridevirtual |
pure virtual in QLayoutItem
Implements QLayoutItem.
Definition at line 916 of file KDChartCartesianAxis.cpp.
Referenced by paintCtx().
|
virtual |
Definition at line 523 of file KDChartCartesianAxis.cpp.
References isAbscissa().
Referenced by KDChart::LeveyJenningsAxis::paintAsOrdinate(), and KDChart::LeveyJenningsAxis::paintCtx().
|
virtual |
Definition at line 480 of file KDChartCartesianAxis.cpp.
References KDChart::AbstractDiagram::coordinatePlane(), d, KDChart::AbstractCoordinatePlane::diagram(), and KDChart::AbstractCoordinatePlane::layoutPlanes().
Referenced by resetTitleTextAttributes(), setAnnotations(), setCustomTickLength(), setCustomTicks(), setPosition(), setTitleText(), and setTitleTextAttributes().
|
overridevirtual |
pure virtual in QLayoutItem
Implements QLayoutItem.
Definition at line 947 of file KDChartCartesianAxis.cpp.
References d.
Referenced by minimumSize(), and sizeHint().
|
overridevirtual |
pure virtual in QLayoutItem
Implements QLayoutItem.
Definition at line 1067 of file KDChartCartesianAxis.cpp.
References maximumSize().
reimp
Implements KDChart::AbstractLayoutItem.
Definition at line 528 of file KDChartCartesianAxis.cpp.
References KDChart::AbstractArea::areaGeometry(), KDChart::AbstractDiagram::coordinatePlane(), d, KDChart::AbstractCoordinatePlane::diagram(), paintCtx(), QObject::qobject_cast(), QPainter::setClipRegion(), KDChart::PaintContext::setPainter(), KDChart::AbstractCoordinatePlane::zoomFactorX(), and KDChart::AbstractCoordinatePlane::zoomFactorY().
|
overridevirtual |
reimp
Reimplemented from KDChart::AbstractLayoutItem.
Reimplemented in KDChart::LeveyJenningsAxis.
Definition at line 641 of file KDChartCartesianAxis.cpp.
References Qt::AlignLeft, KDChart::AbstractArea::areaGeometry(), Bottom, KDChart::PaintContext::coordinatePlane(), KDChart::AbstractAxis::customizedLabel(), d, QPainter::drawLine(), QList::first(), geometry(), KDChart::AbstractCoordinatePlane::gridDimensionsList(), QPainter::hasClipping(), QSizeF::height(), QFontMetricsF::height(), Qt::Horizontal, isAbscissa(), isEmpty(), QList::last(), Left, KDChartEnums::MeasureOrientationMinimum, KDChart::PaintContext::painter(), KDChart::AbstractCoordinatePlane::parent(), position(), QObject::qobject_cast(), referenceDiagramNeedsCenteredAbscissaTicks(), QPainter::restore(), Right, KDChart::AbstractAxis::rulerAttributes(), QPainter::save(), QPainter::setClipping(), QPainter::setPen(), QPointF::setX(), QPointF::setY(), KDChart::AbstractAxis::textAttributes(), tickLength(), titleText(), Top, QSizeF::toSize(), KDChart::CartesianCoordinatePlane::translate(), Qt::Vertical, QSizeF::width(), QPoint::x(), QPointF::x(), QPoint::y(), and QPointF::y().
Referenced by paint(), and KDChart::LeveyJenningsAxis::paintAsAbscissa().
|
virtual |
Definition at line 475 of file KDChartCartesianAxis.cpp.
References d.
Referenced by compare(), expandingDirections(), isAbscissa(), KDChart::LeveyJenningsAxis::paintAsAbscissa(), KDChart::LeveyJenningsAxis::paintAsOrdinate(), and paintCtx().
void CartesianAxis::resetTitleTextAttributes | ( | ) |
Reset the title text attributes to the built-in default:
Same font and pen as AbstractAxis::textAttributes() and 1.5 times their size.
Definition at line 446 of file KDChartCartesianAxis.cpp.
References d, layoutPlanes(), and setCachedSizeDirty().
Sets the axis annotations to annotations. Annotations are a QMap of qreals and QStrings defining special markers and their position. If you use annotations, the normal ticks and values will be invisible. To unset the annotations, pass an empty QMap.
Definition at line 1119 of file KDChartCartesianAxis.cpp.
References annotations(), d, layoutPlanes(), and setCachedSizeDirty().
|
slot |
Definition at line 941 of file KDChartCartesianAxis.cpp.
References d.
Referenced by resetTitleTextAttributes(), setAnnotations(), setCustomTickLength(), setCustomTicks(), setGeometry(), setPosition(), setTitleText(), and setTitleTextAttributes().
Sets the length of custom ticks on the axis.
Definition at line 1093 of file KDChartCartesianAxis.cpp.
References d, layoutPlanes(), and setCachedSizeDirty().
Sets custom ticks on the axis. Ticks are a QList of qreals defining their special position.
Definition at line 1134 of file KDChartCartesianAxis.cpp.
References d, layoutPlanes(), QObject::qobject_cast(), and setCachedSizeDirty().
pure virtual in QLayoutItem
Implements KDChart::AbstractAxis.
Definition at line 1079 of file KDChartCartesianAxis.cpp.
References d, and setCachedSizeDirty().
Definition at line 458 of file KDChartCartesianAxis.cpp.
References d, layoutPlanes(), and setCachedSizeDirty().
use setTitleTextAttributes() instead
Definition at line 585 of file KDChartCartesianAxis.cpp.
References QObject::qobject_cast().
Definition at line 575 of file KDChartCartesianAxis.cpp.
References d, and QObject::qobject_cast().
Sets the optional text displayed as chart title.
Definition at line 414 of file KDChartCartesianAxis.cpp.
References d, layoutPlanes(), and setCachedSizeDirty().
void CartesianAxis::setTitleTextAttributes | ( | const TextAttributes & | a | ) |
Definition at line 426 of file KDChartCartesianAxis.cpp.
References d, layoutPlanes(), and setCachedSizeDirty().
|
overridevirtual |
pure virtual in QLayoutItem
Implements QLayoutItem.
Definition at line 1073 of file KDChartCartesianAxis.cpp.
References maximumSize().
Definition at line 1108 of file KDChartCartesianAxis.cpp.
References QObject::qobject_cast(), and KDChart::AbstractAxis::rulerAttributes().
Referenced by paintCtx().
qreal CartesianAxis::titleSize | ( | ) | const |
Definition at line 591 of file KDChartCartesianAxis.cpp.
qreal CartesianAxis::titleSpace | ( | ) | const |
QString CartesianAxis::titleText | ( | ) | const |
Definition at line 421 of file KDChartCartesianAxis.cpp.
References d.
Referenced by compare(), and paintCtx().
TextAttributes CartesianAxis::titleTextAttributes | ( | ) | const |
Returns the text attributes that will be used for displaying the title text. This is either the text attributes as specified by setTitleTextAttributes, or (if setTitleTextAttributes() was not called) the default text attributes.
Definition at line 434 of file KDChartCartesianAxis.cpp.
References d, hasDefaultTitleTextAttributes(), QObject::qobject_cast(), and KDChart::AbstractAxis::textAttributes().
Referenced by compare().