ConfigDialog Class Reference

#include <configdialog.h>

Inheritance diagram for ConfigDialog:

VidaliaWindow

List of all members.

Public Types

enum  Page {
  General = 0, Network, Server, Appearance,
  Advanced, Service
}

Public Slots

void showWindow (Page page=General)

Public Member Functions

 ConfigDialog (QWidget *parent=0)

Private Slots

void saveChanges ()
void applyChanges ()
void saveConf ()
void help (const QString &topic)
void help ()

Private Member Functions

void loadSettings ()
QAction * createPageAction (QIcon img, QString text, QActionGroup *group)
void addAction (QAction *action, const char *slot=0)

Private Attributes

Ui::ConfigDialog ui


Detailed Description

Definition at line 34 of file configdialog.h.


Member Enumeration Documentation

Config dialog pages.

Enumerator:
General 
Network  General configuration page.
Server  Network configuration page.
Appearance  Server configuration page.
Advanced  Appearance configuration page.
Service  Advanced configuration page. Service Configuration page

Definition at line 40 of file configdialog.h.


Constructor & Destructor Documentation

ConfigDialog::ConfigDialog ( QWidget *  parent = 0  ) 


Member Function Documentation

void ConfigDialog::showWindow ( Page  page = General  )  [slot]

Shows the config dialog with focus set to the given page.

Definition at line 143 of file configdialog.cpp.

References loadSettings(), VidaliaWindow::showWindow(), and ui.

Referenced by ServerPage::onAuthenticated(), and MainWindow::showConfigDialog().

void ConfigDialog::saveChanges (  )  [private, slot]

Called when user clicks "Save Settings". Saves their settings to Vidalia's configuration file.

Saves changes made to settings. If Tor is running and Vidalia is connected, we will also attempt to apply the changes to Tor.

Definition at line 166 of file configdialog.cpp.

References applyChanges(), TorControl::isConnected(), VMessageBox::Ok, p(), ConfigPage::save(), ConfigPage::title(), Vidalia::torControl(), ui, and VMessageBox::warning().

Referenced by ConfigDialog().

void ConfigDialog::applyChanges (  )  [private, slot]

Called after Vidalia has authenticated to Tor and applies any changes made since the last time they were applied.

Definition at line 196 of file configdialog.cpp.

References ConfigPage::apply(), VMessageBox::Cancel, ConfigPage::changedSinceLastApply(), p(), ConfigPage::revert(), saveConf(), VMessageBox::ShowSettings, VidaliaWindow::showWindow(), ConfigPage::title(), ui, and VMessageBox::warning().

Referenced by ConfigDialog(), and saveChanges().

void ConfigDialog::saveConf (  )  [private, slot]

Sends Tor a SAVECONF to write its configuration to disk. If the SAVECONF is successful, then all settings are considered to be applied.

Sends Tor a SAVECONF to write its configuration to disk. If the SAVECONF is successful, then all settings are considered to be applied.

Definition at line 234 of file configdialog.cpp.

References TorControl::saveConf(), and Vidalia::torControl().

Referenced by applyChanges().

void ConfigDialog::help ( const QString &  topic  )  [private, slot]

Called when a ConfigPage in the dialog requests help on a specific topic.

Definition at line 270 of file configdialog.cpp.

References VidaliaWindow::helpRequested().

void ConfigDialog::help (  )  [private, slot]

Shows general help information for whichever settings page the user is currently viewing.

Shows help information for whichever settings page the user is currently viewing.

Definition at line 247 of file configdialog.cpp.

References Advanced, Appearance, Network, Server, and ui.

Referenced by ConfigDialog().

void ConfigDialog::loadSettings (  )  [private]

Loads the current configuration settings

Loads the saved ConfigDialog settings.

Definition at line 155 of file configdialog.cpp.

References ConfigPage::load(), and ui.

Referenced by showWindow().

QAction * ConfigDialog::createPageAction ( QIcon  img,
QString  text,
QActionGroup *  group 
) [private]

Creates a new action for a config page.

Creates a new action associated with a config page.

Definition at line 125 of file configdialog.cpp.

Referenced by ConfigDialog().

void ConfigDialog::addAction ( QAction *  action,
const char *  slot = 0 
) [private]

Adds a new action to the toolbar.

Adds the given action to the toolbar and hooks its triggered() signal to the specified slot (if given).

Definition at line 135 of file configdialog.cpp.

References ui.

Referenced by ConfigDialog().


Member Data Documentation

Ui::ConfigDialog ConfigDialog::ui [private]

Qt Designer generated object

Definition at line 83 of file configdialog.h.

Referenced by addAction(), applyChanges(), ConfigDialog(), help(), loadSettings(), saveChanges(), and showWindow().


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

Generated on Wed Nov 26 21:03:59 2008 for Vidalia by  doxygen 1.5.6