Bitcoin Core  21.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
PSBTOperationsDialog::updateTransactionDisplay
void updateTransactionDisplay()
Definition: psbtoperationsdialog.cpp:154
WalletModel
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:51
PSBTOperationsDialog::StatusLevel::ERR
@ ERR
walletmodel.h
PSBTOperationsDialog::couldSignInputs
size_t couldSignInputs(const PartiallySignedTransaction &psbtx)
Definition: psbtoperationsdialog.cpp:225
PSBTOperationsDialog::PSBTOperationsDialog
PSBTOperationsDialog(QWidget *parent, WalletModel *walletModel, ClientModel *clientModel)
Definition: psbtoperationsdialog.cpp:21
PSBTOperationsDialog::m_transaction_data
PartiallySignedTransaction m_transaction_data
Definition: psbtoperationsdialog.h:37
PSBTOperationsDialog::StatusLevel::INFO
@ INFO
PSBTOperationsDialog::m_wallet_model
WalletModel * m_wallet_model
Definition: psbtoperationsdialog.h:38
PSBTOperationsDialog::showStatus
void showStatus(const QString &msg, StatusLevel level)
Definition: psbtoperationsdialog.cpp:206
PSBTOperationsDialog::openWithPSBT
void openWithPSBT(PartiallySignedTransaction psbtx)
Definition: psbtoperationsdialog.cpp:46
PSBTOperationsDialog::renderTransaction
std::string renderTransaction(const PartiallySignedTransaction &psbtx)
Definition: psbtoperationsdialog.cpp:159
PSBTOperationsDialog::showTransactionStatus
void showTransactionStatus(const PartiallySignedTransaction &psbtx)
Definition: psbtoperationsdialog.cpp:236
PSBTOperationsDialog::StatusLevel
StatusLevel
Definition: psbtoperationsdialog.h:41
PSBTOperationsDialog::broadcastTransaction
void broadcastTransaction()
Definition: psbtoperationsdialog.cpp:92
PSBTOperationsDialog::StatusLevel::WARN
@ WARN
ClientModel
Model for Bitcoin network client.
Definition: clientmodel.h:46
Ui
Definition: addressbookpage.h:14
PSBTOperationsDialog::signTransaction
void signTransaction()
Definition: psbtoperationsdialog.cpp:66
PartiallySignedTransaction
A version of CTransaction with the PSBT format.
Definition: psbt.h:391
PSBTOperationsDialog::copyToClipboard
void copyToClipboard()
Definition: psbtoperationsdialog.cpp:116
PSBTOperationsDialog::~PSBTOperationsDialog
~PSBTOperationsDialog()
Definition: psbtoperationsdialog.cpp:41
PSBTOperationsDialog::m_client_model
ClientModel * m_client_model
Definition: psbtoperationsdialog.h:39
PSBTOperationsDialog::saveTransaction
void saveTransaction()
Definition: psbtoperationsdialog.cpp:123
PSBTOperationsDialog::m_ui
Ui::PSBTOperationsDialog * m_ui
Definition: psbtoperationsdialog.h:36
clientmodel.h
PSBTOperationsDialog
Dialog showing transaction details.
Definition: psbtoperationsdialog.h:19