Public Member Functions | Protected Attributes

KDChart::TextLayoutItem Class Reference

Layout item showing a text. More...

#include <KDChartLayoutItems.h>

Inheritance diagram for KDChart::TextLayoutItem:
Inheritance graph
[legend]
Collaboration diagram for KDChart::TextLayoutItem:
Collaboration graph
[legend]

List of all members.

Public Member Functions

const QObjectautoReferenceArea () const
virtual Qt::Orientations expandingDirections () const
 pure virtual in QLayoutItem
virtual QRect geometry () const
 pure virtual in QLayoutItem
virtual bool intersects (const TextLayoutItem &other, const QPointF &myPos, const QPointF &otherPos) const
virtual bool intersects (const TextLayoutItem &other, const QPoint &myPos, const QPoint &otherPos) const
virtual bool isEmpty () const
 pure virtual in QLayoutItem
virtual QSize maximumSize () const
 pure virtual in QLayoutItem
virtual QSize minimumSize () const
 pure virtual in QLayoutItem
virtual void paint (QPainter *)
virtual void paintAll (QPainter &painter)
 Default impl: just call paint.
virtual void paintCtx (PaintContext *context)
 Default impl: Paint the complete item using its layouted position and size.
QLayout * parentLayout ()
virtual QFont realFont () const
virtual qreal realFontSize () const
void removeFromParentLayout ()
void setAutoReferenceArea (const QObject *area)
virtual void setGeometry (const QRect &r)
 pure virtual in QLayoutItem
void setParentLayout (QLayout *lay)
virtual void setParentWidget (QWidget *widget)
 Inform the item about its widget: This enables the item, to trigger that widget's update, whenever the size of the item's contents has changed.
void setText (const QString &text)
void setTextAlignment (Qt::Alignment)
void setTextAttributes (const TextAttributes &a)
 Use this to specify the text attributes to be used for this item.
virtual QSize sizeHint () const
 pure virtual in QLayoutItem
virtual QSize sizeHintAndRotatedCorners (QPoint &topLeftPt, QPoint &topRightPt, QPoint &bottomRightPt, QPoint &bottomLeftPt) const
virtual void sizeHintChanged () const
 Report changed size hint: ask the parent widget to recalculate the layout.
virtual QSize sizeHintUnrotated () const
QString text () const
Qt::Alignment textAlignment () const
TextAttributes textAttributes () const
 Returns the text attributes to be used for this item.
 TextLayoutItem ()
 TextLayoutItem (const QString &text, const TextAttributes &attributes, const QObject *autoReferenceArea, KDChartEnums::MeasureOrientation autoReferenceOrientation, Qt::Alignment alignment=0)

Protected Attributes

QWidgetmParent
QLayout * mParentLayout

Detailed Description

Layout item showing a text.

Definition at line 98 of file KDChartLayoutItems.h.


Constructor & Destructor Documentation

KDChart::TextLayoutItem::TextLayoutItem (  ) 

Definition at line 221 of file KDChartLayoutItems.cpp.

KDChart::TextLayoutItem::TextLayoutItem ( const QString &  text,
const TextAttributes attributes,
const QObject autoReferenceArea,
KDChartEnums::MeasureOrientation  autoReferenceOrientation,
Qt::Alignment  alignment = 0 
)

Definition at line 204 of file KDChartLayoutItems.cpp.


Member Function Documentation

const QObject * KDChart::TextLayoutItem::autoReferenceArea (  )  const
Qt::Orientations KDChart::TextLayoutItem::expandingDirections (  )  const [virtual]

pure virtual in QLayoutItem

Definition at line 301 of file KDChartLayoutItems.cpp.

Referenced by KDChart::TextBubbleLayoutItem::expandingDirections().

QRect KDChart::TextLayoutItem::geometry (  )  const [virtual]
bool KDChart::TextLayoutItem::intersects ( const TextLayoutItem other,
const QPointF &  myPos,
const QPointF &  otherPos 
) const [virtual]

Definition at line 462 of file KDChartLayoutItems.cpp.

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

bool KDChart::TextLayoutItem::intersects ( const TextLayoutItem other,
const QPoint &  myPos,
const QPoint &  otherPos 
) const [virtual]

Definition at line 467 of file KDChartLayoutItems.cpp.

References PI, and KDChart::TextAttributes::rotation().

bool KDChart::TextLayoutItem::isEmpty (  )  const [virtual]

pure virtual in QLayoutItem

Definition at line 311 of file KDChartLayoutItems.cpp.

Referenced by KDChart::TextBubbleLayoutItem::isEmpty().

QSize KDChart::TextLayoutItem::maximumSize (  )  const [virtual]

pure virtual in QLayoutItem

Definition at line 316 of file KDChartLayoutItems.cpp.

References sizeHint().

Referenced by KDChart::TextBubbleLayoutItem::maximumSize().

QSize KDChart::TextLayoutItem::minimumSize (  )  const [virtual]

pure virtual in QLayoutItem

Definition at line 321 of file KDChartLayoutItems.cpp.

References sizeHint().

Referenced by KDChart::TextBubbleLayoutItem::minimumSize().

void KDChart::TextLayoutItem::paint ( QPainter *  painter  )  [virtual]
void KDChart::AbstractLayoutItem::paintAll ( QPainter &  painter  )  [virtual, inherited]

Default impl: just call paint.

Derived classes like KDChart::AbstractArea are providing additional action here.

Reimplemented in KDChart::AbstractArea, KDChart::TextArea, and KDChart::TernaryAxis.

Definition at line 67 of file KDChartLayoutItems.cpp.

References KDChart::AbstractLayoutItem::paint().

void KDChart::AbstractLayoutItem::paintCtx ( PaintContext context  )  [virtual, inherited]

Default impl: Paint the complete item using its layouted position and size.

Reimplemented in KDChart::CartesianAxis, KDChart::LeveyJenningsAxis, and KDChart::TernaryAxis.

Definition at line 75 of file KDChartLayoutItems.cpp.

References KDChart::AbstractLayoutItem::paint(), and KDChart::PaintContext::painter().

QLayout* KDChart::AbstractLayoutItem::parentLayout (  )  [inherited]

Definition at line 76 of file KDChartLayoutItems.h.

QFont KDChart::TextLayoutItem::realFont (  )  const [virtual]

Definition at line 439 of file KDChartLayoutItems.cpp.

Referenced by paint(), and KDChart::CartesianAxis::paintCtx().

qreal KDChart::TextLayoutItem::realFontSize (  )  const [virtual]
void KDChart::AbstractLayoutItem::removeFromParentLayout (  )  [inherited]

Definition at line 80 of file KDChartLayoutItems.h.

Referenced by KDChart::Chart::takeCoordinatePlane().

void KDChart::TextLayoutItem::setAutoReferenceArea ( const QObject area  ) 
void KDChart::TextLayoutItem::setGeometry ( const QRect &  r  )  [virtual]
void KDChart::AbstractLayoutItem::setParentLayout ( QLayout *  lay  )  [inherited]

Definition at line 72 of file KDChartLayoutItems.h.

void KDChart::AbstractLayoutItem::setParentWidget ( QWidget widget  )  [virtual, inherited]

Inform the item about its widget: This enables the item, to trigger that widget's update, whenever the size of the item's contents has changed.

Thus, you need to call setParentWidget on every item, that has a non-fixed size.

Definition at line 62 of file KDChartLayoutItems.cpp.

References KDChart::AbstractLayoutItem::mParent.

Referenced by KDChart::HeaderFooter::setParent(), and KDChart::AbstractCartesianDiagram::takeAxis().

void KDChart::TextLayoutItem::setText ( const QString &  text  ) 
void KDChart::TextLayoutItem::setTextAlignment ( Qt::Alignment  alignment  ) 

Definition at line 261 of file KDChartLayoutItems.cpp.

References KDChart::AbstractLayoutItem::mParent.

void KDChart::TextLayoutItem::setTextAttributes ( const TextAttributes a  ) 

Use this to specify the text attributes to be used for this item.

See also:
textAttributes

Definition at line 280 of file KDChartLayoutItems.cpp.

References KDChart::TextAttributes::font(), KDChart::AbstractLayoutItem::mParent, and sizeHint().

Referenced by KDChart::HeaderFooter::clone(), and KDChart::TextBubbleLayoutItem::setTextAttributes().

QSize KDChart::TextLayoutItem::sizeHint (  )  const [virtual]
QSize KDChart::TextLayoutItem::sizeHintAndRotatedCorners ( QPoint &  topLeftPt,
QPoint &  topRightPt,
QPoint &  bottomRightPt,
QPoint &  bottomLeftPt 
) const [virtual]
void KDChart::AbstractLayoutItem::sizeHintChanged (  )  const [virtual, inherited]

Report changed size hint: ask the parent widget to recalculate the layout.

Definition at line 84 of file KDChartLayoutItems.cpp.

References KDChart::AbstractLayoutItem::mParent.

Referenced by sizeHintAndRotatedCorners().

QSize KDChart::TextLayoutItem::sizeHintUnrotated (  )  const [virtual]

Definition at line 541 of file KDChartLayoutItems.cpp.

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

QString KDChart::TextLayoutItem::text (  )  const
Qt::Alignment KDChart::TextLayoutItem::textAlignment (  )  const

Definition at line 270 of file KDChartLayoutItems.cpp.

KDChart::TextAttributes KDChart::TextLayoutItem::textAttributes (  )  const

Returns the text attributes to be used for this item.

See also:
setTextAttributes

Definition at line 295 of file KDChartLayoutItems.cpp.

Referenced by KDChart::HeaderFooter::clone(), KDChart::HeaderFooter::compare(), and KDChart::TextBubbleLayoutItem::textAttributes().


Member Data Documentation

QLayout* KDChart::AbstractLayoutItem::mParentLayout [protected, inherited]

Definition at line 91 of file KDChartLayoutItems.h.

Referenced by KDChart::AutoSpacerLayoutItem::paint().


The documentation for this class was generated from the following files: