-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdictglobalattributes.h
More file actions
98 lines (82 loc) · 3.48 KB
/
dictglobalattributes.h
File metadata and controls
98 lines (82 loc) · 3.48 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
#ifndef DICTGLOBALATTRIBUTES_H
#define DICTGLOBALATTRIBUTES_H
#include <QObject>
#include <QSet>
#include <QStringList>
class DictGlobalAttributes : public QObject
{
Q_OBJECT
QString dbId;
QString filename; //full path with filename
QString dictname;
QString author;
QSet <QString> coauthors;
QSet <QString> tags;
QString description;
public:
explicit DictGlobalAttributes(QObject *parent = 0);
DictGlobalAttributes(QString _dbId,
QString _filename,
QString _dictname,
QString _author,
QSet <QString> _coauthors,
QSet <QString> _tags,
QString _description ) :
dbId(_dbId),
filename(_filename),
dictname(_dictname),
author(_author),
coauthors(_coauthors),
tags(_tags),
description(_description) {}
DictGlobalAttributes(const DictGlobalAttributes &dictCopy) :
dbId(dictCopy.dbId),
filename(dictCopy.filename),
dictname(dictCopy.dictname),
author(dictCopy.author),
coauthors(dictCopy.coauthors),
tags(dictCopy.tags),
description(dictCopy.description) {}
friend bool operator==(const DictGlobalAttributes &left, const DictGlobalAttributes &right) {
if (left.dbId != right.dbId) {
return false;
}
return true;
}
friend bool operator==(const DictGlobalAttributes &left, const QString &right) {
if (left.dbId != right) {
return false;
}
return true;
}
DictGlobalAttributes &operator=(const DictGlobalAttributes& right) {
if (this == &right) {
return *this;
}
dbId = right.dbId;
filename = right.filename;
dictname = right.dictname;
author = right.author;
coauthors = right.coauthors;
tags = right.tags;
description = right.description;
return *this;
}
void debugPrint();
QString getDbId(void) const { return dbId; }
QString getFilename(void) const { return filename; }
QString getDictname(void) const { return dictname; }
QString getAuthor(void) const {return author; }
QSet <QString> getCoauthors(void) const { return coauthors; }
QSet <QString> getTags(void) const { return tags; }
QString getDescription(void) const { return description; }
void setCoauthors(QStringList _coAuthors);
void setTags (QStringList _tags);
void setDescription (QString _descr) { description = _descr; }
QString getTagsQString();
QString getCoauthorsQString();
signals:
public slots:
private:
};
#endif // DICTGLOBALATTRIBUTES_H