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

A header or footer displaying text above or below charts. More...

#include <KDChartHeaderFooter.h>

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

Public Types

enum  HeaderFooterType { Header , Footer }
 

Signals

void destroyedHeaderFooter (HeaderFooter *)
 
void positionChanged (HeaderFooter *)
 
- Signals inherited from KDChart::TextArea
void positionChanged (TextArea *)
 

Public Member Functions

 HeaderFooter (Chart *parent=nullptr)
 
 ~HeaderFooter () override
 
virtual HeaderFooterclone () const
 
bool compare (const HeaderFooter &other) const
 
Position position () const
 
void setParent (QObject *parent)
 
void setPosition (Position position)
 
void setType (HeaderFooterType type)
 
HeaderFooterType type () const
 
- Public Member Functions inherited from KDChart::TextArea
 ~TextArea () override
 
void paintAll (QPainter &painter) override
 
virtual void paintIntoRect (QPainter &painter, const QRect &rect)
 Draws the background and frame, then calls paint(). More...
 
- Public Member Functions inherited from KDChart::AbstractAreaBase
void alignToReferencePoint (const RelativePosition &position)
 
BackgroundAttributes backgroundAttributes () const
 
bool compare (const AbstractAreaBase *other) const
 
FrameAttributes frameAttributes () const
 
void getFrameLeadings (int &left, int &top, int &right, int &bottom) const
 
virtual void paintBackground (QPainter &painter, const QRect &rectangle)
 
virtual void paintFrame (QPainter &painter, const QRect &rectangle)
 
void setBackgroundAttributes (const BackgroundAttributes &a)
 
void setFrameAttributes (const FrameAttributes &a)
 
- Public Member Functions inherited from KDChart::TextLayoutItem
 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 paintCtx (PaintContext *context)
 
QLayout * parentLayout ()
 
void removeFromParentLayout ()
 
void setParentLayout (QLayout *lay)
 
virtual void setParentWidget (QWidget *widget)
 
virtual void sizeHintChanged () const
 

Additional Inherited Members

- Static Public Member Functions inherited from KDChart::AbstractAreaBase
static void paintBackgroundAttributes (QPainter &painter, const QRect &rectangle, const KDChart::BackgroundAttributes &attributes)
 
static void paintFrameAttributes (QPainter &painter, const QRect &rectangle, const KDChart::FrameAttributes &attributes)
 
- Protected Member Functions inherited from KDChart::TextArea
 TextArea ()
 
QRect areaGeometry () const override
 
void positionHasChanged () override
 
- Protected Member Functions inherited from KDChart::AbstractAreaBase
 AbstractAreaBase ()
 
virtual ~AbstractAreaBase ()
 
QRect innerRect () const
 
- Protected Attributes inherited from KDChart::AbstractLayoutItem
QWidget * mParent = nullptr
 
QLayout * mParentLayout = nullptr
 

Detailed Description

A header or footer displaying text above or below charts.

Definition at line 25 of file KDChartHeaderFooter.h.

Member Enumeration Documentation

◆ HeaderFooterType

Enumerator
Header 
Footer 

Definition at line 39 of file KDChartHeaderFooter.h.

Constructor & Destructor Documentation

◆ HeaderFooter()

HeaderFooter::HeaderFooter ( Chart parent = nullptr)

Definition at line 40 of file KDChartHeaderFooter.cpp.

References setParent().

Referenced by clone().

◆ ~HeaderFooter()

HeaderFooter::~HeaderFooter ( )
override

Definition at line 47 of file KDChartHeaderFooter.cpp.

References destroyedHeaderFooter().

Member Function Documentation

◆ clone()

HeaderFooter * HeaderFooter::clone ( ) const
virtual

Creates an exact copy of this header/footer.

Definition at line 80 of file KDChartHeaderFooter.cpp.

References HeaderFooter(), d, position(), KDChart::TextLayoutItem::text(), KDChart::TextLayoutItem::textAttributes(), and type().

◆ compare()

bool HeaderFooter::compare ( const HeaderFooter other) const

◆ destroyedHeaderFooter

void KDChart::HeaderFooter::destroyedHeaderFooter ( HeaderFooter )
signal

◆ position()

Position HeaderFooter::position ( ) const

Definition at line 118 of file KDChartHeaderFooter.cpp.

References d.

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

◆ positionChanged

void KDChart::HeaderFooter::positionChanged ( HeaderFooter )
signal

◆ setParent()

void HeaderFooter::setParent ( QObject *  parent)

◆ setPosition()

void HeaderFooter::setPosition ( Position  position)

Definition at line 110 of file KDChartHeaderFooter.cpp.

References d, position(), and positionChanged().

◆ setType()

void HeaderFooter::setType ( HeaderFooterType  type)

Definition at line 97 of file KDChartHeaderFooter.cpp.

References d, positionChanged(), and type().

◆ type()

HeaderFooter::HeaderFooterType HeaderFooter::type ( ) const

Definition at line 105 of file KDChartHeaderFooter.cpp.

References d.

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


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