feather/src/receivewidget.h

69 lines
1.7 KiB
C
Raw Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2020-12-26 19:56:06 +00:00
// Copyright (c) 2020-2021, The Monero Project.
#ifndef FEATHER_RECEIVEWIDGET_H
#define FEATHER_RECEIVEWIDGET_H
#include "appcontext.h"
#include "qrcode/QrCode.h"
#include "libwalletqt/Subaddress.h"
#include "model/SubaddressProxyModel.h"
#include "model/SubaddressModel.h"
#include <QWidget>
#include <QtSvg/QSvgWidget>
namespace Ui {
class ReceiveWidget;
}
class ReceiveWidget : public QWidget
{
Q_OBJECT
public:
2021-05-18 15:59:18 +00:00
explicit ReceiveWidget(QSharedPointer<AppContext> ctx, QWidget *parent = nullptr);
~ReceiveWidget() override;
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();
2020-12-31 06:54:19 +00:00
void resetModel();
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:
Ui::ReceiveWidget *ui;
2021-05-18 15:59:18 +00:00
QSharedPointer<AppContext> m_ctx;
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