00001 /* 00002 ** This file is part of Vidalia, and is subject to the license terms in the 00003 ** LICENSE file, found in the top level directory of this distribution. If you 00004 ** did not receive the LICENSE file with this file, you may obtain it from the 00005 ** Vidalia source package distributed by the Vidalia Project at 00006 ** http://www.vidalia-project.net/. No part of Vidalia, including this file, 00007 ** may be copied, modified, propagated, or distributed except according to the 00008 ** terms described in the LICENSE file. 00009 */ 00010 00011 /* 00012 ** \file vidaliasettings.h 00013 ** \version $Id: vidaliasettings.h 2674 2008-06-06 23:28:48Z edmanm $ 00014 ** \brief General Vidalia settings, such as language and interface style 00015 */ 00016 00017 #ifndef _VIDALIASETTINGS_H 00018 #define _VIDALIASETTINGS_H 00019 00020 #include "vsettings.h" 00021 00022 00023 /** Handles saving and restoring Vidalia's settings, such as the 00024 * location of Tor, the control port, etc. 00025 * 00026 * NOTE: Qt 4.1 documentation states that constructing a QSettings object is 00027 * "very fast", so we shouldn't need to create a global instance of this 00028 * class. 00029 */ 00030 class VidaliaSettings : public VSettings 00031 { 00032 Q_OBJECT 00033 00034 public: 00035 /** Default constructor. */ 00036 VidaliaSettings(); 00037 00038 /** Gets the currently preferred language code for Vidalia. */ 00039 QString getLanguageCode(); 00040 /** Saves the preferred language code. */ 00041 void setLanguageCode(QString languageCode); 00042 00043 /** Gets the interface style key (e.g., "windows", "motif", etc.) */ 00044 QString getInterfaceStyle(); 00045 /** Sets the interface style key. */ 00046 void setInterfaceStyle(QString styleKey); 00047 00048 /** Returns true if Vidalia should start Tor when it starts. */ 00049 bool runTorAtStart(); 00050 /** Set whether to run Tor when Vidalia starts. */ 00051 void setRunTorAtStart(bool run); 00052 00053 /** Returns true if Vidalia's main window should be visible when the 00054 * application starts. */ 00055 bool showMainWindowAtStart(); 00056 /** Sets whether to show Vidalia's main window when the application starts. */ 00057 void setShowMainWindowAtStart(bool show); 00058 00059 /** Returns true if Vidalia should start on system boot. */ 00060 bool runVidaliaOnBoot(); 00061 /** Set whether to run Vidalia on system boot. */ 00062 void setRunVidaliaOnBoot(bool run); 00063 00064 /** Returns a fully-qualified path to the web browser, including the 00065 * executable name. */ 00066 QString getBrowserExecutable() const; 00067 /** Sets the location and name of the web browser executable to the given 00068 * string. If set to the empty string, the browser will not be started. */ 00069 void setBrowserExecutable(const QString &browserExecutable); 00070 00071 /** Returns a fully-qualified path to the IM client, including the 00072 * executable name. */ 00073 QString getIMExecutable() const; 00074 /** Sets the location and name of the IM client executable to the given 00075 * string. If set to the empty string, the client will not be started. */ 00076 void setIMExecutable(const QString &IMExecutable); 00077 00078 /** Returns true if Vidalia should start a proxy application when it 00079 * starts. */ 00080 bool runProxyAtStart(); 00081 /** Set whether to run a proxy application when Vidalia starts. */ 00082 void setRunProxyAtStart(bool run); 00083 00084 /** Returns a fully-qualified path to the proxy server, including the 00085 * executable name. */ 00086 QString getProxyExecutable() const; 00087 /** Sets the location and name of the proxy server executable to the given 00088 * string. If set to the empty string, the proxy will not be started. */ 00089 void setProxyExecutable(const QString &proxyExecutable); 00090 00091 /** Returns a list containing additional command line arguments to be 00092 * passed to ProxyExecutable */ 00093 QStringList getProxyExecutableArguments() const; 00094 /** Sets the additional arguments to be passed to Proxy Executable */ 00095 void setProxyExecutableArguments(const QStringList &proxyExecutableArguments); 00096 }; 00097 00098 #endif 00099