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 "publisher.h"
10
11using namespace Attica;
12
13class Q_DECL_HIDDEN Publisher::Private : public QSharedData
14{
15public:
16 QString id;
17 QString name;
18 QString url;
19 QList<Field> fields;
20 QList<Target> targets;
21
22 Private()
23 {
24 }
25};
26
27Publisher::Publisher()
28 : d(new Private)
29{
30}
31
32Publisher::Publisher(const Publisher &other)
33 : d(other.d)
34{
35}
36
37Publisher &Publisher::operator=(const Attica::Publisher &other)
38{
39 d = other.d;
40 return *this;
41}
42
43Publisher::~Publisher()
44{
45}
46
47void Publisher::setId(const QString &u)
48{
49 d->id = u;
50}
51
52QString Publisher::id() const
53{
54 return d->id;
55}
56
57void Publisher::setName(const QString &u)
58{
59 d->name = u;
60}
61
62QString Publisher::name() const
63{
64 return d->name;
65}
66
67void Publisher::addField(const Field &t)
68{
69 d->fields << t;
70}
71
72QList<Field> Publisher::fields() const
73{
74 return d->fields;
75}
76
77void Publisher::setUrl(const QString &u)
78{
79 d->url = u;
80}
81
82QString Publisher::url() const
83{
84 return d->url;
85}
86
87void Publisher::addTarget(const Attica::Target &t)
88{
89 d->targets << t;
90}
91
92QList<Target> Publisher::targets() const
93{
94 return d->targets;
95}
96
97bool Publisher::isValid() const
98{
99 return !(d->id.isEmpty());
100}
101

source code of attica/src/publisher.cpp