NetworkManagerQt

genericsetting.cpp
1/*
2 SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#include "genericsetting.h"
8#include "genericsetting_p.h"
9
10#include "nmdebug.h"
11
12NetworkManager::GenericSettingPrivate::GenericSettingPrivate()
13 : name(NM_SETTING_GENERIC_SETTING_NAME)
14{
15}
16
17NetworkManager::GenericSetting::GenericSetting()
18 : Setting(Setting::Generic)
19 , d_ptr(new GenericSettingPrivate())
20{
21}
22
23NetworkManager::GenericSetting::GenericSetting(const Ptr &other)
24 : Setting(other)
25 , d_ptr(new GenericSettingPrivate())
26{
27}
28
29NetworkManager::GenericSetting::~GenericSetting()
30{
31 delete d_ptr;
32}
33
35{
36 Q_D(const GenericSetting);
37
38 return d->name;
39}
40
41void NetworkManager::GenericSetting::fromMap(const QVariantMap &setting)
42{
43 Q_UNUSED(setting);
44}
45
47{
48 QVariantMap setting;
49
50 return setting;
51}
52
53QDebug NetworkManager::operator<<(QDebug dbg, const NetworkManager::GenericSetting &setting)
54{
55 dbg.nospace() << "type: " << setting.typeAsString(setting.type()) << '\n';
56 dbg.nospace() << "initialized: " << !setting.isNull() << '\n';
57
58 return dbg.maybeSpace();
59}
Represents generic setting.
QString name() const override
Must be reimplemented, default implementationd does nothing.
QVariantMap toMap() const override
Must be reimplemented, default implementationd does nothing.
void fromMap(const QVariantMap &setting) override
Must be reimplemented, default implementation does nothing.
QDebug & maybeSpace()
QDebug & nospace()
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:38:28 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.