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