Vidalia  0.2.21
Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
AdvancedPage Class Reference

#include <AdvancedPage.h>

Inheritance diagram for AdvancedPage:
ConfigPage

Signals

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

Public Member Functions

 AdvancedPage (QWidget *parent=0)
 
 ~AdvancedPage ()
 
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 authMethodChanged (int index)
 
void browseTorConfig ()
 
void browseTorDataDirectory ()
 
void browseSocketPath ()
 
void toggleControl (bool)
 
void displayTorrcDialog ()
 
void toggleAuto (bool)
 

Private Member Functions

TorSettings::AuthenticationMethod indexToAuthMethod (int index)
 
int authMethodToIndex (TorSettings::AuthenticationMethod method)
 

Private Attributes

TorSettings_settings
 
Ui::AdvancedPage ui
 

Detailed Description

Definition at line 26 of file AdvancedPage.h.

Constructor & Destructor Documentation

AdvancedPage::AdvancedPage ( QWidget *  parent = 0)
AdvancedPage::~AdvancedPage ( )

Default Destructor

Destructor

Definition at line 80 of file AdvancedPage.cpp.

References _settings.

Member Function Documentation

bool AdvancedPage::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.

Reimplemented from ConfigPage.

Definition at line 96 of file AdvancedPage.cpp.

References _settings, and TorSettings::apply().

void AdvancedPage::authMethodChanged ( int  index)
privateslot

Called when the user selects a different authentication method from the combo box.

Definition at line 256 of file AdvancedPage.cpp.

References indexToAuthMethod(), TorSettings::PasswordAuth, and ui.

Referenced by AdvancedPage().

int AdvancedPage::authMethodToIndex ( TorSettings::AuthenticationMethod  method)
private

Returns the index in the authentication methods combo box for the given authentication method.

Definition at line 279 of file AdvancedPage.cpp.

References TorSettings::CookieAuth, and TorSettings::NullAuth.

Referenced by load().

void AdvancedPage::browseSocketPath ( )
privateslot

Called when the user clicks "Browse" to choose the location of Tor's socket path.

Opens a QFileDialog for the user to browse to or create a socket path to communicate to Tor

Definition at line 348 of file AdvancedPage.cpp.

References ui.

Referenced by AdvancedPage().

void AdvancedPage::browseTorConfig ( )
privateslot

Called when the user clicks "Browse" to choose location of Tor config file

Open a QFileDialog to browse for Tor config file.

Definition at line 291 of file AdvancedPage.cpp.

References VMessageBox::No, VMessageBox::Ok, VMessageBox::question(), touch_file(), ui, VMessageBox::warning(), and VMessageBox::Yes.

Referenced by AdvancedPage().

void AdvancedPage::browseTorDataDirectory ( )
privateslot

Called when the user clicks "Browse" to choose the location of Tor's data directory.

Opens a QFileDialog for the user to browse to or create a directory for Tor's DataDirectory.

Definition at line 335 of file AdvancedPage.cpp.

References ui.

Referenced by AdvancedPage().

bool AdvancedPage::changedSinceLastApply ( )
virtual

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

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

Reimplemented from ConfigPage.

Definition at line 104 of file AdvancedPage.cpp.

References _settings, and AbstractTorSettings::changedSinceLastApply().

void AdvancedPage::displayTorrcDialog ( )
privateslot

Called when the user clicks "Edit current torrc" to edit Tor's config in a more advanced way

Called when the user presses the Edit current torrc button

Definition at line 398 of file AdvancedPage.cpp.

Referenced by AdvancedPage().

TorSettings::AuthenticationMethod AdvancedPage::indexToAuthMethod ( int  index)
private

Returns the authentication method for the given index.

Definition at line 265 of file AdvancedPage.cpp.

References TorSettings::CookieAuth, TorSettings::NullAuth, TorSettings::PasswordAuth, and TorSettings::UnknownAuth.

Referenced by authMethodChanged(), and save().

void AdvancedPage::load ( )
virtual
void AdvancedPage::restartTor ( )
signal

Emitted when the user changes torrc file to restart Tor

Referenced by save().

void AdvancedPage::retranslateUi ( )
virtual

Called when the user changes the UI translation.

Reimplemented from ConfigPage.

Definition at line 87 of file AdvancedPage.cpp.

References ui.

void AdvancedPage::revert ( )
virtual

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

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

Reimplemented from ConfigPage.

Definition at line 112 of file AdvancedPage.cpp.

References _settings, and AbstractTorSettings::revert().

bool AdvancedPage::save ( QString &  errmsg)
virtual
void AdvancedPage::toggleAuto ( bool  )
privateslot

Called when the user checks "Configure ControlPort automatically"

Definition at line 429 of file AdvancedPage.cpp.

References ui.

Referenced by AdvancedPage().

void AdvancedPage::toggleControl ( bool  )
privateslot

Called when the user changes from ControlPort to ControlSocket or the other way aroud

Definition at line 405 of file AdvancedPage.cpp.

References ui.

Referenced by AdvancedPage().

Member Data Documentation

TorSettings* AdvancedPage::_settings
private

A TorSettings object used to save/load settings

Definition at line 96 of file AdvancedPage.h.

Referenced by AdvancedPage(), apply(), changedSinceLastApply(), load(), revert(), save(), and ~AdvancedPage().

Ui::AdvancedPage AdvancedPage::ui
private

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