-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathReceiveWidget.h
More file actions
65 lines (51 loc) · 1.55 KB
/
ReceiveWidget.h
File metadata and controls
65 lines (51 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// SPDX-License-Identifier: BSD-3-Clause
// SPDX-FileCopyrightText: The Monero Project
#ifndef FEATHER_RECEIVEWIDGET_H
#define FEATHER_RECEIVEWIDGET_H
#include <QMenu>
#include <QWidget>
#include "libwalletqt/Subaddress.h"
#include "libwalletqt/Wallet.h"
#include "model/SubaddressProxyModel.h"
#include "model/SubaddressModel.h"
#include "qrcode/QrCode.h"
#include "utils/config.h"
namespace Ui {
class ReceiveWidget;
}
class ReceiveWidget : public QWidget
{
Q_OBJECT
public:
explicit ReceiveWidget(Wallet *wallet, QWidget *parent = nullptr);
~ReceiveWidget() override;
void setSearchbarVisible(bool visible);
void focusSearchbar();
public slots:
QString getAddress(quint32 minorIndex);
void copyAddress();
void copyLabel();
void editLabel();
void showContextMenu(const QPoint& point);
void setSearchFilter(const QString &filter);
void onShowTransactions();
void createPaymentRequest();
signals:
void showTransactions(const QString& address);
private slots:
void showHeaderMenu(const QPoint& position);
void showOnDevice();
void generateSubaddress();
private:
QScopedPointer<Ui::ReceiveWidget> ui;
Wallet *m_wallet;
QMenu *m_headerMenu;
QAction *m_showTransactionsAction;
SubaddressModel *m_model;
SubaddressProxyModel *m_proxyModel;
QModelIndex getCurrentIndex();
void addOption(QMenu *menu, const QString &text, Config::ConfigKey key, const std::function<void(bool show)>& func);
void updateQrCode();
void showQrCodeDialog();
};
#endif //FEATHER_RECEIVEWIDGET_H