2017-07-21 18:21:34 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
|
|
* This file may be used under the terms of the QSkinny License, Version 1.0
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef QSK_HINT_ANIMATOR_H
|
|
|
|
#define QSK_HINT_ANIMATOR_H
|
|
|
|
|
|
|
|
#include "QskAspect.h"
|
2018-08-03 08:15:28 +02:00
|
|
|
#include "QskVariantAnimator.h"
|
2017-07-21 18:21:34 +02:00
|
|
|
|
2018-07-19 14:10:48 +02:00
|
|
|
#include <qpointer.h>
|
2017-07-21 18:21:34 +02:00
|
|
|
|
|
|
|
class QskControl;
|
|
|
|
class QskAnimationHint;
|
|
|
|
|
|
|
|
class QSK_EXPORT QskHintAnimator : public QskVariantAnimator
|
|
|
|
{
|
|
|
|
using Inherited = QskVariantAnimator;
|
|
|
|
|
2018-08-03 08:15:28 +02:00
|
|
|
public:
|
2017-07-21 18:21:34 +02:00
|
|
|
QskHintAnimator();
|
2018-07-31 17:32:25 +02:00
|
|
|
~QskHintAnimator() override;
|
2017-07-21 18:21:34 +02:00
|
|
|
|
|
|
|
void setAspect( QskAspect::Aspect );
|
|
|
|
QskAspect::Aspect aspect() const;
|
|
|
|
|
2018-07-19 14:10:48 +02:00
|
|
|
void setControl( QskControl* );
|
2017-07-21 18:21:34 +02:00
|
|
|
QskControl* control() const;
|
|
|
|
|
2018-07-31 17:32:25 +02:00
|
|
|
void advance( qreal value ) override;
|
2017-07-21 18:21:34 +02:00
|
|
|
|
2018-08-03 08:15:28 +02:00
|
|
|
private:
|
2017-07-21 18:21:34 +02:00
|
|
|
QskAspect::Aspect m_aspect;
|
|
|
|
QPointer< QskControl > m_control;
|
|
|
|
};
|
|
|
|
|
|
|
|
class QSK_EXPORT QskHintAnimatorTable
|
|
|
|
{
|
2018-08-03 08:15:28 +02:00
|
|
|
public:
|
2017-07-21 18:21:34 +02:00
|
|
|
QskHintAnimatorTable();
|
|
|
|
~QskHintAnimatorTable();
|
|
|
|
|
|
|
|
void start( QskControl*, QskAspect::Aspect,
|
|
|
|
QskAnimationHint, const QVariant& from, const QVariant& to );
|
|
|
|
|
|
|
|
const QskHintAnimator* animator( QskAspect::Aspect aspect ) const;
|
|
|
|
QVariant currentValue( QskAspect::Aspect ) const;
|
|
|
|
|
|
|
|
bool cleanup();
|
|
|
|
|
2018-08-03 08:15:28 +02:00
|
|
|
private:
|
2017-07-21 18:21:34 +02:00
|
|
|
void reset();
|
|
|
|
|
|
|
|
class PrivateData;
|
|
|
|
PrivateData* m_data;
|
|
|
|
};
|
|
|
|
|
|
|
|
inline QskAspect::Aspect QskHintAnimator::aspect() const
|
|
|
|
{
|
|
|
|
return m_aspect;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline QskControl* QskHintAnimator::control() const
|
|
|
|
{
|
|
|
|
return m_control;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|