Bitcoin Core  0.20.99
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 
27  void openWithPSBT(PartiallySignedTransaction psbtx);
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);
48  void updateTransactionDisplay();
49  std::string renderTransaction(const PartiallySignedTransaction &psbtx);
50  void showStatus(const QString &msg, StatusLevel level);
51  void showTransactionStatus(const PartiallySignedTransaction &psbtx);
52 };
53 
54 #endif // BITCOIN_QT_PSBTOPERATIONSDIALOG_H
Dialog showing transaction details.
A version of CTransaction with the PSBT format.
Definition: psbt.h:390
Ui::PSBTOperationsDialog * m_ui
PartiallySignedTransaction m_transaction_data
Model for Bitcoin network client.
Definition: clientmodel.h:46
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:51