QskHintAnimatorTable::isEmpty added
This commit is contained in:
parent
0b38a95677
commit
b926476e55
|
@ -204,13 +204,11 @@ namespace
|
|||
class QskHintAnimatorTable::PrivateData
|
||||
{
|
||||
public:
|
||||
// we won't have many entries, so we prefer less memory over
|
||||
// using a hash table
|
||||
// we could use a std::set< QskHintAnimator > instead
|
||||
std::map< QskAspect, QskHintAnimator > map;
|
||||
};
|
||||
|
||||
QskHintAnimatorTable::QskHintAnimatorTable()
|
||||
: m_data( nullptr )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -218,6 +216,7 @@ QskHintAnimatorTable::~QskHintAnimatorTable()
|
|||
{
|
||||
if ( qskAnimatorGuard )
|
||||
qskAnimatorGuard->unregisterTable( this );
|
||||
|
||||
delete m_data;
|
||||
}
|
||||
|
||||
|
@ -228,6 +227,7 @@ void QskHintAnimatorTable::start( QskControl* control,
|
|||
if ( m_data == nullptr )
|
||||
{
|
||||
m_data = new PrivateData();
|
||||
|
||||
if ( qskAnimatorGuard )
|
||||
qskAnimatorGuard->registerTable( this );
|
||||
}
|
||||
|
|
|
@ -54,12 +54,13 @@ class QSK_EXPORT QskHintAnimatorTable
|
|||
QVariant currentValue( QskAspect ) const;
|
||||
|
||||
bool cleanup();
|
||||
bool isEmpty() const;
|
||||
|
||||
private:
|
||||
void reset();
|
||||
|
||||
class PrivateData;
|
||||
PrivateData* m_data;
|
||||
PrivateData* m_data = nullptr;
|
||||
};
|
||||
|
||||
inline QskAspect QskHintAnimator::aspect() const noexcept
|
||||
|
@ -82,4 +83,9 @@ inline bool QskHintAnimator::operator<( const QskHintAnimator& other ) const noe
|
|||
return m_aspect < other.m_aspect;
|
||||
}
|
||||
|
||||
inline bool QskHintAnimatorTable::isEmpty() const
|
||||
{
|
||||
return m_data == nullptr;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue