Miam-Player  0.8.0
A nice music player
mediaplaylist.h
Go to the documentation of this file.
1 #ifndef MEDIAPLAYLIST_H
2 #define MEDIAPLAYLIST_H
3 
4 #include <QMediaPlaylist>
5 
6 #include "miamcore_global.h"
7 
16 class MIAMCORE_LIBRARY MediaPlaylist : public QMediaPlaylist
17 {
18  Q_OBJECT
19 private:
20  std::vector<int> _randomIndexes;
21  int _idx;
22  QString _title;
23 
24 public:
25  explicit MediaPlaylist(QObject *parent = nullptr);
26 
27  inline void setTitle(const QString &title) { _title = title; }
28  inline QString title() const { return _title; }
29 
30  void shuffle(int idx);
31 
32  void skipBackward();
33 
34  void skipForward();
35 
36 private:
37  void createRandom();
38 
39  void resetRandom();
40 };
41 
42 #endif // MEDIAPLAYLIST_H
void setTitle(const QString &title)
Definition: mediaplaylist.h:27
The MediaPlaylist class has been created to have a custom Random mode.
Definition: mediaplaylist.h:16
QString title() const
Definition: mediaplaylist.h:28
#define MIAMCORE_LIBRARY
Definition: miamcore_global.h:10