]> Git Repo - VerusCoin.git/blob - src/qt/receiverequestdialog.h
6f3b9838e26d9054b2d7cf96d8fa2a2ffe4ca270
[VerusCoin.git] / src / qt / receiverequestdialog.h
1 // Copyright (c) 2011-2013 The Bitcoin developers
2 // Distributed under the MIT/X11 software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5 #ifndef BITCOIN_QT_RECEIVEREQUESTDIALOG_H
6 #define BITCOIN_QT_RECEIVEREQUESTDIALOG_H
7
8 #include "walletmodel.h"
9
10 #include <QDialog>
11 #include <QImage>
12 #include <QLabel>
13
14 class OptionsModel;
15
16 namespace Ui {
17     class ReceiveRequestDialog;
18 }
19
20 QT_BEGIN_NAMESPACE
21 class QMenu;
22 QT_END_NAMESPACE
23
24 /* Label widget for QR code. This image can be dragged, dropped, copied and saved
25  * to disk.
26  */
27 class QRImageWidget : public QLabel
28 {
29     Q_OBJECT
30
31 public:
32     explicit QRImageWidget(QWidget *parent = 0);
33     QImage exportImage();
34
35 public slots:
36     void saveImage();
37     void copyImage();
38
39 protected:
40     virtual void mousePressEvent(QMouseEvent *event);
41     virtual void contextMenuEvent(QContextMenuEvent *event);
42
43 private:
44     QMenu *contextMenu;
45 };
46
47 class ReceiveRequestDialog : public QDialog
48 {
49     Q_OBJECT
50
51 public:
52     explicit ReceiveRequestDialog(QWidget *parent = 0);
53     ~ReceiveRequestDialog();
54
55     void setModel(OptionsModel *model);
56     void setInfo(const SendCoinsRecipient &info);
57
58 private slots:
59     void on_btnCopyURI_clicked();
60     void on_btnCopyAddress_clicked();
61
62     void update();
63
64 private:
65     Ui::ReceiveRequestDialog *ui;
66     OptionsModel *model;
67     SendCoinsRecipient info;
68 };
69
70 #endif // BITCOIN_QT_RECEIVEREQUESTDIALOG_H
This page took 0.018246 seconds and 2 git commands to generate.