Bitcoin Core  25.99.0
P2P Digital Currency
psbtoperationsdialog.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2020 The Bitcoin Core 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 BITCOIN_QT_PSBTOPERATIONSDIALOG_H
6 #define BITCOIN_QT_PSBTOPERATIONSDIALOG_H
7 
8 #include <QDialog>
9 
10 #include <psbt.h>
11 #include <qt/clientmodel.h>
12 #include <qt/walletmodel.h>
13 
14 namespace Ui {
16 }
17 
19 class PSBTOperationsDialog : public QDialog
20 {
21  Q_OBJECT
22 
23 public:
24  explicit PSBTOperationsDialog(QWidget* parent, WalletModel* walletModel, ClientModel* clientModel);
26 
28 
29 public Q_SLOTS:
30  void signTransaction();
31  void broadcastTransaction();
32  void copyToClipboard();
33  void saveTransaction();
34 
35 private:
36  Ui::PSBTOperationsDialog* m_ui;
40 
41  enum class StatusLevel {
42  INFO,
43  WARN,
44  ERR
45  };
46 
47  size_t couldSignInputs(const PartiallySignedTransaction &psbtx);
49  std::string renderTransaction(const PartiallySignedTransaction &psbtx);
50  void showStatus(const QString &msg, StatusLevel level);
52 };
53 
54 #endif // BITCOIN_QT_PSBTOPERATIONSDIALOG_H
Model for Bitcoin network client.
Definition: clientmodel.h:54
Dialog showing transaction details.
PartiallySignedTransaction m_transaction_data
PSBTOperationsDialog(QWidget *parent, WalletModel *walletModel, ClientModel *clientModel)
Ui::PSBTOperationsDialog * m_ui
void openWithPSBT(PartiallySignedTransaction psbtx)
size_t couldSignInputs(const PartiallySignedTransaction &psbtx)
void showTransactionStatus(const PartiallySignedTransaction &psbtx)
void showStatus(const QString &msg, StatusLevel level)
std::string renderTransaction(const PartiallySignedTransaction &psbtx)
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:52
A version of CTransaction with the PSBT format.
Definition: psbt.h:947