-
Notifications
You must be signed in to change notification settings - Fork 4
/
custommediaplayer.h
77 lines (59 loc) · 1.53 KB
/
custommediaplayer.h
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef CUSTOMMEDIAPLAYER_H
#define CUSTOMMEDIAPLAYER_H
#if HAVE_QT5
#include <QtWidgets>
#endif
#include <QWidget>
#include <QtGui>
#include <QtCore>
#include <Phonon>
QT_BEGIN_NAMESPACE
class QPushButton;
class QLabel;
class QSlider;
class QTextEdit;
class QMenu;
class Ui_settings;
QT_END_NAMESPACE
class CustomMediaPlayer : public QWidget
{
Q_OBJECT
public:
explicit CustomMediaPlayer(QWidget *parent = 0);
void setFile(const QString &text);
void initVideoWindow();
void setVolume(qreal volume);
public slots:
void rewind();
void updateTime();
void finished();
void playPause();
void scaleChanged(QAction *);
void aspectChanged(QAction *);
private slots:
void stateChanged(Phonon::State newstate, Phonon::State oldstate);
void bufferStatus(int percent);
void hasVideoChanged(bool);
private:
bool playPauseForDialog();
QIcon playIcon;
QIcon pauseIcon;
QMenu *fileMenu;
QPushButton *playButton;
QPushButton *rewindButton;
Phonon::SeekSlider *slider;
QLabel *timeLabel;
QLabel *progressLabel;
Phonon::VolumeSlider *volume;
QLabel *info;
Phonon::Effect *nextEffect;
QAction *m_fullScreenAction;
QWidget m_videoWindow;
Phonon::MediaObject m_MediaObject;
Phonon::AudioOutput m_AudioOutput;
Phonon::VideoWidget *m_videoWidget;
Phonon::Path m_audioOutputPath;
bool m_smallScreen;
QRect widgetGeometry;
};
#endif // CUSTOMMEDIAPLAYER_H