16 Q_PROPERTY( Category category READ category WRITE setCategory )
17 Q_PROPERTY( Emphasis emphasis READ emphasis WRITE setEmphasis )
43 constexpr QskFontRole( Category = Body, Emphasis = Normal )
noexcept;
45 constexpr bool operator==(
const QskFontRole& )
const noexcept;
46 constexpr bool operator!=(
const QskFontRole& )
const noexcept;
48 void setCategory( Category )
noexcept;
49 constexpr Category category()
const noexcept;
51 void setEmphasis( Emphasis )
noexcept;
52 constexpr Emphasis emphasis()
const noexcept;
54 QskHashValue hash( QskHashValue seed = 0 )
const noexcept;
57 unsigned char m_category;
58 unsigned char m_emphasis;
61inline constexpr QskFontRole::QskFontRole( Category category, Emphasis emphasis ) noexcept
62 : m_category( category )
63 , m_emphasis( emphasis )
67inline constexpr bool QskFontRole::operator==(
const QskFontRole& other )
const noexcept
69 return ( m_category == other.m_category ) && ( m_emphasis == other.m_emphasis );
72inline constexpr bool QskFontRole::operator!=(
const QskFontRole& other )
const noexcept
74 return !( *
this == other );
77inline void QskFontRole::setCategory( Category category )
noexcept
79 m_category = category;
82inline constexpr QskFontRole::Category QskFontRole::category() const noexcept
84 return static_cast< Category
>( m_category );
87inline void QskFontRole::setEmphasis( Emphasis emphasis )
noexcept
89 m_emphasis = emphasis;
92inline constexpr QskFontRole::Emphasis QskFontRole::emphasis() const noexcept
94 return static_cast< Emphasis
>( m_emphasis );
97inline QskHashValue qHash(
const QskFontRole fontRole, QskHashValue seed = 0 ) noexcept
99 return fontRole.hash( seed );
106 size_t operator()(
const QskFontRole& fontRole )
const noexcept
108 return fontRole.hash();
113#ifndef QT_NO_DEBUG_STREAM
115QSK_EXPORT QDebug operator<<( QDebug,
const QskFontRole& );