feather/src/HistoryWidget.h

66 lines
1.4 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_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
namespace Ui {
class HistoryWidget;
}
class HistoryWidget : public QWidget
{
Q_OBJECT
public:
explicit HistoryWidget(Wallet *wallet, QWidget *parent = nullptr);
~HistoryWidget() override;
2021-05-23 14:58:18 +00:00
void setSearchbarVisible(bool visible);
void focusSearchbar();
void setWebsocketEnabled(bool enabled);
2021-05-23 14:58:18 +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();
signals:
void viewOnBlockExplorer(QString txid);
2020-12-14 22:07:23 +00:00
void resendTransaction(QString txid);
private slots:
void showTxDetails();
void onViewOnBlockExplorer();
void setSearchFilter(const QString &filter);
2020-12-14 22:07:23 +00:00
void onResendTransaction();
void onRemoveFromHistory();
2021-03-08 20:03:20 +00:00
void createTxProof();
private:
enum copyField {
TxID = 0,
2021-03-08 20:03:20 +00:00
Description,
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();
2021-06-27 12:13:05 +00:00
QScopedPointer<Ui::HistoryWidget> ui;
Wallet *m_wallet;
QMenu *m_contextMenu;
QMenu *m_copyMenu;
TransactionHistoryProxyModel *m_model;
};
#endif //FEATHER_HISTORYWIDGET_H