You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wowlet/src/historywidget.h

64 lines
1.4 KiB

// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2020-2021, The Monero Project.
#ifndef WOWLET_HISTORYWIDGET_H
#define WOWLET_HISTORYWIDGET_H
#include "model/TransactionHistoryModel.h"
#include "model/TransactionHistoryProxyModel.h"
#include "libwalletqt/Coins.h"
#include "libwalletqt/Wallet.h"
#include <QWidget>
#include <QMenu>
namespace Ui {
class HistoryWidget;
}
class HistoryWidget : public QWidget
{
Q_OBJECT
public:
explicit HistoryWidget(QWidget *parent = nullptr);
void setModel(TransactionHistoryProxyModel *model, Wallet *wallet);
~HistoryWidget() override;
public slots:
void setSearchText(const QString &text);
void resetModel();
void onWalletRefreshed();
void onWalletOpened();
signals:
void viewOnBlockExplorer(QString txid);
void resendTransaction(QString txid);
private slots:
void showTxDetails();
void onViewOnBlockExplorer();
void setSearchFilter(const QString &filter);
void onResendTransaction();
private:
enum copyField {
TxID = 0,
Date,
Amount
};
void copy(copyField field);
void showContextMenu(const QPoint &point);
void showSyncNoticeMsg();
Ui::HistoryWidget *ui;
QMenu *m_contextMenu;
QMenu *m_copyMenu;
TransactionHistory *m_txHistory;
TransactionHistoryProxyModel *m_model;
Wallet *m_wallet = nullptr;
};
#endif //WOWLET_HISTORYWIDGET_H