Attica

config.cpp
1 /*
2  This file is part of KDE.
3 
4  SPDX-FileCopyrightText: 2018 Ralf Habacker <[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 "config.h"
10 
11 using namespace Attica;
12 
13 class Config::Private : public QSharedData {
14  public:
15  QString m_version;
16  QString m_website;
17  QString m_host;
18  QString m_contact;
19  bool m_ssl;
20 
21  Private()
22  : m_ssl(false)
23  {
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 
45 {
46 }
47 
48 QString Attica::Config::version() const
49 {
50  return d->m_version;
51 }
52 
53 QString Config::website() const
54 {
55  return d->m_website;
56 }
57 
58 QString Config::host() const
59 {
60  return d->m_host;
61 }
62 
63 QString Config::contact() const
64 {
65  return d->m_contact;
66 }
67 
68 bool Config::ssl() const
69 {
70  return d->m_ssl;
71 }
72 
73 bool Config::isValid() const
74 {
75  return !(d->m_version.isEmpty());
76 }
77 
78 void Config::setContact(const QString &contact)
79 {
80  d->m_contact = contact;
81 }
82 
83 void Config::setVersion(const QString &version)
84 {
85  d->m_version = version;
86 }
87 
88 void Config::setWebsite(const QString &website)
89 {
90  d->m_website = website;
91 }
92 
93 void Config::setHost(const QString &host)
94 {
95  d->m_host = host;
96 }
97 
98 void Config::setSsl(bool ssl)
99 {
100  d->m_ssl = ssl;
101 }
bool isValid() const
Checks whether this config is valid.
Definition: config.cpp:73
~Config()
Destructor.
Definition: config.cpp:44
Represents a server config.
Definition: config.h:21
Config & operator=(const Config &other)
Assignment operator.
Definition: config.cpp:38
Config()
Creates an empty Config.
Definition: config.cpp:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 23:06:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.