Fabcoin Core  0.16.2
P2P Digital Currency
receiverequestdialog.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_RECEIVEREQUESTDIALOG_H
6 #define FABCOIN_QT_RECEIVEREQUESTDIALOG_H
7 
8 #include <walletmodel.h>
9 
10 #include <QDialog>
11 #include <QImage>
12 #include <QLabel>
13 #include <QPainter>
14 
15 class OptionsModel;
16 
17 namespace Ui {
19 }
20 
21 QT_BEGIN_NAMESPACE
22 class QMenu;
23 QT_END_NAMESPACE
24 
25 /* Label widget for QR code. This image can be dragged, dropped, copied and saved
26  * to disk.
27  */
28 class QRImageWidget : public QLabel
29 {
30  Q_OBJECT
31 
32 public:
33  explicit QRImageWidget(QWidget *parent = 0);
34  QImage exportImage();
35 
36 public Q_SLOTS:
37  void saveImage();
38  void copyImage();
39 
40 protected:
41  virtual void mousePressEvent(QMouseEvent *event);
42  virtual void contextMenuEvent(QContextMenuEvent *event);
43 
44 private:
45  QMenu *contextMenu;
46 };
47 
48 class ReceiveRequestDialog : public QDialog
49 {
50  Q_OBJECT
51 
52 public:
53  explicit ReceiveRequestDialog(QWidget *parent = 0);
55 
56  void setModel(OptionsModel *model);
57  void setInfo(const SendCoinsRecipient &info);
58  static bool createQRCode(QLabel * label, SendCoinsRecipient info, bool showAddress = false);
59 
60 private Q_SLOTS:
61  void on_btnCopyURI_clicked();
62  void on_btnCopyAddress_clicked();
63 
64  void update();
65 
66 private:
70 };
71 
72 #endif // FABCOIN_QT_RECEIVEREQUESTDIALOG_H
Ui::ReceiveRequestDialog * ui
SendCoinsRecipient info
Interface from Qt to configuration data structure for Fabcoin client.
Definition: optionsmodel.h:22