1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2009 Marco Martin <notmart@gmail.com>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#ifndef ATTICA_KNOWLEDGEBASEENTRY_H
10#define ATTICA_KNOWLEDGEBASEENTRY_H
11
12#include "attica_export.h"
13
14#include <QDateTime>
15#include <QMap>
16#include <QSharedDataPointer>
17
18#include <QUrl>
19
20namespace Attica
21{
22
23/**
24 * @class KnowledgeBaseEntry knowledgebaseentry.h <Attica/KnowledgeBaseEntry>
25 *
26 * Represents a knowledge base entry.
27 */
28class ATTICA_EXPORT KnowledgeBaseEntry
29{
30public:
31 typedef QList<KnowledgeBaseEntry> List;
32 class Parser;
33
34 KnowledgeBaseEntry();
35 KnowledgeBaseEntry(const KnowledgeBaseEntry &other);
36 KnowledgeBaseEntry &operator=(const KnowledgeBaseEntry &other);
37 ~KnowledgeBaseEntry();
38
39 void setId(QString id);
40 QString id() const;
41
42 void setContentId(int id);
43 int contentId() const;
44
45 void setUser(const QString &user);
46 QString user() const;
47
48 void setStatus(const QString &status);
49 QString status() const;
50
51 void setChanged(const QDateTime &changed);
52 QDateTime changed() const;
53
54 void setName(const QString &name);
55 QString name() const;
56
57 void setDescription(const QString &description);
58 QString description() const;
59
60 void setAnswer(const QString &answer);
61 QString answer() const;
62
63 void setComments(int comments);
64 int comments() const;
65
66 void setDetailPage(const QUrl &detailPage);
67 QUrl detailPage() const;
68
69 void addExtendedAttribute(const QString &key, const QString &value);
70 QString extendedAttribute(const QString &key) const;
71
72 QMap<QString, QString> extendedAttributes() const;
73
74 bool isValid() const;
75
76private:
77 class Private;
78 QSharedDataPointer<Private> d;
79};
80
81}
82
83#endif
84

source code of attica/src/knowledgebaseentry.h