 |
Bitcoin Core
21.99.0
P2P Digital Currency
|
Go to the documentation of this file.
28 #include <QActionGroup>
29 #include <QApplication>
31 #include <QFileDialog>
32 #include <QHBoxLayout>
33 #include <QProgressDialog>
34 #include <QPushButton>
35 #include <QVBoxLayout>
38 QStackedWidget(parent),
41 platformStyle(_platformStyle)
47 QVBoxLayout *vbox =
new QVBoxLayout();
48 QHBoxLayout *hbox_buttons =
new QHBoxLayout();
51 QPushButton *exportButton =
new QPushButton(tr(
"&Export"),
this);
52 exportButton->setToolTip(tr(
"Export the data in the current tab to a file"));
56 hbox_buttons->addStretch();
57 hbox_buttons->addWidget(exportButton);
58 vbox->addLayout(hbox_buttons);
154 QModelIndex index = ttm->
index(start, 0, parent);
188 signVerifyMessageDialog->setAttribute(Qt::WA_DeleteOnClose);
200 signVerifyMessageDialog->setAttribute(Qt::WA_DeleteOnClose);
212 if (from_clipboard) {
213 std::string raw = QApplication::clipboard()->text().toStdString();
222 tr(
"Load Transaction Data"), QString(),
223 tr(
"Partially Signed Transaction (*.psbt)"),
nullptr);
224 if (filename.isEmpty())
return;
229 std::ifstream in(filename.toLocal8Bit().data(), std::ios::binary);
230 data = std::string(std::istreambuf_iterator<char>{in}, {});
242 dlg->setAttribute(Qt::WA_DeleteOnClose);
275 tr(
"Backup Wallet"), QString(),
276 tr(
"Wallet Data",
"Name of wallet data file format") + QLatin1String(
" (*.dat)"),
nullptr);
278 if (filename.isEmpty())
282 Q_EMIT
message(tr(
"Backup Failed"), tr(
"There was an error trying to save the wallet data to %1.").arg(filename),
286 Q_EMIT
message(tr(
"Backup Successful"), tr(
"The wallet data was successfully saved to %1.").arg(filename),
329 if (nProgress == 0) {
330 progressDialog =
new QProgressDialog(title, tr(
"Cancel"), 0, 100);
336 }
else if (nProgress == 100) {
SendCoinsDialog * sendCoinsPage
Widget showing the transaction list for a wallet, including a filter row.
@ MSG_INFORMATION
Predefined combinations for certain default usage cases.
OptionsModel * getOptionsModel()
const PlatformStyle * platformStyle
void setModel(AddressTableModel *model)
Dialog for requesting payment of bitcoins.
void coinsSent(const uint256 &txid)
TransactionView * transactionView
@ Unlock
Ask passphrase and unlock.
void setModel(WalletModel *model)
Interface to Bitcoin wallet from Qt view code.
void outOfSyncWarningClicked()
@ AddressRole
Address of transaction.
void setAddress_VM(const QString &address)
void showOutOfSyncWarning(bool fShow)
AddressBookPage * usedSendingAddressesPage
void showTab_VM(bool fShow)
void focusTransaction(const QModelIndex &)
void gotoReceiveCoinsPage()
Switch to receive coins page.
OverviewPage * overviewPage
AddressTableModel * getAddressTableModel()
interfaces::Node & node() const
Overview ("home") page widget.
Multifunctional dialog to ask for passphrases.
void showProgress(const QString &title, int nProgress)
Show progress dialog e.g.
ClientModel * clientModel
TransactionTableModel * getTransactionTableModel()
void bringToFront(QWidget *w)
void setPrivacy(bool privacy)
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
void setModel(WalletModel *model)
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
void encryptWallet()
Encrypt the wallet.
void setClientModel(ClientModel *client_model)
void incomingTransaction(const QString &date, int unit, const CAmount &amount, const QString &type, const QString &address, const QString &label, const QString &walletName)
Notify that a new transaction appeared.
void processNewTransaction(const QModelIndex &parent, int start, int)
Show incoming transaction notification for new transactions.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
void hdEnabledStatusChanged()
HD-Enabled status of wallet changed (only possible during startup)
void openWithPSBT(PartiallySignedTransaction psbtx)
WalletModel * getWalletModel()
interfaces::Wallet & wallet() const
void showProgress(const QString &title, int nProgress)
void setClientModel(ClientModel *clientModel)
Set the client model.
void requestedSyncWarningInfo()
User has requested more information about the out of sync state.
QString getOpenFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
Get open filename, convenience wrapper for QFileDialog::getOpenFileName.
void encryptionStatusChanged()
void message(const QString &title, const QString &message, unsigned int style)
std::vector< unsigned char > DecodeBase64(const char *p, bool *pf_invalid)
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
AddressBookPage * usedReceivingAddressesPage
void setClientModel(ClientModel *clientModel)
void updateEncryptionStatus()
Re-emit encryption status signal.
void message(const QString &title, const QString &message, unsigned int style)
Fired when a message should be reported to the user.
EncryptionStatus getEncryptionStatus() const
void PolishProgressDialog(QProgressDialog *dialog)
Widget that shows a list of sending or receiving addresses.
Dialog for sending bitcoins.
QString getWalletName() const
QWidget * transactionsPage
void message(const QString &title, const QString &message, unsigned int style)
Fired when a message should be reported to the user.
virtual bool backupWallet(const std::string &filename)=0
Back up wallet.
void encryptionStatusChanged()
Encryption status of wallet changed.
void setAddress(const QString &address)
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
virtual bool isInitialBlockDownload()=0
Is initial block download.
WalletView(const PlatformStyle *platformStyle, QWidget *parent)
bool processingQueuedTransactions() const
std::streampos GetFileSize(const char *path, std::streamsize max)
Get the size of a file by scanning it.
bool DecodeRawPSBT(PartiallySignedTransaction &psbt, const std::string &tx_data, std::string &error)
Decode a raw (binary blob) PSBT into a PartiallySignedTransaction.
void setAddress_SM(const QString &address)
void transactionClicked(const QModelIndex &index)
QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
Get save filename, mimics QFileDialog::getSaveFileName, except that it appends a default suffix when ...
Model for Bitcoin network client.
UI model for the transaction table of a wallet.
void outOfSyncWarningClicked()
Notify that the out of sync warning icon has been pressed.
QString HtmlEscape(const QString &str, bool fMultiLine)
void gotoOverviewPage()
Switch to overview (home) page.
int getDisplayUnit() const
void setClientModel(ClientModel *clientModel)
void setWalletModel(WalletModel *walletModel)
Set the wallet model.
A version of CTransaction with the PSBT format.
void changePassphrase()
Change encrypted wallet passphrase.
virtual void abortRescan()=0
Abort a rescan.
void setModel(WalletModel *model)
void setModel(WalletModel *model)
void unlockWallet()
Ask for passphrase to unlock wallet temporarily.
void gotoLoadPSBT(bool from_clipboard=false)
Load Partially Signed Bitcoin Transaction.
WalletModel * walletModel
void backupWallet()
Backup the wallet.
void message(const QString &title, const QString &message, unsigned int style)
ReceiveCoinsDialog * receiveCoinsPage
void setWalletModel(WalletModel *walletModel)
void setPrivacy(bool privacy)
const std::streamsize MAX_FILE_SIZE_PSBT
@ ChangePass
Ask old passphrase + new passphrase twice.
void usedSendingAddresses()
Show used sending addresses.
bool error(const char *fmt, const Args &... args)
void usedReceivingAddresses()
Show used receiving addresses.
void transactionClicked()
void showOutOfSyncWarning(bool fShow)
@ Encrypt
Ask passphrase twice and encrypt.
void showTab_SM(bool fShow)
void gotoHistoryPage()
Switch to history (transactions) page.
@ LabelRole
Label of address related to transaction.
@ ForEditing
Open address book for editing.
QProgressDialog * progressDialog
void setModel(WalletModel *model)
Dialog showing transaction details.
QVariant data(const QModelIndex &index, int role) const override