Raven Core  3.0.0
P2P Digital Currency
receivecoinsdialog.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2016 The Bitcoin Core developers
2 // Copyright (c) 2017-2019 The Raven Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef RAVEN_QT_RECEIVECOINSDIALOG_H
7 #define RAVEN_QT_RECEIVECOINSDIALOG_H
8 
9 #include "guiutil.h"
10 
11 #include <QDialog>
12 #include <QHeaderView>
13 #include <QItemSelection>
14 #include <QKeyEvent>
15 #include <QMenu>
16 #include <QPoint>
17 #include <QVariant>
18 
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  void setupRequestFrame(const PlatformStyle *platformStyle);
48  void setupHistoryFrame(const PlatformStyle *platformStyle);
49 
50 public Q_SLOTS:
51  void clear();
52  void reject();
53  void accept();
54 
55 protected:
56  virtual void keyPressEvent(QKeyEvent *event);
57 
58 private:
59  Ui::ReceiveCoinsDialog *ui;
62  QMenu *contextMenu;
64 
65  QModelIndex selectedRow();
66  void copyColumnToClipboard(int column);
67  virtual void resizeEvent(QResizeEvent *event);
68 
69 private Q_SLOTS:
70  void on_receiveButton_clicked();
71  void on_showRequestButton_clicked();
72  void on_removeRequestButton_clicked();
73  void on_recentRequestsView_doubleClicked(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 // RAVEN_QT_RECEIVECOINSDIALOG_H
Dialog for requesting payment of ravens.
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:167
Interface to Raven wallet from Qt view code.
Definition: walletmodel.h:165
const PlatformStyle * platformStyle