1// SPDX-FileCopyrightText: 2017 Kitsune Ral <kitsune-ral@users.sf.net>
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
6#include "settings.h"
7
8#include <QtNetwork/QNetworkProxy>
9
10Q_DECLARE_METATYPE(QNetworkProxy::ProxyType)
11
12namespace Quotient {
13class QUOTIENT_API NetworkSettings : public SettingsGroup {
14 Q_OBJECT
15 QUO_DECLARE_SETTING(QNetworkProxy::ProxyType, proxyType, setProxyType)
16 QUO_DECLARE_SETTING(QString, proxyHostName, setProxyHostName)
17 QUO_DECLARE_SETTING(quint16, proxyPort, setProxyPort)
18 Q_PROPERTY(QString proxyHost READ proxyHostName WRITE setProxyHostName)
19public:
20 template <typename... ArgTs>
21 explicit NetworkSettings(ArgTs... qsettingsArgs)
22 : SettingsGroup(QStringLiteral("Network"), qsettingsArgs...)
23 {}
24
25 Q_INVOKABLE void setupApplicationProxy() const;
26};
27} // namespace Quotient
28