KD Chart 2
[rev.2.7]
|
Layout item showing a text. More...
#include <KDChartLayoutItems.h>
Public Member Functions | |
const QObject * | autoReferenceArea () const |
QPolygon | boundingPolygon () const |
Qt::Orientations | expandingDirections () const override |
pure virtual in QLayoutItem More... | |
QRect | geometry () const override |
pure virtual in QLayoutItem More... | |
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 |
bool | isEmpty () const override |
pure virtual in QLayoutItem More... | |
virtual int | marginWidth () const |
QSize | maximumSize () const override |
pure virtual in QLayoutItem More... | |
QSize | minimumSize () const override |
pure virtual in QLayoutItem More... | |
void | paint (QPainter *) override |
virtual void | paintAll (QPainter &painter) |
Default impl: just call paint. More... | |
virtual void | paintCtx (PaintContext *context) |
Default impl: Paint the complete item using its layouted position and size. More... | |
QLayout * | parentLayout () |
virtual QFont | realFont () const |
virtual qreal | realFontSize () const |
void | removeFromParentLayout () |
void | setAutoReferenceArea (const QObject *area) |
void | setGeometry (const QRect &r) override |
pure virtual in QLayoutItem More... | |
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. More... | |
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 |
pure virtual in QLayoutItem More... | |
virtual void | sizeHintChanged () const |
Report changed size hint: ask the parent widget to recalculate the layout. More... | |
virtual QSize | sizeHintUnrotated () const |
QString | text () const |
Qt::Alignment | textAlignment () const |
TextAttributes | textAttributes () const |
Returns the text attributes to be used for this item. More... | |
TextLayoutItem () | |
TextLayoutItem (const QString &text, const TextAttributes &attributes, const QObject *autoReferenceArea, KDChartEnums::MeasureOrientation autoReferenceOrientation, Qt::Alignment alignment=0) | |
Protected Attributes | |
QWidget * | mParent |
QLayout * | mParentLayout |
Layout item showing a text.
Definition at line 99 of file KDChartLayoutItems.h.
KDChart::TextLayoutItem::TextLayoutItem | ( | ) |
Definition at line 218 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 201 of file KDChartLayoutItems.cpp.
const QObject * KDChart::TextLayoutItem::autoReferenceArea | ( | ) | const |
Definition at line 239 of file KDChartLayoutItems.cpp.
Referenced by KDChart::TextBubbleLayoutItem::autoReferenceArea(), KDChart::HeaderFooter::compare(), and KDChart::HeaderFooter::setParent().
QPolygon KDChart::TextLayoutItem::boundingPolygon | ( | ) | const |
Definition at line 392 of file KDChartLayoutItems.cpp.
Referenced by intersects(), and KDChart::CartesianAxis::paintCtx().
|
override |
pure virtual in QLayoutItem
Definition at line 298 of file KDChartLayoutItems.cpp.
Referenced by KDChart::TextBubbleLayoutItem::expandingDirections().
|
override |
pure virtual in QLayoutItem
Definition at line 303 of file KDChartLayoutItems.cpp.
Referenced by KDChart::TextArea::areaGeometry(), KDChart::TextBubbleLayoutItem::geometry(), KDChart::TextArea::paintAll(), KDChart::TextArea::paintIntoRect(), and rotatedRect().
|
virtual |
Definition at line 398 of file KDChartLayoutItems.cpp.
Referenced by KDChart::CartesianAxis::paintCtx().
|
virtual |
Definition at line 403 of file KDChartLayoutItems.cpp.
References boundingPolygon().
|
override |
pure virtual in QLayoutItem
Definition at line 308 of file KDChartLayoutItems.cpp.
Referenced by KDChart::TextBubbleLayoutItem::isEmpty().
|
virtual |
Definition at line 447 of file KDChartLayoutItems.cpp.
References KDChart::TextAttributes::rotation().
Referenced by KDChart::CartesianAxis::paintCtx().
|
override |
pure virtual in QLayoutItem
Definition at line 313 of file KDChartLayoutItems.cpp.
References sizeHint().
Referenced by KDChart::TextBubbleLayoutItem::maximumSize().
|
override |
pure virtual in QLayoutItem
Definition at line 318 of file KDChartLayoutItems.cpp.
References sizeHint().
Referenced by KDChart::TextBubbleLayoutItem::minimumSize().
|
overridevirtual |
Implements KDChart::AbstractLayoutItem.
Definition at line 490 of file KDChartLayoutItems.cpp.
References KDChart::TextAttributes::autoShrink(), KDChart::TextAttributes::pen(), realFont(), KDChart::TextAttributes::rotation(), KDChart::PrintingParameters::scalePen(), and KDChart::TextAttributes::textDocument().
Referenced by KDChart::TextBubbleLayoutItem::paint(), KDChart::TextArea::paintAll(), and KDChart::CartesianAxis::paintCtx().
|
virtualinherited |
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 64 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::paint().
Referenced by findSharingAxisDiagrams().
|
virtualinherited |
Default impl: Paint the complete item using its layouted position and size.
Reimplemented in KDChart::CartesianAxis, KDChart::LeveyJenningsAxis, and KDChart::TernaryAxis.
Definition at line 72 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::paint(), and KDChart::PaintContext::painter().
|
inherited |
Definition at line 77 of file KDChartLayoutItems.h.
|
virtual |
Definition at line 386 of file KDChartLayoutItems.cpp.
Referenced by KDChart::CartesianAxis::maximumSize(), paint(), KDChart::CartesianAxis::paintCtx(), rotatedRect(), and sizeHintUnrotated().
|
virtual |
Definition at line 369 of file KDChartLayoutItems.cpp.
References KDChart::TextAttributes::calculatedFontSize().
|
inherited |
Definition at line 81 of file KDChartLayoutItems.h.
Referenced by findSharingAxisDiagrams(), KDChart::Chart::takeCoordinatePlane(), and KDChart::Chart::takeHeaderFooter().
void KDChart::TextLayoutItem::setAutoReferenceArea | ( | const QObject * | area | ) |
Definition at line 232 of file KDChartLayoutItems.cpp.
References sizeHint().
Referenced by KDChart::TextBubbleLayoutItem::setAutoReferenceArea(), and KDChart::HeaderFooter::setParent().
|
override |
pure virtual in QLayoutItem
Definition at line 323 of file KDChartLayoutItems.cpp.
Referenced by KDChart::TextArea::paintAll(), KDChart::CartesianAxis::paintCtx(), KDChart::TextArea::paintIntoRect(), and KDChart::TextBubbleLayoutItem::setGeometry().
|
inherited |
Definition at line 73 of file KDChartLayoutItems.h.
Referenced by KDChart::Chart::addHeaderFooter(), findSharingAxisDiagrams(), and KDChart::Chart::takeHeaderFooter().
|
virtualinherited |
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 59 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::mParent.
Referenced by KDChart::HeaderFooter::setParent(), KDChart::AbstractCartesianDiagram::takeAxis(), and updateToplevelLayout().
void KDChart::TextLayoutItem::setText | ( | const QString & | text | ) |
Definition at line 244 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::mParent, sizeHint(), and text().
Referenced by KDChart::Widget::addHeaderFooter(), KDChart::HeaderFooter::clone(), KDChart::CartesianAxis::paintCtx(), and KDChart::TextBubbleLayoutItem::setText().
void KDChart::TextLayoutItem::setTextAlignment | ( | Qt::Alignment | alignment | ) |
Definition at line 258 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.
Definition at line 277 of file KDChartLayoutItems.cpp.
References KDChart::TextAttributes::font(), KDChart::AbstractLayoutItem::mParent, and sizeHint().
Referenced by KDChart::Chart::addHeaderFooter(), KDChart::HeaderFooter::clone(), KDChart::CartesianAxis::paintCtx(), KDChart::HeaderFooter::setParent(), and KDChart::TextBubbleLayoutItem::setTextAttributes().
|
override |
pure virtual in QLayoutItem
Definition at line 411 of file KDChartLayoutItems.cpp.
References KDChart::TextAttributes::rotation(), and KDChart::AbstractLayoutItem::sizeHintChanged().
Referenced by maximumSize(), KDChart::CartesianAxis::maximumSize(), minimumSize(), KDChart::LeveyJenningsAxis::paintAsAbscissa(), KDChart::CartesianAxis::paintCtx(), setAutoReferenceArea(), setText(), setTextAttributes(), KDChart::TextBubbleLayoutItem::sizeHint(), and KDChart::CartesianAxis::titleSize().
|
virtualinherited |
Report changed size hint: ask the parent widget to recalculate the layout.
Definition at line 81 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::mParent.
Referenced by sizeHint().
|
virtual |
Definition at line 425 of file KDChartLayoutItems.cpp.
References KDChart::GlobalMeasureScaling::paintDevice(), and realFont().
QString KDChart::TextLayoutItem::text | ( | ) | const |
Definition at line 253 of file KDChartLayoutItems.cpp.
Referenced by KDChart::HeaderFooter::clone(), KDChart::HeaderFooter::compare(), setText(), and KDChart::TextBubbleLayoutItem::text().
Qt::Alignment KDChart::TextLayoutItem::textAlignment | ( | ) | const |
Definition at line 267 of file KDChartLayoutItems.cpp.
KDChart::TextAttributes KDChart::TextLayoutItem::textAttributes | ( | ) | const |
Returns the text attributes to be used for this item.
Definition at line 292 of file KDChartLayoutItems.cpp.
Referenced by KDChart::Chart::addHeaderFooter(), KDChart::HeaderFooter::clone(), KDChart::HeaderFooter::compare(), and KDChart::TextBubbleLayoutItem::textAttributes().
|
protectedinherited |
Definition at line 91 of file KDChartLayoutItems.h.
Referenced by KDChart::AbstractLayoutItem::setParentWidget(), setText(), setTextAlignment(), setTextAttributes(), and KDChart::AbstractLayoutItem::sizeHintChanged().
|
protectedinherited |
Definition at line 92 of file KDChartLayoutItems.h.
Referenced by KDChart::AutoSpacerLayoutItem::paint().