5 #if defined(HAVE_CONFIG_H) 10 #include <qt/forms/ui_createwalletdialog.h> 12 #include <QPushButton> 19 ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr(
"Create"));
20 ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(
false);
21 ui->wallet_name_line_edit->setFocus(Qt::ActiveWindowFocusReason);
23 connect(
ui->wallet_name_line_edit, &QLineEdit::textEdited, [
this](
const QString& text) {
24 ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!text.isEmpty());
27 connect(
ui->encrypt_wallet_checkbox, &QCheckBox::toggled, [
this](
bool checked) {
30 ui->disable_privkeys_checkbox->setEnabled(!checked);
33 if (!ui->disable_privkeys_checkbox->isEnabled()) {
34 ui->disable_privkeys_checkbox->setChecked(false);
38 connect(ui->disable_privkeys_checkbox, &QCheckBox::toggled, [
this](
bool checked) {
41 ui->encrypt_wallet_checkbox->setEnabled(!checked);
45 ui->blank_wallet_checkbox->setChecked(true);
49 if (!ui->encrypt_wallet_checkbox->isEnabled()) {
50 ui->encrypt_wallet_checkbox->setChecked(
false);
55 ui->descriptor_checkbox->setToolTip(tr(
"Compiled without sqlite support (required for descriptor wallets)"));
56 ui->descriptor_checkbox->setEnabled(
false);
57 ui->descriptor_checkbox->setChecked(
false);
60 ui->descriptor_checkbox->setEnabled(
false);
61 ui->descriptor_checkbox->setChecked(
true);
72 return ui->wallet_name_line_edit->text();
77 return ui->encrypt_wallet_checkbox->isChecked();
82 return ui->disable_privkeys_checkbox->isChecked();
87 return ui->blank_wallet_checkbox->isChecked();
92 return ui->descriptor_checkbox->isChecked();
bool isDescriptorWalletChecked() const
bool isEncryptWalletChecked() const
QString walletName() const
bool isDisablePrivateKeysChecked() const
CreateWalletDialog(QWidget *parent)
Ui::CreateWalletDialog * ui
bool isMakeBlankWalletChecked() const
Dialog for creating wallets.
virtual ~CreateWalletDialog()
if(it !=peer.m_getdata_requests.end() &&!pfrom.fPauseSend)