#include <advancedpage.h>
Inheritance diagram for AdvancedPage:
Public Member Functions | |
AdvancedPage (QWidget *parent=0) | |
~AdvancedPage () | |
bool | save (QString &errmsg) |
void | load () |
bool | apply (QString &errmsg) |
void | revert () |
bool | changedSinceLastApply () |
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 |
Definition at line 27 of file advancedpage.h.
AdvancedPage::AdvancedPage | ( | QWidget * | parent = 0 |
) |
Default Constructor
Definition at line 33 of file advancedpage.cpp.
References _settings, authMethodChanged(), browseTorConfig(), browseTorDataDirectory(), TorService::isSupported(), Vidalia::torControl(), and ui.
AdvancedPage::~AdvancedPage | ( | ) |
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 73 of file advancedpage.cpp.
References _settings, and TorSettings::apply().
void AdvancedPage::authMethodChanged | ( | int | index | ) | [private, slot] |
Called when the user selects a different authentication method from the combo box.
Definition at line 177 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 200 of file advancedpage.cpp.
References TorSettings::CookieAuth, and TorSettings::NullAuth.
Referenced by load().
void AdvancedPage::browseTorConfig | ( | ) | [private, slot] |
Called when the user clicks "Browse" to choose location of Tor config file
Definition at line 212 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.
Definition at line 255 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.
Reimplemented from ConfigPage.
Definition at line 81 of file advancedpage.cpp.
References _settings, and AbstractTorSettings::changedSinceLastApply().
TorSettings::AuthenticationMethod AdvancedPage::indexToAuthMethod | ( | int | index | ) | [private] |
Returns the authentication method for the given index.
Definition at line 186 of file advancedpage.cpp.
References TorSettings::CookieAuth, TorSettings::NullAuth, TorSettings::PasswordAuth, and TorSettings::UnknownAuth.
Referenced by authMethodChanged(), and save().
void AdvancedPage::load | ( | ) | [virtual] |
Loads the settings for this page
Implements ConfigPage.
Definition at line 153 of file advancedpage.cpp.
References _settings, authMethodToIndex(), TorSettings::getAuthenticationMethod(), TorSettings::getControlAddress(), TorSettings::getControlPassword(), TorSettings::getControlPort(), TorSettings::getDataDirectory(), TorSettings::getTorrc(), TorService::isInstalled(), ui, and TorSettings::useRandomPassword().
void AdvancedPage::revert | ( | ) | [virtual] |
Reverts the Tor configuration settings to their values at the last time they were successfully applied to Tor.
Reimplemented from ConfigPage.
Definition at line 89 of file advancedpage.cpp.
References _settings, and AbstractTorSettings::revert().
bool AdvancedPage::save | ( | QString & | errmsg | ) | [virtual] |
Saves the changes on this page
Implements ConfigPage.
Definition at line 96 of file advancedpage.cpp.
References _settings, TorSettings::getDataDirectory(), TorSettings::getTorrc(), indexToAuthMethod(), TorSettings::PasswordAuth, TorSettings::setAuthenticationMethod(), TorSettings::setControlAddress(), TorSettings::setControlPassword(), TorSettings::setControlPort(), TorSettings::setDataDirectory(), TorSettings::setTorrc(), TorSettings::setUseRandomPassword(), Vidalia::torControl(), and ui.
TorSettings* AdvancedPage::_settings [private] |
A TorSettings object used to save/load settings
Definition at line 78 of file advancedpage.h.
Referenced by AdvancedPage(), apply(), changedSinceLastApply(), load(), revert(), save(), and ~AdvancedPage().
Ui::AdvancedPage AdvancedPage::ui [private] |
Qt Designer generated object
Definition at line 80 of file advancedpage.h.
Referenced by AdvancedPage(), authMethodChanged(), browseTorConfig(), browseTorDataDirectory(), load(), and save().