-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathloading.h
More file actions
50 lines (38 loc) · 802 Bytes
/
loading.h
File metadata and controls
50 lines (38 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef Loading_H
#define Loading_H
#include <QWidget>
#include "dot.h"
class QTimer;
QT_BEGIN_NAMESPACE
namespace Ui { class Loading; }
QT_END_NAMESPACE
class Loading : public QWidget
{
Q_OBJECT
public:
Loading(QWidget *parent = nullptr);
virtual ~Loading() override;
void start();
void stop();
void setCount(int n);
void setRadius(int min, int max);
void setInterver(int interval);
void setColor(const QColor &color);
private:
void calculate();
private slots:
void refresh();
private:
Ui::Loading *ui;
QVector<Dot *> _vecDots;
QVector<int> _vecRadius;
QVector<QPoint> _vecCenters;
int _idx;
int _count;
int _maxRadius;
int _minRadius;
int _interval;
QColor _color;
QTimer *_t;
};
#endif // Loading_H