/work/prefix/include/QtGui/qfontinfo.h
Line | Count | Source |
1 | | // Copyright (C) 2016 The Qt Company Ltd. |
2 | | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | | |
4 | | #ifndef QFONTINFO_H |
5 | | #define QFONTINFO_H |
6 | | |
7 | | #include <QtGui/qtguiglobal.h> |
8 | | #include <QtGui/qfont.h> |
9 | | #include <QtGui/qfontvariableaxis.h> |
10 | | |
11 | | #include <QtCore/qshareddata.h> |
12 | | |
13 | | QT_BEGIN_NAMESPACE |
14 | | |
15 | | |
16 | | class Q_GUI_EXPORT QFontInfo |
17 | | { |
18 | | public: |
19 | | QFontInfo(const QFont &); |
20 | | QFontInfo(const QFontInfo &); |
21 | | ~QFontInfo(); |
22 | | |
23 | | QFontInfo &operator=(const QFontInfo &); |
24 | | |
25 | 0 | void swap(QFontInfo &other) noexcept { d.swap(other.d); } |
26 | | |
27 | | QString family() const; |
28 | | QString styleName() const; |
29 | | int pixelSize() const; |
30 | | int pointSize() const; |
31 | | qreal pointSizeF() const; |
32 | | bool italic() const; |
33 | | QFont::Style style() const; |
34 | | int weight() const; |
35 | 0 | inline bool bold() const { return weight() > QFont::Normal; } |
36 | | bool underline() const; |
37 | | bool overline() const; |
38 | | bool strikeOut() const; |
39 | | bool fixedPitch() const; |
40 | | QFont::StyleHint styleHint() const; |
41 | | |
42 | | QList<QFontVariableAxis> variableAxes() const; |
43 | | |
44 | | #if QT_DEPRECATED_SINCE(6, 0) |
45 | | QT_DEPRECATED_VERSION_X_6_0("Use weight() instead") int legacyWeight() const; |
46 | | #endif |
47 | | |
48 | | bool exactMatch() const; |
49 | | |
50 | | private: |
51 | | QExplicitlySharedDataPointer<QFontPrivate> d; |
52 | | }; |
53 | | |
54 | | Q_DECLARE_SHARED(QFontInfo) |
55 | | |
56 | | QT_END_NAMESPACE |
57 | | |
58 | | #endif // QFONTINFO_H |