diff --git a/src/layouts/QskLayoutHint.cpp b/src/layouts/QskLayoutHint.cpp index 1ab5c5f2..fd1df665 100644 --- a/src/layouts/QskLayoutHint.cpp +++ b/src/layouts/QskLayoutHint.cpp @@ -75,3 +75,20 @@ void QskLayoutHint::normalize() m_maximum = qMax( m_minimum, m_maximum ); m_preferred = qBound( m_minimum, m_preferred, m_maximum ); } + +#ifndef QT_NO_DEBUG_STREAM + +#include + +QDebug operator<<( QDebug debug, const QskLayoutHint& hint ) +{ + QDebugStateSaver saver( debug ); + debug.nospace(); + + debug << "LayoutHint" << "( " << hint.minimum() << ", " + << hint.preferred() << ", " << hint.maximum() << " )"; + + return debug; +} + +#endif diff --git a/src/layouts/QskLayoutHint.h b/src/layouts/QskLayoutHint.h index da5a1dfb..3d8c1265 100644 --- a/src/layouts/QskLayoutHint.h +++ b/src/layouts/QskLayoutHint.h @@ -4,6 +4,8 @@ #include "QskGlobal.h" #include +class QDebug; + class QSK_EXPORT QskLayoutHint { public: @@ -35,32 +37,32 @@ class QSK_EXPORT QskLayoutHint }; inline qreal QskLayoutHint::minimum() const -{ +{ return m_minimum; -} - +} + inline void QskLayoutHint::setMinimum( qreal value ) -{ +{ m_minimum = value; -} - +} + inline qreal QskLayoutHint::preferred() const -{ +{ return m_preferred; -} - +} + inline void QskLayoutHint::setPreferred( qreal value ) -{ +{ m_preferred = value; } inline qreal QskLayoutHint::maximum() const -{ +{ return m_maximum; } inline void QskLayoutHint::setMaximum( qreal value ) -{ +{ m_maximum = value; } @@ -76,6 +78,12 @@ inline bool QskLayoutHint::operator!=( const QskLayoutHint& other ) const return !( *this == other ); } +#ifndef QT_NO_DEBUG_STREAM + +QSK_EXPORT QDebug operator<<( QDebug, const QskLayoutHint& ); + +#endif + Q_DECLARE_TYPEINFO( QskLayoutHint, Q_MOVABLE_TYPE ); #endif