mirror of
https://github.com/dashpay/dash.git
synced 2024-12-30 22:35:51 +01:00
ae506bae66
* qt|wallet|privatesend: Rename PrivateSend to CoinJoin in GUI strings * qt: Move CoinJoin next to Transactions * qt: Adjust status tip of privateSendCoinsMenuAction Co-authored-by: thephez <thephez@users.noreply.github.com> * rename: privateSend -> coinJoin * rename: privatesend -> coinjoin * rename: PrivateSend -> CoinJoin * rename: use_ps -> use_cj * rename: PRIVATESEND -> COINJOIN * rename: privatesend -> coinjoin for files and folders * refactor: Re-order coinjoin files in cmake/make files * refactor: Re-order coinjoin includes where it makes sense * test: Update lint-circular-dependencies.sh * Few cleanups * test: test/coinjoin_tests.cpp -> wallet/test/coinjoin_test.cpp * s/AdvancedPSUI/AdvancedCJUI/g * s/privateSentAmountChanged/coinJoinAmountChanged/g * wallet: Rename "ps_salt" backwards compatible * Minimal PrivateSend -> CoinJoin migration for settings and cmd-line * wallet: Fix privatesendrounds -> coinjoinrounds migration * qt: Migrate nPrivateSendAmount -> nCoinJoinAmount * `-coinjoindenoms` never existed * Migrate all PS options/settings * rpc: Formatting only * qt: Make Send/CoinJoin tabs a bit more distinguishable Co-authored-by: thephez <thephez@users.noreply.github.com> Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
130 lines
3.1 KiB
C++
130 lines
3.1 KiB
C++
// Copyright (c) 2011-2015 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_QT_TRANSACTIONVIEW_H
|
|
#define BITCOIN_QT_TRANSACTIONVIEW_H
|
|
|
|
#include <qt/guiutil.h>
|
|
|
|
#include <uint256.h>
|
|
|
|
#include <QWidget>
|
|
#include <QKeyEvent>
|
|
|
|
class TransactionFilterProxy;
|
|
class WalletModel;
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
class QComboBox;
|
|
class QDateTimeEdit;
|
|
class QFrame;
|
|
class QItemSelectionModel;
|
|
class QLineEdit;
|
|
class QMenu;
|
|
class QModelIndex;
|
|
class QSignalMapper;
|
|
class QTableView;
|
|
QT_END_NAMESPACE
|
|
|
|
/** Widget showing the transaction list for a wallet, including a filter row.
|
|
Using the filter row, the user can view or export a subset of the transactions.
|
|
*/
|
|
class TransactionView : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit TransactionView(QWidget* parent = 0);
|
|
|
|
void setModel(WalletModel *model);
|
|
|
|
// Date ranges for filter
|
|
enum DateEnum
|
|
{
|
|
All,
|
|
Today,
|
|
ThisWeek,
|
|
ThisMonth,
|
|
LastMonth,
|
|
ThisYear,
|
|
Range
|
|
};
|
|
|
|
enum ColumnWidths {
|
|
STATUS_COLUMN_WIDTH = 30,
|
|
WATCHONLY_COLUMN_WIDTH = 23,
|
|
DATE_COLUMN_WIDTH = 120,
|
|
TYPE_COLUMN_WIDTH = 240,
|
|
AMOUNT_MINIMUM_COLUMN_WIDTH = 120,
|
|
MINIMUM_COLUMN_WIDTH = 23
|
|
};
|
|
|
|
private:
|
|
WalletModel *model;
|
|
TransactionFilterProxy *transactionProxyModel;
|
|
QTableView *transactionView;
|
|
QComboBox *dateWidget;
|
|
QComboBox *typeWidget;
|
|
QComboBox *watchOnlyWidget;
|
|
QLineEdit *search_widget;
|
|
QLineEdit *amountWidget;
|
|
|
|
QMenu *contextMenu;
|
|
QSignalMapper *mapperThirdPartyTxUrls;
|
|
|
|
QFrame *dateRangeWidget;
|
|
QDateTimeEdit *dateFrom;
|
|
QDateTimeEdit *dateTo;
|
|
QAction *abandonAction;
|
|
|
|
QWidget *createDateRangeWidget();
|
|
void updateCalendarWidgets();
|
|
|
|
GUIUtil::TableViewLastColumnResizingFixer *columnResizingFixer;
|
|
|
|
virtual void resizeEvent(QResizeEvent* event) override;
|
|
void changeEvent(QEvent* e) override;
|
|
|
|
bool eventFilter(QObject *obj, QEvent *event) override;
|
|
|
|
private Q_SLOTS:
|
|
void contextualMenu(const QPoint &);
|
|
void dateRangeChanged();
|
|
void showDetails();
|
|
void showAddressQRCode();
|
|
void copyAddress();
|
|
void editLabel();
|
|
void copyLabel();
|
|
void copyAmount();
|
|
void copyTxID();
|
|
void copyTxHex();
|
|
void copyTxPlainText();
|
|
void openThirdPartyTxUrl(QString url);
|
|
void updateWatchOnlyColumn(bool fHaveWatchOnly);
|
|
void updateCoinJoinVisibility();
|
|
void abandonTx();
|
|
|
|
Q_SIGNALS:
|
|
void doubleClicked(const QModelIndex&);
|
|
|
|
/** Fired when a message should be reported to the user */
|
|
void message(const QString &title, const QString &message, unsigned int style);
|
|
|
|
/** Send computed sum back to wallet-view */
|
|
void trxAmount(QString amount);
|
|
|
|
public Q_SLOTS:
|
|
void chooseDate(int idx);
|
|
void chooseType(int idx);
|
|
void chooseWatchonly(int idx);
|
|
void changedAmount();
|
|
void changedSearch();
|
|
void exportClicked();
|
|
void focusTransaction(const QModelIndex&);
|
|
void focusTransaction(const uint256& txid);
|
|
void computeSum();
|
|
};
|
|
|
|
#endif // BITCOIN_QT_TRANSACTIONVIEW_H
|