Vidalia 0.3.1
NetworkPage.h
Go to the documentation of this file.
1/*
2** This file is part of Vidalia, and is subject to the license terms in the
3** LICENSE file, found in the top level directory of this distribution. If you
4** did not receive the LICENSE file with this file, you may obtain it from the
5** Vidalia source package distributed by the Vidalia Project at
6** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
7** including this file, may be copied, modified, propagated, or distributed
8** except according to the terms described in the LICENSE file.
9*/
10
11/*
12** \file NetworkPage.h
13** \brief Network and firewall configuration options
14*/
15
16#ifndef _NETWORKPAGE_H
17#define _NETWORKPAGE_H
18
19#include "ui_NetworkPage.h"
20#include "ConfigPage.h"
21#include "Vidalia.h"
22#include "BridgeDownloader.h"
23
24#include <QPoint>
25
26
27class NetworkPage : public ConfigPage
28{
29 Q_OBJECT
30
31public:
32 /** Default Constructor */
33 NetworkPage(QWidget *parent = 0);
34
35 /** Saves the changes on this page */
36 bool save(QString &errmsg);
37 /** Loads the settings for this page */
38 void load();
39
40 /** Applies the network configuration settings to Tor. Returns true if the
41 * settings were applied successfully. Otherwise, <b>errmsg</b> is set and
42 * false is returned. */
43 bool apply(QString &errmsg);
44 /** Reverts the server configuration settings to their values at the last
45 * time they were successfully applied to Tor. */
46 void revert();
47 /** Returns true if the user has changed their server settings since the
48 * last time they were applied to Tor. */
50 /** Called when the user changes the UI translation. */
51 virtual void retranslateUi();
52
53private slots:
54 /** Adds a bridge to the bridge list box. */
55 void addBridge();
56 /** Removes one or more selected bridges from the bridge list box. */
57 void removeBridge();
58 /** Copies all selected bridges to the clipboard. */
60 /** Called when the user right-clicks on a bridge and displays a context
61 * menu. */
62 void bridgeContextMenuRequested(const QPoint &pos);
63 /** Called when the user changes which bridges they have selected. */
65 /** Called when a link in a label is clicked. <b>url</b> is the target of
66 * the clicked link.*/
67 void onLinkActivated(const QString &url);
68 /** Called when the user clicks the "Find Bridges Now" button. Calls
69 * startBridgeRequest() to start a new request for additional bridge
70 * addresses, and displays a progress dialog for the user. */
71 void findBridges();
72 /** Starts a new request for additional bridge addresses. */
73 void startBridgeRequest();
74 /** Called when a previous bridge request initiated by the findBridges()
75 * method has completed. <b>bridges</b> contains a list of all bridges
76 * received. */
77 void bridgeRequestFinished(const QStringList &bridges);
78
79 /** Disable proxy username and password fields when the user wants to use
80 * a SOCKS 4 proxy. */
81 void proxyTypeChanged(int selection);
82
83private:
84 /** Helper class used to facilitate downloading one or more bridge
85 * addresses. */
87
88 /** Qt Designer generated object */
89 Ui::NetworkPage ui;
90};
91
92#endif
93
void findBridges()
void bridgeContextMenuRequested(const QPoint &pos)
bool save(QString &errmsg)
virtual void retranslateUi()
Definition: NetworkPage.cpp:86
bool apply(QString &errmsg)
Definition: NetworkPage.cpp:95
void onLinkActivated(const QString &url)
void bridgeRequestFinished(const QStringList &bridges)
bool changedSinceLastApply()
void addBridge()
void bridgeSelectionChanged()
void removeBridge()
void proxyTypeChanged(int selection)
void copySelectedBridgesToClipboard()
Ui::NetworkPage ui
Definition: NetworkPage.h:89
NetworkPage(QWidget *parent=0)
Definition: NetworkPage.cpp:36
BridgeDownloader * _bridgeDownloader
Definition: NetworkPage.h:86
void startBridgeRequest()