![]() |
KD Chart API Documentation 3.0
|
#include <KDChartCartesianAxis.h>
Public Types | |
enum | Position { Bottom , Top , Right , Left } |
Public Slots | |
void | setCachedSizeDirty () const |
virtual int | tickLength (bool subUnitTicks=false) const |
![]() | |
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 368 of file KDChartCartesianAxis.cpp.
|
override |
Definition at line 374 of file KDChartCartesianAxis.cpp.
References d, KDChart::AbstractAxis::diagram(), and QObject::qobject_cast().
Returns the currently set axis annotations.
Definition at line 1112 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 396 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 1101 of file KDChartCartesianAxis.cpp.
References d.
Returns the currently set custom ticks on the axis.
Definition at line 1127 of file KDChartCartesianAxis.cpp.
References d.
|
overridevirtual |
pure virtual in QLayoutItem
Implements QLayoutItem.
Definition at line 920 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 1086 of file KDChartCartesianAxis.cpp.
References d.
Referenced by KDChart::LeveyJenningsAxis::paintAsAbscissa(), KDChart::LeveyJenningsAxis::paintAsOrdinate(), and paintCtx().
bool CartesianAxis::hasDefaultTitleTextAttributes | ( | ) | const |
Definition at line 451 of file KDChartCartesianAxis.cpp.
References d.
Referenced by titleTextAttributes().
|
virtual |
Definition at line 513 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 914 of file KDChartCartesianAxis.cpp.
Referenced by paintCtx().
|
virtual |
Definition at line 521 of file KDChartCartesianAxis.cpp.
References isAbscissa().
Referenced by KDChart::LeveyJenningsAxis::paintAsOrdinate(), and KDChart::LeveyJenningsAxis::paintCtx().
|
virtual |
Definition at line 478 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 945 of file KDChartCartesianAxis.cpp.
References d.
Referenced by minimumSize(), and sizeHint().
|
overridevirtual |
pure virtual in QLayoutItem
Implements QLayoutItem.
Definition at line 1065 of file KDChartCartesianAxis.cpp.
References maximumSize().
reimp
Implements KDChart::AbstractLayoutItem.
Definition at line 526 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 639 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 473 of file KDChartCartesianAxis.cpp.
References d.
Referenced by checkExistingAxes(), compare(), expandingDirections(), findSharingAxisDiagrams(), 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 444 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 1117 of file KDChartCartesianAxis.cpp.
References annotations(), d, layoutPlanes(), and setCachedSizeDirty().
|
slot |
Definition at line 939 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 1091 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 1132 of file KDChartCartesianAxis.cpp.
References d, layoutPlanes(), QObject::qobject_cast(), and setCachedSizeDirty().
pure virtual in QLayoutItem
Implements KDChart::AbstractAxis.
Definition at line 1077 of file KDChartCartesianAxis.cpp.
References d, and setCachedSizeDirty().
Definition at line 456 of file KDChartCartesianAxis.cpp.
References d, layoutPlanes(), and setCachedSizeDirty().
use setTitleTextAttributes() instead
Definition at line 583 of file KDChartCartesianAxis.cpp.
References QObject::qobject_cast().
Definition at line 573 of file KDChartCartesianAxis.cpp.
References d, and QObject::qobject_cast().
Sets the optional text displayed as chart title.
Definition at line 412 of file KDChartCartesianAxis.cpp.
References d, layoutPlanes(), and setCachedSizeDirty().
void CartesianAxis::setTitleTextAttributes | ( | const TextAttributes & | a | ) |
Definition at line 424 of file KDChartCartesianAxis.cpp.
References d, layoutPlanes(), and setCachedSizeDirty().
|
overridevirtual |
pure virtual in QLayoutItem
Implements QLayoutItem.
Definition at line 1071 of file KDChartCartesianAxis.cpp.
References maximumSize().
Definition at line 1106 of file KDChartCartesianAxis.cpp.
References QObject::qobject_cast(), and KDChart::AbstractAxis::rulerAttributes().
Referenced by paintCtx().
qreal CartesianAxis::titleSize | ( | ) | const |
Definition at line 589 of file KDChartCartesianAxis.cpp.
qreal CartesianAxis::titleSpace | ( | ) | const |
QString CartesianAxis::titleText | ( | ) | const |
Definition at line 419 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 432 of file KDChartCartesianAxis.cpp.
References d, hasDefaultTitleTextAttributes(), QObject::qobject_cast(), and KDChart::AbstractAxis::textAttributes().
Referenced by compare().