5 #if defined(HAVE_CONFIG_H) 15 #include <QPushButton> 22 ui->
buttonBox->button(QDialogButtonBox::Ok)->setText(tr(
"Create"));
23 ui->
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(
false);
27 ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!text.isEmpty());
33 ui->disable_privkeys_checkbox->setEnabled(!checked);
34 #ifdef ENABLE_EXTERNAL_SIGNER
35 ui->external_signer_checkbox->setEnabled(m_has_signers && !checked);
38 if (!ui->disable_privkeys_checkbox->isEnabled()) {
39 ui->disable_privkeys_checkbox->setChecked(false);
49 connect(ui->external_signer_checkbox, &QCheckBox::toggled, [
this](
bool checked) {
50 ui->encrypt_wallet_checkbox->setEnabled(!checked);
51 ui->blank_wallet_checkbox->setEnabled(!checked);
52 ui->disable_privkeys_checkbox->setEnabled(!checked);
57 ui->encrypt_wallet_checkbox->setChecked(false);
58 ui->disable_privkeys_checkbox->setChecked(checked);
59 ui->blank_wallet_checkbox->setChecked(false);
62 connect(ui->disable_privkeys_checkbox, &QCheckBox::toggled, [
this](
bool checked) {
65 ui->encrypt_wallet_checkbox->setEnabled(!checked);
68 ui->blank_wallet_checkbox->setEnabled(!checked);
70 ui->blank_wallet_checkbox->setChecked(false);
74 if (!ui->encrypt_wallet_checkbox->isEnabled()) {
75 ui->encrypt_wallet_checkbox->setChecked(
false);
79 connect(ui->blank_wallet_checkbox, &QCheckBox::toggled, [
this](
bool checked) {
82 ui->disable_privkeys_checkbox->setEnabled(!checked);
84 ui->disable_privkeys_checkbox->setChecked(false);
88 #ifndef ENABLE_EXTERNAL_SIGNER 90 ui->external_signer_checkbox->setToolTip(tr(
"Compiled without external signing support (required for external signing)"));
91 ui->external_signer_checkbox->setEnabled(
false);
92 ui->external_signer_checkbox->setChecked(
false);
115 const std::string label = signers[0]->getName();
117 ui->
buttonBox->button(QDialogButtonBox::Ok)->setEnabled(
true);
bool isExternalSignerChecked() const
Utility functions used by the Bitcoin Qt UI.
bool isEncryptWalletChecked() const
QString walletName() const
bool isDisablePrivateKeysChecked() const
CreateWalletDialog(QWidget *parent)
Ui::CreateWalletDialog * ui
QCheckBox * blank_wallet_checkbox
QLineEdit * wallet_name_line_edit
constexpr auto dialog_flags
bool isMakeBlankWalletChecked() const
QCheckBox * encrypt_wallet_checkbox
void setSigners(const std::vector< std::unique_ptr< interfaces::ExternalSigner >> &signers)
QCheckBox * disable_privkeys_checkbox
Dialog for creating wallets.
virtual ~CreateWalletDialog()
QDialogButtonBox * buttonBox
void setupUi(QDialog *CreateWalletDialog)
QCheckBox * external_signer_checkbox