feather/src/ReceiveWidget.h

73 lines
1.8 KiB
C
Raw Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2023-01-02 19:30:11 +00:00
// SPDX-FileCopyrightText: 2020-2023 The Monero Project
#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
#include "libwalletqt/Subaddress.h"
#include "libwalletqt/Wallet.h"
#include "model/SubaddressProxyModel.h"
#include "model/SubaddressModel.h"
2021-06-28 17:48:23 +00:00
#include "qrcode/QrCode.h"
namespace Ui {
class ReceiveWidget;
}
class ReceiveWidget : public QWidget
{
Q_OBJECT
public:
explicit ReceiveWidget(Wallet *wallet, QWidget *parent = nullptr);
~ReceiveWidget() override;
2021-05-23 14:58:18 +00:00
void setSearchbarVisible(bool visible);
void focusSearchbar();
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);
void setSearchFilter(const QString &filter);
void onShowTransactions();
2021-10-01 17:10:46 +00:00
void createPaymentRequest();
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();
private:
2021-06-27 12:13:05 +00:00
QScopedPointer<Ui::ReceiveWidget> ui;
Wallet *m_wallet;
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();
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();
};
#endif //FEATHER_RECEIVEWIDGET_H