2020-10-07 10:36:04 +00:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2023-01-02 19:30:11 +00:00
|
|
|
// SPDX-FileCopyrightText: 2020-2023 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>
|
2022-05-24 13:18:43 +00:00
|
|
|
#include <QSvgWidget>
|
2021-06-28 17:48:23 +00:00
|
|
|
|
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"
|
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:
|
|
|
|
void copyAddress();
|
|
|
|
void copyLabel();
|
|
|
|
void editLabel();
|
|
|
|
void showContextMenu(const QPoint& point);
|
|
|
|
void setShowFullAddresses(bool show);
|
|
|
|
void setShowUsedAddresses(bool show);
|
2021-03-14 21:12:02 +00:00
|
|
|
void setShowHiddenAddresses(bool show);
|
2020-10-07 10:36:04 +00:00
|
|
|
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-03-14 21:12:02 +00:00
|
|
|
void hideAddress();
|
|
|
|
void showAddress();
|
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_showFullAddressesAction;
|
|
|
|
QAction *m_showUsedAddressesAction;
|
|
|
|
QAction *m_showTransactionsAction;
|
|
|
|
SubaddressModel * m_model;
|
|
|
|
SubaddressProxyModel * m_proxyModel;
|
|
|
|
|
2020-11-14 11:11:54 +00:00
|
|
|
void updateQrCode();
|
2020-10-07 10:36:04 +00:00
|
|
|
void showQrCodeDialog();
|
2021-03-14 21:12:02 +00:00
|
|
|
QStringList getHiddenAddresses();
|
|
|
|
void addHiddenAddress(const QString& address);
|
|
|
|
void removeHiddenAddress(const QString& address);
|
|
|
|
Monero::SubaddressRow* currentEntry();
|
2020-10-07 10:36:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //FEATHER_RECEIVEWIDGET_H
|