feather/src/HistoryWidget.h

67 lines
1.5 KiB
C
Raw Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2022-02-10 10:26:41 +00:00
// SPDX-FileCopyrightText: 2020-2022 The Monero Project
#ifndef FEATHER_HISTORYWIDGET_H
#define FEATHER_HISTORYWIDGET_H
#include <QWidget>
#include <QMenu>
2021-06-28 17:48:23 +00:00
#include "appcontext.h"
#include "libwalletqt/Coins.h"
#include "libwalletqt/Wallet.h"
#include "model/TransactionHistoryModel.h"
#include "model/TransactionHistoryProxyModel.h"
namespace Ui {
class HistoryWidget;
}
class HistoryWidget : public QWidget
{
Q_OBJECT
public:
2021-05-18 15:59:18 +00:00
explicit HistoryWidget(QSharedPointer<AppContext> ctx, QWidget *parent = nullptr);
~HistoryWidget() override;
2021-05-23 14:58:18 +00:00
void setSearchbarVisible(bool visible);
void focusSearchbar();
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();
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;
2021-05-18 15:59:18 +00:00
QSharedPointer<AppContext> m_ctx;
QMenu *m_contextMenu;
QMenu *m_copyMenu;
TransactionHistoryProxyModel *m_model;
};
#endif //FEATHER_HISTORYWIDGET_H