-
Notifications
You must be signed in to change notification settings - Fork 0
/
musicpagealbum.h
42 lines (34 loc) · 1011 Bytes
/
musicpagealbum.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
#ifndef MUSICPAGEALBUM_H
#define MUSICPAGEALBUM_H
#include <QListWidget>
#include <QMediaPlaylist>
#include <QPushButton>
#include <QStackedWidget>
#include <QWidget>
#include "musicpagemusicitem.h"
class MusicPageAlbum : public QWidget
{
Q_OBJECT
public:
explicit MusicPageAlbum(QList<MusicPageMusicItem> *musicItems, QWidget *parent = nullptr);
signals:
public slots:
void removeSelectedMusics();
void removeMusicItems(QStringList deletedMusicsPath);
void playSelectedMusic();
private slots:
void changeToList(QListWidgetItem *item);
void backToAlbumList();
void showMusicContextMenu();
private:
void initMap(QList<MusicPageMusicItem> *musicItems);
void initUI();
void setListItemBackground(QListWidget *list);
private:
const QSize DefaultIconSize = QSize(100, 100);
QPushButton *m_backButton;
QStackedWidget *m_stack;
QMap<QString, QListWidget *> m_albumMap;
QMap<QString, QMediaPlaylist *> m_playlistMap;
};
#endif // MUSICPAGEALBUM_H