Bitcoin ABC  0.22.13
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 {
35  DATE_COLUMN_WIDTH = 130,
36  LABEL_COLUMN_WIDTH = 120,
37  AMOUNT_MINIMUM_COLUMN_WIDTH = 180,
38  MINIMUM_COLUMN_WIDTH = 130
39  };
40 
41  explicit ReceiveCoinsDialog(const PlatformStyle *platformStyle,
42  QWidget *parent = nullptr);
44 
45  void setModel(WalletModel *model);
46 
47 public Q_SLOTS:
48  void clear();
49  void reject();
50  void accept();
51 
52 protected:
53  virtual void keyPressEvent(QKeyEvent *event);
54 
55 private:
56  Ui::ReceiveCoinsDialog *ui;
59  QMenu *contextMenu;
61 
62  QModelIndex selectedRow();
63  void copyColumnToClipboard(int column);
64  virtual void resizeEvent(QResizeEvent *event);
65 
66 private Q_SLOTS:
67  void on_receiveButton_clicked();
68  void on_showRequestButton_clicked();
69  void on_removeRequestButton_clicked();
70  void on_recentRequestsView_doubleClicked(const QModelIndex &index);
71  void recentRequestsView_selectionChanged(const QItemSelection &selected,
72  const QItemSelection &deselected);
73  void updateDisplayUnit();
74  void showMenu(const QPoint &point);
75  void copyURI();
76  void copyLabel();
77  void copyMessage();
78  void copyAmount();
79 };
80 
81 #endif // BITCOIN_QT_RECEIVECOINSDIALOG_H
Dialog for requesting payment of bitcoins.
GUIUtil::TableViewLastColumnResizingFixer * columnResizingFixer
Ui::ReceiveCoinsDialog * ui
Makes a QTableView last column feel as if it was being resized from its left border.
Definition: guiutil.h:194
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:47
const PlatformStyle * platformStyle