#include <config.h>
Public Slots | |
void | changePage (QListWidgetItem *current, QListWidgetItem *previous) |
Change the page to the requested page. | |
void | readConfig () |
Read the settings stored. | |
void | writeConfig () |
Write the settings to the config file. | |
Signals | |
void | viewMultiWinModeChanged (bool) |
Request to change the GUI to multi or single windows mode. | |
void | userPathChanged (QString) |
The preferred user path changed. | |
void | railsFileChanged (QString) |
is emitted if the rails file changed | |
void | serverAdressChanged (QString) |
is emitted if the server address changed | |
void | serverPortChanged (quint16) |
is emitted if the server port changed | |
void | clientPortChanged (quint16) |
is emitted if the client port changed | |
Public Member Functions | |
Config (QWidget *parent=0) | |
Simple constructor. | |
Protected Member Functions | |
void | showEvent (QShowEvent *event) |
Private Slots | |
void | accept () |
Accept the dialog and emit signals for the modified settings. | |
Private Member Functions | |
void | createIcons () |
Apply some icons to the dialog. | |
Private Attributes | |
QListWidget * | _contentsWidget |
The list with the links to all the subpages. | |
QStackedWidget * | _pagesWidget |
The subpages container. | |
QListWidgetItem * | _general |
The subpages. | |
QListWidgetItem * | _network |
QListWidgetItem * | _view |
QWidget * | _generalConfig |
QWidget * | _networkConfig |
QWidget * | _viewConfig |
QComboBox * | _uiModeCombo |
QComboBox * | _protocolCombo |
QLineEdit * | _userPathEdit |
QLineEdit * | _railsFileEdit |
QLineEdit * | _addressEdit |
QLineEdit * | _portEdit |
bool | _multiWinFlag |
QString | _userPath |
QString | _railsFile |
int | _protocol |
QString | _serverAddress |
int | _clientPort |
int | _serverPort |
Definition at line 18 of file config.h.
Config::Config | ( | QWidget * | parent = 0 |
) |
Simple constructor.
Definition at line 12 of file config.cpp.
References _addressEdit, _contentsWidget, _general, _generalConfig, _network, _networkConfig, _pagesWidget, _portEdit, _protocolCombo, _railsFileEdit, _uiModeCombo, _userPathEdit, _view, _viewConfig, accept(), changePage(), and createIcons().
void Config::changePage | ( | QListWidgetItem * | current, | |
QListWidgetItem * | previous | |||
) | [slot] |
Change the page to the requested page.
Definition at line 167 of file config.cpp.
References _contentsWidget, and _pagesWidget.
Referenced by Config().
void Config::readConfig | ( | ) | [slot] |
Read the settings stored.
Definition at line 176 of file config.cpp.
References _clientPort, _multiWinFlag, _protocol, _railsFile, _serverAddress, _serverPort, _userPath, clientPortChanged(), railsFileChanged(), serverAdressChanged(), serverPortChanged(), userPathChanged(), and viewMultiWinModeChanged().
Referenced by Win::readSettings().
void Config::writeConfig | ( | ) | [slot] |
Write the settings to the config file.
Definition at line 201 of file config.cpp.
References _clientPort, _multiWinFlag, _protocol, _railsFile, _serverAddress, _serverPort, and _userPath.
Referenced by Win::writeSettings().
void Config::accept | ( | ) | [private, slot] |
Accept the dialog and emit signals for the modified settings.
Definition at line 234 of file config.cpp.
References _addressEdit, _multiWinFlag, _portEdit, _railsFile, _railsFileEdit, _serverAddress, _serverPort, _uiModeCombo, _userPath, _userPathEdit, railsFileChanged(), serverAdressChanged(), serverPortChanged(), userPathChanged(), and viewMultiWinModeChanged().
Referenced by Config().
void Config::viewMultiWinModeChanged | ( | bool | ) | [signal] |
Request to change the GUI to multi or single windows mode.
Referenced by accept(), and readConfig().
void Config::userPathChanged | ( | QString | ) | [signal] |
void Config::railsFileChanged | ( | QString | ) | [signal] |
void Config::serverAdressChanged | ( | QString | ) | [signal] |
void Config::serverPortChanged | ( | quint16 | ) | [signal] |
void Config::clientPortChanged | ( | quint16 | ) | [signal] |
void Config::showEvent | ( | QShowEvent * | event | ) | [protected] |
Reimplemented to allow the config dialog to set the settings to the current value
Definition at line 217 of file config.cpp.
References _addressEdit, _contentsWidget, _multiWinFlag, _pagesWidget, _portEdit, _railsFile, _railsFileEdit, _serverAddress, _serverPort, _uiModeCombo, _userPath, and _userPathEdit.
void Config::createIcons | ( | ) | [private] |
QListWidget* Config::_contentsWidget [private] |
The list with the links to all the subpages.
Definition at line 75 of file config.h.
Referenced by changePage(), Config(), and showEvent().
QStackedWidget* Config::_pagesWidget [private] |
The subpages container.
Definition at line 78 of file config.h.
Referenced by changePage(), Config(), and showEvent().
QListWidgetItem* Config::_general [private] |
QListWidgetItem * Config::_network [private] |
QListWidgetItem * Config::_view [private] |
QWidget* Config::_generalConfig [private] |
QWidget * Config::_networkConfig [private] |
QWidget * Config::_viewConfig [private] |
QComboBox* Config::_uiModeCombo [private] |
QComboBox * Config::_protocolCombo [private] |
QLineEdit* Config::_userPathEdit [private] |
QLineEdit * Config::_railsFileEdit [private] |
QLineEdit * Config::_addressEdit [private] |
QLineEdit * Config::_portEdit [private] |
bool Config::_multiWinFlag [private] |
Definition at line 87 of file config.h.
Referenced by accept(), readConfig(), showEvent(), and writeConfig().
QString Config::_userPath [private] |
Definition at line 88 of file config.h.
Referenced by accept(), readConfig(), showEvent(), and writeConfig().
QString Config::_railsFile [private] |
Definition at line 88 of file config.h.
Referenced by accept(), readConfig(), showEvent(), and writeConfig().
int Config::_protocol [private] |
QString Config::_serverAddress [private] |
Definition at line 90 of file config.h.
Referenced by accept(), readConfig(), showEvent(), and writeConfig().
int Config::_clientPort [private] |
int Config::_serverPort [private] |
Definition at line 91 of file config.h.
Referenced by accept(), readConfig(), showEvent(), and writeConfig().