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_HISTORYWIDGET_H
|
|
|
|
#define FEATHER_HISTORYWIDGET_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
#include <QMenu>
|
|
|
|
|
2024-10-01 20:17:54 +00:00
|
|
|
class TransactionHistoryProxyModel;
|
|
|
|
class Wallet;
|
2021-06-28 17:48:23 +00:00
|
|
|
|
2020-10-07 10:36:04 +00:00
|
|
|
namespace Ui {
|
|
|
|
class HistoryWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
class HistoryWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2023-03-01 02:05:56 +00:00
|
|
|
explicit HistoryWidget(Wallet *wallet, QWidget *parent = nullptr);
|
2020-10-07 10:36:04 +00:00
|
|
|
~HistoryWidget() override;
|
|
|
|
|
2021-05-23 14:58:18 +00:00
|
|
|
void setSearchbarVisible(bool visible);
|
|
|
|
void focusSearchbar();
|
2022-07-03 16:24:33 +00:00
|
|
|
void setWebsocketEnabled(bool enabled);
|
2021-05-23 14:58:18 +00:00
|
|
|
|
2020-10-07 10:36:04 +00:00
|
|
|
public slots:
|
|
|
|
void setSearchText(const QString &text);
|
2020-12-30 04:45:00 +00:00
|
|
|
void resetModel();
|
2020-12-30 03:58:17 +00:00
|
|
|
void onWalletRefreshed();
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void viewOnBlockExplorer(QString txid);
|
2020-12-14 22:07:23 +00:00
|
|
|
void resendTransaction(QString txid);
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void showTxDetails();
|
|
|
|
void onViewOnBlockExplorer();
|
|
|
|
void setSearchFilter(const QString &filter);
|
2020-12-14 22:07:23 +00:00
|
|
|
void onResendTransaction();
|
2024-03-13 13:10:20 +00:00
|
|
|
void onRemoveFromHistory();
|
2021-03-08 20:03:20 +00:00
|
|
|
void createTxProof();
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
enum copyField {
|
|
|
|
TxID = 0,
|
2021-03-08 20:03:20 +00:00
|
|
|
Description,
|
2020-10-07 10:36:04 +00:00
|
|
|
Date,
|
|
|
|
Amount
|
|
|
|
};
|
|
|
|
|
|
|
|
void copy(copyField field);
|
2020-12-14 22:07:23 +00:00
|
|
|
void showContextMenu(const QPoint &point);
|
2020-12-30 03:58:17 +00:00
|
|
|
void showSyncNoticeMsg();
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2021-06-27 12:13:05 +00:00
|
|
|
QScopedPointer<Ui::HistoryWidget> ui;
|
2023-03-01 02:05:56 +00:00
|
|
|
Wallet *m_wallet;
|
2020-10-07 10:36:04 +00:00
|
|
|
QMenu *m_contextMenu;
|
|
|
|
QMenu *m_copyMenu;
|
|
|
|
TransactionHistoryProxyModel *m_model;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //FEATHER_HISTORYWIDGET_H
|