Bitcoin Core  21.99.0
P2P Digital Currency
transactiondescdialog.cpp
Go to the documentation of this file.
1 // Copyright (c) 2011-2019 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 
6 #include <qt/forms/ui_transactiondescdialog.h>
7 
8 #include <qt/guiutil.h>
10 
11 #include <QModelIndex>
12 
13 TransactionDescDialog::TransactionDescDialog(const QModelIndex &idx, QWidget *parent) :
14  QDialog(parent, GUIUtil::dialog_flags),
15  ui(new Ui::TransactionDescDialog)
16 {
17  ui->setupUi(this);
18  setWindowTitle(tr("Details for %1").arg(idx.data(TransactionTableModel::TxHashRole).toString()));
19  QString desc = idx.data(TransactionTableModel::LongDescriptionRole).toString();
20  ui->detailText->setHtml(desc);
21 
23 }
24 
26 {
27  delete ui;
28 }
transactiontablemodel.h
TransactionDescDialog::TransactionDescDialog
TransactionDescDialog(const QModelIndex &idx, QWidget *parent=nullptr)
Definition: transactiondescdialog.cpp:13
TransactionDescDialog
Dialog showing transaction details.
Definition: transactiondescdialog.h:19
GUIUtil
Utility functions used by the Bitcoin Qt UI.
Definition: bitcoingui.h:58
GUIUtil::dialog_flags
constexpr auto dialog_flags
Definition: guiutil.h:51
TransactionDescDialog::ui
Ui::TransactionDescDialog * ui
Definition: transactiondescdialog.h:28
guiutil.h
transactiondescdialog.h
TransactionTableModel::LongDescriptionRole
@ LongDescriptionRole
Long description (HTML format)
Definition: transactiontablemodel.h:56
Ui
Definition: addressbookpage.h:14
TransactionDescDialog::~TransactionDescDialog
~TransactionDescDialog()
Definition: transactiondescdialog.cpp:25
TransactionTableModel::TxHashRole
@ TxHashRole
Transaction hash.
Definition: transactiontablemodel.h:64
GUIUtil::handleCloseWindowShortcut
void handleCloseWindowShortcut(QWidget *w)
Definition: guiutil.cpp:393