Vidalia 0.3.1
GeneralPage.h
Go to the documentation of this file.
1/*
2** This file is part of Vidalia, and is subject to the license terms in the
3** LICENSE file, found in the top level directory of this distribution. If you
4** did not receive the LICENSE file with this file, you may obtain it from the
5** Vidalia source package distributed by the Vidalia Project at
6** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
7** including this file, may be copied, modified, propagated, or distributed
8** except according to the terms described in the LICENSE file.
9*/
10
11/*
12** \file GeneralPage.h
13** \brief General Tor and Vidalia configuration options
14*/
15
16#ifndef _GENERALPAGE_H
17#define _GENERALPAGE_H
18
19#include "ui_GeneralPage.h"
20#include "ConfigPage.h"
21#include "VidaliaSettings.h"
22#include "TorSettings.h"
23
24#include <QFileDialog>
25
26
27class GeneralPage : public ConfigPage
28{
29 Q_OBJECT
30
31public:
32 /** Default Constructor */
33 GeneralPage(QWidget *parent = 0);
34 /** Default Destructor */
36 /** Saves the changes on this page */
37 bool save(QString &errmsg);
38 /** Loads the settings for this page */
39 void load();
40 /** Called when the user changes the UI translation. */
41 virtual void retranslateUi();
42
43signals:
44 /** Emitted when the user clicks the "Check Now" button. */
46
47private slots:
48 /** Open a QFileDialog to browse for a Tor executable file. */
50 /** Open a QFileDialog to browse for a proxy executable file. */
52 /** Initiate an immediate check for software updates. */
53 void updateNow();
54
55private:
56 /** Displays a file dialog allowing the user to browse for an executable
57 * file. <b>caption</b> will be displayed in the dialog's title bar and <b>
58 * file</b>, if specified, is the default file selected in the dialog. */
59 QString browseExecutable(const QString &caption,
60 const QString &file = QString());
61
62 /** A VidaliaSettings object used for saving/loading vidalia settings */
64 /** A TorSettings ovject used for saving/loading tor settings */
66 /** Qt Designer generated object */
67 Ui::GeneralPage ui;
68};
69
70#endif
71
TorSettings * _torSettings
Definition: GeneralPage.h:65
Ui::GeneralPage ui
Definition: GeneralPage.h:67
bool save(QString &errmsg)
void updateNow()
virtual void retranslateUi()
Definition: GeneralPage.cpp:61
VidaliaSettings * _vidaliaSettings
Definition: GeneralPage.h:63
GeneralPage(QWidget *parent=0)
Definition: GeneralPage.cpp:25
QString browseExecutable(const QString &caption, const QString &file=QString())
Definition: GeneralPage.cpp:71
void checkForUpdates()
void browseProxyExecutable()
Definition: GeneralPage.cpp:95
void browseTorExecutable()
Definition: GeneralPage.cpp:85