1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2010 Sebastian Kügler <sebas@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#include "project.h"
10
11using namespace Attica;
12
13class Q_DECL_HIDDEN Project::Private : public QSharedData
14{
15public:
16 QString m_id;
17 QString m_name;
18 QString m_version;
19 QString m_license;
20 QString m_url;
21 QString m_summary;
22 QString m_description;
23 QStringList m_developers;
24 QString m_requirements;
25 QString m_specFile;
26
27 QMap<QString, QString> m_extendedAttributes;
28
29 Private()
30 {
31 }
32};
33
34Project::Project()
35 : d(new Private)
36{
37}
38
39Project::Project(const Project &other)
40 : d(other.d)
41{
42}
43
44Project &Project::operator=(const Attica::Project &other)
45{
46 d = other.d;
47 return *this;
48}
49
50Project::~Project()
51{
52}
53
54void Project::setId(const QString &u)
55{
56 d->m_id = u;
57}
58
59QString Project::id() const
60{
61 return d->m_id;
62}
63
64void Project::setName(const QString &name)
65{
66 d->m_name = name;
67}
68
69QString Project::name() const
70{
71 return d->m_name;
72}
73
74void Project::setVersion(const QString &name)
75{
76 d->m_version = name;
77}
78
79QString Project::version() const
80{
81 return d->m_version;
82}
83
84void Project::setLicense(const QString &name)
85{
86 d->m_license = name;
87}
88
89QString Project::license() const
90{
91 return d->m_license;
92}
93
94void Project::setUrl(const QString &name)
95{
96 d->m_url = name;
97}
98
99QString Project::url() const
100{
101 return d->m_url;
102}
103
104void Project::setSummary(const QString &name)
105{
106 d->m_summary = name;
107}
108
109QString Project::summary() const
110{
111 return d->m_summary;
112}
113
114void Project::setDescription(const QString &name)
115{
116 d->m_description = name;
117}
118
119QString Project::description() const
120{
121 return d->m_description;
122}
123
124void Project::setDevelopers(const QStringList &name)
125{
126 d->m_developers = name;
127}
128
129QStringList Project::developers() const
130{
131 return d->m_developers;
132}
133
134void Project::setRequirements(const QString &name)
135{
136 d->m_requirements = name;
137}
138
139QString Project::requirements() const
140{
141 return d->m_requirements;
142}
143
144void Project::setSpecFile(const QString &name)
145{
146 d->m_specFile = name;
147}
148
149QString Project::specFile() const
150{
151 return d->m_specFile;
152}
153
154void Project::addExtendedAttribute(const QString &key, const QString &value)
155{
156 d->m_extendedAttributes.insert(key, value);
157}
158
159QString Project::extendedAttribute(const QString &key) const
160{
161 return d->m_extendedAttributes.value(key);
162}
163
164QMap<QString, QString> Project::extendedAttributes() const
165{
166 return d->m_extendedAttributes;
167}
168
169bool Project::isValid() const
170{
171 return !(d->m_id.isEmpty());
172}
173

source code of attica/src/project.cpp