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 | #ifndef NETWORKMANAGERQT_GENERIC_SETTING_H |
8 | #define NETWORKMANAGERQT_GENERIC_SETTING_H |
9 | |
10 | #include "setting.h" |
11 | #include <networkmanagerqt/networkmanagerqt_export.h> |
12 | |
13 | #include <QString> |
14 | |
15 | namespace NetworkManager |
16 | { |
17 | class GenericSettingPrivate; |
18 | |
19 | /** |
20 | * Represents generic setting |
21 | */ |
22 | class NETWORKMANAGERQT_EXPORT GenericSetting : public Setting |
23 | { |
24 | public: |
25 | typedef QSharedPointer<GenericSetting> Ptr; |
26 | typedef QList<Ptr> List; |
27 | GenericSetting(); |
28 | explicit GenericSetting(const Ptr &other); |
29 | ~GenericSetting() override; |
30 | |
31 | QString name() const override; |
32 | |
33 | void fromMap(const QVariantMap &setting) override; |
34 | |
35 | QVariantMap toMap() const override; |
36 | |
37 | protected: |
38 | GenericSettingPrivate *d_ptr; |
39 | |
40 | private: |
41 | Q_DECLARE_PRIVATE(GenericSetting) |
42 | }; |
43 | |
44 | NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const GenericSetting &setting); |
45 | |
46 | } |
47 | |
48 | #endif // NETWORKMANAGERQT_GENERIC_SETTING_H |
49 | |