2023-06-19 11:22:34 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef QSK_SWIPE_VIEW_H
|
|
|
|
#define QSK_SWIPE_VIEW_H
|
|
|
|
|
|
|
|
#include "QskStackBox.h"
|
|
|
|
|
|
|
|
class QSK_EXPORT QskSwipeView : public QskStackBox
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2023-08-10 19:10:31 +02:00
|
|
|
Q_PROPERTY( int duration READ duration WRITE setDuration RESET resetDuration )
|
|
|
|
|
|
|
|
using Inherited = QskStackBox;
|
2023-06-19 11:22:34 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
QSK_SUBCONTROLS( Panel )
|
|
|
|
|
|
|
|
QskSwipeView( QQuickItem* parent = nullptr );
|
|
|
|
~QskSwipeView() override;
|
|
|
|
|
|
|
|
int duration() const;
|
|
|
|
void setDuration( int );
|
2023-08-10 19:10:31 +02:00
|
|
|
void resetDuration();
|
|
|
|
|
|
|
|
QskAspect::Subcontrol effectiveSubcontrol( QskAspect::Subcontrol ) const;
|
2023-06-19 11:22:34 +02:00
|
|
|
|
|
|
|
protected:
|
2023-08-10 19:10:31 +02:00
|
|
|
bool gestureFilter( const QQuickItem*, const QEvent* ) override;
|
|
|
|
void gestureEvent( QskGestureEvent* ) override;
|
2023-06-19 11:22:34 +02:00
|
|
|
|
|
|
|
private:
|
2023-08-10 19:10:31 +02:00
|
|
|
void setAnimator( QskStackBoxAnimator* ) = delete;
|
|
|
|
|
2023-06-19 11:22:34 +02:00
|
|
|
class PrivateData;
|
|
|
|
std::unique_ptr< PrivateData > m_data;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|