Vidalia
0.2.21
Main Page
Namespaces
Classes
Files
File List
File Members
src
vidalia
config
ConfigDialog.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 ConfigDialog.h
13
** \brief Contains a series of Vidalia and Tor configuration pages
14
*/
15
16
#ifndef _CONFIGDIALOG_H
17
#define _CONFIGDIALOG_H
18
19
#include "ui_ConfigDialog.h"
20
#include "
VidaliaWindow.h
"
21
22
#include <QMainWindow>
23
#include <QFileDialog>
24
25
26
class
ConfigDialog
:
public
VidaliaWindow
27
{
28
Q_OBJECT
29
30
public
:
31
/** Config dialog pages. */
32
enum
Page
{
33
General
= 0,
/** General configuration page. */
34
Network
,
/** Network configuration page. */
35
Server
,
/** Server configuration page. */
36
Appearance
,
/** Appearance configuration page. */
37
Advanced
,
/** Advanced configuration page. */
38
Service
/** Service Configuration page */
39
};
40
41
/** Default Constructor */
42
ConfigDialog
(QWidget *parent = 0);
43
44
public
slots:
45
/** Shows the config dialog with focus set to the given page. */
46
void
showWindow
(
Page
page =
General
);
47
48
signals:
49
/** Emitted when the user clicks "Check Now" to initiate a check
50
* for software updates. */
51
void
checkForUpdates
();
52
/** Emitted when the user changes torrc file to restart Tor */
53
void
restartTor
();
54
55
protected
:
56
/** Called when the user changes the UI translation. */
57
virtual
void
retranslateUi
();
58
59
private
slots:
60
/** Called when user clicks "Save Settings". Saves their settings to
61
* Vidalia's configuration file. */
62
void
saveChanges
();
63
/** Called after Vidalia has authenticated to Tor and applies any changes
64
* made since the last time they were applied. */
65
void
applyChanges
();
66
/** Sends Tor a SAVECONF to write its configuration to disk. If the
67
* SAVECONF is successful, then all settings are considered to be
68
* applied. */
69
void
saveConf
();
70
/** Called when a ConfigPage in the dialog requests help on a specific
71
* <b>topic</b>. */
72
void
help
(
const
QString &topic);
73
/** Shows general help information for whichever settings page the user is
74
* currently viewing. */
75
void
help
();
76
/** Stub method that relays the checkForUpdates() signal from the General
77
* settings page to the owner of the config dialog (MainWindow). */
78
void
onCheckForUpdates
();
79
80
private
:
81
/** Loads the current configuration settings */
82
void
loadSettings
();
83
/** Creates a new action for a config page. */
84
QAction*
createPageAction
(
const
QIcon &img,
const
QString &text,
85
const
QString &data, QActionGroup *group);
86
/** Adds a new action to the toolbar. */
87
void
addAction
(QAction *action,
const
char
*slot = 0);
88
89
/** Qt Designer generated object */
90
Ui::ConfigDialog
ui
;
91
};
92
93
#endif
94
Generated on Thu Dec 6 2012 04:33:16 for Vidalia by
1.8.2