Attica

config.cpp
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
29 : d(new Private)
30{
31}
32
34 : d(other.d)
35{
36}
37
39{
40 d = other.d;
41 return *this;
42}
43
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}
Represents a server config.
Definition config.h:24
bool isValid() const
Checks whether this config is valid.
Definition config.cpp:73
Config & operator=(const Config &other)
Assignment operator.
Definition config.cpp:38
~Config()
Destructor.
Definition config.cpp:44
Config()
Creates an empty Config.
Definition config.cpp:28
The Attica namespace,.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:19:09 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.