Vidalia
0.3.1
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
Service
,
/** Service Configuration page */
37
Appearance
,
/** Appearance configuration page. */
38
Advanced
/** Advanced 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
ConfigDialog::ui
Ui::ConfigDialog ui
Definition:
ConfigDialog.h:90
VidaliaWindow
Definition:
VidaliaWindow.h:27
ConfigDialog::Network
Definition:
ConfigDialog.h:34
ConfigDialog::loadSettings
void loadSettings()
Definition:
ConfigDialog.cpp:175
ConfigDialog::addAction
void addAction(QAction *action, const char *slot=0)
Definition:
ConfigDialog.cpp:141
ConfigDialog::Server
Definition:
ConfigDialog.h:35
ConfigDialog::Advanced
Definition:
ConfigDialog.h:38
ConfigDialog::Page
Page
Definition:
ConfigDialog.h:32
ConfigDialog::General
Definition:
ConfigDialog.h:33
ConfigDialog::checkForUpdates
void checkForUpdates()
ConfigDialog::retranslateUi
virtual void retranslateUi()
Definition:
ConfigDialog.cpp:161
ConfigDialog::restartTor
void restartTor()
ConfigDialog::onCheckForUpdates
void onCheckForUpdates()
Definition:
ConfigDialog.cpp:290
VidaliaWindow::showWindow
virtual void showWindow()
Definition:
VidaliaWindow.h:64
ConfigDialog::ConfigDialog
ConfigDialog(QWidget *parent=0)
Definition:
ConfigDialog.cpp:42
ConfigDialog::Appearance
Definition:
ConfigDialog.h:37
ConfigDialog::saveConf
void saveConf()
Definition:
ConfigDialog.cpp:254
ConfigDialog::help
void help()
Definition:
ConfigDialog.cpp:267
ConfigDialog::applyChanges
void applyChanges()
Definition:
ConfigDialog.cpp:216
ConfigDialog
Definition:
ConfigDialog.h:26
ConfigDialog::saveChanges
void saveChanges()
Definition:
ConfigDialog.cpp:186
ConfigDialog::createPageAction
QAction * createPageAction(const QIcon &img, const QString &text, const QString &data, QActionGroup *group)
Definition:
ConfigDialog.cpp:129
ConfigDialog::Service
Definition:
ConfigDialog.h:36
VidaliaWindow.h
Generated by
1.8.12