Attica

license.cpp
1 /*
2  SPDX-FileCopyrightText: 2010 Frederik Gladhorn <[email protected]>
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 License::Private : public QSharedData
12 {
13 public:
14  int id;
15  QString name;
16  QUrl url;
17 
18  Private() : id(-1)
19  {}
20 };
21 
23  : d(new Private)
24 {
25 }
26 
28  : d(other.d)
29 {
30 }
31 
33 {
34  d = other.d;
35  return *this;
36 }
37 
39 {}
40 
41 uint License::id() const
42 {
43  return d->id;
44 }
45 
46 void License::setId(uint id)
47 {
48  d->id = id;
49 }
50 
51 QString License::name() const
52 {
53  return d->name;
54 }
55 
56 void License::setName(const QString &name)
57 {
58  d->name = name;
59 }
60 
61 void License::setUrl(const QUrl &url)
62 {
63  d->url = url;
64 }
65 
66 QUrl License::url() const
67 {
68  return d->url;
69 }
QString name(const QVariant &location)
License()
Creates an empty License.
Definition: license.cpp:22
~License()
Destructor.
Definition: license.cpp:38
License & operator=(const License &other)
Assignment operator.
Definition: license.cpp:32
The License class contains information about one license that the server offers.
Definition: license.h:21
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 23:06:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.