feather/src/ReceiveWidget.h

65 lines
1.6 KiB
C
Raw Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2024-01-01 17:07:58 +00:00
// SPDX-FileCopyrightText: 2020-2024 The Monero Project
#ifndef FEATHER_RECEIVEWIDGET_H
#define FEATHER_RECEIVEWIDGET_H
2021-06-28 17:48:23 +00:00
#include <QMenu>
#include <QWidget>
#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"
2023-11-16 15:26:58 +00:00
#include "utils/config.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:
QString getAddress(quint32 minorIndex);
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();
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();
private:
2021-06-27 12:13:05 +00:00
QScopedPointer<Ui::ReceiveWidget> ui;
Wallet *m_wallet;
QMenu *m_headerMenu;
QAction *m_showTransactionsAction;
2023-03-29 09:00:41 +00:00
SubaddressModel *m_model;
SubaddressProxyModel *m_proxyModel;
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();
void showQrCodeDialog();
2023-11-16 15:26:58 +00:00
SubaddressRow* currentEntry();
};
#endif //FEATHER_RECEIVEWIDGET_H