Falkon Develop
Cross-platform Qt-based web browser
sbi_networkproxy.h
Go to the documentation of this file.
1/* ============================================================
2* StatusBarIcons - Extra icons in statusbar for Falkon
3* Copyright (C) 2013-2014 David Rosca <nowrep@gmail.com>
4*
5* This program is free software: you can redistribute it and/or modify
6* it under the terms of the GNU General Public License as published by
7* the Free Software Foundation, either version 3 of the License, or
8* (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program. If not, see <http://www.gnu.org/licenses/>.
17* ============================================================ */
18#ifndef SBI_NETWORKPROXY_H
19#define SBI_NETWORKPROXY_H
20
21#include <QUrl>
22#include <QNetworkProxy>
23
24class QSettings;
25
27{
28public:
29 explicit SBI_NetworkProxy();
30
31 bool operator==(const SBI_NetworkProxy &other) const;
32
33 quint16 port() const;
34 void setPort(quint16 port);
35
36 QString hostName() const;
37 void setHostName(const QString &hostName);
38
39 QString userName() const;
40 void setUserName(const QString &userName);
41
42 QString password() const;
43 void setPassword(const QString &password);
44
45 QNetworkProxy::ProxyType type() const;
46 void setType(QNetworkProxy::ProxyType type);
47
48 void loadFromSettings(const QSettings &settings);
49 void saveToSettings(QSettings &settings) const;
50
51 void applyProxy();
52
53private:
54 quint16 m_port;
55 QString m_hostname;
56 QString m_username;
57 QString m_password;
58
59 QNetworkProxy::ProxyType m_type;
60};
61
62#endif // SBI_NETWORKPROXY_H
void setHostName(const QString &hostName)
void setPort(quint16 port)
void saveToSettings(QSettings &settings) const
QString hostName() const
void setPassword(const QString &password)
quint16 port() const
QNetworkProxy::ProxyType type() const
void setUserName(const QString &userName)
QString userName() const
bool operator==(const SBI_NetworkProxy &other) const
void loadFromSettings(const QSettings &settings)
QString password() const
void setType(QNetworkProxy::ProxyType type)