代码拉取完成,页面将自动刷新
#ifndef PROGRESSBAR_H
#define PROGRESSBAR_H
#include "sumHeader.h"
class ProgressPoint:public QWidget
{
Q_OBJECT
public:
ProgressPoint(QWidget *parent = nullptr);
~ProgressPoint();
const constexpr static int Width = 20;
const constexpr static int Height = 20;
signals:
void moveX(int y);
private slots:
void acceptMusicProgress(int x);
private:
void mouseMoveEvent(QMouseEvent *event) override;
void mousePressEvent(QMouseEvent *event) override;
// void mouseReleaseEvent(QMouseEvent *event) override;
void paintEvent(QPaintEvent *event) override;
private:
QPoint _lastMousePos;
QPoint _orginPos;
};
class ProgressPointAndBar:public QWidget
{
Q_OBJECT
public:
ProgressPointAndBar(QWidget *parent = nullptr);
~ProgressPointAndBar();
const constexpr static int Width = 344;
const constexpr static int Height = 25;//14;
//public:
// void Move(int x);
signals:
void musicTimePoint(double rotia);
// void sendPointCdMusic(double x);//x是横坐标增量
private slots:
void moveBar(int x);
void acceptCdMusicProgress(double ratio);
private:
void paintEvent(QPaintEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override;
private:
ProgressPoint *_pot;
int _barMoveX;
};
class ProgressBar:public QWidget
{
Q_OBJECT
public:
ProgressBar(QWidget *parent = nullptr);
~ProgressBar();
const constexpr static int ProgressBarHeight = 25;
private:
void loadLayOut();
void setText(double rotia);
private slots:
void acceptMusicProgress(double rotia);//rotia是占比
void acceptCdMusicProgress(double rotia);//rotia是比例
void acceptMusicLength(double x);
// void accceptResetBegin();
signals:
// void musicTimePoint(double rotia);
void sendPointAndBarCdMusicProgress(double x);
void sendCdMusicProgress(double rotia);
void sendVlcPlayerProgress(double);
private:
QLabel *_leftTiming;
QLabel *_rightTiming;
ProgressPointAndBar *_dot;
int _musicTimeSec = 0;
};
#endif // PROGRESSBAR_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。