KD Chart API Documentation  3.1
Public Member Functions | List of all members
KDChart::TextLayoutItem Class Reference

#include <KDChartLayoutItems.h>

Inheritance diagram for KDChart::TextLayoutItem:
KDChart::AbstractLayoutItem KDChart::TextArea KDChart::HeaderFooter

Public Member Functions

 TextLayoutItem ()
 
 TextLayoutItem (const QString &text, const TextAttributes &attributes, const QObject *autoReferenceArea, KDChartEnums::MeasureOrientation autoReferenceOrientation, Qt::Alignment alignment={})
 
const QObject * autoReferenceArea () const
 
QPolygon boundingPolygon () const
 
Qt::Orientations expandingDirections () const override
 
QRect geometry () const override
 
virtual bool intersects (const TextLayoutItem &other, const QPoint &myPos, const QPoint &otherPos) const
 
virtual bool intersects (const TextLayoutItem &other, const QPointF &myPos, const QPointF &otherPos) const
 
bool isEmpty () const override
 
virtual int marginWidth () const
 
QSize maximumSize () const override
 
QSize minimumSize () const override
 
void paint (QPainter *) override
 
virtual QFont realFont () const
 
virtual qreal realFontSize () const
 
void setAutoReferenceArea (const QObject *area)
 
void setGeometry (const QRect &r) override
 
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. More...
 
QSize sizeHint () const override
 
virtual QSize sizeHintUnrotated () const
 
QString text () const
 
Qt::Alignment textAlignment () const
 
TextAttributes textAttributes () const
 
- Public Member Functions inherited from KDChart::AbstractLayoutItem
 AbstractLayoutItem (Qt::Alignment itemAlignment={})
 
virtual void paintAll (QPainter &painter)
 
virtual void paintCtx (PaintContext *context)
 
QLayout * parentLayout ()
 
void removeFromParentLayout ()
 
void setParentLayout (QLayout *lay)
 
virtual void setParentWidget (QWidget *widget)
 
virtual void sizeHintChanged () const
 

Additional Inherited Members

- Protected Attributes inherited from KDChart::AbstractLayoutItem
QWidget * mParent = nullptr
 
QLayout * mParentLayout = nullptr
 

Detailed Description

Layout item showing a text

Definition at line 88 of file KDChartLayoutItems.h.

Constructor & Destructor Documentation

◆ TextLayoutItem() [1/2]

KDChart::TextLayoutItem::TextLayoutItem ( )

Definition at line 205 of file KDChartLayoutItems.cpp.

◆ TextLayoutItem() [2/2]

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

Definition at line 188 of file KDChartLayoutItems.cpp.

Member Function Documentation

◆ autoReferenceArea()

const QObject * KDChart::TextLayoutItem::autoReferenceArea ( ) const

◆ boundingPolygon()

QPolygon KDChart::TextLayoutItem::boundingPolygon ( ) const

Definition at line 374 of file KDChartLayoutItems.cpp.

Referenced by intersects().

◆ expandingDirections()

Qt::Orientations KDChart::TextLayoutItem::expandingDirections ( ) const
override

pure virtual in QLayoutItem

Definition at line 280 of file KDChartLayoutItems.cpp.

◆ geometry()

QRect KDChart::TextLayoutItem::geometry ( ) const
override

pure virtual in QLayoutItem

Definition at line 285 of file KDChartLayoutItems.cpp.

Referenced by KDChart::TextArea::areaGeometry(), KDChart::TextArea::paintAll(), and KDChart::TextArea::paintIntoRect().

◆ intersects() [1/2]

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

Definition at line 385 of file KDChartLayoutItems.cpp.

References boundingPolygon().

◆ intersects() [2/2]

bool KDChart::TextLayoutItem::intersects ( const TextLayoutItem other,
const QPointF &  myPos,
const QPointF &  otherPos 
) const
virtual

Definition at line 380 of file KDChartLayoutItems.cpp.

◆ isEmpty()

bool KDChart::TextLayoutItem::isEmpty ( ) const
override

pure virtual in QLayoutItem

Definition at line 290 of file KDChartLayoutItems.cpp.

◆ marginWidth()

int KDChart::TextLayoutItem::marginWidth ( ) const
virtual

Definition at line 427 of file KDChartLayoutItems.cpp.

◆ maximumSize()

QSize KDChart::TextLayoutItem::maximumSize ( ) const
override

pure virtual in QLayoutItem

Definition at line 295 of file KDChartLayoutItems.cpp.

◆ minimumSize()

QSize KDChart::TextLayoutItem::minimumSize ( ) const
override

pure virtual in QLayoutItem

Definition at line 300 of file KDChartLayoutItems.cpp.

◆ paint()

void KDChart::TextLayoutItem::paint ( QPainter *  painter)
overridevirtual

◆ realFont()

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

Definition at line 368 of file KDChartLayoutItems.cpp.

◆ realFontSize()

qreal KDChart::TextLayoutItem::realFontSize ( ) const
virtual

Definition at line 351 of file KDChartLayoutItems.cpp.

◆ setAutoReferenceArea()

void KDChart::TextLayoutItem::setAutoReferenceArea ( const QObject *  area)

Definition at line 215 of file KDChartLayoutItems.cpp.

Referenced by KDChart::HeaderFooter::setParent().

◆ setGeometry()

void KDChart::TextLayoutItem::setGeometry ( const QRect &  r)
override

◆ setText()

void KDChart::TextLayoutItem::setText ( const QString &  text)

Definition at line 227 of file KDChartLayoutItems.cpp.

Referenced by KDChart::LeveyJenningsAxis::paintAsOrdinate().

◆ setTextAlignment()

void KDChart::TextLayoutItem::setTextAlignment ( Qt::Alignment  alignment)

Definition at line 241 of file KDChartLayoutItems.cpp.

◆ setTextAttributes()

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 260 of file KDChartLayoutItems.cpp.

References KDChart::TextAttributes::font().

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

◆ sizeHint()

QSize KDChart::TextLayoutItem::sizeHint ( ) const
override

pure virtual in QLayoutItem

Definition at line 393 of file KDChartLayoutItems.cpp.

Referenced by KDChart::LeveyJenningsAxis::paintAsAbscissa(), and KDChart::LeveyJenningsAxis::paintAsOrdinate().

◆ sizeHintUnrotated()

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

Definition at line 407 of file KDChartLayoutItems.cpp.

◆ text()

QString KDChart::TextLayoutItem::text ( ) const

◆ textAlignment()

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

Definition at line 250 of file KDChartLayoutItems.cpp.

◆ textAttributes()

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

Returns the text attributes to be used for this item.

See also
setTextAttributes

Definition at line 275 of file KDChartLayoutItems.cpp.

Referenced by KDChart::Chart::addHeaderFooter(), KDChart::HeaderFooter::clone(), and KDChart::HeaderFooter::compare().


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

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated by doxygen 1.9.1