#include <configdialog.h>
Public Types | |
enum | Page { General = 0, Server = 1, Appearance = 2, Advanced = 3 } |
Public Slots | |
void | showWindow (Page page=General) |
Public Member Functions | |
ConfigDialog (QWidget *parent=0) | |
Private Slots | |
void | saveChanges () |
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 |
Definition at line 43 of file configdialog.h.
enum ConfigDialog::Page |
Config dialog pages.
General | |
Server | General configuration page. |
Appearance | Server configuration page. |
Advanced | Appearance configuration page. |
Definition at line 49 of file configdialog.h.
ConfigDialog::ConfigDialog | ( | QWidget * | parent = 0 |
) |
Default Constructor
Constructor
Definition at line 45 of file configdialog.cpp.
References addAction(), createPageAction(), help(), IMAGE_ADVANCED, IMAGE_APPEARANCE, IMAGE_CANCEL, IMAGE_GENERAL, IMAGE_HELP, IMAGE_SAVE, IMAGE_SERVER, saveChanges(), and ui.
void ConfigDialog::showWindow | ( | Page | page = General |
) | [slot] |
Shows the config dialog with focus set to the given page.
Definition at line 120 of file configdialog.cpp.
References loadSettings(), VidaliaWindow::showWindow(), and ui.
Referenced by MainWindow::showConfigDialog().
void ConfigDialog::saveChanges | ( | ) | [private, slot] |
Called when user clicks "Save Settings"
Saves changes made to settings.
Definition at line 142 of file configdialog.cpp.
References VMessageBox::Ok, ConfigPage::save(), ui, and VMessageBox::warning().
Referenced by ConfigDialog().
void ConfigDialog::help | ( | ) | [private, slot] |
Called when user clicks "Help"
Shows help information about the configuration dialog.
Definition at line 166 of file configdialog.cpp.
References Vidalia::help().
Referenced by ConfigDialog().
void ConfigDialog::loadSettings | ( | ) | [private] |
Loads the current configuration settings
Loads the saved ConfigDialog settings.
Definition at line 132 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 100 of file configdialog.cpp.
References FONT.
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 111 of file configdialog.cpp.
Referenced by ConfigDialog().
Ui::ConfigDialog ConfigDialog::ui [private] |
Qt Designer generated object
Definition at line 78 of file configdialog.h.
Referenced by addAction(), ConfigDialog(), loadSettings(), saveChanges(), and showWindow().