receiverequestdialog.h raw
1 // Copyright (c) 2011-2020 The Limenka developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5 #ifndef LIMENKA_QT_RECEIVEREQUESTDIALOG_H
6 #define LIMENKA_QT_RECEIVEREQUESTDIALOG_H
7
8 #include <qt/sendcoinsrecipient.h>
9
10 #include <QDialog>
11 #include <QList>
12 #include <QTextEdit>
13 #include <QWidget>
14
15 class WalletModel;
16
17 namespace Ui {
18 class ReceiveRequestDialog;
19 }
20
21 class ReceiveRequestDialog : public QDialog
22 {
23 Q_OBJECT
24
25 public:
26 explicit ReceiveRequestDialog(QWidget *parent = nullptr);
27 ~ReceiveRequestDialog();
28
29 void setModel(WalletModel *model);
30 void setInfo(const SendCoinsRecipient &info);
31
32 private Q_SLOTS:
33 void on_btnCopyURI_clicked();
34 void on_btnCopyAddress_clicked();
35 void updateDisplayUnit();
36
37 private:
38 Ui::ReceiveRequestDialog *ui;
39 void updateInfoWidget();
40 QTextEdit *m_info_widget;
41 QList<QWidget*> m_info_grid;
42 WalletModel* model{nullptr};
43 SendCoinsRecipient info;
44 };
45
46 #endif // LIMENKA_QT_RECEIVEREQUESTDIALOG_H
47