AdvancedPage Class Reference

#include <advancedpage.h>

Inheritance diagram for AdvancedPage:

ConfigPage

List of all members.

Public Member Functions

 AdvancedPage (QWidget *parent=0)
 ~AdvancedPage ()
bool save (QString &errmsg)
void load ()

Private Slots

void authMethodChanged (int index)
void browseTorConfig ()
void browseTorDataDirectory ()

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 38 of file advancedpage.h.


Constructor & Destructor Documentation

AdvancedPage::AdvancedPage ( QWidget *  parent = 0  ) 

Default Constructor

Constructor

Definition at line 44 of file advancedpage.cpp.

References _settings, authMethodChanged(), browseTorConfig(), browseTorDataDirectory(), TorService::isSupported(), and ui.

AdvancedPage::~AdvancedPage (  ) 

Default Destructor

Destructor

Definition at line 74 of file advancedpage.cpp.

References _settings.


Member Function Documentation

bool AdvancedPage::save ( QString &  errmsg  )  [virtual]

Saves the changes on this page

Saves all settings for this page.

Implements ConfigPage.

Definition at line 81 of file advancedpage.cpp.

References _settings, indexToAuthMethod(), TorSettings::PasswordAuth, TorSettings::setAuthenticationMethod(), TorSettings::setControlAddress(), TorSettings::setControlPassword(), TorSettings::setControlPort(), TorSettings::setDataDirectory(), TorSettings::setGroup(), TorSettings::setTorrc(), TorSettings::setUser(), TorSettings::setUseRandomPassword(), and ui.

void AdvancedPage::load (  )  [virtual]

Loads the settings for this page

Loads previously saved settings.

Implements ConfigPage.

Definition at line 125 of file advancedpage.cpp.

References _settings, authMethodToIndex(), TorSettings::getAuthenticationMethod(), TorSettings::getControlAddress(), TorSettings::getControlPassword(), TorSettings::getControlPort(), TorSettings::getDataDirectory(), TorSettings::getGroup(), TorSettings::getTorrc(), TorSettings::getUser(), TorService::isInstalled(), ui, and TorSettings::useRandomPassword().

void AdvancedPage::authMethodChanged ( int  index  )  [private, slot]

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

Definition at line 149 of file advancedpage.cpp.

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

Referenced by AdvancedPage().

void AdvancedPage::browseTorConfig (  )  [private, slot]

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 184 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 (  )  [private, slot]

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 227 of file advancedpage.cpp.

References ui.

Referenced by AdvancedPage().

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

Returns the authentication method for the given index.

Definition at line 158 of file advancedpage.cpp.

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

Referenced by authMethodChanged(), and save().

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

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

Definition at line 172 of file advancedpage.cpp.

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

Referenced by load().


Member Data Documentation

TorSettings* AdvancedPage::_settings [private]

A TorSettings object used to save/load settings

Definition at line 76 of file advancedpage.h.

Referenced by AdvancedPage(), load(), save(), and ~AdvancedPage().

Ui::AdvancedPage AdvancedPage::ui [private]

Qt Designer generated object

Definition at line 78 of file advancedpage.h.

Referenced by AdvancedPage(), authMethodChanged(), browseTorConfig(), browseTorDataDirectory(), load(), and save().


The documentation for this class was generated from the following files:
Generated on Wed Sep 5 15:49:29 2007 for Vidalia by  doxygen 1.5.3