Changeset a4ed73e for src/gui/settingsdialog.cpp
- Timestamp:
- 07/13/11 21:42:48 (12 years ago)
- Branches:
- master, qt5
- Children:
- 268d58f
- Parents:
- 6817002
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/settingsdialog.cpp
r6817002 ra4ed73e 27 27 { 28 28 setupUi(this); 29 connect(directConnection, SIGNAL(clicked(bool)), SLOT(connectionTypeChanged(bool))); 30 } 29 31 32 33 void SettingsDialog::loadDialogData() 34 { 30 35 // deserialize dialog data 31 36 address->setText(AppSettings::proxyAddress()); 32 37 port->setValue(AppSettings::proxyPort()); 33 38 directConnection->setChecked(AppSettings::isDirectConnection()); 34 35 connect(buttonBox, SIGNAL(accepted()), SLOT(saveDialogData())); 36 connect(directConnection, SIGNAL(clicked(bool)), SLOT(connectionTypeChanged(bool))); 37 38 if(directConnection->isChecked()) 39 proxyWidget->hide(); 39 proxyWidget->setDisabled(directConnection->isChecked()); 40 40 } 41 41 42 void SettingsDialog::connectionTypeChanged(bool aState)43 {44 aState ? proxyWidget->hide() : proxyWidget->show();45 }46 42 47 43 void SettingsDialog::saveDialogData() … … 51 47 AppSettings::setProxyPort(port->value()); 52 48 AppSettings::setDirectConnection(directConnection->isChecked()); 53 54 close();55 49 } 56 50 51 52 void SettingsDialog::connectionTypeChanged(bool aState) 53 { 54 proxyWidget->setDisabled(aState); 55 } 56 57
Note: See TracChangeset
for help on using the changeset viewer.