-
Notifications
You must be signed in to change notification settings - Fork 6
/
player.h
69 lines (59 loc) · 1.72 KB
/
player.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
#ifndef PLAYER_H
#define PLAYER_H
#include <QWidget>
#include <QToolButton>
#include <QProgressBar>
#include <QComboBox>
#include <phonon/audiooutput.h>
//#include <phonon/backendcapabilities.h>
#include <phonon/mediaobject.h>
#include <phonon/seekslider.h>
#include <phonon/volumeslider.h>
#include <phonon/backendcapabilities.h>
#include <phonon/effect.h>
#include <phonon/effectparameter.h>
#include <phonon/effectwidget.h>
class Player : public QWidget
{
Q_OBJECT
public:
explicit Player(const QString &path,QWidget *parent = 0);
bool isPlaying(){return isPlay;}
signals:
void finished();
public slots:
void playPause();
void play(Phonon::MediaSource url,bool besmala=false);
void pause(){m_MediaObject.pause();}
void stop();
void repeate(){ m_MediaObject.seek(0); m_MediaObject.play();}
private slots:
//! [phonon]
void stateChanged(Phonon::State newstate, Phonon::State oldstate); //تغير اوضاع القراءة
void mediaFinished();//انتهاء القراءة
//! [phononEffect]
// void chargeAvailableAudioEffects();
// void configureEffect();
// void effectChanged();
private:
QString m_appPath;
QString m_besmala;
QToolButton *actionPlayPause;
QToolButton *actionStopMedia;
//Phonon
QIcon playIcon;
QIcon pauseIcon;
Phonon::MediaObject m_MediaObject;
Phonon::AudioOutput m_AudioOutput;
Phonon::SeekSlider *slider;
Phonon::VolumeSlider *volume;
QProgressBar *progress;
//----------------------phonon effect----------------------------
Phonon::Effect *nextEffect;
Phonon::Path m_audioOutputPath;
QComboBox *audioEffectsCombo;
QAction *effectAction;
bool playOne;
bool isPlay;
};
#endif // PLAYER_H