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