2014-12-17 02:47:57 +01:00
|
|
|
// Copyright (c) 2011-2013 The Bitcoin Core developers
|
2014-12-13 05:09:33 +01:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
2013-11-04 16:20:43 +01:00
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2014-11-03 16:16:40 +01:00
|
|
|
#ifndef BITCOIN_QT_RECEIVEREQUESTDIALOG_H
|
|
|
|
#define BITCOIN_QT_RECEIVEREQUESTDIALOG_H
|
2011-11-10 15:20:17 +01:00
|
|
|
|
2013-10-18 13:45:11 +02:00
|
|
|
#include "walletmodel.h"
|
|
|
|
|
2011-11-10 15:20:17 +01:00
|
|
|
#include <QDialog>
|
|
|
|
#include <QImage>
|
2013-10-18 13:08:30 +02:00
|
|
|
#include <QLabel>
|
2011-11-10 15:20:17 +01:00
|
|
|
|
2014-06-03 14:42:20 +02:00
|
|
|
class OptionsModel;
|
|
|
|
|
2011-11-10 15:20:17 +01:00
|
|
|
namespace Ui {
|
2013-10-16 15:14:26 +02:00
|
|
|
class ReceiveRequestDialog;
|
2011-11-10 15:20:17 +01:00
|
|
|
}
|
2014-06-03 14:42:20 +02:00
|
|
|
|
2014-05-07 08:15:22 +02:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
class QMenu;
|
|
|
|
QT_END_NAMESPACE
|
2011-11-10 15:20:17 +01:00
|
|
|
|
2013-10-18 13:08:30 +02:00
|
|
|
/* Label widget for QR code. This image can be dragged, dropped, copied and saved
|
|
|
|
* to disk.
|
|
|
|
*/
|
|
|
|
class QRImageWidget : public QLabel
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit QRImageWidget(QWidget *parent = 0);
|
|
|
|
QImage exportImage();
|
|
|
|
|
2015-07-14 13:59:05 +02:00
|
|
|
public Q_SLOTS:
|
2013-10-18 13:08:30 +02:00
|
|
|
void saveImage();
|
|
|
|
void copyImage();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void mousePressEvent(QMouseEvent *event);
|
2014-05-07 08:15:22 +02:00
|
|
|
virtual void contextMenuEvent(QContextMenuEvent *event);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QMenu *contextMenu;
|
2013-10-18 13:08:30 +02:00
|
|
|
};
|
|
|
|
|
2013-10-16 15:14:26 +02:00
|
|
|
class ReceiveRequestDialog : public QDialog
|
2011-11-10 15:20:17 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2013-10-18 14:25:35 +02:00
|
|
|
explicit ReceiveRequestDialog(QWidget *parent = 0);
|
2013-10-16 15:14:26 +02:00
|
|
|
~ReceiveRequestDialog();
|
2011-11-10 15:20:17 +01:00
|
|
|
|
2012-06-24 18:28:05 +02:00
|
|
|
void setModel(OptionsModel *model);
|
2013-10-18 14:25:35 +02:00
|
|
|
void setInfo(const SendCoinsRecipient &info);
|
2012-06-24 18:28:05 +02:00
|
|
|
|
2015-07-14 13:59:05 +02:00
|
|
|
private Q_SLOTS:
|
2013-10-18 14:25:35 +02:00
|
|
|
void on_btnCopyURI_clicked();
|
2013-10-18 19:42:40 +02:00
|
|
|
void on_btnCopyAddress_clicked();
|
2011-11-10 15:20:17 +01:00
|
|
|
|
2013-10-18 14:25:35 +02:00
|
|
|
void update();
|
2011-11-10 15:20:17 +01:00
|
|
|
|
|
|
|
private:
|
2013-10-16 15:14:26 +02:00
|
|
|
Ui::ReceiveRequestDialog *ui;
|
2012-06-24 18:28:05 +02:00
|
|
|
OptionsModel *model;
|
2013-10-18 13:45:11 +02:00
|
|
|
SendCoinsRecipient info;
|
2011-11-10 15:20:17 +01:00
|
|
|
};
|
|
|
|
|
2014-11-03 16:16:40 +01:00
|
|
|
#endif // BITCOIN_QT_RECEIVEREQUESTDIALOG_H
|