diff --git a/src/controls/QskAnimationHint.cpp b/src/controls/QskAnimationHint.cpp new file mode 100644 index 00000000..259b1936 --- /dev/null +++ b/src/controls/QskAnimationHint.cpp @@ -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 operator<<( QDebug debug, const QskAnimationHint& hint ) +{ + QDebugStateSaver saver( debug ); + debug.nospace(); + + debug << "AnimationHint" << '('; + debug << hint.duration << ',' << hint.type << ',' << hint.updateFlags; + debug << ')'; + + return debug; +} + +#endif diff --git a/src/controls/QskAnimationHint.h b/src/controls/QskAnimationHint.h index 4a1f04a7..7687b102 100644 --- a/src/controls/QskAnimationHint.h +++ b/src/controls/QskAnimationHint.h @@ -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 diff --git a/src/src.pro b/src/src.pro index f2db71f7..3ed81c02 100644 --- a/src/src.pro +++ b/src/src.pro @@ -212,6 +212,7 @@ HEADERS += \ SOURCES += \ controls/QskAbstractButton.cpp \ controls/QskAnimator.cpp \ + controls/QskAnimationHint.cpp \ controls/QskBoundedControl.cpp \ controls/QskBoundedInput.cpp \ controls/QskBoundedRangeInput.cpp \