Fabcoin Core  0.16.2
P2P Digital Currency
receivecoinsdialog.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2017 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 FABCOIN_QT_RECEIVECOINSDIALOG_H
6 #define FABCOIN_QT_RECEIVECOINSDIALOG_H
7 
8 #include <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 OptionsModel;
19 class PlatformStyle;
20 class WalletModel;
21 
22 namespace Ui {
23  class ReceiveCoinsDialog;
24 }
25 
26 QT_BEGIN_NAMESPACE
27 class QModelIndex;
28 QT_END_NAMESPACE
29 
31 class ReceiveCoinsDialog : public QDialog
32 {
33  Q_OBJECT
34 
35 public:
36  enum ColumnWidths {
37  DATE_COLUMN_WIDTH = 130,
38  LABEL_COLUMN_WIDTH = 120,
39  AMOUNT_MINIMUM_COLUMN_WIDTH = 180,
40  MINIMUM_COLUMN_WIDTH = 130
41  };
42 
43  explicit ReceiveCoinsDialog(const PlatformStyle *platformStyle, QWidget *parent = 0);
45 
46  void setModel(WalletModel *model);
47 
48 public Q_SLOTS:
49  void clear();
50  void reject();
51  void accept();
52 
53 protected:
54  virtual void keyPressEvent(QKeyEvent *event);
55 
56 private:
60  QMenu *contextMenu;
62 
63  QModelIndex selectedRow();
64  void copyColumnToClipboard(int column);
65  virtual void resizeEvent(QResizeEvent *event);
66 
67 private Q_SLOTS:
68  void on_receiveButton_clicked();
69  void on_showRequestButton_clicked();
70  void on_removeRequestButton_clicked();
71  void on_copyAddressButton_clicked();
72  void on_recentRequestsView_doubleClicked(const QModelIndex &index);
73  void on_recentRequestsView_clicked(const QModelIndex &index);
74  void recentRequestsView_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
75  void updateDisplayUnit();
76  void showMenu(const QPoint &point);
77  void copyURI();
78  void copyLabel();
79  void copyMessage();
80  void copyAmount();
81 };
82 
83 #endif // FABCOIN_QT_RECEIVECOINSDIALOG_H
Dialog for requesting payment of fabcoins.
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:158
Interface from Qt to configuration data structure for Fabcoin client.
Definition: optionsmodel.h:22
Interface to Fabcoin wallet from Qt view code.
Definition: walletmodel.h:103
const PlatformStyle * platformStyle