QskAnimationHint improved
This commit is contained in:
parent
05bb54e48d
commit
e5f15d34e4
24
src/controls/QskAnimationHint.cpp
Normal file
24
src/controls/QskAnimationHint.cpp
Normal 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
|
@ -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
|
||||
|
@ -212,6 +212,7 @@ HEADERS += \
|
||||
SOURCES += \
|
||||
controls/QskAbstractButton.cpp \
|
||||
controls/QskAnimator.cpp \
|
||||
controls/QskAnimationHint.cpp \
|
||||
controls/QskBoundedControl.cpp \
|
||||
controls/QskBoundedInput.cpp \
|
||||
controls/QskBoundedRangeInput.cpp \
|
||||
|
Loading…
x
Reference in New Issue
Block a user