Bitcoin ABC  0.24.10
P2P Digital Currency
receivecoinsdialog.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2016 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 
5 #ifndef BITCOIN_QT_RECEIVECOINSDIALOG_H
6 #define BITCOIN_QT_RECEIVECOINSDIALOG_H
7 
8 #include <qt/guiutil.h>
9 
10 #include <QDialog>
11 #include <QHeaderView>
12 #include <QItemSelection>
13 #include <QKeyEvent>
14 #include <QMenu>
15 #include <QPoint>
16 #include <QVariant>
17 
18 class PlatformStyle;
19 class WalletModel;
20 
21 namespace Ui {
22 class ReceiveCoinsDialog;
23 }
24 
25 QT_BEGIN_NAMESPACE
26 class QModelIndex;
27 QT_END_NAMESPACE
28 
30 class ReceiveCoinsDialog : public QDialog {
31  Q_OBJECT
32 
33 public:
34  enum ColumnWidths {
39  };
40 
42  QWidget *parent = nullptr);
44 
45  void setModel(WalletModel *model);
46 
47 public Q_SLOTS:
48  void clear();
49  void reject() override;
50  void accept() override;
51 
52 private:
53  Ui::ReceiveCoinsDialog *ui;
56  QMenu *contextMenu;
58 
59  QModelIndex selectedRow();
60  void copyColumnToClipboard(int column);
61  virtual void resizeEvent(QResizeEvent *event) override;
62 
63 private Q_SLOTS:
67  void on_recentRequestsView_doubleClicked(const QModelIndex &index);
68  void recentRequestsView_selectionChanged(const QItemSelection &selected,
69  const QItemSelection &deselected);
70  void updateDisplayUnit();
71  void showMenu(const QPoint &point);
72  void copyURI();
73  void copyLabel();
74  void copyMessage();
75  void copyAmount();
76 };
77 
78 #endif // BITCOIN_QT_RECEIVECOINSDIALOG_H
ReceiveCoinsDialog::AMOUNT_MINIMUM_COLUMN_WIDTH
@ AMOUNT_MINIMUM_COLUMN_WIDTH
Definition: receivecoinsdialog.h:37
ReceiveCoinsDialog
Dialog for requesting payment of bitcoins.
Definition: receivecoinsdialog.h:30
ReceiveCoinsDialog::setModel
void setModel(WalletModel *model)
Definition: receivecoinsdialog.cpp:75
WalletModel
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:47
ReceiveCoinsDialog::ReceiveCoinsDialog
ReceiveCoinsDialog(const PlatformStyle *platformStyle, QWidget *parent=nullptr)
Definition: receivecoinsdialog.cpp:23
ReceiveCoinsDialog::copyAmount
void copyAmount()
Definition: receivecoinsdialog.cpp:311
ReceiveCoinsDialog::MINIMUM_COLUMN_WIDTH
@ MINIMUM_COLUMN_WIDTH
Definition: receivecoinsdialog.h:38
ReceiveCoinsDialog::resizeEvent
virtual void resizeEvent(QResizeEvent *event) override
Definition: receivecoinsdialog.cpp:246
ReceiveCoinsDialog::LABEL_COLUMN_WIDTH
@ LABEL_COLUMN_WIDTH
Definition: receivecoinsdialog.h:36
ReceiveCoinsDialog::ui
Ui::ReceiveCoinsDialog * ui
Definition: receivecoinsdialog.h:53
GUIUtil::TableViewLastColumnResizingFixer
Makes a QTableView last column feel as if it was being resized from its left border.
Definition: guiutil.h:224
ReceiveCoinsDialog::on_receiveButton_clicked
void on_receiveButton_clicked()
Definition: receivecoinsdialog.cpp:146
ReceiveCoinsDialog::on_removeRequestButton_clicked
void on_removeRequestButton_clicked()
Definition: receivecoinsdialog.cpp:228
ReceiveCoinsDialog::model
WalletModel * model
Definition: receivecoinsdialog.h:55
ReceiveCoinsDialog::updateDisplayUnit
void updateDisplayUnit()
Definition: receivecoinsdialog.cpp:139
ReceiveCoinsDialog::copyMessage
void copyMessage()
Definition: receivecoinsdialog.cpp:306
ReceiveCoinsDialog::copyColumnToClipboard
void copyColumnToClipboard(int column)
Definition: receivecoinsdialog.cpp:267
ReceiveCoinsDialog::contextMenu
QMenu * contextMenu
Definition: receivecoinsdialog.h:56
ReceiveCoinsDialog::selectedRow
QModelIndex selectedRow()
Definition: receivecoinsdialog.cpp:251
ReceiveCoinsDialog::platformStyle
const PlatformStyle * platformStyle
Definition: receivecoinsdialog.h:57
guiutil.h
ReceiveCoinsDialog::on_recentRequestsView_doubleClicked
void on_recentRequestsView_doubleClicked(const QModelIndex &index)
Definition: receivecoinsdialog.cpp:195
ReceiveCoinsDialog::recentRequestsView_selectionChanged
void recentRequestsView_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
Definition: receivecoinsdialog.cpp:206
ReceiveCoinsDialog::copyLabel
void copyLabel()
Definition: receivecoinsdialog.cpp:301
ReceiveCoinsDialog::~ReceiveCoinsDialog
~ReceiveCoinsDialog()
Definition: receivecoinsdialog.cpp:120
ReceiveCoinsDialog::showMenu
void showMenu(const QPoint &point)
Definition: receivecoinsdialog.cpp:279
ReceiveCoinsDialog::DATE_COLUMN_WIDTH
@ DATE_COLUMN_WIDTH
Definition: receivecoinsdialog.h:35
ReceiveCoinsDialog::accept
void accept() override
Definition: receivecoinsdialog.cpp:135
Ui
Definition: addressbookpage.h:14
ReceiveCoinsDialog::columnResizingFixer
GUIUtil::TableViewLastColumnResizingFixer * columnResizingFixer
Definition: receivecoinsdialog.h:54
ReceiveCoinsDialog::reject
void reject() override
Definition: receivecoinsdialog.cpp:131
ReceiveCoinsDialog::ColumnWidths
ColumnWidths
Definition: receivecoinsdialog.h:34
ReceiveCoinsDialog::clear
void clear()
Definition: receivecoinsdialog.cpp:124
ReceiveCoinsDialog::on_showRequestButton_clicked
void on_showRequestButton_clicked()
Definition: receivecoinsdialog.cpp:215
ReceiveCoinsDialog::copyURI
void copyURI()
Definition: receivecoinsdialog.cpp:287
PlatformStyle
Definition: platformstyle.h:13