File indexing completed on 2025-12-16 10:26:07
0001
0002
0003
0004 #ifndef QFONTINFO_H
0005 #define QFONTINFO_H
0006
0007 #include <QtGui/qtguiglobal.h>
0008 #include <QtGui/qfont.h>
0009 #include <QtGui/qfontvariableaxis.h>
0010
0011 #include <QtCore/qshareddata.h>
0012
0013 QT_BEGIN_NAMESPACE
0014
0015
0016 class Q_GUI_EXPORT QFontInfo
0017 {
0018 public:
0019 QFontInfo(const QFont &);
0020 QFontInfo(const QFontInfo &);
0021 ~QFontInfo();
0022
0023 QFontInfo &operator=(const QFontInfo &);
0024
0025 void swap(QFontInfo &other) noexcept { d.swap(other.d); }
0026
0027 QString family() const;
0028 QString styleName() const;
0029 int pixelSize() const;
0030 int pointSize() const;
0031 qreal pointSizeF() const;
0032 bool italic() const;
0033 QFont::Style style() const;
0034 int weight() const;
0035 inline bool bold() const { return weight() > QFont::Normal; }
0036 bool underline() const;
0037 bool overline() const;
0038 bool strikeOut() const;
0039 bool fixedPitch() const;
0040 QFont::StyleHint styleHint() const;
0041
0042 QList<QFontVariableAxis> variableAxes() const;
0043
0044 #if QT_DEPRECATED_SINCE(6, 0)
0045 QT_DEPRECATED_VERSION_X_6_0("Use weight() instead") int legacyWeight() const;
0046 #endif
0047
0048 bool exactMatch() const;
0049
0050 private:
0051 QExplicitlySharedDataPointer<QFontPrivate> d;
0052 };
0053
0054 Q_DECLARE_SHARED(QFontInfo)
0055
0056 QT_END_NAMESPACE
0057
0058 #endif