![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QFont::Tag type provides access to advanced font features. More...
#include <qfont.h>
Public Member Functions | |
| constexpr | Tag ()=default |
| Default constructor, producing an invalid tag. | |
| template<size_t N> | |
| constexpr Q_IMPLICIT | Tag (const char(&str)[N]) noexcept |
| Constructs a tag from a string literal, str. | |
| constexpr bool | isValid () const noexcept |
| Returns whether the tag is valid. | |
| constexpr quint32 | value () const noexcept |
| Returns the numerical value of this tag. | |
| QByteArray | toString () const |
| Returns the string representation of this tag as a byte array. | |
Static Public Member Functions | |
| static constexpr std::optional< Tag > | fromValue (quint32 value) noexcept |
| Returns a tag constructed from value, or \nullopt if the tag produced would be invalid. | |
| static Q_GUI_EXPORT std::optional< Tag > | fromString (QAnyStringView view) noexcept |
| Returns a tag constructed from the string in view. | |
Friends | |
| Q_GUI_EXPORT QDataStream & | operator<< (QDataStream &stream, QFont::Tag tag) |
| Q_GUI_EXPORT QDataStream & | operator>> (QDataStream &stream, QFont::Tag &tag) |
| Data stream operators for QFont::Tag. | |
| Q_GUI_EXPORT QDebug | operator<< (QDebug debug, QFont::Tag tag) |
| constexpr size_t | qHash (Tag key, size_t seed=0) noexcept |
| \qhash{QFont::Tag} | |
| constexpr bool | comparesEqual (const Tag &lhs, const Tag &rhs) noexcept |
| constexpr Qt::strong_ordering | compareThreeWay (const Tag &lhs, const Tag &rhs) noexcept |
| Compare lhs with rhs for equality and ordering. | |
The QFont::Tag type provides access to advanced font features.
QFont provides access to advanced features when shaping text. A feature is defined by a tag, which can be represented as a four-character string, or as a 32bit integer value. This type represents such a tag in a type-safe way. It can be constructed from a four-character, 8bit string literal, or from a corresponding 32bit integer value. Using a shorter or longer string literal will result in a compile-time error.
The named constructors allow to create a tag from an 32bit integer or string value, and will return a \nullopt when the input is invalid.
|
constexprdefault |
Default constructor, producing an invalid tag.
|
inlineconstexprnoexcept |
Constructs a tag from a string literal, str.
The literal must be exactly four characters long.
|
staticnoexcept |
Returns a tag constructed from the string in view.
The string must be exactly four characters long.
Returns \nullopt if the input is not four characters long, or if the tag produced would be invalid.
|
inlineconstexprnoexcept |
Returns whether the tag is valid.
A tag is valid if its value is not zero.
|
inline |
Returns the string representation of this tag as a byte array.
|
inlineconstexprnoexcept |
Returns the numerical value of this tag.
|
friend |
|
friend |
|
friend |
|
friend |
Data stream operators for QFont::Tag.
|
friend |
\qhash{QFont::Tag}