summaryrefslogtreecommitdiffstats
path: root/playerwidget.h
blob: e6e20d52bd04558134283d1f85e22ca6e4d1bcf3 (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
43
44
#ifndef PLAYERWIDGET_H
#define PLAYERWIDGET_H

#include <QWidget>

class QTreeView;
class QStandardItemModel;
class QSortFilterProxyModel;
class QLineEdit;
class QComboBox;
class QLabel;
class QSlider;
class QTextEdit;
class QMediaPlayer;

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 };
        explicit PlayerWidget(QWidget *parent = 0);

    public slots:
        //void doFilter();
        void populateBy(QString selector);
        void refreshSort();

    private:
        void setupGui();
        void populateByArtist();
        QComboBox *mSortBy;
        QLineEdit *mFilter;
        QMediaPlayer *mPlayer;
        QTreeView *mView;
        QStandardItemModel *mViewModel;
        QSortFilterProxyModel *mViewProxy;
        QLabel *mNowPlayingL;
        QSlider *mSlider;
        QTextEdit *mCurrentTE;
        QTreeView *mPlayListView;
        QStandardItemModel *mPlayListModel;
};

#endif // PLAYERWIDGET_H