42 #ifndef QFONTMETRICS_H 43 #define QFONTMETRICS_H 45 #include <QtGui/qfont.h> 46 #include <QtCore/qsharedpointer.h> 47 #ifndef QT_INCLUDE_COMPAT 48 #include <QtCore/qrect.h> 74 #ifdef Q_COMPILER_RVALUE_REFS 76 {
qSwap(
d, other.d);
return *
this; }
83 int lineSpacing()
const;
84 int minLeftBearing()
const;
85 int minRightBearing()
const;
89 int averageCharWidth()
const;
91 bool inFont(
QChar)
const;
92 bool inFontUcs4(
uint ucs4)
const;
94 int leftBearing(
QChar)
const;
95 int rightBearing(
QChar)
const;
96 int width(
const QString &,
int len = -1)
const;
97 int width(
const QString &,
int len,
int flags)
const;
99 int width(
QChar)
const;
100 int charWidth(
const QString &str,
int pos)
const;
107 int tabstops=0,
int *tabarray=0)
const 109 QSize size(
int flags,
const QString& str,
int tabstops=0,
int *tabarray=0)
const;
115 int underlinePos()
const;
116 int overlinePos()
const;
117 int strikeOutPos()
const;
118 int lineWidth()
const;
129 int tabstops=0,
int *tabarray=0)
const 131 inline QSize size(
int flags,
const QString& str,
int len,
int tabstops=0,
int *tabarray=0)
const 132 {
return size(flags, str.
left(len), tabstops, tabarray); }
135 #if defined(Q_WS_MAC) 156 #ifdef Q_COMPILER_RVALUE_REFS 158 {
qSwap(
d, other.d);
return *
this; }
160 qreal ascent()
const;
161 qreal descent()
const;
162 qreal height()
const;
163 qreal leading()
const;
164 qreal lineSpacing()
const;
165 qreal minLeftBearing()
const;
166 qreal minRightBearing()
const;
167 qreal maxWidth()
const;
169 qreal xHeight()
const;
170 qreal averageCharWidth()
const;
172 bool inFont(
QChar)
const;
173 bool inFontUcs4(
uint ucs4)
const;
184 QSizeF size(
int flags,
const QString& str,
int tabstops=0,
int *tabarray=0)
const;
190 qreal underlinePos()
const;
191 qreal overlinePos()
const;
192 qreal strikeOutPos()
const;
193 qreal lineWidth()
const;
208 #endif // QFONTMETRICS_H
QExplicitlySharedDataPointer< QFontPrivate > d
The QFontMetrics class provides font metrics information.
#define QT_END_NAMESPACE
This macro expands to.
bool operator!=(QBool b1, bool b2)
The QString class provides a Unicode character string.
The QSizeF class defines the size of a two-dimensional object using floating point precision...
The QChar class provides a 16-bit Unicode character.
QRect boundingRect(int x, int y, int w, int h, int flags, const QString &text, int tabstops=0, int *tabarray=0) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
static const QRectF boundingRect(const QPointF *points, int pointCount)
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
QString left(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n leftmost characters of the string.
void qSwap(T &value1, T &value2)
The QFont class specifies a font used for drawing text.
The QRect class defines a rectangle in the plane using integer precision.
The QFontMetricsF class provides font metrics information.
The QSize class defines the size of a two-dimensional object using integer point precision.
The QTextCodec class provides conversions between text encodings.
bool operator==(QBool b1, bool b2)
QExplicitlySharedDataPointer< QFontPrivate > d