-
Notifications
You must be signed in to change notification settings - Fork 0
/
musicpagemusicitem.cpp
113 lines (94 loc) · 2.13 KB
/
musicpagemusicitem.cpp
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#include "musicpagemusicitem.h"
MusicPageMusicItem::MusicPageMusicItem(QString filePath, QObject *parent)
{
m_filePath = filePath;
}
MusicPageMusicItem::MusicPageMusicItem(QString filePath, QString parentDir, QObject *parent) : QObject(parent)
{
m_filePath = filePath;
m_parentDir = parentDir;
}
MusicPageMusicItem::MusicPageMusicItem(const MusicPageMusicItem &other)
{
m_filePath = other.filePath();
m_parentDir = other.parentDir();
m_title = other.title();
m_artist = other.artist();
m_album = other.album();
m_year = other.year();
m_time = other.time();
}
MusicPageMusicItem &MusicPageMusicItem::operator=(const MusicPageMusicItem &other)
{
if (this == &other) {
return *this;
}
m_filePath = other.filePath();
m_parentDir = other.parentDir();
m_title = other.title();
m_artist = other.artist();
m_album = other.album();
m_year = other.year();
m_time = other.time();
return *this;
}
bool MusicPageMusicItem::operator ==(const MusicPageMusicItem &other) const
{
return m_filePath == other.filePath();
}
QString MusicPageMusicItem::filePath() const
{
return m_filePath;
}
void MusicPageMusicItem::setFilePath(const QString &filePath)
{
m_filePath = filePath;
}
QString MusicPageMusicItem::parentDir() const
{
return m_parentDir;
}
void MusicPageMusicItem::setParentDir(const QString &parentDir)
{
m_parentDir = parentDir;
}
QString MusicPageMusicItem::title() const
{
return m_title;
}
void MusicPageMusicItem::setTitle(const QString &title)
{
m_title = title;
}
QString MusicPageMusicItem::artist() const
{
return m_artist;
}
void MusicPageMusicItem::setArtist(const QString &artist)
{
m_artist = artist;
}
QString MusicPageMusicItem::album() const
{
return m_album;
}
void MusicPageMusicItem::setAlbum(const QString &album)
{
m_album = album;
}
QString MusicPageMusicItem::year() const
{
return m_year;
}
void MusicPageMusicItem::setYear(const QString &year)
{
m_year = year;
}
QString MusicPageMusicItem::time() const
{
return m_time;
}
void MusicPageMusicItem::setTime(const QString &time)
{
m_time = time;
}