Vidalia
0.3.1
|
#include <ConfigDialog.h>
Public Types | |
enum | Page { General = 0, Network, Server, Service, Appearance, Advanced } |
Public Slots | |
void | showWindow (Page page=General) |
![]() | |
virtual void | setVisible (bool visible) |
virtual void | showWindow () |
Signals | |
void | checkForUpdates () |
void | restartTor () |
![]() | |
void | helpRequested (const QString &topic) |
Public Member Functions | |
ConfigDialog (QWidget *parent=0) | |
![]() | |
VidaliaWindow (const QString &name, QWidget *parent=0, Qt::WFlags flags=0) | |
~VidaliaWindow () | |
void | setShortcut (const QString &shortcut, const char *slot) |
void | saveWindowState () |
void | restoreWindowState () |
QVariant | getSetting (QString name, QVariant defaultValue) |
void | saveSetting (QString name, QVariant value) |
Protected Member Functions | |
virtual void | retranslateUi () |
![]() | |
virtual void | changeEvent (QEvent *e) |
Private Slots | |
void | saveChanges () |
void | applyChanges () |
void | saveConf () |
void | help (const QString &topic) |
void | help () |
void | onCheckForUpdates () |
Private Member Functions | |
void | loadSettings () |
QAction * | createPageAction (const QIcon &img, const QString &text, const QString &data, QActionGroup *group) |
void | addAction (QAction *action, const char *slot=0) |
Private Attributes | |
Ui::ConfigDialog | ui |
Definition at line 26 of file ConfigDialog.h.
enum ConfigDialog::Page |
Config dialog pages.
Enumerator | |
---|---|
General | |
Network | General configuration page. |
Server | Network configuration page. |
Service | Server configuration page. |
Appearance | Service Configuration page |
Advanced | Appearance configuration page. Advanced configuration page. |
Definition at line 32 of file ConfigDialog.h.
ConfigDialog::ConfigDialog | ( | QWidget * | parent = 0 | ) |
Default Constructor
Constructor
Definition at line 42 of file ConfigDialog.cpp.
References addAction(), applyChanges(), checkForUpdates(), connect(), createPageAction(), Vidalia::createShortcut(), help(), VidaliaWindow::helpRequested(), IMAGE_ADVANCED, IMAGE_APPEARANCE, IMAGE_GENERAL, IMAGE_HELP, IMAGE_NETWORK, IMAGE_SERVER, IMAGE_SERVICE, onCheckForUpdates(), restartTor(), saveChanges(), Vidalia::torControl(), and ui.
|
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 141 of file ConfigDialog.cpp.
Referenced by ConfigDialog().
|
privateslot |
Called after Vidalia has authenticated to Tor and applies any changes made since the last time they were applied.
Definition at line 216 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().
|
signal |
Emitted when the user clicks "Check Now" to initiate a check for software updates.
Referenced by ConfigDialog(), and onCheckForUpdates().
|
private |
Creates a new action for a config page.
Creates a new action associated with a config page.
Definition at line 129 of file ConfigDialog.cpp.
Referenced by ConfigDialog().
|
privateslot |
Called when a ConfigPage in the dialog requests help on a specific topic.
Definition at line 299 of file ConfigDialog.cpp.
References VidaliaWindow::helpRequested().
|
privateslot |
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 267 of file ConfigDialog.cpp.
References Advanced, Appearance, Network, Server, and ui.
Referenced by ConfigDialog().
|
private |
Loads the current configuration settings
Loads the saved ConfigDialog settings.
Definition at line 175 of file ConfigDialog.cpp.
References ConfigPage::load(), and ui.
Referenced by showWindow().
|
privateslot |
Stub method that relays the checkForUpdates() signal from the General settings page to the owner of the config dialog (MainWindow).
Definition at line 290 of file ConfigDialog.cpp.
References checkForUpdates().
Referenced by ConfigDialog().
|
signal |
Emitted when the user changes torrc file to restart Tor
Referenced by ConfigDialog().
|
protectedvirtual |
Called when the user changes the UI translation.
Reimplemented from VidaliaWindow.
Definition at line 161 of file ConfigDialog.cpp.
References ConfigPage::retranslateUi(), and ui.
|
privateslot |
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 186 of file ConfigDialog.cpp.
References applyChanges(), TorControl::isConnected(), VMessageBox::Ok, p(), ConfigPage::save(), ConfigPage::title(), Vidalia::torControl(), ui, and VMessageBox::warning().
Referenced by ConfigDialog().
|
privateslot |
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 254 of file ConfigDialog.cpp.
References TorControl::saveConf(), AbstractTorSettings::setChanged(), and Vidalia::torControl().
Referenced by applyChanges().
Shows the config dialog with focus set to the given page.
Definition at line 149 of file ConfigDialog.cpp.
References loadSettings(), VidaliaWindow::showWindow(), and ui.
Referenced by ServerPage::onAuthenticated(), and MainWindow::showConfigDialog().
|
private |
Qt Designer generated object
Definition at line 90 of file ConfigDialog.h.
Referenced by addAction(), applyChanges(), ConfigDialog(), help(), loadSettings(), retranslateUi(), saveChanges(), and showWindow().