use enums for class members
This commit is contained in:
parent
0d86454774
commit
c331fd601a
@ -58,7 +58,7 @@ QskTextOptions::TextFormat QskTextOptions::effectiveFormat( const QString& text
|
|||||||
if ( m_format == QskTextOptions::AutoText )
|
if ( m_format == QskTextOptions::AutoText )
|
||||||
return Qt::mightBeRichText( text ) ? StyledText : PlainText;
|
return Qt::mightBeRichText( text ) ? StyledText : PlainText;
|
||||||
|
|
||||||
return static_cast< QskTextOptions::TextFormat >( m_format );
|
return m_format;
|
||||||
}
|
}
|
||||||
|
|
||||||
QskHashValue QskTextOptions::hash( QskHashValue seed ) const noexcept
|
QskHashValue QskTextOptions::hash( QskHashValue seed ) const noexcept
|
||||||
|
@ -82,9 +82,9 @@ class QSK_EXPORT QskTextOptions
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
int m_maximumLineCount;
|
int m_maximumLineCount;
|
||||||
unsigned int m_fontSizeMode : 2;
|
FontSizeMode m_fontSizeMode : 2;
|
||||||
unsigned int m_wrapMode : 4;
|
WrapMode m_wrapMode : 4;
|
||||||
unsigned int m_format : 3;
|
TextFormat m_format : 3;
|
||||||
unsigned int m_elideMode : 2;
|
unsigned int m_elideMode : 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ inline void QskTextOptions::setFormat( TextFormat format ) noexcept
|
|||||||
|
|
||||||
constexpr inline QskTextOptions::TextFormat QskTextOptions::format() const noexcept
|
constexpr inline QskTextOptions::TextFormat QskTextOptions::format() const noexcept
|
||||||
{
|
{
|
||||||
return static_cast< QskTextOptions::TextFormat >( m_format );
|
return m_format;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void QskTextOptions::setElideMode( Qt::TextElideMode elideMode ) noexcept
|
inline void QskTextOptions::setElideMode( Qt::TextElideMode elideMode ) noexcept
|
||||||
@ -130,7 +130,7 @@ inline void QskTextOptions::setWrapMode( WrapMode wrapMode ) noexcept
|
|||||||
|
|
||||||
constexpr inline QskTextOptions::WrapMode QskTextOptions::wrapMode() const noexcept
|
constexpr inline QskTextOptions::WrapMode QskTextOptions::wrapMode() const noexcept
|
||||||
{
|
{
|
||||||
return static_cast< QskTextOptions::WrapMode >( m_wrapMode );
|
return m_wrapMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void QskTextOptions::setFontSizeMode( FontSizeMode fontSizeMode ) noexcept
|
inline void QskTextOptions::setFontSizeMode( FontSizeMode fontSizeMode ) noexcept
|
||||||
@ -140,7 +140,7 @@ inline void QskTextOptions::setFontSizeMode( FontSizeMode fontSizeMode ) noexcep
|
|||||||
|
|
||||||
constexpr inline QskTextOptions::FontSizeMode QskTextOptions::fontSizeMode() const noexcept
|
constexpr inline QskTextOptions::FontSizeMode QskTextOptions::fontSizeMode() const noexcept
|
||||||
{
|
{
|
||||||
return static_cast< QskTextOptions::FontSizeMode >( m_fontSizeMode );
|
return m_fontSizeMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void QskTextOptions::setMaximumLineCount( int lineCount ) noexcept
|
inline void QskTextOptions::setMaximumLineCount( int lineCount ) noexcept
|
||||||
|
Loading…
x
Reference in New Issue
Block a user