vidaliasettings.h

Go to the documentation of this file.
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 3511 2009-02-05 00:56:16Z 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   /** If browserDirectory is empty, returns a fully-qualified path to
00065    * the web browser, including the executable name. If browserDirectory
00066    * is set, then returns the basename of the configured web browser */
00067   QString getBrowserExecutable() const;
00068   /** Sets the location and name of the web browser executable to the given
00069    * string. If set to the empty string, the browser will not be started. */
00070   void setBrowserExecutable(const QString &browserExecutable);
00071 
00072   /** Returns a fully-qualified path to the web browser directory */
00073   QString getBrowserDirectory() const;
00074   /** Sets the location and name of the web browser directory to the given string.
00075    * If set to the empty string, the browser will not be started. */
00076   void setBrowserDirectory(const QString &browserDirectory);
00077 
00078   /** Returns a fully-qualified path to the IM client, including the
00079    * executable name. */
00080   QString getIMExecutable() const;
00081   /** Sets the location and name of the IM client executable to the given
00082    * string. If set to the empty string, the client will not be started. */
00083   void setIMExecutable(const QString &IMExecutable);
00084 
00085   /** Returns true if Vidalia should start a proxy application when it
00086    * starts. */
00087   bool runProxyAtStart();
00088   /** Set whether to run a proxy application when Vidalia starts. */
00089   void setRunProxyAtStart(bool run);
00090 
00091   /** Returns a fully-qualified path to the proxy server, including the
00092    * executable name. */
00093   QString getProxyExecutable() const;
00094   /** Sets the location and name of the proxy server executable to the given
00095    * string. If set to the empty string, the proxy will not be started. */
00096   void setProxyExecutable(const QString &proxyExecutable);
00097 
00098   /** Returns a list containing additional command line arguments to be
00099    * passed to ProxyExecutable */
00100   QStringList getProxyExecutableArguments() const;
00101   /** Sets the additional arguments to be passed to Proxy Executable */
00102   void setProxyExecutableArguments(const QStringList &proxyExecutableArguments);
00103 };
00104 
00105 #endif
00106 

Generated on Wed Dec 23 21:06:55 2009 for Vidalia by  doxygen 1.6.1