From 5f4dc89085ba099926255dc8e8d82cd6d66d78f4 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Fri, 22 Oct 2021 19:19:56 +0200 Subject: [PATCH] Use WindowModality for dialogs --- src/components.cpp | 6 ++++++ src/components.h | 7 +++++++ src/dialog/AboutDialog.cpp | 2 +- src/dialog/AboutDialog.h | 4 +++- src/dialog/AccountSwitcherDialog.cpp | 4 +++- src/dialog/AccountSwitcherDialog.h | 3 ++- src/dialog/BalanceDialog.cpp | 2 +- src/dialog/BalanceDialog.h | 3 ++- src/dialog/CalcConfigDialog.cpp | 2 +- src/dialog/CalcConfigDialog.h | 4 +++- src/dialog/ContactsDialog.cpp | 2 +- src/dialog/ContactsDialog.h | 4 +++- src/dialog/DebugInfoDialog.cpp | 2 +- src/dialog/DebugInfoDialog.h | 3 ++- src/dialog/InfoDialog.cpp | 2 +- src/dialog/InfoDialog.h | 4 +++- src/dialog/KeysDialog.cpp | 2 +- src/dialog/KeysDialog.h | 3 ++- src/dialog/LocalMoneroInfoDialog.cpp | 2 +- src/dialog/LocalMoneroInfoDialog.h | 3 ++- src/dialog/OutputInfoDialog.cpp | 2 +- src/dialog/OutputInfoDialog.h | 3 ++- src/dialog/OutputSweepDialog.cpp | 2 +- src/dialog/OutputSweepDialog.h | 3 ++- src/dialog/PasswordChangeDialog.cpp | 2 +- src/dialog/PasswordChangeDialog.h | 3 ++- src/dialog/PasswordDialog.cpp | 2 +- src/dialog/PasswordDialog.h | 4 +++- src/dialog/PaymentRequestDialog.cpp | 2 +- src/dialog/PaymentRequestDialog.h | 3 ++- src/dialog/QrCodeDialog.cpp | 2 +- src/dialog/QrCodeDialog.h | 3 ++- src/dialog/RestoreHeightDialog.cpp | 2 +- src/dialog/RestoreHeightDialog.h | 3 ++- src/dialog/SeedDialog.cpp | 2 +- src/dialog/SeedDialog.h | 3 ++- src/dialog/SignVerifyDialog.cpp | 2 +- src/dialog/SignVerifyDialog.h | 3 ++- src/dialog/SplashDialog.cpp | 2 +- src/dialog/SplashDialog.h | 4 +++- src/dialog/TxBroadcastDialog.cpp | 2 +- src/dialog/TxBroadcastDialog.h | 3 ++- src/dialog/TxConfAdvDialog.cpp | 2 +- src/dialog/TxConfAdvDialog.h | 3 ++- src/dialog/TxConfDialog.cpp | 2 +- src/dialog/TxConfDialog.h | 3 ++- src/dialog/TxImportDialog.cpp | 2 +- src/dialog/TxImportDialog.h | 3 ++- src/dialog/TxProofDialog.cpp | 2 +- src/dialog/TxProofDialog.h | 3 ++- src/dialog/VerifyProofDialog.cpp | 2 +- src/dialog/VerifyProofDialog.h | 3 ++- src/dialog/ViewOnlyDialog.cpp | 2 +- src/dialog/ViewOnlyDialog.h | 3 ++- src/dialog/WalletCacheDebugDialog.cpp | 2 +- src/dialog/WalletCacheDebugDialog.h | 3 ++- src/dialog/WalletInfoDialog.cpp | 2 +- src/dialog/WalletInfoDialog.h | 3 ++- 58 files changed, 105 insertions(+), 56 deletions(-) diff --git a/src/components.cpp b/src/components.cpp index 4e02c65..810c49f 100644 --- a/src/components.cpp +++ b/src/components.cpp @@ -113,4 +113,10 @@ ClickableLabel::~ClickableLabel() = default; void ClickableLabel::mousePressEvent(QMouseEvent* event) { emit clicked(); +} + +WindowModalDialog::WindowModalDialog(QWidget *parent) + : QDialog(parent) +{ + this->setWindowModality(Qt::WindowModal); } \ No newline at end of file diff --git a/src/components.h b/src/components.h index eeb3804..6f26014 100644 --- a/src/components.h +++ b/src/components.h @@ -121,4 +121,11 @@ protected: }; +class WindowModalDialog : public QDialog { + Q_OBJECT + +public: + explicit WindowModalDialog(QWidget *parent); +}; + #endif //FEATHER_COMPONENTS_H diff --git a/src/dialog/AboutDialog.cpp b/src/dialog/AboutDialog.cpp index 5e8d701..82130e2 100644 --- a/src/dialog/AboutDialog.cpp +++ b/src/dialog/AboutDialog.cpp @@ -8,7 +8,7 @@ #include "utils/Utils.h" AboutDialog::AboutDialog(QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::AboutDialog) { ui->setupUi(this); diff --git a/src/dialog/AboutDialog.h b/src/dialog/AboutDialog.h index 2f2e404..4dcc8a2 100644 --- a/src/dialog/AboutDialog.h +++ b/src/dialog/AboutDialog.h @@ -7,11 +7,13 @@ #include #include +#include "components.h" + namespace Ui { class AboutDialog; } -class AboutDialog : public QDialog +class AboutDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/AccountSwitcherDialog.cpp b/src/dialog/AccountSwitcherDialog.cpp index ee1e10e..9a00613 100644 --- a/src/dialog/AccountSwitcherDialog.cpp +++ b/src/dialog/AccountSwitcherDialog.cpp @@ -11,7 +11,7 @@ #include "utils/Icons.h" AccountSwitcherDialog::AccountSwitcherDialog(QSharedPointer ctx, QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::AccountSwitcherDialog) , m_ctx(std::move(ctx)) , m_model(m_ctx->wallet->subaddressAccountModel()) @@ -25,6 +25,8 @@ AccountSwitcherDialog::AccountSwitcherDialog(QSharedPointer ctx, QWi ui->label_totalBalance->setFont(ModelUtils::getMonospaceFont()); ui->label_totalBalance->setText(WalletManager::displayAmount(m_ctx->wallet->balanceAll())); + this->setWindowModality(Qt::WindowModal); + ui->accounts->setModel(m_proxyModel); ui->accounts->setContextMenuPolicy(Qt::CustomContextMenu); ui->accounts->setSelectionMode(QAbstractItemView::SingleSelection); diff --git a/src/dialog/AccountSwitcherDialog.h b/src/dialog/AccountSwitcherDialog.h index 08c15be..e31f419 100644 --- a/src/dialog/AccountSwitcherDialog.h +++ b/src/dialog/AccountSwitcherDialog.h @@ -7,13 +7,14 @@ #include #include "appcontext.h" +#include "components.h" #include "model/SubaddressAccountModel.h" namespace Ui { class AccountSwitcherDialog; } -class AccountSwitcherDialog : public QDialog +class AccountSwitcherDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/BalanceDialog.cpp b/src/dialog/BalanceDialog.cpp index 7c49000..2fab567 100644 --- a/src/dialog/BalanceDialog.cpp +++ b/src/dialog/BalanceDialog.cpp @@ -8,7 +8,7 @@ #include "model/ModelUtils.h" BalanceDialog::BalanceDialog(QWidget *parent, Wallet *wallet) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::BalanceDialog) { ui->setupUi(this); diff --git a/src/dialog/BalanceDialog.h b/src/dialog/BalanceDialog.h index 1880ae9..8c32c2e 100644 --- a/src/dialog/BalanceDialog.h +++ b/src/dialog/BalanceDialog.h @@ -6,13 +6,14 @@ #include +#include "components.h" #include "libwalletqt/Wallet.h" namespace Ui { class BalanceDialog; } -class BalanceDialog : public QDialog +class BalanceDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/CalcConfigDialog.cpp b/src/dialog/CalcConfigDialog.cpp index caafb94..7bf7a07 100644 --- a/src/dialog/CalcConfigDialog.cpp +++ b/src/dialog/CalcConfigDialog.cpp @@ -8,7 +8,7 @@ #include "utils/config.h" CalcConfigDialog::CalcConfigDialog(QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::CalcConfigDialog) { ui->setupUi(this); diff --git a/src/dialog/CalcConfigDialog.h b/src/dialog/CalcConfigDialog.h index 37f7a2d..5209bd1 100644 --- a/src/dialog/CalcConfigDialog.h +++ b/src/dialog/CalcConfigDialog.h @@ -7,11 +7,13 @@ #include #include +#include "components.h" + namespace Ui { class CalcConfigDialog; } -class CalcConfigDialog : public QDialog +class CalcConfigDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/ContactsDialog.cpp b/src/dialog/ContactsDialog.cpp index 439208d..381f66c 100644 --- a/src/dialog/ContactsDialog.cpp +++ b/src/dialog/ContactsDialog.cpp @@ -5,7 +5,7 @@ #include "ContactsDialog.h" ContactsDialog::ContactsDialog(QWidget *parent, const QString &address, const QString &name) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::ContactsDialog) { ui->setupUi(this); diff --git a/src/dialog/ContactsDialog.h b/src/dialog/ContactsDialog.h index 03b81c4..f0a74bc 100644 --- a/src/dialog/ContactsDialog.h +++ b/src/dialog/ContactsDialog.h @@ -6,11 +6,13 @@ #include +#include "components.h" + namespace Ui { class ContactsDialog; } -class ContactsDialog : public QDialog +class ContactsDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/DebugInfoDialog.cpp b/src/dialog/DebugInfoDialog.cpp index 07fcc8b..c77f296 100644 --- a/src/dialog/DebugInfoDialog.cpp +++ b/src/dialog/DebugInfoDialog.cpp @@ -11,7 +11,7 @@ #include "utils/WebsocketNotifier.h" DebugInfoDialog::DebugInfoDialog(QSharedPointer ctx, QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::DebugInfoDialog) , m_ctx(std::move(ctx)) { diff --git a/src/dialog/DebugInfoDialog.h b/src/dialog/DebugInfoDialog.h index d2fbc83..d94493e 100644 --- a/src/dialog/DebugInfoDialog.h +++ b/src/dialog/DebugInfoDialog.h @@ -7,13 +7,14 @@ #include #include "appcontext.h" +#include "components.h" #include "libwalletqt/Wallet.h" namespace Ui { class DebugInfoDialog; } -class DebugInfoDialog : public QDialog +class DebugInfoDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/InfoDialog.cpp b/src/dialog/InfoDialog.cpp index 976d96c..2de636d 100644 --- a/src/dialog/InfoDialog.cpp +++ b/src/dialog/InfoDialog.cpp @@ -5,7 +5,7 @@ #include "ui_InfoDialog.h" InfoDialog::InfoDialog(QWidget *parent, const QString &title, const QString &infoData) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::InfoDialog) { ui->setupUi(this); diff --git a/src/dialog/InfoDialog.h b/src/dialog/InfoDialog.h index fa18b5b..a334828 100644 --- a/src/dialog/InfoDialog.h +++ b/src/dialog/InfoDialog.h @@ -6,11 +6,13 @@ #include +#include "components.h" + namespace Ui { class InfoDialog; } -class InfoDialog : public QDialog +class InfoDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/KeysDialog.cpp b/src/dialog/KeysDialog.cpp index 7fe362d..12af0e3 100644 --- a/src/dialog/KeysDialog.cpp +++ b/src/dialog/KeysDialog.cpp @@ -5,7 +5,7 @@ #include "ui_KeysDialog.h" KeysDialog::KeysDialog(QSharedPointer ctx, QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::KeysDialog) { ui->setupUi(this); diff --git a/src/dialog/KeysDialog.h b/src/dialog/KeysDialog.h index 5684075..bb08c49 100644 --- a/src/dialog/KeysDialog.h +++ b/src/dialog/KeysDialog.h @@ -7,12 +7,13 @@ #include #include "appcontext.h" +#include "components.h" namespace Ui { class KeysDialog; } -class KeysDialog : public QDialog +class KeysDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/LocalMoneroInfoDialog.cpp b/src/dialog/LocalMoneroInfoDialog.cpp index d3df1a7..f6f1b36 100644 --- a/src/dialog/LocalMoneroInfoDialog.cpp +++ b/src/dialog/LocalMoneroInfoDialog.cpp @@ -8,7 +8,7 @@ #include "utils/Utils.h" LocalMoneroInfoDialog::LocalMoneroInfoDialog(QWidget *parent, LocalMoneroModel *model, int row) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::LocalMoneroInfoDialog) , m_model(model) , m_row(row) diff --git a/src/dialog/LocalMoneroInfoDialog.h b/src/dialog/LocalMoneroInfoDialog.h index e5f6cd1..273bafc 100644 --- a/src/dialog/LocalMoneroInfoDialog.h +++ b/src/dialog/LocalMoneroInfoDialog.h @@ -7,13 +7,14 @@ #include #include +#include "components.h" #include "model/LocalMoneroModel.h" namespace Ui { class LocalMoneroInfoDialog; } -class LocalMoneroInfoDialog : public QDialog +class LocalMoneroInfoDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/OutputInfoDialog.cpp b/src/dialog/OutputInfoDialog.cpp index 772d1fb..4ab953b 100644 --- a/src/dialog/OutputInfoDialog.cpp +++ b/src/dialog/OutputInfoDialog.cpp @@ -8,7 +8,7 @@ #include "utils/Utils.h" OutputInfoDialog::OutputInfoDialog(CoinsInfo *cInfo, QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::OutputInfoDialog) { ui->setupUi(this); diff --git a/src/dialog/OutputInfoDialog.h b/src/dialog/OutputInfoDialog.h index 18dd39c..c0eb49a 100644 --- a/src/dialog/OutputInfoDialog.h +++ b/src/dialog/OutputInfoDialog.h @@ -6,6 +6,7 @@ #include +#include "components.h" #include "libwalletqt/Coins.h" #include "libwalletqt/CoinsInfo.h" @@ -13,7 +14,7 @@ namespace Ui { class OutputInfoDialog; } -class OutputInfoDialog : public QDialog +class OutputInfoDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/OutputSweepDialog.cpp b/src/dialog/OutputSweepDialog.cpp index 7c7d2fb..3883676 100644 --- a/src/dialog/OutputSweepDialog.cpp +++ b/src/dialog/OutputSweepDialog.cpp @@ -7,7 +7,7 @@ #include "libwalletqt/WalletManager.h" OutputSweepDialog::OutputSweepDialog(QWidget *parent, quint64 amount) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::OutputSweepDialog) , m_amount(amount) { diff --git a/src/dialog/OutputSweepDialog.h b/src/dialog/OutputSweepDialog.h index 4b565fb..8c5e6b5 100644 --- a/src/dialog/OutputSweepDialog.h +++ b/src/dialog/OutputSweepDialog.h @@ -6,13 +6,14 @@ #include +#include "components.h" #include "libwalletqt/CoinsInfo.h" namespace Ui { class OutputSweepDialog; } -class OutputSweepDialog : public QDialog +class OutputSweepDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/PasswordChangeDialog.cpp b/src/dialog/PasswordChangeDialog.cpp index 14c5e9d..d7e1386 100644 --- a/src/dialog/PasswordChangeDialog.cpp +++ b/src/dialog/PasswordChangeDialog.cpp @@ -7,7 +7,7 @@ #include PasswordChangeDialog::PasswordChangeDialog(QWidget *parent, Wallet *wallet) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::PasswordChangeDialog) , m_wallet(wallet) { diff --git a/src/dialog/PasswordChangeDialog.h b/src/dialog/PasswordChangeDialog.h index 7fc91e0..d39ec6b 100644 --- a/src/dialog/PasswordChangeDialog.h +++ b/src/dialog/PasswordChangeDialog.h @@ -6,13 +6,14 @@ #include +#include "components.h" #include "libwalletqt/Wallet.h" namespace Ui { class PasswordChangeDialog; } -class PasswordChangeDialog : public QDialog +class PasswordChangeDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/PasswordDialog.cpp b/src/dialog/PasswordDialog.cpp index d4e0e4a..5a49b59 100644 --- a/src/dialog/PasswordDialog.cpp +++ b/src/dialog/PasswordDialog.cpp @@ -7,7 +7,7 @@ #include "utils/Icons.h" PasswordDialog::PasswordDialog(const QString &walletName, bool incorrectPassword, QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::PasswordDialog) { ui->setupUi(this); diff --git a/src/dialog/PasswordDialog.h b/src/dialog/PasswordDialog.h index 544331f..7afc5b0 100644 --- a/src/dialog/PasswordDialog.h +++ b/src/dialog/PasswordDialog.h @@ -6,11 +6,13 @@ #include +#include "components.h" + namespace Ui { class PasswordDialog; } -class PasswordDialog : public QDialog +class PasswordDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/PaymentRequestDialog.cpp b/src/dialog/PaymentRequestDialog.cpp index 4cf38ee..dfac97b 100644 --- a/src/dialog/PaymentRequestDialog.cpp +++ b/src/dialog/PaymentRequestDialog.cpp @@ -12,7 +12,7 @@ #include "WalletManager.h" PaymentRequestDialog::PaymentRequestDialog(QWidget *parent, QSharedPointer ctx, QString address) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::PaymentRequestDialog) , m_ctx(std::move(ctx)) , m_address(std::move(address)) diff --git a/src/dialog/PaymentRequestDialog.h b/src/dialog/PaymentRequestDialog.h index c109d0a..ca8274c 100644 --- a/src/dialog/PaymentRequestDialog.h +++ b/src/dialog/PaymentRequestDialog.h @@ -7,13 +7,14 @@ #include #include "appcontext.h" +#include "components.h" #include "qrcode/QrCode.h" namespace Ui { class PaymentRequestDialog; } -class PaymentRequestDialog : public QDialog +class PaymentRequestDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/QrCodeDialog.cpp b/src/dialog/QrCodeDialog.cpp index 4b1c7cf..41ca49c 100644 --- a/src/dialog/QrCodeDialog.cpp +++ b/src/dialog/QrCodeDialog.cpp @@ -9,7 +9,7 @@ #include QrCodeDialog::QrCodeDialog(QWidget *parent, QrCode *qrCode, const QString &title) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::QrCodeDialog) { ui->setupUi(this); diff --git a/src/dialog/QrCodeDialog.h b/src/dialog/QrCodeDialog.h index 706b120..78d7dc3 100644 --- a/src/dialog/QrCodeDialog.h +++ b/src/dialog/QrCodeDialog.h @@ -6,6 +6,7 @@ #include +#include "components.h" #include "qrcode/QrCode.h" #include "widgets/QrCodeWidget.h" @@ -13,7 +14,7 @@ namespace Ui { class QrCodeDialog; } -class QrCodeDialog : public QDialog +class QrCodeDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/RestoreHeightDialog.cpp b/src/dialog/RestoreHeightDialog.cpp index ca7cfda..5a4045c 100644 --- a/src/dialog/RestoreHeightDialog.cpp +++ b/src/dialog/RestoreHeightDialog.cpp @@ -8,7 +8,7 @@ #include RestoreHeightDialog::RestoreHeightDialog(QWidget *parent, quint64 currentRestoreHeight) - : QDialog(parent) + : WindowModalDialog(parent) , m_restoreHeightWidget(new RestoreHeightWidget(this)) { auto *layout = new QVBoxLayout(this); diff --git a/src/dialog/RestoreHeightDialog.h b/src/dialog/RestoreHeightDialog.h index 88cad2c..711882b 100644 --- a/src/dialog/RestoreHeightDialog.h +++ b/src/dialog/RestoreHeightDialog.h @@ -6,9 +6,10 @@ #include +#include "components.h" #include "widgets/RestoreHeightWidget.h" -class RestoreHeightDialog : public QDialog +class RestoreHeightDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/SeedDialog.cpp b/src/dialog/SeedDialog.cpp index 9153b2a..cc09e05 100644 --- a/src/dialog/SeedDialog.cpp +++ b/src/dialog/SeedDialog.cpp @@ -7,7 +7,7 @@ #include "constants.h" SeedDialog::SeedDialog(QSharedPointer ctx, QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::SeedDialog) , m_ctx(std::move(ctx)) { diff --git a/src/dialog/SeedDialog.h b/src/dialog/SeedDialog.h index a0398bd..7cc656f 100644 --- a/src/dialog/SeedDialog.h +++ b/src/dialog/SeedDialog.h @@ -7,12 +7,13 @@ #include #include "appcontext.h" +#include "components.h" namespace Ui { class SeedDialog; } -class SeedDialog : public QDialog +class SeedDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/SignVerifyDialog.cpp b/src/dialog/SignVerifyDialog.cpp index 490aa56..f65df4c 100644 --- a/src/dialog/SignVerifyDialog.cpp +++ b/src/dialog/SignVerifyDialog.cpp @@ -9,7 +9,7 @@ #include "utils/Utils.h" SignVerifyDialog::SignVerifyDialog(Wallet *wallet, QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::SignVerifyDialog) , m_wallet(wallet) { diff --git a/src/dialog/SignVerifyDialog.h b/src/dialog/SignVerifyDialog.h index d7819f6..18ad34a 100644 --- a/src/dialog/SignVerifyDialog.h +++ b/src/dialog/SignVerifyDialog.h @@ -6,13 +6,14 @@ #include +#include "components.h" #include "libwalletqt/Wallet.h" namespace Ui { class SignVerifyDialog; } -class SignVerifyDialog : public QDialog +class SignVerifyDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/SplashDialog.cpp b/src/dialog/SplashDialog.cpp index ba0bc5c..7f2e9d2 100644 --- a/src/dialog/SplashDialog.cpp +++ b/src/dialog/SplashDialog.cpp @@ -7,7 +7,7 @@ #include "utils/Icons.h" SplashDialog::SplashDialog(QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::SplashDialog) { ui->setupUi(this); diff --git a/src/dialog/SplashDialog.h b/src/dialog/SplashDialog.h index 7341b7d..8f772a8 100644 --- a/src/dialog/SplashDialog.h +++ b/src/dialog/SplashDialog.h @@ -6,11 +6,13 @@ #include +#include "components.h" + namespace Ui { class SplashDialog; } -class SplashDialog : public QDialog +class SplashDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/TxBroadcastDialog.cpp b/src/dialog/TxBroadcastDialog.cpp index 58223db..1258522 100644 --- a/src/dialog/TxBroadcastDialog.cpp +++ b/src/dialog/TxBroadcastDialog.cpp @@ -9,7 +9,7 @@ #include "utils/NetworkManager.h" TxBroadcastDialog::TxBroadcastDialog(QWidget *parent, QSharedPointer ctx, const QString &transactionHex) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::TxBroadcastDialog) , m_ctx(std::move(ctx)) { diff --git a/src/dialog/TxBroadcastDialog.h b/src/dialog/TxBroadcastDialog.h index 944d463..98f4e19 100644 --- a/src/dialog/TxBroadcastDialog.h +++ b/src/dialog/TxBroadcastDialog.h @@ -7,13 +7,14 @@ #include #include "appcontext.h" +#include "components.h" #include "utils/daemonrpc.h" namespace Ui { class TxBroadcastDialog; } -class TxBroadcastDialog : public QDialog +class TxBroadcastDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/TxConfAdvDialog.cpp b/src/dialog/TxConfAdvDialog.cpp index 3ddb412..db3b230 100644 --- a/src/dialog/TxConfAdvDialog.cpp +++ b/src/dialog/TxConfAdvDialog.cpp @@ -14,7 +14,7 @@ #include "qrcode/QrCode.h" TxConfAdvDialog::TxConfAdvDialog(QSharedPointer ctx, const QString &description, QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::TxConfAdvDialog) , m_ctx(std::move(ctx)) , m_exportUnsignedMenu(new QMenu(this)) diff --git a/src/dialog/TxConfAdvDialog.h b/src/dialog/TxConfAdvDialog.h index c4df716..a0e5069 100644 --- a/src/dialog/TxConfAdvDialog.h +++ b/src/dialog/TxConfAdvDialog.h @@ -10,13 +10,14 @@ #include #include "appcontext.h" +#include "components.h" #include "libwalletqt/PendingTransaction.h" namespace Ui { class TxConfAdvDialog; } -class TxConfAdvDialog : public QDialog +class TxConfAdvDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/TxConfDialog.cpp b/src/dialog/TxConfDialog.cpp index 5cb2776..9db8509 100644 --- a/src/dialog/TxConfDialog.cpp +++ b/src/dialog/TxConfDialog.cpp @@ -13,7 +13,7 @@ #include "utils/ColorScheme.h" TxConfDialog::TxConfDialog(QSharedPointer ctx, PendingTransaction *tx, const QString &address, const QString &description, QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::TxConfDialog) , m_ctx(std::move(ctx)) , m_tx(tx) diff --git a/src/dialog/TxConfDialog.h b/src/dialog/TxConfDialog.h index 4d2ab87..0fd5cf4 100644 --- a/src/dialog/TxConfDialog.h +++ b/src/dialog/TxConfDialog.h @@ -7,6 +7,7 @@ #include #include "appcontext.h" +#include "components.h" #include "libwalletqt/PendingTransaction.h" #include "libwalletqt/WalletManager.h" @@ -14,7 +15,7 @@ namespace Ui { class TxConfDialog; } -class TxConfDialog : public QDialog +class TxConfDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/TxImportDialog.cpp b/src/dialog/TxImportDialog.cpp index 2a00bcc..56645ad 100644 --- a/src/dialog/TxImportDialog.cpp +++ b/src/dialog/TxImportDialog.cpp @@ -9,7 +9,7 @@ #include "utils/NetworkManager.h" TxImportDialog::TxImportDialog(QWidget *parent, QSharedPointer ctx) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::TxImportDialog) , m_ctx(std::move(ctx)) , m_loadTimer(new QTimer(this)) diff --git a/src/dialog/TxImportDialog.h b/src/dialog/TxImportDialog.h index 4919252..4e5f5a8 100644 --- a/src/dialog/TxImportDialog.h +++ b/src/dialog/TxImportDialog.h @@ -7,13 +7,14 @@ #include #include "appcontext.h" +#include "components.h" #include "utils/daemonrpc.h" namespace Ui { class TxImportDialog; } -class TxImportDialog : public QDialog +class TxImportDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/TxProofDialog.cpp b/src/dialog/TxProofDialog.cpp index 9299c4d..e3ac452 100644 --- a/src/dialog/TxProofDialog.cpp +++ b/src/dialog/TxProofDialog.cpp @@ -11,7 +11,7 @@ #include "utils/Utils.h" TxProofDialog::TxProofDialog(QWidget *parent, QSharedPointer ctx, TransactionInfo *txInfo) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::TxProofDialog) , m_ctx(std::move(ctx)) { diff --git a/src/dialog/TxProofDialog.h b/src/dialog/TxProofDialog.h index ba47a57..7c1a84f 100644 --- a/src/dialog/TxProofDialog.h +++ b/src/dialog/TxProofDialog.h @@ -7,13 +7,14 @@ #include #include "appcontext.h" +#include "components.h" #include "libwalletqt/TransactionInfo.h" namespace Ui { class TxProofDialog; } -class TxProofDialog : public QDialog +class TxProofDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/VerifyProofDialog.cpp b/src/dialog/VerifyProofDialog.cpp index d696f8f..f27aa02 100644 --- a/src/dialog/VerifyProofDialog.cpp +++ b/src/dialog/VerifyProofDialog.cpp @@ -11,7 +11,7 @@ #include "utils/Utils.h" VerifyProofDialog::VerifyProofDialog(Wallet *wallet, QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::VerifyProofDialog) , m_wallet(wallet) { diff --git a/src/dialog/VerifyProofDialog.h b/src/dialog/VerifyProofDialog.h index 8c538eb..4d9f3ab 100644 --- a/src/dialog/VerifyProofDialog.h +++ b/src/dialog/VerifyProofDialog.h @@ -7,13 +7,14 @@ #include #include +#include "components.h" #include "libwalletqt/Wallet.h" namespace Ui { class VerifyProofDialog; } -class VerifyProofDialog : public QDialog +class VerifyProofDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/ViewOnlyDialog.cpp b/src/dialog/ViewOnlyDialog.cpp index a031a1a..d1251cc 100644 --- a/src/dialog/ViewOnlyDialog.cpp +++ b/src/dialog/ViewOnlyDialog.cpp @@ -9,7 +9,7 @@ #include ViewOnlyDialog::ViewOnlyDialog(QSharedPointer ctx, QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::ViewOnlyDialog) , m_ctx(std::move(ctx)) { diff --git a/src/dialog/ViewOnlyDialog.h b/src/dialog/ViewOnlyDialog.h index 3cb9942..8f137a8 100644 --- a/src/dialog/ViewOnlyDialog.h +++ b/src/dialog/ViewOnlyDialog.h @@ -7,12 +7,13 @@ #include #include "appcontext.h" +#include "components.h" namespace Ui { class ViewOnlyDialog; } -class ViewOnlyDialog : public QDialog +class ViewOnlyDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/WalletCacheDebugDialog.cpp b/src/dialog/WalletCacheDebugDialog.cpp index f2547ee..2805c1c 100644 --- a/src/dialog/WalletCacheDebugDialog.cpp +++ b/src/dialog/WalletCacheDebugDialog.cpp @@ -9,7 +9,7 @@ #include "model/ModelUtils.h" WalletCacheDebugDialog::WalletCacheDebugDialog(QSharedPointer ctx, QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::WalletCacheDebugDialog) , m_ctx(std::move(ctx)) { diff --git a/src/dialog/WalletCacheDebugDialog.h b/src/dialog/WalletCacheDebugDialog.h index 0b8f076..5778814 100644 --- a/src/dialog/WalletCacheDebugDialog.h +++ b/src/dialog/WalletCacheDebugDialog.h @@ -7,12 +7,13 @@ #include #include "appcontext.h" +#include "components.h" namespace Ui { class WalletCacheDebugDialog; } -class WalletCacheDebugDialog : public QDialog +class WalletCacheDebugDialog : public WindowModalDialog { Q_OBJECT diff --git a/src/dialog/WalletInfoDialog.cpp b/src/dialog/WalletInfoDialog.cpp index fac1766..bcf8f77 100644 --- a/src/dialog/WalletInfoDialog.cpp +++ b/src/dialog/WalletInfoDialog.cpp @@ -7,7 +7,7 @@ #include WalletInfoDialog::WalletInfoDialog(QSharedPointer ctx, QWidget *parent) - : QDialog(parent) + : WindowModalDialog(parent) , ui(new Ui::WalletInfoDialog) , m_ctx(std::move(ctx)) { diff --git a/src/dialog/WalletInfoDialog.h b/src/dialog/WalletInfoDialog.h index 9ab4c25..1c77e74 100644 --- a/src/dialog/WalletInfoDialog.h +++ b/src/dialog/WalletInfoDialog.h @@ -7,12 +7,13 @@ #include #include "appcontext.h" +#include "components.h" namespace Ui { class WalletInfoDialog; } -class WalletInfoDialog : public QDialog +class WalletInfoDialog : public WindowModalDialog { Q_OBJECT