You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wowlet/src/dialog/restoredialog.cpp

37 lines
1.1 KiB

// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2020-2021, The Monero Project.
#include "restoredialog.h"
#include "ui_restoredialog.h"
RestoreDialog::RestoreDialog(AppContext *ctx, QWidget *parent)
: QDialog(parent)
, ui(new Ui::RestoreDialog)
, m_ctx(ctx)
{
ui->setupUi(this);
this->setWindowIcon(QIcon("://assets/images/appicons/64x64.png"));
connect(ui->buttonBox, &QDialogButtonBox::accepted, this, &RestoreDialog::accepted);
connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &RestoreDialog::rejected);
if(m_ctx->networkType == NetworkType::Type::TESTNET) {
ui->restoreHeightWidget->hideSlider();
} else {
// load restoreHeight lookup db
ui->restoreHeightWidget->initRestoreHeights(m_ctx->restoreHeights[m_ctx->networkType]);
}
}
int RestoreDialog::getHeight() {
return ui->restoreHeightWidget->getHeight();
}
void RestoreDialog::initRestoreHeights(RestoreHeightLookup *lookup) {
ui->restoreHeightWidget->initRestoreHeights(lookup);
}
RestoreDialog::~RestoreDialog() {
delete ui;
}