#ifndef PLAYERWIDGET_H #define PLAYERWIDGET_H #include 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