![]() |
KD Chart API Documentation
3.1
|
A text area in the chart with a background, a frame, etc. More...
#include <KDChartTextArea.h>
Signals | |
void | positionChanged (TextArea *) |
Public Member Functions | |
~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 |
Protected Member Functions | |
TextArea () | |
QRect | areaGeometry () const override |
void | positionHasChanged () override |
![]() | |
AbstractAreaBase () | |
virtual | ~AbstractAreaBase () |
QRect | innerRect () 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) |
![]() | |
QWidget * | mParent = nullptr |
QLayout * | mParentLayout = nullptr |
A text area in the chart with a background, a frame, etc.
TextArea is the base class for all text containing non-widget chart elements that have a set of background attributes and frame attributes, such as headers or footers.
Definition at line 34 of file KDChartTextArea.h.
|
override |
Definition at line 42 of file KDChartTextArea.cpp.
|
protected |
Definition at line 34 of file KDChartTextArea.cpp.
|
overrideprotectedvirtual |
Implements KDChart::AbstractAreaBase.
Definition at line 86 of file KDChartTextArea.cpp.
References KDChart::TextLayoutItem::geometry().
Referenced by paintAll().
|
overridevirtual |
Call paintAll, if you want the background and the frame to be drawn before the normal paint() is invoked automatically.
Reimplemented from KDChart::AbstractLayoutItem.
Definition at line 64 of file KDChartTextArea.cpp.
References areaGeometry(), KDChart::TextLayoutItem::geometry(), KDChart::AbstractAreaBase::innerRect(), KDChart::TextLayoutItem::paint(), KDChart::AbstractAreaBase::paintBackground(), KDChart::AbstractAreaBase::paintFrame(), and KDChart::TextLayoutItem::setGeometry().
Referenced by paintIntoRect().
|
virtual |
Draws the background and frame, then calls paint().
In most cases there is no need to overwrite this method in a derived class, but you would overwrite TextLayoutItem::paint() instead.
Definition at line 52 of file KDChartTextArea.cpp.
References KDChart::TextLayoutItem::geometry(), paintAll(), and KDChart::TextLayoutItem::setGeometry().
|
signal |
Referenced by positionHasChanged().
|
overrideprotectedvirtual |
Reimplemented from KDChart::AbstractAreaBase.
Definition at line 91 of file KDChartTextArea.cpp.
References positionChanged().