20 #include <QItemSelection> 21 #include <QMessageBox> 23 #include <QTextDocument> 28 columnResizingFixer(0),
30 platformStyle(platformStyle)
41 ui->
clearButton->setIcon(QIcon(
":/icons/" + theme +
"/remove"));
42 ui->
receiveButton->setIcon(QIcon(
":/icons/" + theme +
"/receiving_addresses"));
48 QAction *copyURIAction =
new QAction(tr(
"Copy URI"),
this);
49 QAction *copyLabelAction =
new QAction(tr(
"Copy label"),
this);
50 QAction *copyMessageAction =
new QAction(tr(
"Copy message"),
this);
51 QAction *copyAmountAction =
new QAction(tr(
"Copy amount"),
this);
62 connect(copyURIAction, SIGNAL(triggered()),
this, SLOT(
copyURI()));
63 connect(copyLabelAction, SIGNAL(triggered()),
this, SLOT(
copyLabel()));
64 connect(copyMessageAction, SIGNAL(triggered()),
this, SLOT(
copyMessage()));
65 connect(copyAmountAction, SIGNAL(triggered()),
this, SLOT(
copyAmount()));
82 tableView->verticalHeader()->hide();
83 tableView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
85 tableView->setAlternatingRowColors(
true);
86 tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
87 tableView->setSelectionMode(QAbstractItemView::ContiguousSelection);
91 connect(tableView->selectionModel(),
92 SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
this,
161 dialog->setAttribute(Qt::WA_DeleteOnClose);
176 dialog->
setInfo(submodel->
entry(index.row()).recipient);
177 dialog->setAttribute(Qt::WA_DeleteOnClose);
195 Q_FOREACH (
const QModelIndex& index, selection) {
205 if(selection.empty())
208 QModelIndex firstIndex = selection.at(0);
216 QWidget::resizeEvent(event);
222 if (event->key() == Qt::Key_Return)
233 this->QDialog::keyPressEvent(event);
239 return QModelIndex();
241 if(selection.empty())
242 return QModelIndex();
244 QModelIndex firstIndex = selection.at(0);
252 if (!firstIndex.isValid()) {
271 if (!sel.isValid()) {
Ui::ReceiveCoinsDialog * ui
QString addRow(const QString &type, const QString &label, const QString &address)
QPushButton * removeRequestButton
static const QString Receive
ReceiveCoinsDialog(const PlatformStyle *platformStyle, QWidget *parent=0)
void setModel(WalletModel *model)
void setInfo(const SendCoinsRecipient &info)
void setModel(OptionsModel *model)
virtual void resizeEvent(QResizeEvent *event)
const PlatformStyle * platformStyle
void addNewRequest(const SendCoinsRecipient &recipient)
void recentRequestsView_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
QVariant data(const QModelIndex &index, int role) const
const RecentRequestEntry & entry(int row) const
void on_receiveButton_clicked()
void on_removeRequestButton_clicked()
void showMenu(const QPoint &point)
void setDisplayUnit(int unit)
RecentRequestsTableModel * getRecentRequestsTableModel()
void setClipboard(const QString &str)
void copyColumnToClipboard(int column)
QString labelForAddress(const QString &address) const
QPushButton * showRequestButton
void setupUi(QWidget *ReceiveCoinsDialog)
GUIUtil::TableViewLastColumnResizingFixer * columnResizingFixer
OptionsModel * getOptionsModel()
QString formatBitcoinURI(const SendCoinsRecipient &info)
void stretchColumnWidth(int column)
const QString & getReturnValue() const
void on_showRequestButton_clicked()
BitcoinAmountField * reqAmount
QPushButton * clearButton
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex())
void on_recentRequestsView_doubleClicked(const QModelIndex &index)
virtual void keyPressEvent(QKeyEvent *event)
QCheckBox * checkUseInstantSend
QPushButton * receiveButton
QModelIndex selectedRow()
void sort(int column, Qt::SortOrder order=Qt::AscendingOrder)
AddressTableModel * getAddressTableModel()
QTableView * recentRequestsView
void setModel(AddressTableModel *model)