![]() |
KD Chart API Documentation
3.1
|
A header or footer displaying text above or below charts. More...
#include <KDChartHeaderFooter.h>
Public Types | |
enum | HeaderFooterType { Header , Footer } |
Signals | |
void | destroyedHeaderFooter (HeaderFooter *) |
void | positionChanged (HeaderFooter *) |
![]() | |
void | positionChanged (TextArea *) |
Public Member Functions | |
HeaderFooter (Chart *parent=nullptr) | |
~HeaderFooter () override | |
virtual HeaderFooter * | clone () 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 |
![]() | |
~TextArea () override | |
void | paintAll (QPainter &painter) override |
virtual void | paintIntoRect (QPainter &painter, const QRect &rect) |
Draws the background and frame, then calls paint(). More... | |
![]() | |
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) |
![]() | |
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 |
![]() | |
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 void | paintBackgroundAttributes (QPainter &painter, const QRect &rectangle, const KDChart::BackgroundAttributes &attributes) |
static void | paintFrameAttributes (QPainter &painter, const QRect &rectangle, const KDChart::FrameAttributes &attributes) |
![]() | |
TextArea () | |
QRect | areaGeometry () const override |
void | positionHasChanged () override |
![]() | |
AbstractAreaBase () | |
virtual | ~AbstractAreaBase () |
QRect | innerRect () const |
![]() | |
QWidget * | mParent = nullptr |
QLayout * | mParentLayout = nullptr |
A header or footer displaying text above or below charts.
Definition at line 25 of file KDChartHeaderFooter.h.
Enumerator | |
---|---|
Header | |
Footer |
Definition at line 39 of file KDChartHeaderFooter.h.
HeaderFooter::HeaderFooter | ( | Chart * | parent = nullptr | ) |
Definition at line 40 of file KDChartHeaderFooter.cpp.
References setParent().
Referenced by clone().
|
override |
Definition at line 47 of file KDChartHeaderFooter.cpp.
References destroyedHeaderFooter().
|
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().
bool HeaderFooter::compare | ( | const HeaderFooter & | other | ) | const |
Definition at line 90 of file KDChartHeaderFooter.cpp.
References KDChart::TextLayoutItem::autoReferenceArea(), position(), KDChart::TextLayoutItem::text(), KDChart::TextLayoutItem::textAttributes(), and type().
|
signal |
Referenced by ~HeaderFooter(), KDChart::Chart::addHeaderFooter(), and KDChart::Chart::takeHeaderFooter().
Position HeaderFooter::position | ( | ) | const |
Definition at line 118 of file KDChartHeaderFooter.cpp.
References d.
Referenced by KDChart::Chart::addHeaderFooter(), clone(), compare(), and setPosition().
|
signal |
Referenced by KDChart::Chart::addHeaderFooter(), setPosition(), and setType().
void HeaderFooter::setParent | ( | QObject * | parent | ) |
Definition at line 52 of file KDChartHeaderFooter.cpp.
References KDChart::TextLayoutItem::autoReferenceArea(), KDChart::TextLayoutItem::setAutoReferenceArea(), and KDChart::AbstractLayoutItem::setParentWidget().
Referenced by HeaderFooter(), KDChart::Widget::addHeaderFooter(), and KDChart::Widget::replaceHeaderFooter().
void HeaderFooter::setPosition | ( | Position | position | ) |
Definition at line 110 of file KDChartHeaderFooter.cpp.
References d, position(), and positionChanged().
void HeaderFooter::setType | ( | HeaderFooterType | type | ) |
Definition at line 97 of file KDChartHeaderFooter.cpp.
References d, positionChanged(), and 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().