-
Notifications
You must be signed in to change notification settings - Fork 13
/
playlistview.h
61 lines (47 loc) · 1.32 KB
/
playlistview.h
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef PLAYLISTVIEW_H
#define PLAYLISTVIEW_H
#include <QWidget>
#include <QUrl>
#include <QFileSystemModel>
#include <QScroller>
#include "qmediaplaylist.h"
#include "playlistmodel.h"
namespace Ui {
class PlaylistView;
}
class PlaylistView : public QWidget
{
Q_OBJECT
public:
explicit PlaylistView(QWidget *parent = nullptr, PlaylistModel *playlistModel = nullptr);
~PlaylistView();
private:
Ui::PlaylistView *ui;
QMediaPlaylist *m_playlist = nullptr;
PlaylistModel *m_playlistModel = nullptr;
QFileSystemModel *m_fileSystemModel = nullptr;
QScroller *m_playlistViewScroller = nullptr;
void setupPlayListUi();
void setupFileBrowserUi();
// File browser functions
void fbCd(QString path);
private slots:
void playlistPositionChanged(int);
void clearPlaylist();
void removeItem();
void handleSongSelected(const QModelIndex &index);
void handleSelectionChanged(int index);
// File browser functions
void fbGoHome();
void fbGoUp();
void fbAdd();
void fbToggleSelect();
void fbItemClicked(const QModelIndex &index);
void updateTotalDuration();
void toggleEditMode();
signals:
void showPlayerClicked();
void songSelected(const QModelIndex &index);
void addSelectedFilesClicked(const QList<QUrl> &urls);
};
#endif // PLAYLISTVIEW_H