more C++11 specifier
This commit is contained in:
parent
0fa33f6061
commit
acbfb9a006
|
@ -143,14 +143,6 @@ static inline QskColorFilter qskInterpolatedFilter(
|
||||||
return interpolated;
|
return interpolated;
|
||||||
}
|
}
|
||||||
|
|
||||||
QskColorFilter::QskColorFilter()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QskColorFilter::~QskColorFilter()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void QskColorFilter::addColorSubstitution( QRgb from, QRgb to )
|
void QskColorFilter::addColorSubstitution( QRgb from, QRgb to )
|
||||||
{
|
{
|
||||||
for ( auto& substitution : m_substitutions )
|
for ( auto& substitution : m_substitutions )
|
||||||
|
@ -203,12 +195,6 @@ QRgb QskColorFilter::substituted( const QRgb& rgb ) const
|
||||||
return qskSubstitutedRgb( m_substitutions, rgb );
|
return qskSubstitutedRgb( m_substitutions, rgb );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QskColorFilter::operator==( const QskColorFilter& other ) const
|
|
||||||
{
|
|
||||||
// what about having the same substitutions, but in different order ???
|
|
||||||
return ( m_substitutions == other.m_substitutions );
|
|
||||||
}
|
|
||||||
|
|
||||||
QskColorFilter QskColorFilter::interpolated(
|
QskColorFilter QskColorFilter::interpolated(
|
||||||
const QskColorFilter& other, qreal progress ) const
|
const QskColorFilter& other, qreal progress ) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,13 +16,11 @@
|
||||||
class QPen;
|
class QPen;
|
||||||
class QBrush;
|
class QBrush;
|
||||||
class QVariant;
|
class QVariant;
|
||||||
class QDebug;
|
|
||||||
|
|
||||||
class QSK_EXPORT QskColorFilter
|
class QSK_EXPORT QskColorFilter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QskColorFilter();
|
QskColorFilter() noexcept = default;
|
||||||
~QskColorFilter();
|
|
||||||
|
|
||||||
void addColorSubstitution( QRgb from, QRgb to );
|
void addColorSubstitution( QRgb from, QRgb to );
|
||||||
void addColorSubstitution( Qt::GlobalColor, QRgb );
|
void addColorSubstitution( Qt::GlobalColor, QRgb );
|
||||||
|
@ -37,12 +35,12 @@ class QSK_EXPORT QskColorFilter
|
||||||
QColor substituted( const QColor& ) const;
|
QColor substituted( const QColor& ) const;
|
||||||
QRgb substituted( const QRgb& ) const;
|
QRgb substituted( const QRgb& ) const;
|
||||||
|
|
||||||
bool isIdentity() const;
|
bool isIdentity() const noexcept;
|
||||||
|
|
||||||
bool operator==( const QskColorFilter& other ) const;
|
bool operator==( const QskColorFilter& other ) const noexcept;
|
||||||
bool operator!=( const QskColorFilter& other ) const;
|
bool operator!=( const QskColorFilter& other ) const noexcept;
|
||||||
|
|
||||||
const QVector< QPair< QRgb, QRgb > >& substitutions() const;
|
const QVector< QPair< QRgb, QRgb > >& substitutions() const noexcept;
|
||||||
|
|
||||||
QskColorFilter interpolated(
|
QskColorFilter interpolated(
|
||||||
const QskColorFilter&, qreal value ) const;
|
const QskColorFilter&, qreal value ) const;
|
||||||
|
@ -55,19 +53,26 @@ class QSK_EXPORT QskColorFilter
|
||||||
QVector< QPair< QRgb, QRgb > > m_substitutions;
|
QVector< QPair< QRgb, QRgb > > m_substitutions;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline bool QskColorFilter::isIdentity() const
|
inline bool QskColorFilter::isIdentity() const noexcept
|
||||||
{
|
{
|
||||||
return m_substitutions.isEmpty();
|
return m_substitutions.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool QskColorFilter::operator==(
|
||||||
|
const QskColorFilter& other ) const noexcept
|
||||||
|
{
|
||||||
|
// what about having the same substitutions, but in different order ???
|
||||||
|
return ( m_substitutions == other.m_substitutions );
|
||||||
|
}
|
||||||
|
|
||||||
inline bool QskColorFilter::operator!=(
|
inline bool QskColorFilter::operator!=(
|
||||||
const QskColorFilter& other ) const
|
const QskColorFilter& other ) const noexcept
|
||||||
{
|
{
|
||||||
return ( !( *this == other ) );
|
return ( !( *this == other ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const QVector< QPair< QRgb, QRgb > >&
|
inline const QVector< QPair< QRgb, QRgb > >&
|
||||||
QskColorFilter::substitutions() const
|
QskColorFilter::substitutions() const noexcept
|
||||||
{
|
{
|
||||||
return m_substitutions;
|
return m_substitutions;
|
||||||
}
|
}
|
||||||
|
@ -91,6 +96,7 @@ inline void QskColorFilter::addColorSubstitution(
|
||||||
Q_DECLARE_METATYPE( QskColorFilter )
|
Q_DECLARE_METATYPE( QskColorFilter )
|
||||||
|
|
||||||
#ifndef QT_NO_DEBUG_STREAM
|
#ifndef QT_NO_DEBUG_STREAM
|
||||||
|
class QDebug;
|
||||||
QSK_EXPORT QDebug operator<<( QDebug, const QskColorFilter& );
|
QSK_EXPORT QDebug operator<<( QDebug, const QskColorFilter& );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue