PIVX Core  5.6.99
P2P Digital Currency
requestdialog.h
Go to the documentation of this file.
1 // Copyright (c) 2019-2022 The PIVX Core 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 PIVX_QT_REQUESTDIALOG_H
6 #define PIVX_QT_REQUESTDIALOG_H
7 
8 #include "focuseddialog.h"
9 #include "snackbar.h"
10 #include "walletmodel.h"
11 
12 #include <QPixmap>
13 
14 class WalletModel;
15 class PIVXGUI;
16 
17 namespace Ui {
18 class RequestDialog;
19 }
20 
22 {
23  Q_OBJECT
24 
25 public:
26  explicit RequestDialog(QWidget *parent = nullptr);
28 
29  void setWalletModel(WalletModel *model);
30  void setPaymentRequest(bool _isPaymentRequest);
31  void showEvent(QShowEvent *event) override;
32  int res = -1;
33 
34 private Q_SLOTS:
35  void accept() override;
36  void onCopyClicked();
37  void onCopyUriClicked();
38 
39 private:
40  Ui::RequestDialog *ui{nullptr};
41  int pos = 0;
42  bool isPaymentRequest = true;
44  SnackBar *snackBar{nullptr};
45  // Cached last address
47 
48  void updateQr(const QString& str);
49  void inform(const QString& text);
50 };
51 
52 #endif // PIVX_QT_REQUESTDIALOG_H
PIVX GUI main class.
Definition: pivxgui.h:46
RequestDialog(QWidget *parent=nullptr)
SnackBar * snackBar
Definition: requestdialog.h:44
Ui::RequestDialog * ui
Definition: requestdialog.h:40
void updateQr(const QString &str)
void accept() override
void setWalletModel(WalletModel *model)
void onCopyUriClicked()
WalletModel * walletModel
Definition: requestdialog.h:43
bool isPaymentRequest
Definition: requestdialog.h:42
void showEvent(QShowEvent *event) override
void inform(const QString &text)
void setPaymentRequest(bool _isPaymentRequest)
SendCoinsRecipient * info
Definition: requestdialog.h:46
Interface to PIVX wallet from Qt view code.
Definition: walletmodel.h:109