KD Reports API Documentation
2.2
|
#include <KDReportsFontScaler_p.h>
Public Member Functions | |
FontScaler (const QFont &initialFont) | |
void | applyAdditionalScalingFactor (qreal factor) |
QFont | font () const |
QFontMetricsF | fontMetrics () const |
QFontMetricsF | initialFontMetrics () const |
qreal | scalingFactor () const |
void | setFactorForHeight (qreal wantedHeight) |
void | setFactorForWidth (qreal wantedFactor, const QString &sampleText) |
void | setFontAndScalingFactor (const QFont &font, qreal scalingFactor) |
qreal | textWidth (const QString &text) const |
Definition at line 36 of file KDReportsFontScaler_p.h.
|
explicit |
Definition at line 18 of file KDReportsFontScaler.cpp.
void FontScaler::applyAdditionalScalingFactor | ( | qreal | factor | ) |
Definition at line 41 of file KDReportsFontScaler.cpp.
Referenced by KDReports::TableLayout::ensureScalingFactorForHeight(), setFactorForHeight(), and setFactorForWidth().
|
inline |
Definition at line 47 of file KDReportsFontScaler_p.h.
Referenced by KDReports::TableLayout::horizontalHeaderScaledFont(), KDReports::TableLayout::scaledFont(), setFontAndScalingFactor(), and KDReports::TableLayout::verticalHeaderScaledFont().
|
inline |
Definition at line 51 of file KDReportsFontScaler_p.h.
Referenced by KDReports::TableLayout::ensureScalingFactorForHeight(), and KDReports::TableLayout::updateColumnWidths().
|
inline |
Definition at line 59 of file KDReportsFontScaler_p.h.
|
inline |
Definition at line 55 of file KDReportsFontScaler_p.h.
Referenced by KDReports::TableLayout::ensureScalingFactorForHeight(), KDReports::TableLayout::scalingFactor(), and setFontAndScalingFactor().
void FontScaler::setFactorForHeight | ( | qreal | wantedHeight | ) |
Definition at line 77 of file KDReportsFontScaler.cpp.
References applyAdditionalScalingFactor().
Referenced by KDReports::TableLayout::ensureScalingFactorForHeight().
void FontScaler::setFactorForWidth | ( | qreal | wantedFactor, |
const QString & | sampleText | ||
) |
Definition at line 105 of file KDReportsFontScaler.cpp.
References applyAdditionalScalingFactor(), textWidth(), and textWidthForMetrics().
Referenced by KDReports::TableLayout::ensureScalingFactorForWidth().
void FontScaler::setFontAndScalingFactor | ( | const QFont & | font, |
qreal | scalingFactor | ||
) |
Definition at line 26 of file KDReportsFontScaler.cpp.
References font(), and scalingFactor().
Referenced by KDReports::TableLayout::setInitialFontScalingFactor().
qreal FontScaler::textWidth | ( | const QString & | text | ) | const |
Definition at line 72 of file KDReportsFontScaler.cpp.
References textWidthForMetrics().
Referenced by setFactorForWidth(), and KDReports::TableLayout::updateColumnWidths().