PIVX Core  5.6.99
P2P Digital Currency
txviewholder.h
Go to the documentation of this file.
1 // Copyright (c) 2019-2021 The PIVX Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef PIVX_QT_TXVIEWHOLDER_H
6 #define PIVX_QT_TXVIEWHOLDER_H
7 
8 #include "bitcoinunits.h"
9 #include "furlistrow.h"
10 #include "txrow.h"
11 #include <transactionfilterproxy.h>
12 
13 QT_BEGIN_NAMESPACE
14 class QModelIndex;
15 QT_END_NAMESPACE
16 
17 class TxViewHolder : public FurListRow<QWidget*>
18 {
19 public:
21 
22  explicit TxViewHolder(bool _isLightTheme) : FurListRow(), isLightTheme(_isLightTheme){}
23 
24  QWidget* createHolder(int pos) override;
25 
26  void init(QWidget* holder,const QModelIndex &index, bool isHovered, bool isSelected) const override;
27 
28  QColor rectColor(bool isHovered, bool isSelected) override;
29 
30  ~TxViewHolder() override{};
31 
33 
34  void setDisplayUnit(int displayUnit){
35  this->nDisplayUnit = displayUnit;
36  }
37 
39  this->filter = _filter;
40  }
41 
42 private:
43  int nDisplayUnit{0};
45  TxRow* txRow{nullptr};
46 };
47 
48 #endif // PIVX_QT_TXVIEWHOLDER_H
Filter the transaction list according to pre-specified rules.
Definition: txrow.h:17
bool isLightTheme
Definition: txviewholder.h:30
~TxViewHolder() override
Definition: txviewholder.h:30
TxRow * txRow
Definition: txviewholder.h:45
TransactionFilterProxy * filter
Definition: txviewholder.h:44
TxViewHolder(bool _isLightTheme)
Definition: txviewholder.h:22
void init(QWidget *holder, const QModelIndex &index, bool isHovered, bool isSelected) const override
QColor rectColor(bool isHovered, bool isSelected) override
void setFilter(TransactionFilterProxy *_filter)
Definition: txviewholder.h:38
QWidget * createHolder(int pos) override
void setDisplayUnit(int displayUnit)
Definition: txviewholder.h:34