VidaliaSettings Class Reference

#include <vidaliasettings.h>

Inheritance diagram for VidaliaSettings:

VSettings ServiceSettings

List of all members.

Public Member Functions

 VidaliaSettings ()
QString getLanguageCode ()
void setLanguageCode (QString languageCode)
QString getInterfaceStyle ()
void setInterfaceStyle (QString styleKey)
bool runTorAtStart ()
void setRunTorAtStart (bool run)
bool showMainWindowAtStart ()
void setShowMainWindowAtStart (bool show)
bool runVidaliaOnBoot ()
void setRunVidaliaOnBoot (bool run)
QString getBrowserExecutable () const
void setBrowserExecutable (const QString &browserExecutable)
QString getIMExecutable () const
void setIMExecutable (const QString &IMExecutable)
bool runProxyAtStart ()
void setRunProxyAtStart (bool run)
QString getProxyExecutable () const
void setProxyExecutable (const QString &proxyExecutable)
QStringList getProxyExecutableArguments () const
void setProxyExecutableArguments (const QStringList &proxyExecutableArguments)


Detailed Description

Handles saving and restoring Vidalia's settings, such as the location of Tor, the control port, etc.

NOTE: Qt 4.1 documentation states that constructing a QSettings object is "very fast", so we shouldn't need to create a global instance of this class.

Definition at line 30 of file vidaliasettings.h.


Constructor & Destructor Documentation

VidaliaSettings::VidaliaSettings (  ) 


Member Function Documentation

QString VidaliaSettings::getLanguageCode (  ) 

Gets the currently preferred language code for Vidalia.

Definition at line 78 of file vidaliasettings.cpp.

References SETTING_LANGUAGE, and VSettings::value().

Referenced by AppearancePage::load(), and Vidalia::setLanguage().

void VidaliaSettings::setLanguageCode ( QString  languageCode  ) 

Saves the preferred language code.

Sets the preferred language code.

Definition at line 85 of file vidaliasettings.cpp.

References SETTING_LANGUAGE, and VSettings::setValue().

Referenced by AppearancePage::save().

QString VidaliaSettings::getInterfaceStyle (  ) 

Gets the interface style key (e.g., "windows", "motif", etc.)

Definition at line 92 of file vidaliasettings.cpp.

References SETTING_STYLE, and VSettings::value().

Referenced by Vidalia::setStyle().

void VidaliaSettings::setInterfaceStyle ( QString  styleKey  ) 

Sets the interface style key.

Definition at line 99 of file vidaliasettings.cpp.

References SETTING_STYLE, and VSettings::setValue().

Referenced by AppearancePage::save().

bool VidaliaSettings::runTorAtStart (  ) 

Returns true if Vidalia should start Tor when it starts.

Returns true if Tor is to be run when Vidalia starts.

Definition at line 106 of file vidaliasettings.cpp.

References SETTING_RUN_TOR_AT_START, and VSettings::value().

Referenced by GeneralPage::load(), and MainWindow::running().

void VidaliaSettings::setRunTorAtStart ( bool  run  ) 

Set whether to run Tor when Vidalia starts.

If run is set to true, then Tor will be run when Vidalia starts.

Definition at line 113 of file vidaliasettings.cpp.

References SETTING_RUN_TOR_AT_START, and VSettings::setValue().

Referenced by GeneralPage::save().

bool VidaliaSettings::showMainWindowAtStart (  ) 

Returns true if Vidalia's main window should be visible when the application starts.

Definition at line 121 of file vidaliasettings.cpp.

References SETTING_SHOW_MAINWINDOW_AT_START, and VSettings::value().

Referenced by MainWindow::MainWindow().

void VidaliaSettings::setShowMainWindowAtStart ( bool  show  ) 

Sets whether to show Vidalia's main window when the application starts.

Definition at line 128 of file vidaliasettings.cpp.

References SETTING_SHOW_MAINWINDOW_AT_START, and VSettings::setValue().

Referenced by MainWindow::toggleShowOnStartup().

bool VidaliaSettings::runVidaliaOnBoot (  ) 

Returns true if Vidalia should start on system boot.

Returns true if Vidalia is set to run on system boot.

Definition at line 136 of file vidaliasettings.cpp.

References win32_registry_get_key_value().

Referenced by GeneralPage::load().

void VidaliaSettings::setRunVidaliaOnBoot ( bool  run  ) 

Set whether to run Vidalia on system boot.

If run is set to true, then Vidalia will run on system boot.

Definition at line 152 of file vidaliasettings.cpp.

References win32_registry_remove_key(), and win32_registry_set_key_value().

Referenced by GeneralPage::save().

QString VidaliaSettings::getBrowserExecutable (  )  const

Returns a fully-qualified path to the web browser, including the executable name.

Definition at line 173 of file vidaliasettings.cpp.

References SETTING_BROWSER_EXECUTABLE, and VSettings::value().

Referenced by MainWindow::onSubprocessFinished(), and MainWindow::startSubprocesses().

void VidaliaSettings::setBrowserExecutable ( const QString &  browserExecutable  ) 

Sets the location and name of the web browser executable to the given string. If set to the empty string, the browser will not be started.

Sets the location and name of the web browser executable to the given string. If set to the empty string, the browser will not be started.

Definition at line 181 of file vidaliasettings.cpp.

References SETTING_BROWSER_EXECUTABLE, and VSettings::setValue().

QString VidaliaSettings::getIMExecutable (  )  const

Returns a fully-qualified path to the IM client, including the executable name.

Definition at line 189 of file vidaliasettings.cpp.

References SETTING_IM_EXECUTABLE, and VSettings::value().

Referenced by MainWindow::onSubprocessFinished(), and MainWindow::startSubprocesses().

void VidaliaSettings::setIMExecutable ( const QString &  IMExecutable  ) 

Sets the location and name of the IM client executable to the given string. If set to the empty string, the client will not be started.

Sets the location and name of the IM client executable to the given string. If set to the empty string, the client will not be started.

Definition at line 197 of file vidaliasettings.cpp.

References SETTING_IM_EXECUTABLE, and VSettings::setValue().

bool VidaliaSettings::runProxyAtStart (  ) 

Returns true if Vidalia should start a proxy application when it starts.

Definition at line 205 of file vidaliasettings.cpp.

References SETTING_RUN_PROXY_AT_START, and VSettings::value().

Referenced by GeneralPage::load(), and MainWindow::running().

void VidaliaSettings::setRunProxyAtStart ( bool  run  ) 

Set whether to run a proxy application when Vidalia starts.

Definition at line 212 of file vidaliasettings.cpp.

References SETTING_RUN_PROXY_AT_START, and VSettings::setValue().

Referenced by GeneralPage::save().

QString VidaliaSettings::getProxyExecutable (  )  const

Returns a fully-qualified path to the proxy server, including the executable name.

Definition at line 220 of file vidaliasettings.cpp.

References SETTING_PROXY_EXECUTABLE, and VSettings::value().

Referenced by GeneralPage::load(), and MainWindow::startProxy().

void VidaliaSettings::setProxyExecutable ( const QString &  proxyExecutable  ) 

Sets the location and name of the proxy server executable to the given string. If set to the empty string, the proxy will not be started.

Definition at line 228 of file vidaliasettings.cpp.

References SETTING_PROXY_EXECUTABLE, and VSettings::setValue().

Referenced by GeneralPage::save().

QStringList VidaliaSettings::getProxyExecutableArguments (  )  const

Returns a list containing additional command line arguments to be passed to ProxyExecutable

Returns a list containing additional command line arguments to be passed to ProxyExecutable

Definition at line 236 of file vidaliasettings.cpp.

References SETTING_PROXY_EXECUTABLE_ARGUMENTS, and VSettings::value().

Referenced by GeneralPage::load(), and MainWindow::startProxy().

void VidaliaSettings::setProxyExecutableArguments ( const QStringList &  proxyExecutableArguments  ) 

Sets the additional arguments to be passed to Proxy Executable

Definition at line 243 of file vidaliasettings.cpp.

References SETTING_PROXY_EXECUTABLE_ARGUMENTS, and VSettings::setValue().

Referenced by GeneralPage::save().


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

Generated on Wed Nov 26 21:02:40 2008 for Vidalia by  doxygen 1.5.6