-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalbumsong.h
86 lines (64 loc) · 1.55 KB
/
albumsong.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef ALBUMSONG_H
#define ALBUMSONG_H
#include <QFrame>
#include <QBoxLayout>
#include <QLabel>
#include <QMouseEvent>
#include "opbutton.h"
#include "icon.h"
#include "croplabel.h"
#include "pix.h"
#include "pie.h"
extern QString blue;
extern QString red;
extern QString green;
class AlbumSong : public QFrame
{
Q_OBJECT
public:
//CONSTRUCTOR
AlbumSong(QVariantMap, bool logged);
//VARIABLES
bool downloading = false;
bool uploading = false;
bool isSelected = false;
int bSize = 15;
QString id;
//UTILITIES
Pix r;
//ELEMENTS
QBoxLayout *layout = new QBoxLayout(QBoxLayout::LeftToRight,this);
QLabel *number = new QLabel();
QLabel *duration = new QLabel();
Icon *status = nullptr;
Pie *pie = nullptr;
OpButton *sync = nullptr;
OpButton *more = nullptr;
CropLabel *name = new CropLabel("","color:#444");
//EVENTS
void enterEvent(QEvent * event);
void leaveEvent(QEvent * event);
void mouseReleaseEvent(QMouseEvent *);
void mouseDoubleClickEvent(QMouseEvent *event);
public slots:
//SETTERS
void setSelected(bool);
void setPlaying(bool);
void setData(QVariantMap);
void setLocation(QString);
//EVENTS
void syncClicked();
void piePressed();
void morePressed();
signals:
//EVENTS
void songSelected(QString);
void songPlayed(QString);
void songRightClicked(QString);
void showSongMenu(QString);
//SYNC
void syncSong(QString);
//DOWNLOAD
void cancelDownload(QString);
};
#endif // ALBUMSONG_H