PrerenderedLabel

Search for usage in LXR

#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 () 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 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
 
- Protected Member Functions inherited from PrerenderedElement

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.

Constructor & Destructor Documentation

◆ PrerenderedLabel()

PrerenderedLabel::PrerenderedLabel ( )

Definition at line 62 of file KChartTextLabelCache.cpp.

◆ ~PrerenderedLabel()

PrerenderedLabel::~PrerenderedLabel ( )
override

Definition at line 72 of file KChartTextLabelCache.cpp.

Member Function Documentation

◆ angle()

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

Definition at line 121 of file KChartTextLabelCache.cpp.

◆ brush()

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

Definition at line 110 of file KChartTextLabelCache.cpp.

◆ font()

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

Definition at line 88 of file KChartTextLabelCache.cpp.

◆ invalidate()

void PrerenderedLabel::invalidate ( ) const
overrideprotectedvirtual

Invalidates the preredendered data, forces re-rendering.

Implements PrerenderedElement.

Definition at line 77 of file KChartTextLabelCache.cpp.

◆ pixmap()

const QPixmap & PrerenderedLabel::pixmap ( ) const
overridevirtual

Returns the rendered element.

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

Implements PrerenderedElement.

Definition at line 126 of file KChartTextLabelCache.cpp.

◆ referencePointLocation() [1/2]

QPointF PrerenderedLabel::referencePointLocation ( ) const

Definition at line 239 of file KChartTextLabelCache.cpp.

◆ referencePointLocation() [2/2]

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

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

Implements PrerenderedElement.

Definition at line 244 of file KChartTextLabelCache.cpp.

◆ setAngle()

void PrerenderedLabel::setAngle ( qreal angle)

Sets the angle of the label to angle degrees.

Definition at line 115 of file KChartTextLabelCache.cpp.

◆ setBrush()

void PrerenderedLabel::setBrush ( const QBrush & brush)

Sets the label's brush to brush.

Definition at line 104 of file KChartTextLabelCache.cpp.

◆ setFont()

void PrerenderedLabel::setFont ( const QFont & font)

Sets the label's font to font.

Definition at line 82 of file KChartTextLabelCache.cpp.

◆ setText()

void PrerenderedLabel::setText ( const QString & text)

Sets the label's text to text.

Definition at line 93 of file KChartTextLabelCache.cpp.

◆ text()

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

Definition at line 99 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-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.