7#include <qt/forms/ui_receivecoinsdialog.h>
21#include <QTextDocument>
31 ui->clearButton->setIcon(
QIcon());
32 ui->receiveButton->setIcon(
QIcon());
33 ui->showRequestButton->setIcon(
QIcon());
34 ui->removeRequestButton->setIcon(
QIcon());
36 ui->clearButton->setIcon(
38 ui->receiveButton->setIcon(
40 ui->showRequestButton->setIcon(
42 ui->removeRequestButton->setIcon(
60 connect(
ui->recentRequestsView, &QWidget::customContextMenuRequested,
this,
64 connect(copyLabelAction, &QAction::triggered,
this,
71 connect(
ui->clearButton, &QPushButton::clicked,
this,
87 tableView->verticalHeader()->hide();
88 tableView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
89 tableView->setModel(
_model->getRecentRequestsTableModel());
90 tableView->setAlternatingRowColors(
true);
91 tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
92 tableView->setSelectionMode(QAbstractItemView::ContiguousSelection);
100 connect(tableView->selectionModel(),
101 &QItemSelectionModel::selectionChanged,
this,
125 ui->reqAmount->clear();
126 ui->reqLabel->setText(
"");
127 ui->reqMessage->setText(
"");
141 ui->reqAmount->setDisplayUnit(
163 ui->reqMessage->text());
165 dialog->setAttribute(Qt::WA_DeleteOnClose);
176 tr(
"Could not unlock wallet."),
177 QMessageBox::Ok, QMessageBox::Ok);
181 tr(
"Could not generate new %1 address")
182 .
arg(QString::fromStdString(
184 QMessageBox::Ok, QMessageBox::Ok);
202 dialog->setAttribute(Qt::WA_DeleteOnClose);
210 !
ui->recentRequestsView->selectionModel()->selectedRows().isEmpty();
211 ui->showRequestButton->setEnabled(
enable);
212 ui->removeRequestButton->setEnabled(
enable);
217 !
ui->recentRequestsView->selectionModel()) {
221 ui->recentRequestsView->selectionModel()->selectedRows();
230 !
ui->recentRequestsView->selectionModel()) {
234 ui->recentRequestsView->selectionModel()->selectedRows();
247 QWidget::resizeEvent(event);
253 !
ui->recentRequestsView->selectionModel()) {
257 ui->recentRequestsView->selectionModel()->selectedRows();
289 if (!
sel.isValid()) {
EditStatus getEditStatus() const
@ WALLET_UNLOCK_FAILURE
Wallet could not be unlocked to create new receiving address.
@ NO_CHANGES
No changes were made during edit operation.
@ INVALID_ADDRESS
Unparseable address.
@ KEY_GENERATION_FAILURE
Generating a new public key for a receiving address failed.
@ DUPLICATE_ADDRESS
Address already in address book.
QString addRow(const QString &type, const QString &label, const QString &address, const OutputType address_type)
static const QString Receive
Specifies receive address.
Makes a QTableView last column feel as if it was being resized from its left border.
void stretchColumnWidth(int column)
int getDisplayUnit() const
void displayUnitChanged(int unit)
Dialog for requesting payment of bitcoins.
Ui::ReceiveCoinsDialog * ui
void on_removeRequestButton_clicked()
@ AMOUNT_MINIMUM_COLUMN_WIDTH
void on_showRequestButton_clicked()
void on_recentRequestsView_doubleClicked(const QModelIndex &index)
GUIUtil::TableViewLastColumnResizingFixer * columnResizingFixer
void recentRequestsView_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
void setModel(WalletModel *model)
void showMenu(const QPoint &point)
void on_receiveButton_clicked()
ReceiveCoinsDialog(const PlatformStyle *platformStyle, QWidget *parent=nullptr)
virtual void resizeEvent(QResizeEvent *event) override
QModelIndex selectedRow()
void copyColumnToClipboard(int column)
Model for list of recently generated payment requests / bitcoincash: URIs.
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) override
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
void sort(int column, Qt::SortOrder order=Qt::AscendingOrder) override
void addNewRequest(const SendCoinsRecipient &recipient)
Interface to Bitcoin wallet from Qt view code.
AddressTableModel * getAddressTableModel()
OptionsModel * getOptionsModel()
interfaces::Wallet & wallet() const
RecentRequestsTableModel * getRecentRequestsTableModel()
void canGetAddressesChanged()
virtual bool canGetAddresses() const =0
virtual OutputType getDefaultAddressType()=0
QString formatBitcoinURI(const SendCoinsRecipient &info)
void setClipboard(const QString &str)
const std::string & FormatOutputType(OutputType type)
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...