libQuotient
A Qt library for building matrix clients
networksettings.h
Go to the documentation of this file.
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 
10 Q_DECLARE_METATYPE(QNetworkProxy::ProxyType)
11 
12 namespace Quotient {
13 class 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)
19 public:
20  explicit NetworkSettings() : SettingsGroup(u"Network"_s) {}
21 
22  Q_INVOKABLE void setupApplicationProxy() const;
23 };
24 } // namespace Quotient