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 | |
20 | namespace Attica |
21 | { |
22 | |
23 | /*! |
24 | * \class Attica::KnowledgeBaseEntry |
25 | * \inheaderfile Attica/KnowledgeBaseEntry |
26 | * \inmodule Attica |
27 | * |
28 | * \brief Represents a knowledge base entry. |
29 | */ |
30 | class ATTICA_EXPORT KnowledgeBaseEntry |
31 | { |
32 | public: |
33 | /*! |
34 | * |
35 | */ |
36 | typedef QList<KnowledgeBaseEntry> List; |
37 | class Parser; |
38 | |
39 | /*! |
40 | * |
41 | */ |
42 | KnowledgeBaseEntry(); |
43 | KnowledgeBaseEntry(const KnowledgeBaseEntry &other); |
44 | KnowledgeBaseEntry &operator=(const KnowledgeBaseEntry &other); |
45 | ~KnowledgeBaseEntry(); |
46 | |
47 | /*! |
48 | * |
49 | */ |
50 | void setId(QString id); |
51 | |
52 | /*! |
53 | * |
54 | */ |
55 | QString id() const; |
56 | |
57 | /*! |
58 | * |
59 | */ |
60 | void setContentId(int id); |
61 | |
62 | /*! |
63 | * |
64 | */ |
65 | int contentId() const; |
66 | |
67 | /*! |
68 | * |
69 | */ |
70 | void setUser(const QString &user); |
71 | |
72 | /*! |
73 | * |
74 | */ |
75 | QString user() const; |
76 | |
77 | /*! |
78 | * |
79 | */ |
80 | void setStatus(const QString &status); |
81 | |
82 | /*! |
83 | * |
84 | */ |
85 | QString status() const; |
86 | |
87 | /*! |
88 | * |
89 | */ |
90 | void setChanged(const QDateTime &changed); |
91 | |
92 | /*! |
93 | * |
94 | */ |
95 | QDateTime changed() const; |
96 | |
97 | /*! |
98 | * |
99 | */ |
100 | void setName(const QString &name); |
101 | |
102 | /*! |
103 | * |
104 | */ |
105 | QString name() const; |
106 | |
107 | /*! |
108 | * |
109 | */ |
110 | void setDescription(const QString &description); |
111 | |
112 | /*! |
113 | * |
114 | */ |
115 | QString description() const; |
116 | |
117 | /*! |
118 | * |
119 | */ |
120 | void setAnswer(const QString &answer); |
121 | |
122 | /*! |
123 | * |
124 | */ |
125 | QString answer() const; |
126 | |
127 | /*! |
128 | * |
129 | */ |
130 | void (int ); |
131 | |
132 | /*! |
133 | * |
134 | */ |
135 | int () const; |
136 | |
137 | /*! |
138 | * |
139 | */ |
140 | void setDetailPage(const QUrl &detailPage); |
141 | |
142 | /*! |
143 | * |
144 | */ |
145 | QUrl detailPage() const; |
146 | |
147 | /*! |
148 | * |
149 | */ |
150 | void addExtendedAttribute(const QString &key, const QString &value); |
151 | |
152 | /*! |
153 | * |
154 | */ |
155 | QString extendedAttribute(const QString &key) const; |
156 | |
157 | /*! |
158 | * |
159 | */ |
160 | QMap<QString, QString> extendedAttributes() const; |
161 | |
162 | /*! |
163 | * |
164 | */ |
165 | bool isValid() const; |
166 | |
167 | private: |
168 | class Private; |
169 | QSharedDataPointer<Private> d; |
170 | }; |
171 | |
172 | } |
173 | |
174 | #endif |
175 | |