#include <KChartTextLabelCache.h>

Inheritance diagram for PrerenderedLabel:

Public Member Functions

qreal angle () const
const QBrushbrush () const
const QFontfont () const
const QPenpen () const
const QPixmappixmap () const override
QPointF referencePointLocation (KChartEnums::PositionValue position) const override
QPointF referencePointLocation () const
void setAngle (qreal angle)
void setBrush (const QBrush &brush)
void setFont (const QFont &font)
void setPen (const QPen &)
void setText (const QString &text)
const QStringtext () const
- Public Member Functions inherited from PrerenderedElement
const QPointFposition () 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.


qreal angle = 90.0;
CachedLabel label;
label.paint( font, tr("Label"), angle );

Definition at line 94 of file KChartTextLabelCache.h.

Member Function Documentation

qreal PrerenderedLabel::angle ( ) const
the label's angle in degrees

Definition at line 133 of file KChartTextLabelCache.cpp.

const QBrush & PrerenderedLabel::brush ( ) const
the label's brush

Definition at line 122 of file KChartTextLabelCache.cpp.

const QFont & PrerenderedLabel::font ( ) const
the label's font.

Definition at line 100 of file KChartTextLabelCache.cpp.

void PrerenderedLabel::invalidate ( ) const

Invalidates the preredendered data, forces re-rendering.

Implements PrerenderedElement.

Definition at line 89 of file KChartTextLabelCache.cpp.

const QPixmap & PrerenderedLabel::pixmap ( ) const

Returns the rendered element.

If any of the properties have change, the element will be regenerated.

Implements PrerenderedElement.

Definition at line 138 of file KChartTextLabelCache.cpp.

QPointF PrerenderedLabel::referencePointLocation ( KChartEnums::PositionValue  ) const

Return the location of the reference point relatively to the pixmap's origin.

Implements PrerenderedElement.

Definition at line 256 of file KChartTextLabelCache.cpp.

void PrerenderedLabel::setAngle ( qreal  angle)

Sets the angle of the label to angle degrees.

Definition at line 127 of file KChartTextLabelCache.cpp.

void PrerenderedLabel::setBrush ( const QBrush brush)

Sets the label's brush to brush.

Definition at line 116 of file KChartTextLabelCache.cpp.

void PrerenderedLabel::setFont ( const QFont font)

Sets the label's font to font.

Definition at line 94 of file KChartTextLabelCache.cpp.

void PrerenderedLabel::setText ( const QString text)

Sets the label's text to text.

Definition at line 105 of file KChartTextLabelCache.cpp.

const QString & PrerenderedLabel::text ( ) const
the label's text

Definition at line 111 of file KChartTextLabelCache.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Sep 19 2020 22:36:26 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.