QskAnimationHint improved

This commit is contained in:
Uwe Rathmann 2021-12-29 15:27:53 +01:00
parent 05bb54e48d
commit e5f15d34e4
3 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,24 @@
/******************************************************************************
* QSkinny - Copyright (C) 2016 Uwe Rathmann
* This file may be used under the terms of the QSkinny License, Version 1.0
*****************************************************************************/
#include "QskAnimationHint.h"
#ifndef QT_NO_DEBUG_STREAM
#include <qdebug.h>
QDebug operator<<( QDebug debug, const QskAnimationHint& hint )
{
QDebugStateSaver saver( debug );
debug.nospace();
debug << "AnimationHint" << '(';
debug << hint.duration << ',' << hint.type << ',' << hint.updateFlags;
debug << ')';
return debug;
}
#endif

View File

@ -42,6 +42,11 @@ class QSK_EXPORT QskAnimationHint
{
}
inline constexpr bool isValid() const
{
return duration > 0;
}
uint duration;
QEasingCurve::Type type;
UpdateFlags updateFlags;
@ -51,4 +56,11 @@ Q_DECLARE_METATYPE( QskAnimationHint )
Q_DECLARE_TYPEINFO( QskAnimationHint, Q_PRIMITIVE_TYPE );
Q_DECLARE_OPERATORS_FOR_FLAGS( QskAnimationHint::UpdateFlags )
#ifndef QT_NO_DEBUG_STREAM
class QDebug;
QSK_EXPORT QDebug operator<<( QDebug, const QskAnimationHint& );
#endif
#endif

View File

@ -212,6 +212,7 @@ HEADERS += \
SOURCES += \
controls/QskAbstractButton.cpp \
controls/QskAnimator.cpp \
controls/QskAnimationHint.cpp \
controls/QskBoundedControl.cpp \
controls/QskBoundedInput.cpp \
controls/QskBoundedRangeInput.cpp \