1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2018 Ralf Habacker <ralf.habacker@freenet.de>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#include "config.h"
10
11using namespace Attica;
12
13class Q_DECL_HIDDEN Config::Private : public QSharedData
14{
15public:
16 QString m_version;
17 QString m_website;
18 QString m_host;
19 QString m_contact;
20 bool m_ssl;
21
22 Private()
23 : m_ssl(false)
24 {
25 }
26};
27
28Config::Config()
29 : d(new Private)
30{
31}
32
33Config::Config(const Attica::Config &other)
34 : d(other.d)
35{
36}
37
38Config &Config::operator=(const Attica::Config &other)
39{
40 d = other.d;
41 return *this;
42}
43
44Config::~Config()
45{
46}
47
48QString Attica::Config::version() const
49{
50 return d->m_version;
51}
52
53QString Config::website() const
54{
55 return d->m_website;
56}
57
58QString Config::host() const
59{
60 return d->m_host;
61}
62
63QString Config::contact() const
64{
65 return d->m_contact;
66}
67
68bool Config::ssl() const
69{
70 return d->m_ssl;
71}
72
73bool Config::isValid() const
74{
75 return !(d->m_version.isEmpty());
76}
77
78void Config::setContact(const QString &contact)
79{
80 d->m_contact = contact;
81}
82
83void Config::setVersion(const QString &version)
84{
85 d->m_version = version;
86}
87
88void Config::setWebsite(const QString &website)
89{
90 d->m_website = website;
91}
92
93void Config::setHost(const QString &host)
94{
95 d->m_host = host;
96}
97
98void Config::setSsl(bool ssl)
99{
100 d->m_ssl = ssl;
101}
102

source code of attica/src/config.cpp