2024-01-17 14:31:45 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* QSkinny - Copyright (C) The authors
|
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2017-07-21 18:21:34 +02:00
|
|
|
#ifndef QSK_SKIN_TRANSITION_H
|
|
|
|
#define QSK_SKIN_TRANSITION_H
|
|
|
|
|
2018-08-03 08:15:28 +02:00
|
|
|
#include "QskAspect.h"
|
2022-03-24 11:17:03 +01:00
|
|
|
#include <memory>
|
2017-07-21 18:21:34 +02:00
|
|
|
|
2022-03-24 11:17:03 +01:00
|
|
|
class QskAnimationHint;
|
2024-01-30 13:04:38 +01:00
|
|
|
class QskSkin;
|
|
|
|
|
2019-02-03 12:48:43 +01:00
|
|
|
class QQuickWindow;
|
2017-07-21 18:21:34 +02:00
|
|
|
class QVariant;
|
2024-01-30 13:04:38 +01:00
|
|
|
template< typename Key, typename T > class QHash;
|
2017-07-21 18:21:34 +02:00
|
|
|
|
|
|
|
class QSK_EXPORT QskSkinTransition
|
|
|
|
{
|
2018-08-03 08:15:28 +02:00
|
|
|
public:
|
2017-07-21 18:21:34 +02:00
|
|
|
enum Type
|
|
|
|
{
|
|
|
|
Color = 1,
|
|
|
|
Metric = 2,
|
|
|
|
|
|
|
|
AllTypes = Color | Metric
|
|
|
|
};
|
|
|
|
|
|
|
|
QskSkinTransition();
|
|
|
|
virtual ~QskSkinTransition();
|
|
|
|
|
2024-01-30 13:04:38 +01:00
|
|
|
void setSourceSkin( const QskSkin* );
|
|
|
|
void setTargetSkin( const QskSkin* );
|
2017-07-21 18:21:34 +02:00
|
|
|
|
|
|
|
void setMask( Type );
|
|
|
|
Type mask() const;
|
|
|
|
|
2024-01-30 13:04:38 +01:00
|
|
|
void run( const QskAnimationHint& );
|
2017-07-21 18:21:34 +02:00
|
|
|
|
|
|
|
static bool isRunning();
|
2020-12-21 16:06:58 +01:00
|
|
|
static QVariant animatedHint( const QQuickWindow*, QskAspect );
|
2019-02-03 12:48:43 +01:00
|
|
|
static QVariant animatedGraphicFilter( const QQuickWindow*, int graphicRole );
|
2017-07-21 18:21:34 +02:00
|
|
|
|
2018-08-03 08:15:28 +02:00
|
|
|
private:
|
2022-03-24 08:08:40 +01:00
|
|
|
Q_DISABLE_COPY( QskSkinTransition )
|
|
|
|
|
2022-03-24 11:17:03 +01:00
|
|
|
class PrivateData;
|
|
|
|
std::unique_ptr< PrivateData > m_data;
|
2017-07-21 18:21:34 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|