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  virtual ~MediaPlaylist();
28 
29  inline void setTitle(const QString &title) { _title = title; }
30  inline QString title() const { return _title; }
31 
32  void shuffle(int idx);
33 
34  void skipBackward();
35 
36  void skipForward();
37 
38 private:
39  void createRandom();
40 
41  void resetRandom();
42 };
43 
44 #endif // MEDIAPLAYLIST_H
void setTitle(const QString &title)
Definition: mediaplaylist.h:29
The MediaPlaylist class has been created to have a custom Random mode.
Definition: mediaplaylist.h:16
QString title() const
Definition: mediaplaylist.h:30
#define MIAMCORE_LIBRARY
Definition: miamcore_global.h:11