This repository has been archived by the owner on Sep 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
NetworkSettingsTab.h
92 lines (77 loc) · 2.59 KB
/
NetworkSettingsTab.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/***************************************************************************//**
* @brief Thumbnail me 3.0
* Thumbnail me is a user interface for Movie thumbnailer.
* Generate thumbnails from any movie is now easier !
*
* @file NetworkSettingsTab.h
* @class NetworkSettingsTab
* Cette classe permet de configurer manuellement un proxy.
* Elle génère un widget disponible dans le widget "Settings".
*
* @author Quentin Rousseau\n
* @note Copyright (C) 2011-2012 Quentin Rousseau\n
* License: GNU General Public License version 2 (GPLv2) - http://www.gnu.org/licenses/gpl-2.0.html\n
* Site web: www.thumbnailme.com\n
* Email: quentin.rousseau@thumbnailme.com
*
* @since 3.0
* @version 3.0
* @date 2011-2012
*******************************************************************************/
#ifndef HEADER_NETWORKSETTINGSTAB
#define HEADER_NETWORKSETTINGSTAB
#include <QObject>
#include <QRadioButton>
#include <QGroupBox>
#include <QSettings>
#include <QLineEdit>
#include <QSpinBox>
#include <QCheckBox>
#include <QLabel>
class NetworkSettingsTab : public QWidget
{
Q_OBJECT
public:
explicit NetworkSettingsTab();
virtual ~NetworkSettingsTab();
void initializeWidget();
private:
QSettings *settings;
QRadioButton *directConnectionRadio;
QRadioButton *useProxyRadio;
QGroupBox *proxyGroupBox;
QGroupBox *connectionGroupBox;
QLabel *proxyHostnameLabel;
QLabel *proxyPortLabel;
QLabel *proxyType;
QRadioButton *proxyTypeHttpRadio;
QRadioButton *proxyTypeSocks5Radio;
QCheckBox *proxyAuthenticationCheckbox;
QLabel *proxyUsernameLabel;
QLabel *proxyPasswordLabel;
QLineEdit *proxyHostnameLineEdit;
QSpinBox *proxyPortLineEdit;
QLineEdit *proxyUsernameLineEdit;
QLineEdit *proxyPasswordLineEdit;
private:
void retranslate();
protected:
void changeEvent(QEvent* event);
public:
QString getProxyHostname();
QString getProxyPort();
QByteArray getProxyUsername();
QByteArray getProxyPassword();
void setProxyHostname(QString hostname);
void setProxyPort(int port);
void setProxyUsername(QByteArray username);
void setProxyPassword(QByteArray password);
void setProxyType(int type);
int getProxyType();
bool isProxyChecked();
bool isAuthenticationChecked();
private slots:
virtual void reject();
void setEnabledProxyGroupBox(bool checked);
};
#endif // HEADER_NETWORKSETTINGSTAB