2020-10-07 10:36:04 +00:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2024-01-01 17:07:58 +00:00
|
|
|
// SPDX-FileCopyrightText: 2020-2024 The Monero Project
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
#ifndef FEATHER_RECEIVEWIDGET_H
|
|
|
|
#define FEATHER_RECEIVEWIDGET_H
|
|
|
|
|
2021-06-28 17:48:23 +00:00
|
|
|
#include <QMenu>
|
|
|
|
#include <QWidget>
|
|
|
|
|
2020-10-07 10:36:04 +00:00
|
|
|
#include "libwalletqt/Subaddress.h"
|
2023-03-01 02:05:56 +00:00
|
|
|
#include "libwalletqt/Wallet.h"
|
2020-10-07 10:36:04 +00:00
|
|
|
#include "model/SubaddressProxyModel.h"
|
|
|
|
#include "model/SubaddressModel.h"
|
2021-06-28 17:48:23 +00:00
|
|
|
#include "qrcode/QrCode.h"
|
2023-11-16 15:26:58 +00:00
|
|
|
#include "utils/config.h"
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class ReceiveWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
class ReceiveWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2023-03-01 02:05:56 +00:00
|
|
|
explicit ReceiveWidget(Wallet *wallet, QWidget *parent = nullptr);
|
2020-10-07 10:36:04 +00:00
|
|
|
~ReceiveWidget() override;
|
|
|
|
|
2021-05-23 14:58:18 +00:00
|
|
|
void setSearchbarVisible(bool visible);
|
|
|
|
void focusSearchbar();
|
|
|
|
|
2020-10-07 10:36:04 +00:00
|
|
|
public slots:
|
2024-03-08 16:35:57 +00:00
|
|
|
QString getAddress(quint32 minorIndex);
|
2020-10-07 10:36:04 +00:00
|
|
|
void copyAddress();
|
|
|
|
void copyLabel();
|
|
|
|
void editLabel();
|
|
|
|
void showContextMenu(const QPoint& point);
|
|
|
|
void setSearchFilter(const QString &filter);
|
|
|
|
void onShowTransactions();
|
2021-10-01 17:10:46 +00:00
|
|
|
void createPaymentRequest();
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void showTransactions(const QString& address);
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void showHeaderMenu(const QPoint& position);
|
2021-05-02 18:22:38 +00:00
|
|
|
void showOnDevice();
|
|
|
|
void generateSubaddress();
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
private:
|
2021-06-27 12:13:05 +00:00
|
|
|
QScopedPointer<Ui::ReceiveWidget> ui;
|
2023-03-01 02:05:56 +00:00
|
|
|
Wallet *m_wallet;
|
2020-10-07 10:36:04 +00:00
|
|
|
QMenu *m_headerMenu;
|
|
|
|
QAction *m_showTransactionsAction;
|
2023-03-29 09:00:41 +00:00
|
|
|
SubaddressModel *m_model;
|
|
|
|
SubaddressProxyModel *m_proxyModel;
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2023-11-16 15:26:58 +00:00
|
|
|
void addOption(QMenu *menu, const QString &text, Config::ConfigKey key, const std::function<void(bool show)>& func);
|
2020-11-14 11:11:54 +00:00
|
|
|
void updateQrCode();
|
2020-10-07 10:36:04 +00:00
|
|
|
void showQrCodeDialog();
|
2023-11-16 15:26:58 +00:00
|
|
|
SubaddressRow* currentEntry();
|
2020-10-07 10:36:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //FEATHER_RECEIVEWIDGET_H
|