Vidalia  0.3.1
Public Member Functions | Private Slots | Private Attributes | List of all members
NetworkPage Class Reference

#include <NetworkPage.h>

Inheritance diagram for NetworkPage:
ConfigPage

Public Member Functions

 NetworkPage (QWidget *parent=0)
 
bool save (QString &errmsg)
 
void load ()
 
bool apply (QString &errmsg)
 
void revert ()
 
bool changedSinceLastApply ()
 
virtual void retranslateUi ()
 
- Public Member Functions inherited from ConfigPage
 ConfigPage (QWidget *parent=0, const QString title=QString())
 
QString title () const
 

Private Slots

void addBridge ()
 
void removeBridge ()
 
void copySelectedBridgesToClipboard ()
 
void bridgeContextMenuRequested (const QPoint &pos)
 
void bridgeSelectionChanged ()
 
void onLinkActivated (const QString &url)
 
void findBridges ()
 
void startBridgeRequest ()
 
void bridgeRequestFinished (const QStringList &bridges)
 
void proxyTypeChanged (int selection)
 

Private Attributes

BridgeDownloader_bridgeDownloader
 
Ui::NetworkPage ui
 

Additional Inherited Members

- Signals inherited from ConfigPage
void helpRequested (const QString &topic)
 

Detailed Description

Definition at line 27 of file NetworkPage.h.

Constructor & Destructor Documentation

NetworkPage::NetworkPage ( QWidget *  parent = 0)

Member Function Documentation

void NetworkPage::addBridge ( )
privateslot

Adds a bridge to the bridge list box.

Definition at line 127 of file NetworkPage.cpp.

References ui.

Referenced by NetworkPage().

bool NetworkPage::apply ( QString &  errmsg)
virtual

Applies the network configuration settings to Tor. Returns true if the settings were applied successfully. Otherwise, errmsg is set and false is returned.

Applies the network configuration settings to Tor. Returns true if the * settings were applied successfully. Otherwise, errmsg is set and * false is returned.

Reimplemented from ConfigPage.

Definition at line 95 of file NetworkPage.cpp.

References NetworkSettings::apply(), and Vidalia::torControl().

void NetworkPage::bridgeContextMenuRequested ( const QPoint &  pos)
privateslot

Called when the user right-clicks on a bridge and displays a context menu.

Definition at line 167 of file NetworkPage.cpp.

References connect(), copySelectedBridgesToClipboard(), IMG_COPY, and ui.

Referenced by NetworkPage().

void NetworkPage::bridgeRequestFinished ( const QStringList &  bridges)
privateslot

Called when a previous bridge request initiated by the findBridges() method has completed. bridges contains a list of all bridges received.

Definition at line 383 of file NetworkPage.cpp.

References ConfigPage::helpRequested(), and ui.

Referenced by findBridges(), and NetworkPage().

void NetworkPage::bridgeSelectionChanged ( )
privateslot

Called when the user changes which bridges they have selected.

Definition at line 186 of file NetworkPage.cpp.

References ui.

Referenced by NetworkPage().

bool NetworkPage::changedSinceLastApply ( )
virtual

Returns true if the user has changed their server settings since the last time they were applied to Tor.

Returns true if the user has changed their server settings since the * last time they were applied to Tor.

Reimplemented from ConfigPage.

Definition at line 103 of file NetworkPage.cpp.

References AbstractTorSettings::changedSinceLastApply(), and Vidalia::torControl().

void NetworkPage::copySelectedBridgesToClipboard ( )
privateslot

Copies all selected bridges to the clipboard.

Definition at line 149 of file NetworkPage.cpp.

References ui, and vApp.

Referenced by bridgeContextMenuRequested(), and NetworkPage().

void NetworkPage::findBridges ( )
privateslot

Called when the user clicks the "Find Bridges Now" button. Calls startBridgeRequest() to start a new request for additional bridge addresses, and displays a progress dialog for the user.

Called when the user clicks the "Find Bridges Now" button. Attempts to establish an HTTPS connection to bridges.torproject.org and download one or more bridge addresses.

Definition at line 336 of file NetworkPage.cpp.

References _bridgeDownloader, bridgeRequestFinished(), BridgeDownloader::cancelBridgeRequest(), connect(), ConfigPage::helpRequested(), and startBridgeRequest().

Referenced by NetworkPage().

void NetworkPage::load ( )
virtual
void NetworkPage::onLinkActivated ( const QString &  url)
privateslot

Called when a link in a label is clicked. url is the target of the clicked link.

Definition at line 120 of file NetworkPage.cpp.

References ConfigPage::helpRequested().

Referenced by NetworkPage().

void NetworkPage::proxyTypeChanged ( int  selection)
privateslot

Disable proxy username and password fields when the user wants to use a SOCKS 4 proxy.

Definition at line 414 of file NetworkPage.cpp.

References QVariant, NetworkSettings::Socks4Proxy, and ui.

Referenced by NetworkPage().

void NetworkPage::removeBridge ( )
privateslot

Removes one or more selected bridges from the bridge list box.

Definition at line 142 of file NetworkPage.cpp.

References ui.

Referenced by NetworkPage().

void NetworkPage::retranslateUi ( )
virtual

Called when the user changes the UI translation.

Reimplemented from ConfigPage.

Definition at line 86 of file NetworkPage.cpp.

References ui.

void NetworkPage::revert ( )
virtual

Reverts the server configuration settings to their values at the last time they were successfully applied to Tor.

Reverts the server configuration settings to their values at the last * time they were successfully applied to Tor.

Reimplemented from ConfigPage.

Definition at line 111 of file NetworkPage.cpp.

References AbstractTorSettings::revert(), and Vidalia::torControl().

bool NetworkPage::save ( QString &  errmsg)
virtual
void NetworkPage::startBridgeRequest ( )
privateslot

Starts a new request for additional bridge addresses.

Definition at line 366 of file NetworkPage.cpp.

References _bridgeDownloader, BridgeDownloader::downloadBridges(), BridgeDownloader::DownloadMethodHttps, NetworkSettings::HttpHttpsProxy, BridgeDownloader::setProxy(), and ui.

Referenced by findBridges().

Member Data Documentation

BridgeDownloader* NetworkPage::_bridgeDownloader
private

Helper class used to facilitate downloading one or more bridge addresses.

Definition at line 86 of file NetworkPage.h.

Referenced by findBridges(), NetworkPage(), and startBridgeRequest().

Ui::NetworkPage NetworkPage::ui
private

The documentation for this class was generated from the following files: