Vidalia 0.3.1
|
#include <AdvancedPage.h>
Signals | |
void | restartTor () |
![]() | |
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 () |
![]() | |
ConfigPage (QWidget *parent=0, const QString title=QString()) | |
QString | title () const |
virtual void | load ()=0 |
virtual bool | save (QString &errmsg)=0 |
virtual bool | changedSinceLastApply () |
virtual bool | apply (QString &errmsg) |
virtual void | revert () |
virtual void | retranslateUi () |
Private Slots | |
void | authMethodChanged (int index) |
void | browseTorConfig () |
void | browseTorDataDirectory () |
void | browseSocketPath () |
void | toggleControl (bool) |
void | displayTorrcDialog () |
void | toggleAuto (bool) |
void | displayWarning (bool) |
Private Member Functions | |
TorSettings::AuthenticationMethod | indexToAuthMethod (int index) |
int | authMethodToIndex (TorSettings::AuthenticationMethod method) |
Private Attributes | |
TorSettings * | _settings |
Ui::AdvancedPage | ui |
Definition at line 26 of file AdvancedPage.h.
AdvancedPage::AdvancedPage | ( | QWidget * | parent = 0 | ) |
Default Constructor
Constructor
Definition at line 36 of file AdvancedPage.cpp.
References _settings, authMethodChanged(), browseSocketPath(), browseTorConfig(), browseTorDataDirectory(), connect(), displayTorrcDialog(), displayWarning(), TorService::isSupported(), toggleAuto(), toggleControl(), Vidalia::torControl(), and ui.
AdvancedPage::~AdvancedPage | ( | ) |
|
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 98 of file AdvancedPage.cpp.
References _settings, and TorSettings::apply().
|
privateslot |
Called when the user selects a different authentication method from the combo box.
Definition at line 257 of file AdvancedPage.cpp.
References indexToAuthMethod(), TorSettings::PasswordAuth, and ui.
Referenced by AdvancedPage().
|
private |
Returns the index in the authentication methods combo box for the given authentication method.
Definition at line 281 of file AdvancedPage.cpp.
References TorSettings::CookieAuth, and TorSettings::NullAuth.
Referenced by load().
|
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 350 of file AdvancedPage.cpp.
References ui.
Referenced by AdvancedPage().
|
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 293 of file AdvancedPage.cpp.
References VMessageBox::No, VMessageBox::Ok, VMessageBox::question(), touch_file(), ui, VMessageBox::warning(), and VMessageBox::Yes.
Referenced by AdvancedPage().
|
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 337 of file AdvancedPage.cpp.
References ui.
Referenced by AdvancedPage().
|
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 106 of file AdvancedPage.cpp.
References _settings, and AbstractTorSettings::changedSinceLastApply().
|
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 400 of file AdvancedPage.cpp.
Referenced by AdvancedPage().
Called when the user checks "Randomly Generate" checkbox
Definition at line 440 of file AdvancedPage.cpp.
References indexToAuthMethod(), TorSettings::PasswordAuth, and ui.
Referenced by AdvancedPage().
|
private |
Returns the authentication method for the given index.
Definition at line 267 of file AdvancedPage.cpp.
References TorSettings::CookieAuth, TorSettings::NullAuth, TorSettings::PasswordAuth, and TorSettings::UnknownAuth.
Referenced by authMethodChanged(), displayWarning(), and save().
|
virtual |
Loads the settings for this page
Loads previously saved settings.
Implements ConfigPage.
Definition at line 225 of file AdvancedPage.cpp.
References _settings, authMethodToIndex(), TorSettings::autoControlPort(), TorSettings::getAuthenticationMethod(), TorSettings::getControlAddress(), TorSettings::getControlMethod(), TorSettings::getControlPassword(), TorSettings::getControlPort(), TorSettings::getDataDirectory(), TorSettings::getSocketPath(), TorSettings::getTorrc(), getTorVersion(), TorService::isInstalled(), ControlMethod::Port, ControlMethod::Socket, Vidalia::torControl(), ui, and TorSettings::useRandomPassword().
|
signal |
Emitted when the user changes torrc file to restart Tor
Referenced by save().
|
virtual |
Called when the user changes the UI translation.
Reimplemented from ConfigPage.
Definition at line 89 of file AdvancedPage.cpp.
References ui.
|
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 114 of file AdvancedPage.cpp.
References _settings, and AbstractTorSettings::revert().
|
virtual |
Saves the changes on this page
Saves all settings for this page.
Implements ConfigPage.
Definition at line 121 of file AdvancedPage.cpp.
References _settings, Local8BitStringValidator::canEncode(), TorSettings::getDataDirectory(), TorSettings::getTorrc(), indexToAuthMethod(), isConnected(), isVidaliaRunningTor(), TorSettings::PasswordAuth, ControlMethod::Port, restartTor(), TorSettings::setAuthenticationMethod(), TorSettings::setAutoControlPort(), TorSettings::setControlAddress(), TorSettings::setControlMethod(), TorSettings::setControlPassword(), TorSettings::setControlPort(), TorSettings::setDataDirectory(), TorSettings::setSocketPath(), TorSettings::setTorrc(), TorSettings::setUseRandomPassword(), ControlMethod::Socket, Vidalia::torControl(), and ui.
Called when the user checks "Configure ControlPort automatically"
Definition at line 431 of file AdvancedPage.cpp.
References ui.
Referenced by AdvancedPage().
Called when the user changes from ControlPort to ControlSocket or the other way aroud
Definition at line 407 of file AdvancedPage.cpp.
References ui.
Referenced by AdvancedPage().
|
private |
A TorSettings object used to save/load settings
Definition at line 99 of file AdvancedPage.h.
Referenced by AdvancedPage(), apply(), changedSinceLastApply(), load(), revert(), save(), and ~AdvancedPage().
|
private |
Qt Designer generated object
Definition at line 101 of file AdvancedPage.h.
Referenced by AdvancedPage(), authMethodChanged(), browseSocketPath(), browseTorConfig(), browseTorDataDirectory(), displayWarning(), load(), retranslateUi(), save(), toggleAuto(), and toggleControl().