[test] Replace check_output with low level version
[bitcoinplatinum.git] / src / qt / receiverequestdialog.h
blob1a9b1652371b03dc39630d0e754c7fc310f1bee5
1 // Copyright (c) 2011-2016 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.
5 #ifndef BITCOIN_QT_RECEIVEREQUESTDIALOG_H
6 #define BITCOIN_QT_RECEIVEREQUESTDIALOG_H
8 #include "walletmodel.h"
10 #include <QDialog>
11 #include <QImage>
12 #include <QLabel>
13 #include <QPainter>
15 class OptionsModel;
17 namespace Ui {
18 class ReceiveRequestDialog;
21 QT_BEGIN_NAMESPACE
22 class QMenu;
23 QT_END_NAMESPACE
25 /* Label widget for QR code. This image can be dragged, dropped, copied and saved
26 * to disk.
28 class QRImageWidget : public QLabel
30 Q_OBJECT
32 public:
33 explicit QRImageWidget(QWidget *parent = 0);
34 QImage exportImage();
36 public Q_SLOTS:
37 void saveImage();
38 void copyImage();
40 protected:
41 virtual void mousePressEvent(QMouseEvent *event);
42 virtual void contextMenuEvent(QContextMenuEvent *event);
44 private:
45 QMenu *contextMenu;
48 class ReceiveRequestDialog : public QDialog
50 Q_OBJECT
52 public:
53 explicit ReceiveRequestDialog(QWidget *parent = 0);
54 ~ReceiveRequestDialog();
56 void setModel(OptionsModel *model);
57 void setInfo(const SendCoinsRecipient &info);
59 private Q_SLOTS:
60 void on_btnCopyURI_clicked();
61 void on_btnCopyAddress_clicked();
63 void update();
65 private:
66 Ui::ReceiveRequestDialog *ui;
67 OptionsModel *model;
68 SendCoinsRecipient info;
71 #endif // BITCOIN_QT_RECEIVEREQUESTDIALOG_H