5 Star 2 Fork 2

GongBaoDD/Qt5Player

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
playercontrols.h 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
GongBaoDD 提交于 2014-07-22 07:57 +08:00 . 20140722
#ifndef PLAYERCONTROLS_H
#define PLAYERCONTROLS_H
#include <QMediaPlayer>
#include <QWidget>
class QAbstractButton;
class QAbstractSlider;
class QComboBox;
class PlayerControls : public QWidget
{
Q_OBJECT
public:
PlayerControls(QWidget *parent = 0);
QMediaPlayer::State state() const;
int volume() const;
bool isMuted() const;
qreal playbackRate() const;
public slots:
void setState(QMediaPlayer::State state);
void setVolume(int volume);
void setMuted(bool muted);
void setPlaybackRate(float rate);
signals:
void play();
void pause();
void stop();
void next();
void previous();
void changeVolume(int volume);
void changeMuting(bool muting);
void changeRate(qreal rate);
private slots:
void playClicked();
void muteClicked();
void updateRate();
private:
QMediaPlayer::State playerState;
bool playerMuted;
QAbstractButton *playButton;
QAbstractButton *stopButton;
QAbstractButton *nextButton;
QAbstractButton *previousButton;
QAbstractButton *muteButton;
QAbstractSlider *volumeSlider;
QComboBox *rateBox;
};
#endif // PLAYERCONTROLS_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/gongbaodd/Qt5Player.git
git@gitee.com:gongbaodd/Qt5Player.git
gongbaodd
Qt5Player
Qt5Player
master

搜索帮助