#ifndef SCROLLAREA_H
#define SCROLLAREA_H

#include <QScrollArea>
#include <QElapsedTimer>
#include "shs_widgets_export.h"

QT_BEGIN_NAMESPACE


class SHS_WIDGETS_EXPORT SHSScrollArea: public QScrollArea
{
	Q_OBJECT
	//Q_PROPERTY(bool swipeMoveToFirstPage READ swipeMoveToFirstPage WRITE setSwipeMoveToFirstPage)
public:
	explicit SHSScrollArea(QWidget * parent = 0);
	~SHSScrollArea();

protected:
	void timerEvent(QTimerEvent * e) override;
	void mousePressEvent(QMouseEvent * e) override;
	void mouseReleaseEvent(QMouseEvent * e) override;
	void mouseMoveEvent(QMouseEvent * e) override;
	void stop();

	QPoint press_pos;

	bool is_moving = false;
	int timer = 0;
	QElapsedTimer tm;
	QPointF speed, spos;

public slots:

};

QT_END_NAMESPACE

#endif
