| 1 | /* |
| 2 | This file is part of KDE. |
| 3 | |
| 4 | SPDX-FileCopyrightText: 2010 Intel Corporation |
| 5 | SPDX-FileContributor: Mateu Batle Sastre <mbatle@collabora.co.uk> |
| 6 | |
| 7 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 8 | */ |
| 9 | |
| 10 | #include "distribution.h" |
| 11 | |
| 12 | using namespace Attica; |
| 13 | |
| 14 | class Q_DECL_HIDDEN Distribution::Private : public QSharedData |
| 15 | { |
| 16 | public: |
| 17 | int id; |
| 18 | QString name; |
| 19 | |
| 20 | Private() |
| 21 | : id(-1) |
| 22 | { |
| 23 | } |
| 24 | }; |
| 25 | |
| 26 | Distribution::Distribution() |
| 27 | : d(new Private) |
| 28 | { |
| 29 | } |
| 30 | |
| 31 | Distribution::Distribution(const Attica::Distribution &other) |
| 32 | : d(other.d) |
| 33 | { |
| 34 | } |
| 35 | |
| 36 | Distribution &Distribution::operator=(const Attica::Distribution &other) |
| 37 | { |
| 38 | d = other.d; |
| 39 | return *this; |
| 40 | } |
| 41 | |
| 42 | Distribution::~Distribution() |
| 43 | { |
| 44 | } |
| 45 | |
| 46 | uint Distribution::id() const |
| 47 | { |
| 48 | return d->id; |
| 49 | } |
| 50 | |
| 51 | void Distribution::setId(uint id) |
| 52 | { |
| 53 | d->id = id; |
| 54 | } |
| 55 | |
| 56 | QString Distribution::name() const |
| 57 | { |
| 58 | return d->name; |
| 59 | } |
| 60 | |
| 61 | void Distribution::setName(const QString &name) |
| 62 | { |
| 63 | d->name = name; |
| 64 | } |
| 65 | |