File indexing completed on 2024-12-01 03:37:35
0001 /* 0002 SPDX-FileCopyrightText: 2010 Frederik Gladhorn <gladhorn@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #include "license.h" 0008 0009 using namespace Attica; 0010 0011 class Q_DECL_HIDDEN License::Private : public QSharedData 0012 { 0013 public: 0014 int id; 0015 QString name; 0016 QUrl url; 0017 0018 Private() 0019 : id(-1) 0020 { 0021 } 0022 }; 0023 0024 License::License() 0025 : d(new Private) 0026 { 0027 } 0028 0029 License::License(const Attica::License &other) 0030 : d(other.d) 0031 { 0032 } 0033 0034 License &License::operator=(const Attica::License &other) 0035 { 0036 d = other.d; 0037 return *this; 0038 } 0039 0040 License::~License() 0041 { 0042 } 0043 0044 uint License::id() const 0045 { 0046 return d->id; 0047 } 0048 0049 void License::setId(uint id) 0050 { 0051 d->id = id; 0052 } 0053 0054 QString License::name() const 0055 { 0056 return d->name; 0057 } 0058 0059 void License::setName(const QString &name) 0060 { 0061 d->name = name; 0062 } 0063 0064 void License::setUrl(const QUrl &url) 0065 { 0066 d->url = url; 0067 } 0068 0069 QUrl License::url() const 0070 { 0071 return d->url; 0072 }