-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathseekslider.h
More file actions
38 lines (29 loc) · 873 Bytes
/
seekslider.h
File metadata and controls
38 lines (29 loc) · 873 Bytes
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
#ifndef SEEKSLIDER_H
#define SEEKSLIDER_H
#include <QSlider>
#include <QMediaPlayer>
class SeekSlider : public QSlider {
Q_OBJECT
public:
SeekSlider(QWidget *parent = 0);
void setMaxVal(const qint64 i);
void setMediaObject(QMediaPlayer *mp);
qint64 currentValue();
~SeekSlider();
public slots:
void mediaChanged(QMediaContent);
void mediaDurationChanged(const qint64 d);
void seek(const qint64 v);
void setValue(const qint64 v);
void stateChanged(QMediaPlayer::State s);
void audioAvailableChanged(const bool available);
void seekableChanged(const bool canSeek);
void currentMediaChanged(QMediaContent /*media*/);
private:
qint64 m_maxVal;
QMediaPlayer *m_mp;
private slots:
void aboutToMoveSlider();
void sliderReleasedSlot();
};
#endif // SEEKSLIDER_H