6#ifndef QSK_SKIN_HINT_TABLE_H
7#define QSK_SKIN_HINT_TABLE_H
28 bool setHint(
QskAspect,
const QVariant& );
31 template<
typename T >
bool setHint(
QskAspect,
const T& );
32 template<
typename T > T hint(
QskAspect )
const;
39 const QHash< QskAspect, QVariant >& hints()
const;
41 bool hasAnimators()
const;
42 bool hasHints()
const;
44 QskAspect::States states()
const;
49 QskAspect* resolvedAspect =
nullptr )
const;
60 static const QVariant invalidHint;
62 QHash< QskAspect, QVariant >* m_hints =
nullptr;
64 unsigned short m_animatorCount = 0;
65 QskAspect::States m_states;
68inline bool QskSkinHintTable::hasHints()
const
70 return m_hints !=
nullptr;
73inline QskAspect::States QskSkinHintTable::states()
const
78inline bool QskSkinHintTable::hasAnimators()
const
80 return m_animatorCount > 0;
83inline bool QskSkinHintTable::hasHint(
QskAspect aspect )
const
85 return m_hints && m_hints->contains( aspect );
88inline const QVariant& QskSkinHintTable::hint(
QskAspect aspect )
const
90 if ( m_hints !=
nullptr )
92 auto it = m_hints->constFind( aspect );
93 if ( it != m_hints->constEnd() )
100template<
typename T >
101inline bool QskSkinHintTable::setHint(
QskAspect aspect,
const T& hint )
103 return setHint( aspect, QVariant::fromValue( hint ) );
106template<
typename T >
107inline T QskSkinHintTable::hint(
QskAspect aspect )
const
109 return hint( aspect ).value< T >();
Lookup key for a QskSkinHintTable.