进度更新

This commit is contained in:
RigoLigo
2021-07-05 23:35:50 +08:00
parent 8991043127
commit 4df8bf7d0a
24 changed files with 835 additions and 134 deletions

34
inc/spkloading.h Normal file
View File

@@ -0,0 +1,34 @@
#pragma once
#include <QWidget>
#include <QTimeLine>
class SpkLoading : public QWidget
{
Q_OBJECT
public:
explicit SpkLoading(QWidget *parent = nullptr);
virtual void paintEvent(QPaintEvent *e) override;
virtual void resizeEvent(QResizeEvent *e) override;
private:
QTimeLine *mAnimTimer;
QList<int> mSizeList;
int mUserHeight = 0;
int dw, dh;
double dx, dy;
public slots:
void start() { mAnimTimer->start(); }
void stop() { mAnimTimer->stop(); }
void Begin() { start(); setVisible(true); }
void End() { stop(); setVisible(false); }
void setHeight(int h) { mUserHeight = h; }
void reset();
private slots:
void timer(int s);
void loop();
};