blob: c9206cd14f6d85f99060a05cf05fd23366540ebe (
plain)
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
|
#ifndef PLAYERWIDGET_H
#define PLAYERWIDGET_H
#include <QWidget>
class QTreeView;
class QStandardItemModel;
class QSortFilterProxyModel;
class QLineEdit;
class QLabel;
class QSlider;
class QTextEdit;
class QMediaPlayer;
class BeetPlayerProxy;
class PlayerWidget : public QWidget {
Q_OBJECT
public:
enum ItemType { Artist, Album, Song };
enum CustomRoles { TypeRole = Qt::UserRole + 1, IdRole = Qt::UserRole + 2, FullPathRole = Qt::UserRole + 3, GenreRole = Qt::UserRole + 4 };
explicit PlayerWidget(QWidget *parent = 0);
public slots:
void populate();
void doFilter();
void clearFilter();
private:
void setupGui();
QLineEdit *mFilter;
QMediaPlayer *mPlayer;
QTreeView *mView;
QStandardItemModel *mViewModel;
BeetPlayerProxy *mViewProxy;
QLabel *mNowPlayingL;
QSlider *mSlider;
QTextEdit *mCurrentTE;
QTreeView *mPlayListView;
QStandardItemModel *mPlayListModel;
};
#endif // PLAYERWIDGET_H
|