PIVX Core  5.6.99
P2P Digital Currency
furabstractlistitemdelegate.h
Go to the documentation of this file.
1 // Copyright (c) 2019-2020 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_FURABSTRACTLISTITEMDELEGATE_H
6 #define PIVX_QT_FURABSTRACTLISTITEMDELEGATE_H
7 
8 #include "furlistrow.h"
9 
10 #include <QAbstractItemDelegate>
11 #include <QColor>
12 #include <QModelIndex>
13 #include <QObject>
14 #include <QPaintEngine>
15 #include <QPainter>
16 #include <QWidget>
17 
18 QT_BEGIN_NAMESPACE
19 class QModelIndex;
20 QT_END_NAMESPACE
21 
22 class FurAbstractListItemDelegate : public QAbstractItemDelegate
23 {
24  Q_OBJECT
25 public:
26  FurAbstractListItemDelegate(int _rowHeight, FurListRow<>* _row, QObject *parent=nullptr);
27 
28  QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
29  void paint(QPainter *painter, const QStyleOptionViewItem &option,
30  const QModelIndex &index ) const;
31 
33 private:
34  int rowHeight = 0;
35  FurListRow<>* row = nullptr;
36 
37 };
38 
39 #endif // PIVX_QT_FURABSTRACTLISTITEMDELEGATE_H
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
FurAbstractListItemDelegate(int _rowHeight, FurListRow<> *_row, QObject *parent=nullptr)