aboutsummaryrefslogtreecommitdiff
path: root/src/qt/receiverequestdialog.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-10-25 04:27:05 -0700
committerWladimir J. van der Laan <laanwj@gmail.com>2013-10-25 04:27:05 -0700
commit081c0cdeb2b8c1e8db449f3b38837c4ca3b4ba73 (patch)
tree21559f88288cda3543659d5c06622613284dfa3f /src/qt/receiverequestdialog.h
parent48cc4fc326fa916954967580ca49c24044d55754 (diff)
parent70b14636cd60529c87b2cc61516f5d1bf49299a5 (diff)
Merge pull request #3099 from laanwj/2013_10_new_receive_flow
qt: improve "receive coins" workflow
Diffstat (limited to 'src/qt/receiverequestdialog.h')
-rw-r--r--src/qt/receiverequestdialog.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/qt/receiverequestdialog.h b/src/qt/receiverequestdialog.h
new file mode 100644
index 0000000000..1beb873dfd
--- /dev/null
+++ b/src/qt/receiverequestdialog.h
@@ -0,0 +1,57 @@
+#ifndef QRCODEDIALOG_H
+#define QRCODEDIALOG_H
+
+#include "walletmodel.h"
+
+#include <QDialog>
+#include <QImage>
+#include <QLabel>
+
+namespace Ui {
+ class ReceiveRequestDialog;
+}
+class OptionsModel;
+
+/* 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();
+
+public slots:
+ void saveImage();
+ void copyImage();
+
+protected:
+ virtual void mousePressEvent(QMouseEvent *event);
+};
+
+class ReceiveRequestDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit ReceiveRequestDialog(QWidget *parent = 0);
+ ~ReceiveRequestDialog();
+
+ void setModel(OptionsModel *model);
+ void setInfo(const SendCoinsRecipient &info);
+
+private slots:
+ void on_btnCopyURI_clicked();
+ void on_btnCopyAddress_clicked();
+
+ void update();
+
+private:
+ Ui::ReceiveRequestDialog *ui;
+ OptionsModel *model;
+ SendCoinsRecipient info;
+};
+
+#endif // QRCODEDIALOG_H