the-libs/tcircularspinner.h
2018-01-14 23:20:08 +11:00

32 lines
626 B
C++

#ifndef TCIRCULARSPINNER_H
#define TCIRCULARSPINNER_H
#include <QWidget>
#include <QPaintEvent>
#include <QPainter>
#include <QTimer>
#include <tvariantanimation.h>
class tCircularSpinner : public QWidget
{
Q_OBJECT
public:
explicit tCircularSpinner(QWidget *parent = nullptr);
~tCircularSpinner();
QSize sizeHint() const;
signals:
public slots:
void appear();
void disappear();
private:
void paintEvent(QPaintEvent* event);
int rotation = 0;
int arcLength = 16 * 15;
QTimer* rotationTimer;
};
#endif // TCIRCULARSPINNER_H