-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweburl.h
41 lines (37 loc) · 1.08 KB
/
weburl.h
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
#ifndef WEBURL_H
#define WEBURL_H
#include <QString>
#include <QSet>
#include <QList>
#include <QMetaType>
class weburl
{
public:
weburl(bool favorite = false,
const QString &link = "",
const QString &info = "");
~weburl();
bool isFavorite() const { return infavorite; }
void setFavorite(bool fav) { infavorite = fav; }
QString link() const { return inlink; }
void setLink(const QString &title) { inlink = title; }
QString info() const { return ininfo; }
void setInfo(const QString &linkinfo) { ininfo = linkinfo; }
void addTag(QString *tag);
void removeTag(QString *tag);
bool containsTag(const QString &tag);
int tagsCount() const {
if (tags == nullptr) {
return 0;
}
return tags->size();
}
QList<QString*> * getTags() const { return tags; }
private:
QString inlink;
QString ininfo;
QList<QString*> *tags = nullptr;
bool infavorite;
};
Q_DECLARE_METATYPE(weburl)
#endif