GeneralPage.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 GeneralPage.h
00013 ** \version $Id: GeneralPage.h 3735 2009-04-28 20:28:01Z edmanm $
00014 ** \brief General Tor and Vidalia configuration options
00015 */
00016 
00017 #ifndef _GENERALPAGE_H
00018 #define _GENERALPAGE_H
00019 
00020 #include "ui_GeneralPage.h"
00021 #include "ConfigPage.h"
00022 #include "VidaliaSettings.h"
00023 #include "TorSettings.h"
00024 
00025 #include <QFileDialog>
00026 
00027 
00028 class GeneralPage : public ConfigPage
00029 {
00030   Q_OBJECT
00031 
00032 public:
00033   /** Default Constructor */
00034   GeneralPage(QWidget *parent = 0);
00035   /** Default Destructor */
00036   ~GeneralPage();
00037   /** Saves the changes on this page */
00038   bool save(QString &errmsg);
00039   /** Loads the settings for this page */
00040   void load();
00041   /** Called when the user changes the UI translation. */
00042   virtual void retranslateUi();
00043 
00044 signals:
00045   /** Emitted when the user clicks the "Check Now" button. */
00046   void checkForUpdates();
00047 
00048 private slots:
00049   /** Open a QFileDialog to browse for a Tor executable file. */
00050   void browseTorExecutable();
00051   /** Open a QFileDialog to browse for a proxy executable file. */
00052   void browseProxyExecutable();
00053   /** Initiate an immediate check for software updates. */
00054   void updateNow();
00055 
00056 private:
00057   /** Displays a file dialog allowing the user to browse for an executable
00058    * file. <b>caption</b> will be displayed in the dialog's title bar and <b>
00059    * file</b>, if specified, is the default file selected in the dialog. */
00060   QString browseExecutable(const QString &caption,
00061                            const QString &file = QString());
00062 
00063   /** A VidaliaSettings object used for saving/loading vidalia settings */
00064   VidaliaSettings *_vidaliaSettings;
00065   /** A TorSettings ovject used for saving/loading tor settings */
00066   TorSettings *_torSettings;
00067   /** Qt Designer generated object */
00068   Ui::GeneralPage ui;
00069 };
00070 
00071 #endif
00072 

Generated on 31 Mar 2010 for Vidalia by  doxygen 1.6.1