1 | /* |
2 | SPDX-FileCopyrightText: 2010 Frederik Gladhorn <gladhorn@kde.org> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
5 | */ |
6 | |
7 | #include "license.h" |
8 | |
9 | using namespace Attica; |
10 | |
11 | class Q_DECL_HIDDEN License::Private : public QSharedData |
12 | { |
13 | public: |
14 | int id; |
15 | QString name; |
16 | QUrl url; |
17 | |
18 | Private() |
19 | : id(-1) |
20 | { |
21 | } |
22 | }; |
23 | |
24 | License::License() |
25 | : d(new Private) |
26 | { |
27 | } |
28 | |
29 | License::License(const Attica::License &other) |
30 | : d(other.d) |
31 | { |
32 | } |
33 | |
34 | License &License::operator=(const Attica::License &other) |
35 | { |
36 | d = other.d; |
37 | return *this; |
38 | } |
39 | |
40 | License::~License() |
41 | { |
42 | } |
43 | |
44 | uint License::id() const |
45 | { |
46 | return d->id; |
47 | } |
48 | |
49 | void License::setId(uint id) |
50 | { |
51 | d->id = id; |
52 | } |
53 | |
54 | QString License::name() const |
55 | { |
56 | return d->name; |
57 | } |
58 | |
59 | void License::setName(const QString &name) |
60 | { |
61 | d->name = name; |
62 | } |
63 | |
64 | void License::setUrl(const QUrl &url) |
65 | { |
66 | d->url = url; |
67 | } |
68 | |
69 | QUrl License::url() const |
70 | { |
71 | return d->url; |
72 | } |
73 | |