Vidalia  0.3.1
Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
TorrcDialog Class Reference

#include <TorrcDialog.h>

Inheritance diagram for TorrcDialog:

Public Member Functions

 TorrcDialog (QWidget *parent=0)
 
 ~TorrcDialog ()
 

Private Slots

void saveTorrc ()
 

Private Member Functions

void loadToolBar ()
 
void loadTorrc ()
 
bool parseAndSet (QString *errmsg=0)
 

Private Attributes

Ui::TorrcDialog ui
 
TorControltc
 

Detailed Description

Definition at line 36 of file TorrcDialog.h.

Constructor & Destructor Documentation

TorrcDialog::TorrcDialog ( QWidget *  parent = 0)

Default constructor

Constructor

Definition at line 42 of file TorrcDialog.cpp.

References connect(), loadToolBar(), loadTorrc(), saveTorrc(), tc, Vidalia::torControl(), and ui.

TorrcDialog::~TorrcDialog ( )

Destructor

Definition at line 62 of file TorrcDialog.cpp.

Member Function Documentation

void TorrcDialog::loadToolBar ( )
private

Definition at line 68 of file TorrcDialog.cpp.

References ui.

Referenced by TorrcDialog().

void TorrcDialog::loadTorrc ( )
private

Loads the contents of the torrc file that Tor has loaded

Loads the saved torrc file that Tor's using to the TextEdit widget for editing

Definition at line 145 of file TorrcDialog.cpp.

References TorControl::getInfo(), TorControl::isConnected(), tc, and ui.

Referenced by TorrcDialog().

bool TorrcDialog::parseAndSet ( QString *  errmsg = 0)
private

Parses the options edited and sets them through SETCONF if they pass the parsing stage

Gives a shallow parse phase to the settings to catch most errors and passes on the error messages from Tor if the setting's value isn't valid. It returns false if something went wrong. If there's a problem in the setting stage, changes to that point will remaind but won't be saved.

Definition at line 88 of file TorrcDialog.cpp.

References i(), TorControl::isConnected(), TorControl::setConf(), tc, and ui.

Referenced by saveTorrc().

void TorrcDialog::saveTorrc ( )
privateslot

Saves the settings specified to the torrc file through the SAVECONF control

Calls the parsing and setting routine, and if everything went right it saves the configuration to the torrc file through the SAVECONF control

Definition at line 167 of file TorrcDialog.cpp.

References TorControl::isConnected(), parseAndSet(), TorControl::saveConf(), tc, and ui.

Referenced by TorrcDialog().

Member Data Documentation

TorControl* TorrcDialog::tc
private

TorControl object to comunicate with Tor

Definition at line 61 of file TorrcDialog.h.

Referenced by loadTorrc(), parseAndSet(), saveTorrc(), and TorrcDialog().

Ui::TorrcDialog TorrcDialog::ui
private

Qt Designer generated object.

Definition at line 59 of file TorrcDialog.h.

Referenced by loadToolBar(), loadTorrc(), parseAndSet(), saveTorrc(), and TorrcDialog().


The documentation for this class was generated from the following files: