Layout item showing a text. More...
#include <KDChartLayoutItems.h>


Public Member Functions | |
| const QObject * | autoReferenceArea () const |
| virtual Qt::Orientations | expandingDirections () const |
| pure virtual in QLayoutItem | |
| virtual QRect | geometry () const |
| pure virtual in QLayoutItem | |
| 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 |
| virtual bool | isEmpty () const |
| pure virtual in QLayoutItem | |
| virtual QSize | maximumSize () const |
| pure virtual in QLayoutItem | |
| virtual QSize | minimumSize () const |
| pure virtual in QLayoutItem | |
| virtual void | paint (QPainter *) |
| virtual void | paintAll (QPainter &painter) |
| Default impl: just call paint. | |
| virtual void | paintCtx (PaintContext *context) |
| Default impl: Paint the complete item using its layouted position and size. | |
| QLayout * | parentLayout () |
| virtual QFont | realFont () const |
| virtual qreal | realFontSize () const |
| void | removeFromParentLayout () |
| void | setAutoReferenceArea (const QObject *area) |
| virtual void | setGeometry (const QRect &r) |
| pure virtual in QLayoutItem | |
| 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. | |
| 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. | |
| virtual QSize | sizeHint () const |
| pure virtual in QLayoutItem | |
| virtual QSize | sizeHintAndRotatedCorners (QPoint &topLeftPt, QPoint &topRightPt, QPoint &bottomRightPt, QPoint &bottomLeftPt) const |
| virtual void | sizeHintChanged () const |
| Report changed size hint: ask the parent widget to recalculate the layout. | |
| virtual QSize | sizeHintUnrotated () const |
| QString | text () const |
| Qt::Alignment | textAlignment () const |
| TextAttributes | textAttributes () const |
| Returns the text attributes to be used for this item. | |
| TextLayoutItem (const QString &text, const TextAttributes &attributes, const QObject *autoReferenceArea, KDChartEnums::MeasureOrientation autoReferenceOrientation, Qt::Alignment alignment=0) | |
| TextLayoutItem () | |
Protected Attributes | |
| QWidget * | mParent |
| QLayout * | mParentLayout |
Layout item showing a text.
Definition at line 98 of file KDChartLayoutItems.h.
| KDChart::TextLayoutItem::TextLayoutItem | ( | ) |
Definition at line 221 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 204 of file KDChartLayoutItems.cpp.
| const QObject * KDChart::TextLayoutItem::autoReferenceArea | ( | ) | const |
Definition at line 242 of file KDChartLayoutItems.cpp.
Referenced by KDChart::TextBubbleLayoutItem::autoReferenceArea(), KDChart::HeaderFooter::compare(), and KDChart::HeaderFooter::setParent().
| Qt::Orientations KDChart::TextLayoutItem::expandingDirections | ( | ) | const [virtual] |
pure virtual in QLayoutItem
Definition at line 301 of file KDChartLayoutItems.cpp.
Referenced by KDChart::TextBubbleLayoutItem::expandingDirections().
| QRect KDChart::TextLayoutItem::geometry | ( | ) | const [virtual] |
pure virtual in QLayoutItem
Definition at line 306 of file KDChartLayoutItems.cpp.
Referenced by KDChart::TextArea::areaGeometry(), KDChart::TextBubbleLayoutItem::geometry(), paint(), KDChart::TextArea::paintAll(), KDChart::CartesianAxis::paintCtx(), and KDChart::TextArea::paintIntoRect().
| bool KDChart::TextLayoutItem::intersects | ( | const TextLayoutItem & | other, | |
| const QPoint & | myPos, | |||
| const QPoint & | otherPos | |||
| ) | const [virtual] |
Definition at line 470 of file KDChartLayoutItems.cpp.
References PI, and KDChart::TextAttributes::rotation().
| bool KDChart::TextLayoutItem::intersects | ( | const TextLayoutItem & | other, | |
| const QPointF & | myPos, | |||
| const QPointF & | otherPos | |||
| ) | const [virtual] |
Definition at line 465 of file KDChartLayoutItems.cpp.
Referenced by KDChart::CartesianAxis::paintCtx().
| bool KDChart::TextLayoutItem::isEmpty | ( | ) | const [virtual] |
pure virtual in QLayoutItem
Definition at line 311 of file KDChartLayoutItems.cpp.
Referenced by KDChart::TextBubbleLayoutItem::isEmpty().
| QSize KDChart::TextLayoutItem::maximumSize | ( | ) | const [virtual] |
pure virtual in QLayoutItem
Definition at line 316 of file KDChartLayoutItems.cpp.
References sizeHint().
Referenced by KDChart::TextBubbleLayoutItem::maximumSize().
| QSize KDChart::TextLayoutItem::minimumSize | ( | ) | const [virtual] |
pure virtual in QLayoutItem
Definition at line 321 of file KDChartLayoutItems.cpp.
References sizeHint().
Referenced by KDChart::TextBubbleLayoutItem::minimumSize().
| void KDChart::TextLayoutItem::paint | ( | QPainter * | painter | ) | [virtual] |
Implements KDChart::AbstractLayoutItem.
Definition at line 618 of file KDChartLayoutItems.cpp.
References KDChart::TextAttributes::autoShrink(), geometry(), KDChart::TextAttributes::pen(), realFont(), rotatedRect(), KDChart::TextAttributes::rotation(), and KDChart::PrintingParameters::scalePen().
Referenced by KDChart::TextBubbleLayoutItem::paint(), KDChart::TextArea::paintAll(), and KDChart::CartesianAxis::paintCtx().
| void KDChart::AbstractLayoutItem::paintAll | ( | QPainter & | painter | ) | [virtual, inherited] |
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 67 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::paint().
| void KDChart::AbstractLayoutItem::paintCtx | ( | PaintContext * | context | ) | [virtual, inherited] |
Default impl: Paint the complete item using its layouted position and size.
Reimplemented in KDChart::CartesianAxis, KDChart::LeveyJenningsAxis, and KDChart::TernaryAxis.
Definition at line 75 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::paint(), and KDChart::PaintContext::painter().
| QLayout* KDChart::AbstractLayoutItem::parentLayout | ( | ) | [inherited] |
Definition at line 76 of file KDChartLayoutItems.h.
| QFont KDChart::TextLayoutItem::realFont | ( | ) | const [virtual] |
Definition at line 442 of file KDChartLayoutItems.cpp.
Referenced by paint(), and KDChart::CartesianAxis::paintCtx().
| qreal KDChart::TextLayoutItem::realFontSize | ( | ) | const [virtual] |
Definition at line 422 of file KDChartLayoutItems.cpp.
References KDChart::TextAttributes::calculatedFontSize().
| void KDChart::AbstractLayoutItem::removeFromParentLayout | ( | ) | [inherited] |
Definition at line 80 of file KDChartLayoutItems.h.
Referenced by KDChart::Chart::takeCoordinatePlane().
| void KDChart::TextLayoutItem::setAutoReferenceArea | ( | const QObject * | area | ) |
Definition at line 235 of file KDChartLayoutItems.cpp.
References sizeHint().
Referenced by KDChart::TextBubbleLayoutItem::setAutoReferenceArea(), and KDChart::HeaderFooter::setParent().
| void KDChart::TextLayoutItem::setGeometry | ( | const QRect & | r | ) | [virtual] |
pure virtual in QLayoutItem
Definition at line 326 of file KDChartLayoutItems.cpp.
Referenced by KDChart::TextArea::paintAll(), KDChart::CartesianAxis::paintCtx(), KDChart::TextArea::paintIntoRect(), and KDChart::TextBubbleLayoutItem::setGeometry().
| void KDChart::AbstractLayoutItem::setParentLayout | ( | QLayout * | lay | ) | [inherited] |
Definition at line 72 of file KDChartLayoutItems.h.
| void KDChart::AbstractLayoutItem::setParentWidget | ( | QWidget * | widget | ) | [virtual, inherited] |
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 62 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::mParent.
Referenced by KDChart::HeaderFooter::setParent(), and KDChart::AbstractCartesianDiagram::takeAxis().
| void KDChart::TextLayoutItem::setText | ( | const QString & | text | ) |
Definition at line 247 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::mParent, and sizeHint().
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 261 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 280 of file KDChartLayoutItems.cpp.
References KDChart::TextAttributes::font(), KDChart::AbstractLayoutItem::mParent, and sizeHint().
Referenced by KDChart::HeaderFooter::clone(), KDChart::CartesianAxis::paintCtx(), and KDChart::TextBubbleLayoutItem::setTextAttributes().
| QSize KDChart::TextLayoutItem::sizeHint | ( | ) | const [virtual] |
pure virtual in QLayoutItem
Definition at line 513 of file KDChartLayoutItems.cpp.
References sizeHintAndRotatedCorners().
Referenced by maximumSize(), minimumSize(), KDChart::CartesianAxis::paintCtx(), setAutoReferenceArea(), setText(), setTextAttributes(), and KDChart::TextBubbleLayoutItem::sizeHint().
| QSize KDChart::TextLayoutItem::sizeHintAndRotatedCorners | ( | QPoint & | topLeftPt, | |
| QPoint & | topRightPt, | |||
| QPoint & | bottomRightPt, | |||
| QPoint & | bottomLeftPt | |||
| ) | const [virtual] |
Definition at line 519 of file KDChartLayoutItems.cpp.
References KDChart::TextAttributes::rotation(), and KDChart::AbstractLayoutItem::sizeHintChanged().
Referenced by KDChart::CartesianAxis::paintCtx(), and sizeHint().
| void KDChart::AbstractLayoutItem::sizeHintChanged | ( | ) | const [virtual, inherited] |
Report changed size hint: ask the parent widget to recalculate the layout.
Definition at line 84 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::mParent.
Referenced by sizeHintAndRotatedCorners().
| QSize KDChart::TextLayoutItem::sizeHintUnrotated | ( | ) | const [virtual] |
Definition at line 544 of file KDChartLayoutItems.cpp.
Referenced by KDChart::CartesianAxis::paintCtx().
| QString KDChart::TextLayoutItem::text | ( | ) | const |
Definition at line 256 of file KDChartLayoutItems.cpp.
Referenced by KDChart::HeaderFooter::clone(), KDChart::HeaderFooter::compare(), KDChart::CartesianAxis::paintCtx(), and KDChart::TextBubbleLayoutItem::text().
| Qt::Alignment KDChart::TextLayoutItem::textAlignment | ( | ) | const |
Definition at line 270 of file KDChartLayoutItems.cpp.
| KDChart::TextAttributes KDChart::TextLayoutItem::textAttributes | ( | ) | const |
Returns the text attributes to be used for this item.
Definition at line 295 of file KDChartLayoutItems.cpp.
Referenced by KDChart::HeaderFooter::clone(), KDChart::HeaderFooter::compare(), and KDChart::TextBubbleLayoutItem::textAttributes().
QWidget* KDChart::AbstractLayoutItem::mParent [protected, inherited] |
Definition at line 90 of file KDChartLayoutItems.h.
Referenced by KDChart::AbstractLayoutItem::setParentWidget(), setText(), setTextAlignment(), setTextAttributes(), and KDChart::AbstractLayoutItem::sizeHintChanged().
QLayout* KDChart::AbstractLayoutItem::mParentLayout [protected, inherited] |
Definition at line 91 of file KDChartLayoutItems.h.
Referenced by KDChart::AutoSpacerLayoutItem::paint().