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 Q_DECL_HIDDEN Config::Private : public QSharedData
14 {
15 public:
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 
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 }
Config & operator=(const Config &other)
Assignment operator.
Definition: config.cpp:38
bool isValid() const
Checks whether this config is valid.
Definition: config.cpp:73
Config()
Creates an empty Config.
Definition: config.cpp:28
ScriptableExtension * host() const
~Config()
Destructor.
Definition: config.cpp:44
The Attica namespace,.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 04:05:13 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.