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