A set of text attributes. More...
#include <KDChartTextAttributes.h>
Public Member Functions | |
bool | autoRotate () const |
bool | autoShrink () const |
const QFont | calculatedFont (const QObject *autoReferenceArea, KDChartEnums::MeasureOrientation autoReferenceOrientation) const |
Returns the font in the size that is used at drawing time. | |
const qreal | calculatedFontSize (const QObject *autoReferenceArea, KDChartEnums::MeasureOrientation autoReferenceOrientation) const |
Returns the font size that is used at drawing time. | |
QFont | font () const |
Measure | fontSize () const |
bool | hasAbsoluteFontSize () const |
bool | isVisible () const |
Measure | minimalFontSize () const |
bool | operator!= (const TextAttributes &other) const |
TextAttributes & | operator= (const TextAttributes &) |
bool | operator== (const TextAttributes &) const |
QPen | pen () const |
int | rotation () const |
void | setAutoRotate (bool autoRotate) |
Set whether the text should be automatically rotated as needed when space is constraint. | |
void | setAutoShrink (bool autoShrink) |
Set whether the text should automatically be shrunk, if space is constraint. | |
void | setFont (const QFont &font) |
Set the font to be used for rendering the text. | |
void | setFontSize (const Measure &measure) |
Set the size of the font used for rendering text. | |
void | setMinimalFontSize (const Measure &measure) |
Set the minimal size of the font used for rendering text. | |
void | setPen (const QPen &pen) |
Set the pen to use for rendering the text. | |
void | setRotation (int rotation) |
Set the rotation angle to use for the text. | |
void | setVisible (bool visible) |
Set whether the text is to be rendered at all. | |
TextAttributes () | |
TextAttributes (const TextAttributes &) | |
~TextAttributes () |
A set of text attributes.
TextAttributes encapsulates settings that have to do with text. This includes font, fontsize, color, whether the text is rotated, etc
Definition at line 43 of file KDChartTextAttributes.h.
TextAttributes::TextAttributes | ( | ) |
Definition at line 60 of file KDChartTextAttributes.cpp.
References setAutoRotate(), setAutoShrink(), setFont(), setPen(), setRotation(), and setVisible().
TextAttributes::TextAttributes | ( | const TextAttributes & | r | ) |
Definition at line 71 of file KDChartTextAttributes.cpp.
TextAttributes::~TextAttributes | ( | ) |
Definition at line 87 of file KDChartTextAttributes.cpp.
bool TextAttributes::autoRotate | ( | ) | const |
Definition at line 215 of file KDChartTextAttributes.cpp.
References d.
Referenced by operator<<(), and operator==().
bool TextAttributes::autoShrink | ( | ) | const |
Definition at line 225 of file KDChartTextAttributes.cpp.
References d.
Referenced by operator<<(), operator==(), and KDChart::TextLayoutItem::paint().
const QFont TextAttributes::calculatedFont | ( | const QObject * | autoReferenceArea, | |
KDChartEnums::MeasureOrientation | autoReferenceOrientation | |||
) | const |
Returns the font in the size that is used at drawing time.
This method is called at drawing time. It returns the font as it is used for rendering text, taking into account any measures that were set via setFontSize and/or setMinimalFontSize.
Definition at line 185 of file KDChartTextAttributes.cpp.
References calculatedFontSize(), d, and KDChart::CartesianCoordinatePlane::hasFixedDataCoordinateSpaceRelation().
Referenced by KDChart::LeveyJenningsDiagram::iconRect().
const qreal TextAttributes::calculatedFontSize | ( | const QObject * | autoReferenceArea, | |
KDChartEnums::MeasureOrientation | autoReferenceOrientation | |||
) | const |
Returns the font size that is used at drawing time.
This method is called at drawing time. It returns the font size as it is used for rendering text, taking into account any measures that were set via setFontSize and/or setMinimalFontSize.
Definition at line 174 of file KDChartTextAttributes.cpp.
References KDChart::Measure::calculatedValue(), fontSize(), and minimalFontSize().
Referenced by calculatedFont(), and KDChart::TextLayoutItem::realFontSize().
QFont TextAttributes::font | ( | ) | const |
Definition at line 139 of file KDChartTextAttributes.cpp.
References d.
Referenced by operator<<(), operator==(), and KDChart::TextLayoutItem::setTextAttributes().
Measure TextAttributes::fontSize | ( | ) | const |
Definition at line 149 of file KDChartTextAttributes.cpp.
References d.
Referenced by calculatedFontSize(), operator<<(), operator==(), and KDChart::CartesianAxis::titleTextAttributes().
bool TextAttributes::hasAbsoluteFontSize | ( | ) | const |
Definition at line 164 of file KDChartTextAttributes.cpp.
References d, and KDChartEnums::MeasureCalculationModeAbsolute.
bool TextAttributes::isVisible | ( | ) | const |
Definition at line 126 of file KDChartTextAttributes.cpp.
References d.
Referenced by operator<<(), operator==(), KDChart::LeveyJenningsAxis::paintAsAbscissa(), KDChart::LeveyJenningsAxis::paintAsOrdinate(), and KDChart::CartesianAxis::paintCtx().
Measure TextAttributes::minimalFontSize | ( | ) | const |
Definition at line 159 of file KDChartTextAttributes.cpp.
References d.
Referenced by calculatedFontSize(), operator<<(), and operator==().
bool KDChart::TextAttributes::operator!= | ( | const TextAttributes & | other | ) | const |
Definition at line 50 of file KDChartTextAttributes.h.
References KDGantt::operator==().
TextAttributes & TextAttributes::operator= | ( | const TextAttributes & | r | ) |
Definition at line 77 of file KDChartTextAttributes.cpp.
References d.
bool TextAttributes::operator== | ( | const TextAttributes & | r | ) | const |
Definition at line 93 of file KDChartTextAttributes.cpp.
References autoRotate(), autoShrink(), font(), fontSize(), isVisible(), minimalFontSize(), pen(), and rotation().
QPen TextAttributes::pen | ( | ) | const |
Definition at line 245 of file KDChartTextAttributes.cpp.
References d.
Referenced by operator<<(), operator==(), KDChart::TextLayoutItem::paint(), KDChart::LeveyJenningsAxis::paintAsOrdinate(), KDChart::CartesianAxis::paintCtx(), and KDChart::LeveyJenningsAxis::setType().
int TextAttributes::rotation | ( | ) | const |
Definition at line 235 of file KDChartTextAttributes.cpp.
References d.
Referenced by KDChart::TextLayoutItem::intersects(), operator<<(), operator==(), KDChart::TextLayoutItem::paint(), KDChart::CartesianAxis::paintCtx(), and KDChart::TextLayoutItem::sizeHintAndRotatedCorners().
void TextAttributes::setAutoRotate | ( | bool | autoRotate | ) |
Set whether the text should be automatically rotated as needed when space is constraint.
autoRotate | Whether text should be automatically rotated. |
Definition at line 210 of file KDChartTextAttributes.cpp.
References d.
Referenced by TextAttributes().
void TextAttributes::setAutoShrink | ( | bool | autoShrink | ) |
Set whether the text should automatically be shrunk, if space is constraint.
autoShrink | Whether text should be auto-shrunk. |
Definition at line 220 of file KDChartTextAttributes.cpp.
References d.
Referenced by TextAttributes().
void TextAttributes::setFont | ( | const QFont & | font | ) |
Set the font to be used for rendering the text.
font | The font to use. |
Definition at line 131 of file KDChartTextAttributes.cpp.
References d.
Referenced by TextAttributes().
void TextAttributes::setFontSize | ( | const Measure & | measure | ) |
Set the size of the font used for rendering text.
measure | The measure to use. |
Definition at line 144 of file KDChartTextAttributes.cpp.
References d.
Referenced by KDChart::Chart::addLegend(), KDChart::LeveyJenningsDiagram::iconRect(), and KDChart::CartesianAxis::titleTextAttributes().
void TextAttributes::setMinimalFontSize | ( | const Measure & | measure | ) |
Set the minimal size of the font used for rendering text.
measure | The measure to use. |
Definition at line 154 of file KDChartTextAttributes.cpp.
References d.
void TextAttributes::setPen | ( | const QPen & | pen | ) |
Set the pen to use for rendering the text.
pen | The pen to use. |
Definition at line 240 of file KDChartTextAttributes.cpp.
References d.
Referenced by KDChart::LeveyJenningsAxis::setType(), and TextAttributes().
void TextAttributes::setRotation | ( | int | rotation | ) |
Set the rotation angle to use for the text.
rotation | The rotation angle. |
Definition at line 230 of file KDChartTextAttributes.cpp.
References d.
Referenced by TextAttributes().
void TextAttributes::setVisible | ( | bool | visible | ) |
Set whether the text is to be rendered at all.
visible | Whether the text is visible. |
Definition at line 121 of file KDChartTextAttributes.cpp.
References d.
Referenced by TextAttributes().