playerwindow.h

来自「一个基于qt的媒体播放器程序源码」· C头文件 代码 · 共 42 行

H
42
字号
#ifndef PLAYERWINDOW_H#define PLAYERWINDOW_H#include <qwidget.h>class QAxWidget;class QSlider;class QToolButton;class PlayerWindow : public QWidget{    Q_OBJECT    Q_ENUMS(ReadyStateConstants)public:    enum PlayStateConstants { Stopped = 0, Paused = 1, Playing = 2 };    enum ReadyStateConstants { Uninitialized = 0, Loading = 1,                               Interactive = 3, Complete = 4 };    PlayerWindow(QWidget *parent = 0, const char *name = 0);protected:    void timerEvent(QTimerEvent *event);private slots:    void onPlayStateChange(int oldState, int newState);    void onReadyStateChange(ReadyStateConstants readyState);    void onPositionChange(double oldPos, double newPos);    void sliderValueChanged(int newValue);    void openFile();private:    QAxWidget *wmp;    QToolButton *openButton;    QToolButton *playPauseButton;    QToolButton *stopButton;    QSlider *seekSlider;    QString fileFilters;    int updateTimer;};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?