Coverage Report

Created: 2026-01-25 07:18

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/qtbase/src/gui/text/qfontvariableaxis.h
Line
Count
Source
1
// Copyright (C) 2024 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 QFONTVARIABLEAXIS_H
5
#define QFONTVARIABLEAXIS_H
6
7
#include <QtGui/qtguiglobal.h>
8
#include <QtGui/qfont.h>
9
10
#include <QtCore/qshareddata.h>
11
12
QT_BEGIN_NAMESPACE
13
14
class QFontVariableAxisPrivate;
15
QT_DECLARE_QESDP_SPECIALIZATION_DTOR(QFontVariableAxisPrivate)
16
17
class QFontVariableAxis
18
{
19
    Q_GADGET_EXPORT(Q_GUI_EXPORT)
20
    Q_DECLARE_PRIVATE(QFontVariableAxis)
21
22
    Q_PROPERTY(QByteArray tag READ tagString CONSTANT)
23
    Q_PROPERTY(QString name READ name CONSTANT)
24
    Q_PROPERTY(qreal minimumValue READ minimumValue CONSTANT)
25
    Q_PROPERTY(qreal maximumValue READ maximumValue CONSTANT)
26
    Q_PROPERTY(qreal defaultValue READ defaultValue CONSTANT)
27
public:
28
    Q_GUI_EXPORT QFontVariableAxis();
29
    QFontVariableAxis(QFontVariableAxis &&other) noexcept = default;
30
    Q_GUI_EXPORT QFontVariableAxis(const QFontVariableAxis &axis);
31
    Q_GUI_EXPORT ~QFontVariableAxis();
32
    QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QFontVariableAxis)
33
    void swap(QFontVariableAxis &other) noexcept
34
0
    {
35
0
        d_ptr.swap(other.d_ptr);
36
0
    }
37
38
    Q_GUI_EXPORT QFontVariableAxis &operator=(const QFontVariableAxis &axis);
39
40
    Q_GUI_EXPORT QFont::Tag tag() const;
41
    Q_GUI_EXPORT void setTag(QFont::Tag tag);
42
43
    Q_GUI_EXPORT QString name() const;
44
    Q_GUI_EXPORT void setName(const QString &name);
45
46
    Q_GUI_EXPORT qreal minimumValue() const;
47
    Q_GUI_EXPORT void setMinimumValue(qreal minimumValue);
48
49
    Q_GUI_EXPORT qreal maximumValue() const;
50
    Q_GUI_EXPORT void setMaximumValue(qreal maximumValue);
51
52
    Q_GUI_EXPORT qreal defaultValue() const;
53
    Q_GUI_EXPORT void setDefaultValue(qreal defaultValue);
54
55
private:
56
0
    QByteArray tagString() const { return tag().toString(); }
57
    void detach();
58
59
#ifndef QT_NO_DEBUG_STREAM
60
    Q_GUI_EXPORT friend QDebug operator<<(QDebug debug, const QFontVariableAxis &axis);
61
#endif
62
63
    QExplicitlySharedDataPointer<QFontVariableAxisPrivate> d_ptr;
64
};
65
66
Q_DECLARE_SHARED(QFontVariableAxis)
67
68
QT_END_NAMESPACE
69
70
#endif // QFONTVARIABLEAXIS_H
71