Attica

publisher.cpp
1 /*
2  This file is part of KDE.
3 
4  SPDX-FileCopyrightText: 2010 Sebastian K├╝gler <[email protected]>
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 
11 using namespace Attica;
12 
13 class Publisher::Private : public QSharedData
14 {
15 public:
16  QString id;
17  QString name;
18  QString url;
19  QList<Field> fields;
20  QList<Target> targets;
21 
22  Private()
23  {
24  }
25 };
26 
27 Publisher::Publisher()
28  : d(new Private)
29 {
30 }
31 
32 Publisher::Publisher(const Publisher &other)
33  : d(other.d)
34 {
35 }
36 
37 Publisher &Publisher::operator=(const Attica::Publisher &other)
38 {
39  d = other.d;
40  return *this;
41 }
42 
43 Publisher::~Publisher()
44 {
45 }
46 
47 void Publisher::setId(const QString &u)
48 {
49  d->id = u;
50 }
51 
52 QString Publisher::id() const
53 {
54  return d->id;
55 }
56 
57 void Publisher::setName(const QString &u)
58 {
59  d->name = u;
60 }
61 
62 QString Publisher::name() const
63 {
64  return d->name;
65 }
66 
67 void Publisher::addField(const Field &t)
68 {
69  d->fields << t;
70 }
71 
72 QList<Field> Publisher::fields() const
73 {
74  return d->fields;
75 }
76 
77 void Publisher::setUrl(const QString &u)
78 {
79  d->url = u;
80 }
81 
82 QString Publisher::url() const
83 {
84  return d->url;
85 }
86 
87 void Publisher::addTarget(const Attica::Target &t)
88 {
89  d->targets << t;
90 }
91 
92 QList<Target> Publisher::targets() const
93 {
94  return d->targets;
95 }
96 
97 bool Publisher::isValid() const
98 {
99  return !(d->id.isEmpty());
100 }
QString name(const QVariant &location)
Publisher
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 03:59:45 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.