Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-16 09:05:00

0001 // Copyright (C) 2024 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QFONTVARIABLEAXIS_H
0005 #define QFONTVARIABLEAXIS_H
0006 
0007 #include <QtGui/qtguiglobal.h>
0008 #include <QtGui/qfont.h>
0009 
0010 #include <QtCore/qshareddata.h>
0011 
0012 QT_BEGIN_NAMESPACE
0013 
0014 class QFontVariableAxisPrivate;
0015 QT_DECLARE_QESDP_SPECIALIZATION_DTOR(QFontVariableAxisPrivate)
0016 
0017 class QFontVariableAxis
0018 {
0019     Q_GADGET_EXPORT(Q_GUI_EXPORT)
0020     Q_DECLARE_PRIVATE(QFontVariableAxis)
0021 
0022     Q_PROPERTY(QByteArray tag READ tagString CONSTANT)
0023     Q_PROPERTY(QString name READ name CONSTANT)
0024     Q_PROPERTY(qreal minimumValue READ minimumValue CONSTANT)
0025     Q_PROPERTY(qreal maximumValue READ maximumValue CONSTANT)
0026     Q_PROPERTY(qreal defaultValue READ defaultValue CONSTANT)
0027 public:
0028     Q_GUI_EXPORT QFontVariableAxis();
0029     QFontVariableAxis(QFontVariableAxis &&other) noexcept = default;
0030     Q_GUI_EXPORT QFontVariableAxis(const QFontVariableAxis &axis);
0031     Q_GUI_EXPORT ~QFontVariableAxis();
0032     QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QFontVariableAxis)
0033     void swap(QFontVariableAxis &other) noexcept
0034     {
0035         d_ptr.swap(other.d_ptr);
0036     }
0037 
0038     Q_GUI_EXPORT QFontVariableAxis &operator=(const QFontVariableAxis &axis);
0039 
0040     Q_GUI_EXPORT QFont::Tag tag() const;
0041     Q_GUI_EXPORT void setTag(QFont::Tag tag);
0042 
0043     Q_GUI_EXPORT QString name() const;
0044     Q_GUI_EXPORT void setName(const QString &name);
0045 
0046     Q_GUI_EXPORT qreal minimumValue() const;
0047     Q_GUI_EXPORT void setMinimumValue(qreal minimumValue);
0048 
0049     Q_GUI_EXPORT qreal maximumValue() const;
0050     Q_GUI_EXPORT void setMaximumValue(qreal maximumValue);
0051 
0052     Q_GUI_EXPORT qreal defaultValue() const;
0053     Q_GUI_EXPORT void setDefaultValue(qreal defaultValue);
0054 
0055 private:
0056     QByteArray tagString() const { return tag().toString(); }
0057     void detach();
0058 
0059 #ifndef QT_NO_DEBUG_STREAM
0060     Q_GUI_EXPORT friend QDebug operator<<(QDebug debug, const QFontVariableAxis &axis);
0061 #endif
0062 
0063     QExplicitlySharedDataPointer<QFontVariableAxisPrivate> d_ptr;
0064 };
0065 
0066 Q_DECLARE_SHARED(QFontVariableAxis)
0067 
0068 QT_END_NAMESPACE
0069 
0070 #endif // QFONTVARIABLEAXIS_H
0071