-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmediaplayertabwidget.h
66 lines (57 loc) · 1.79 KB
/
mediaplayertabwidget.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
#ifndef MEDIAPLAYERTABWIDGET_H
#define MEDIAPLAYERTABWIDGET_H
#include <QWidget>
#include <QTabWidget>
#include "basePlayer.h"
#include <QLabel>
#include <QList>
#include "controlpanel.h"
#include "lyricbox.h"
#include "progressbar.h"
#include "videowidget.h"
#include "mediadatabase.h"
#include "user.h"
class mediaPlayerTabWidget : public QWidget
{
Q_OBJECT
public:
explicit mediaPlayerTabWidget(QWidget *parent = 0);
bool addMedia(const QStringList *filenames);
bool openMedia(const QStringList *filenames);
void setVideoWidget(videoWidget *);
void setControlPanel(controlPanel *);
void setLyricBox(lyricBox *);
void setProgressBar(progressBar *);
void setMediaDatabase(mediaDatabase * db);
void setUser(User * user);
signals:
void currentPlayerDurationChanged(qint64);
void currentPlayerPositionChanged(qint64);
public slots:
bool addMedia();
bool openMedia();
void newMetaDataReceived(const QString&artist, const QString &title);
void togglePlayPause();
void next();
void previous();
void setVolume(int volume);
void setMediaPosition(int position);
private slots:
void playerStateHasChanged(QMediaPlayer::State);
void durationChanged(qint64);
void positionChanged(qint64);
void videoAvailableChanged(bool videoAvailable);
void lyricsHaveChanged(const QString & artist, const QString & title, const QString & newLyrics);
private:
QTabWidget *_tabs;
QLabel *_metaData;
QList<basePlayer *> * _players;
videoWidget * _videoWidget;
basePlayer * _currentlyPlayingPlayer;
controlPanel * _controlPanel;
lyricBox * _lyricsBox;
progressBar * _progressBar;
mediaDatabase * _db;
User * _user;
};
#endif // MEDIAPLAYERTABWIDGET_H