PrerenderedElement Class Reference

#include <KDChartTextLabelCache.h>

Inheritance diagram for PrerenderedElement:

Inheritance graph
[legend]
Collaboration diagram for PrerenderedElement:

Collaboration graph
[legend]
List of all members.

Detailed Description

base class for prerendered elements like labels, pixmaps, markers, etc.

Definition at line 40 of file KDChartTextLabelCache.h.

Public Member Functions

virtual const QPixmap & pixmap () const=0
 Returns the rendered element.
const QPointF & position () const
 Get the position of the element.
 PrerenderedElement ()
KDChartEnums::PositionValue referencePoint () const
 Get the reference point of the element.
virtual QPointF referencePointLocation (KDChartEnums::PositionValue) const=0
 Return the location of the reference point relatively to the pixmap's origin.
void setPosition (const QPointF &position)
 Set the position of the element.
void setReferencePoint (KDChartEnums::PositionValue)
 Set the reference point of the element.
virtual ~PrerenderedElement ()

Protected Member Functions

virtual void invalidate () const=0
 invalidate() needs to be called if any of the properties that determine the visual appearance of the prerendered element change.


Constructor & Destructor Documentation

PrerenderedElement::PrerenderedElement (  ) 

Definition at line 59 of file KDChartTextLabelCache.cpp.

00060     : m_referencePoint( KDChartEnums::PositionNorthWest )
00061 {
00062 }

virtual PrerenderedElement::~PrerenderedElement (  )  [virtual]

Definition at line 43 of file KDChartTextLabelCache.h.

00043 {}


Member Function Documentation

virtual void PrerenderedElement::invalidate (  )  const [protected, pure virtual]

invalidate() needs to be called if any of the properties that determine the visual appearance of the prerendered element change.

It can be called for a const object, as objects may need to force recalculation of the pixmap.

Implemented in PrerenderedLabel.

virtual const QPixmap& PrerenderedElement::pixmap (  )  const [pure virtual]

Returns the rendered element.

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

Implemented in PrerenderedLabel.

const QPointF & PrerenderedElement::position (  )  const

Get the position of the element.

Definition at line 69 of file KDChartTextLabelCache.cpp.

Referenced by KDChart::TernaryAxis::paintCtx().

00070 {
00071     return m_position;
00072 }

KDChartEnums::PositionValue PrerenderedElement::referencePoint (  )  const

Get the reference point of the element.

Definition at line 79 of file KDChartTextLabelCache.cpp.

Referenced by PrerenderedLabel::referencePointLocation().

00080 {
00081     return m_referencePoint;
00082 }

virtual QPointF PrerenderedElement::referencePointLocation ( KDChartEnums::PositionValue   )  const [pure virtual]

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

Implemented in PrerenderedLabel.

void PrerenderedElement::setPosition ( const QPointF &  position  ) 

Set the position of the element.

Definition at line 64 of file KDChartTextLabelCache.cpp.

00065 {   // this does not invalidate the element
00066     m_position = position;
00067 }

void PrerenderedElement::setReferencePoint ( KDChartEnums::PositionValue   ) 

Set the reference point of the element.

Every element has nine possible reference points (all compass directions, plus the center.

Definition at line 74 of file KDChartTextLabelCache.cpp.

00075 {   // this does not invalidate the element
00076     m_referencePoint = point;
00077 }


The documentation for this class was generated from the following files:
Generated on Mon Sep 17 16:17:57 2007 for KD Chart 2 by  doxygen 1.5.1