This repository was archived by the owner on Oct 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcddata.cpp
More file actions
103 lines (84 loc) · 1.46 KB
/
Copy pathcddata.cpp
File metadata and controls
103 lines (84 loc) · 1.46 KB
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
#include "cddata.h"
cdData::cdData(QObject *parent) : QObject(parent)
{
mSongName = new QList<QString>;
mCDName = new QString;
mAutorName = new QString;
mYear = new int;
mType = new QString;
mPicture = new QString;
mNumberOfSongs = new int;
mNumberOfSongs = 0;
}
cdData::~cdData()
{
mSongName->clear();
delete mSongName;
delete mCDName;
delete mAutorName;
delete mYear;
delete mType;
delete mPicture;
delete mNumberOfSongs;
}
QString cdData::getCDName() const
{
return *mCDName;
}
QString cdData::getAutorName() const
{
return *mAutorName;
}
int cdData::getYear() const
{
return *mYear;
}
int cdData::getNumberOfSongs() const
{
return mSongName->count();
}
QString cdData::getType() const
{
return *mType;
}
QString cdData::getSong(int id) const
{
return mSongName->at(id);
}
QString cdData::getPicture() const
{
return *mPicture;
}
QList<QString> cdData::getSongs() const
{
return *mSongName;
}
void cdData::setCDName(QString CDName)
{
*mCDName = CDName;
}
void cdData::setAutorName(QString autorName)
{
*mAutorName = autorName;
}
void cdData::setYear(int year)
{
*mYear = year;
}
void cdData::setType(QString genre)
{
*mType = genre;
}
void cdData::addSong(QString songName)
{
mSongName->append(songName);
mNumberOfSongs++;
}
void cdData::setPicture(QString pictureAddr)
{
*mPicture = pictureAddr;
}
void cdData::clearSongs()
{
mSongName->clear();
}