Vidalia
0.3.1
Main Page
Namespaces
Classes
Files
File List
File Members
src
vidalia
config
TorrcDialog.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 TorrcDialog.h
13
** \brief Torrc Dialog, contains the dialog for displaying and editing the torrc
14
*/
15
16
#ifndef _TORRCDIALOG_H
17
#define _TORRCDIALOG_H
18
19
#include <QSyntaxHighlighter>
20
21
class
TorHighlighter
:
public
QSyntaxHighlighter {
22
public
:
23
/** Default constructor */
24
TorHighlighter
(QTextEdit *te) : QSyntaxHighlighter(te) {}
25
/** Default deconstructor */
26
~TorHighlighter
() {}
27
/** Hightlights commented lines and gives some format to
28
* the rest of the lines */
29
void
highlightBlock
(
const
QString &text);
30
};
31
32
#include "ui_TorrcDialog.h"
33
34
class
TorControl
;
35
36
class
TorrcDialog
:
public
QDialog
37
{
38
Q_OBJECT
39
40
public
:
41
/** Default constructor */
42
TorrcDialog
(QWidget *parent = 0);
43
/** Destructor */
44
~TorrcDialog
();
45
46
private
slots:
47
/** Saves the settings specified to the torrc file
48
* through the SAVECONF control */
49
void
saveTorrc
();
50
51
private
:
52
void
loadToolBar
();
53
/** Loads the contents of the torrc file that Tor has loaded */
54
void
loadTorrc
();
55
/** Parses the options edited and sets them through SETCONF
56
* if they pass the parsing stage */
57
bool
parseAndSet
(QString *errmsg = 0);
58
59
Ui::TorrcDialog
ui
;
/**< Qt Designer generated object. */
60
/** TorControl object to comunicate with Tor */
61
TorControl
*
tc
;
62
63
};
64
65
#endif // _TORRCDIALOG_H
Generated on Mon Jan 14 2013 08:44:27 for Vidalia by
1.8.3