sweepprivkeydialog.h raw

   1  // Copyright (c) 2026-present The Limenka Knots developers
   2  // Distributed under the MIT software license, see the accompanying
   3  // file COPYING or http://www.opensource.org/licenses/mit-license.php.
   4  
   5  #ifndef LIMENKA_QT_SWEEPPRIVKEYDIALOG_H
   6  #define LIMENKA_QT_SWEEPPRIVKEYDIALOG_H
   7  
   8  #include <QDialog>
   9  
  10  #include <thread>
  11  
  12  class WalletModel;
  13  
  14  namespace Ui {
  15      class SweepPrivKeyDialog;
  16  }
  17  
  18  class SweepPrivKeyDialog : public QDialog
  19  {
  20      Q_OBJECT
  21  
  22  public:
  23      explicit SweepPrivKeyDialog(QWidget *parent = nullptr);
  24      ~SweepPrivKeyDialog();
  25  
  26      void setModel(WalletModel *model);
  27      void reject() override;
  28  
  29  private Q_SLOTS:
  30      void on_sweepButton_clicked();
  31      void on_clearButton_clicked();
  32      void handleResult(bool success, const QString& message);
  33  
  34  Q_SIGNALS:
  35      void sweepComplete(bool success, const QString& message);
  36  
  37  private:
  38      Ui::SweepPrivKeyDialog *ui;
  39      WalletModel *model{nullptr};
  40      std::thread m_sweep_thread;
  41  };
  42  
  43  #endif // LIMENKA_QT_SWEEPPRIVKEYDIALOG_H
  44