Changeset View
Changeset View
Standalone View
Standalone View
src/qt/optionsdialog.cpp
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | #endif | ||||
ui->unit->setModel(new BitcoinUnits(this)); | ui->unit->setModel(new BitcoinUnits(this)); | ||||
/* Widget-to-option mapper */ | /* Widget-to-option mapper */ | ||||
mapper = new QDataWidgetMapper(this); | mapper = new QDataWidgetMapper(this); | ||||
mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit); | mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit); | ||||
mapper->setOrientation(Qt::Vertical); | mapper->setOrientation(Qt::Vertical); | ||||
GUIUtil::ItemDelegate *delegate = new GUIUtil::ItemDelegate(mapper); | |||||
connect(delegate, &GUIUtil::ItemDelegate::keyEscapePressed, this, | |||||
&OptionsDialog::reject); | |||||
mapper->setItemDelegate(delegate); | |||||
/* setup/change UI elements when proxy IPs are invalid/valid */ | /* setup/change UI elements when proxy IPs are invalid/valid */ | ||||
ui->proxyIp->setCheckValidator(new ProxyAddressValidator(parent)); | ui->proxyIp->setCheckValidator(new ProxyAddressValidator(parent)); | ||||
ui->proxyIpTor->setCheckValidator(new ProxyAddressValidator(parent)); | ui->proxyIpTor->setCheckValidator(new ProxyAddressValidator(parent)); | ||||
connect(ui->proxyIp, &QValidatedLineEdit::validationDidChange, this, | connect(ui->proxyIp, &QValidatedLineEdit::validationDidChange, this, | ||||
&OptionsDialog::updateProxyValidationState); | &OptionsDialog::updateProxyValidationState); | ||||
connect(ui->proxyIpTor, &QValidatedLineEdit::validationDidChange, this, | connect(ui->proxyIpTor, &QValidatedLineEdit::validationDidChange, this, | ||||
&OptionsDialog::updateProxyValidationState); | &OptionsDialog::updateProxyValidationState); | ||||
connect(ui->proxyPort, &QLineEdit::textChanged, this, | connect(ui->proxyPort, &QLineEdit::textChanged, this, | ||||
▲ Show 20 Lines • Show All 267 Lines • Show Last 20 Lines |