PrerenderedLabel
#include <KChartTextLabelCache.h>

Public Member Functions | |
qreal | angle () const |
const QBrush & | brush () const |
const QFont & | font () const |
const QPen & | pen () const |
const QPixmap & | pixmap () const override |
QPointF | referencePointLocation () const |
QPointF | referencePointLocation (KChartEnums::PositionValue position) const override |
void | setAngle (qreal angle) |
void | setBrush (const QBrush &brush) |
void | setFont (const QFont &font) |
void | setPen (const QPen &) |
void | setText (const QString &text) |
const QString & | text () const |
![]() | |
const QPointF & | position () const |
KChartEnums::PositionValue | referencePoint () const |
void | setPosition (const QPointF &position) |
void | setReferencePoint (KChartEnums::PositionValue) |
Protected Member Functions | |
void | invalidate () const override |
Detailed Description
PrerenderedLabel is an internal KChart class that simplifies creation and caching of cached text labels.
It provides referenze points to anchor the text to other elements. Reference points use the positions defined in KChartEnums.
Usage:
qreal angle = 90.0; CachedLabel label; label.paint( font, tr("Label"), angle );
Definition at line 83 of file KChartTextLabelCache.h.
Member Function Documentation
◆ angle()
qreal PrerenderedLabel::angle | ( | ) | const |
- Returns
- the label's angle in degrees
Definition at line 122 of file KChartTextLabelCache.cpp.
◆ brush()
const QBrush & PrerenderedLabel::brush | ( | ) | const |
- Returns
- the label's brush
Definition at line 111 of file KChartTextLabelCache.cpp.
◆ font()
const QFont & PrerenderedLabel::font | ( | ) | const |
- Returns
- the label's font.
Definition at line 89 of file KChartTextLabelCache.cpp.
◆ invalidate()
|
overrideprotectedvirtual |
Invalidates the preredendered data, forces re-rendering.
Implements PrerenderedElement.
Definition at line 78 of file KChartTextLabelCache.cpp.
◆ pixmap()
|
overridevirtual |
Returns the rendered element.
If any of the properties have change, the element will be regenerated.
Implements PrerenderedElement.
Definition at line 127 of file KChartTextLabelCache.cpp.
◆ referencePointLocation()
|
overridevirtual |
Return the location of the reference point relatively to the pixmap's origin.
Implements PrerenderedElement.
Definition at line 245 of file KChartTextLabelCache.cpp.
◆ setAngle()
void PrerenderedLabel::setAngle | ( | qreal | angle | ) |
Sets the angle of the label to angle degrees.
Definition at line 116 of file KChartTextLabelCache.cpp.
◆ setBrush()
void PrerenderedLabel::setBrush | ( | const QBrush & | brush | ) |
Sets the label's brush to brush.
Definition at line 105 of file KChartTextLabelCache.cpp.
◆ setFont()
void PrerenderedLabel::setFont | ( | const QFont & | font | ) |
Sets the label's font to font.
Definition at line 83 of file KChartTextLabelCache.cpp.
◆ setText()
void PrerenderedLabel::setText | ( | const QString & | text | ) |
Sets the label's text to text.
Definition at line 94 of file KChartTextLabelCache.cpp.
◆ text()
const QString & PrerenderedLabel::text | ( | ) | const |
- Returns
- the label's text
Definition at line 100 of file KChartTextLabelCache.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat May 21 2022 03:51:42 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.