QskStateCombination operators added
This commit is contained in:
parent
baee63ea6b
commit
7d0092ccb3
@ -1,14 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
||||||
* This file may be used under the terms of the QSkinny License, Version 1.0
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
#include "QskStateCombination.h"
|
|
||||||
|
|
||||||
static void qskRegisterStateCombination()
|
|
||||||
{
|
|
||||||
qRegisterMetaType< QskStateCombination >();
|
|
||||||
}
|
|
||||||
|
|
||||||
Q_CONSTRUCTOR_FUNCTION( qskRegisterStateCombination )
|
|
||||||
|
|
@ -21,6 +21,9 @@ class QSK_EXPORT QskStateCombination
|
|||||||
constexpr QskStateCombination( QskAspect::States = QskAspect::States() ) noexcept;
|
constexpr QskStateCombination( QskAspect::States = QskAspect::States() ) noexcept;
|
||||||
constexpr QskStateCombination( Type, QskAspect::States = QskAspect::States() ) noexcept;
|
constexpr QskStateCombination( Type, QskAspect::States = QskAspect::States() ) noexcept;
|
||||||
|
|
||||||
|
constexpr bool operator==( QskStateCombination ) const noexcept;
|
||||||
|
constexpr bool operator!=( QskStateCombination ) const noexcept;
|
||||||
|
|
||||||
constexpr bool isNull() const noexcept;
|
constexpr bool isNull() const noexcept;
|
||||||
|
|
||||||
void setType( Type ) noexcept;
|
void setType( Type ) noexcept;
|
||||||
@ -36,7 +39,6 @@ class QSK_EXPORT QskStateCombination
|
|||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_TYPEINFO( QskStateCombination, Q_MOVABLE_TYPE );
|
Q_DECLARE_TYPEINFO( QskStateCombination, Q_MOVABLE_TYPE );
|
||||||
Q_DECLARE_METATYPE( QskStateCombination )
|
|
||||||
|
|
||||||
constexpr inline QskStateCombination::QskStateCombination(
|
constexpr inline QskStateCombination::QskStateCombination(
|
||||||
QskAspect::State state ) noexcept
|
QskAspect::State state ) noexcept
|
||||||
@ -90,4 +92,14 @@ constexpr inline QskAspect::States QskStateCombination::states() const noexcept
|
|||||||
return m_states;
|
return m_states;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constexpr bool QskStateCombination::operator==( QskStateCombination other ) const noexcept
|
||||||
|
{
|
||||||
|
return ( m_type == other.m_type ) && ( m_states == other.m_states );
|
||||||
|
}
|
||||||
|
|
||||||
|
constexpr bool QskStateCombination::operator!=( QskStateCombination other ) const noexcept
|
||||||
|
{
|
||||||
|
return !( *this == other );
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -63,7 +63,6 @@ SOURCES += \
|
|||||||
common/QskScaleTickmarks.cpp \
|
common/QskScaleTickmarks.cpp \
|
||||||
common/QskShadowMetrics.cpp \
|
common/QskShadowMetrics.cpp \
|
||||||
common/QskSizePolicy.cpp \
|
common/QskSizePolicy.cpp \
|
||||||
common/QskStateCombination.cpp \
|
|
||||||
common/QskTextColors.cpp \
|
common/QskTextColors.cpp \
|
||||||
common/QskTextOptions.cpp
|
common/QskTextOptions.cpp
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user