qskinny/src/controls/QskSkinTransition.h

58 lines
1.3 KiB
C
Raw Normal View History

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