forked from YACReader/yacreader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfolder.cpp
More file actions
81 lines (73 loc) · 2 KB
/
folder.cpp
File metadata and controls
81 lines (73 loc) · 2 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
#include "folder.h"
Folder::Folder()
: knownParent(false),
knownId(false),
numChildren(-1)
{
}
Folder::Folder(qulonglong folderId, qulonglong parentId, const QString &folderName, const QString &folderPath)
: knownParent(true),
knownId(true),
numChildren(-1)
{
this->id = folderId;
this->parentId = parentId;
this->name = folderName;
this->path = folderPath;
}
Folder::Folder(qulonglong folderId,
qulonglong parentId,
const QString &folderName,
const QString &folderPath,
bool completed,
bool finished,
int numChildren,
const QString &firstChildHash,
const QString &customImage,
YACReader::FileType type,
qint64 added,
qint64 updated)
: knownParent(true),
knownId(true),
numChildren(-1)
{
this->id = folderId;
this->parentId = parentId;
this->name = folderName;
this->path = folderPath;
this->completed = completed;
this->finished = finished;
this->numChildren = numChildren;
this->firstChildHash = firstChildHash;
this->customImage = customImage;
this->type = type;
this->added = added;
this->updated = updated;
}
Folder::Folder(const Folder &folder)
{
operator=(folder);
}
Folder &Folder::operator=(const Folder &other)
{
LibraryItem::operator=(other);
this->knownParent = other.knownParent;
this->knownId = other.knownId;
this->finished = other.finished;
this->completed = other.completed;
this->numChildren = other.numChildren;
this->firstChildHash = other.firstChildHash;
this->customImage = other.customImage;
this->type = other.type;
this->added = other.added;
this->updated = other.updated;
return *this;
}
Folder::Folder(const QString &folderName, const QString &folderPath)
: knownParent(false),
knownId(false),
numChildren(-1)
{
this->name = folderName;
this->path = folderPath;
}