-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmaster.cpp
68 lines (55 loc) · 830 Bytes
/
master.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
#include "Master.h"
Master::Master(void)
{
_songCount = 0;
}
Master::~Master(void)
{
}
void Master::AddToList(int ID, QString path)
{
_list.insert(ID, path);
_songCount++;
}
void Master::SetList(QMap<int, QString> map)
{
_list = map;
}
void Master::SetAlbumList(QMap<QString, QStringList > map)
{
_albumList = map;
}
void Master::RemoveFromList(int id)
{
_list.remove(id);
_songCount--;
}
QString Master::Get(int id)
{
return _list.value(id);
}
void Master::SetName(QString name)
{
_name = name;
}
QString Master::GetName()
{
return _name;
}
int Master::GetCount()
{
return _list.size();
}
int Master::GetAlbumsCount()
{
return _albumList.size();
}
void Master::ClearList()
{
_songCount = 0;
_list.clear();
}
void Master::ClearAlbumList()
{
_albumList.clear();
}