Coverage Report

Created: 2026-03-31 07:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/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(QFontInfo &&) = default;
22
    ~QFontInfo();
23
24
    QFontInfo &operator=(const QFontInfo &);
25
    QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QFontInfo)
26
27
0
    void swap(QFontInfo &other) noexcept { d.swap(other.d); }
28
29
    QString family() const;
30
    QString styleName() const;
31
    int pixelSize() const;
32
    int pointSize() const;
33
    qreal pointSizeF() const;
34
    bool italic() const;
35
    QFont::Style style() const;
36
    int weight() const;
37
0
    inline bool bold() const { return weight() > QFont::Normal; }
38
    bool underline() const;
39
    bool overline() const;
40
    bool strikeOut() const;
41
    bool fixedPitch() const;
42
    QFont::StyleHint styleHint() const;
43
44
    QList<QFontVariableAxis> variableAxes() const;
45
46
#if QT_DEPRECATED_SINCE(6, 0)
47
    QT_DEPRECATED_VERSION_X_6_0("Use weight() instead") int legacyWeight() const;
48
#endif
49
50
    bool exactMatch() const;
51
52
private:
53
    QExplicitlySharedDataPointer<QFontPrivate> d;
54
};
55
56
Q_DECLARE_SHARED(QFontInfo)
57
58
QT_END_NAMESPACE
59
60
#endif // QFONTINFO_H