19 #include <QItemSelection>
20 #include <QMessageBox>
22 #include <QTextDocument>
31 #ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
39 QAction *copyLabelAction =
new QAction(tr(
"Copy label"),
this);
40 QAction *copyMessageAction =
new QAction(tr(
"Copy message"),
this);
41 QAction *copyAmountAction =
new QAction(tr(
"Copy amount"),
this);
51 connect(copyLabelAction, SIGNAL(triggered()),
this, SLOT(
copyLabel()));
52 connect(copyMessageAction, SIGNAL(triggered()),
this, SLOT(
copyMessage()));
53 connect(copyAmountAction, SIGNAL(triggered()),
this, SLOT(
copyAmount()));
70 tableView->verticalHeader()->hide();
71 tableView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
73 tableView->setAlternatingRowColors(
true);
74 tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
75 tableView->setSelectionMode(QAbstractItemView::ContiguousSelection);
79 connect(tableView->selectionModel(),
80 SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
this,
148 dialog->setAttribute(Qt::WA_DeleteOnClose);
150 dialog->setInfo(info);
163 dialog->
setInfo(submodel->
entry(index.row()).recipient);
164 dialog->setAttribute(Qt::WA_DeleteOnClose);
182 foreach (QModelIndex index, selection)
193 if(selection.empty())
196 QModelIndex firstIndex = selection.at(0);
204 QWidget::resizeEvent(event);
210 if (event->key() == Qt::Key_Return)
221 this->QDialog::keyPressEvent(event);
230 if(selection.empty())
233 QModelIndex firstIndex = selection.at(0);
243 if(selection.empty())
void stretchColumnWidth(int column)
Model for list of recently generated payment requests / bitcoin: URIs.
void addNewRequest(const SendCoinsRecipient &recipient)
void sort(int column, Qt::SortOrder order=Qt::AscendingOrder)
Dialog for requesting payment of bitcoins.
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex())
QPushButton * receiveButton
void recentRequestsView_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
BitcoinAmountField * reqAmount
void setModel(AddressTableModel *model)
const QString & getReturnValue() const
GUIUtil::TableViewLastColumnResizingFixer * columnResizingFixer
Open address book to pick address.
AddressTableModel * getAddressTableModel()
Ui::ReceiveCoinsDialog * ui
const RecentRequestEntry & entry(int row) const
QPushButton * showRequestButton
void setModel(WalletModel *model)
QPushButton * clearButton
void copyColumnToClipboard(int column)
QVariant data(const QModelIndex &index, int role) const
void setClipboard(const QString &str)
void on_recentRequestsView_doubleClicked(const QModelIndex &index)
void setInfo(const SendCoinsRecipient &info)
Makes a QTableView last column feel as if it was being resized from its left border.
virtual void keyPressEvent(QKeyEvent *event)
Widget that shows a list of sending or receiving addresses.
QTableView * recentRequestsView
virtual void resizeEvent(QResizeEvent *event)
void on_removeRequestButton_clicked()
QString addRow(const QString &type, const QString &label, const QString &address)
RecentRequestsTableModel * getRecentRequestsTableModel()
void on_receiveButton_clicked()
QString labelForAddress(const QString &address) const
Interface to Bitcoin wallet from Qt view code.
void clear()
Make field empty and ready for new input.
void setupUi(QWidget *ReceiveCoinsDialog)
void on_showRequestButton_clicked()
static const QString Receive
Specifies receive address.
QPushButton * removeRequestButton
void showMenu(const QPoint &point)
void setModel(OptionsModel *model)
void setDisplayUnit(int unit)
Change unit used to display amount.
ReceiveCoinsDialog(QWidget *parent=0)
OptionsModel * getOptionsModel()