Rework itemdelegate, part I.
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
class QPropertyAnimation;
|
||||
class QVariantAnimation;
|
||||
class QTableView;
|
||||
class BCValueList;
|
||||
|
||||
class BCDelegate : public QStyledItemDelegate
|
||||
{
|
||||
@@ -46,7 +47,7 @@ class BCDelegate : public QStyledItemDelegate
|
||||
|
||||
public:
|
||||
|
||||
explicit BCDelegate(QTableView* view );
|
||||
explicit BCDelegate(const BCValueList& valueList, QTableView* view );
|
||||
|
||||
QString displayText(const QVariant& dataValue, const QLocale& locale) const override;
|
||||
|
||||
@@ -89,9 +90,12 @@ private:
|
||||
QString formatDisplayString(const QModelIndex& index) const;
|
||||
void paintHighlightRow(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
||||
|
||||
const BCValueList& _valueList;
|
||||
QTableView* _view{};
|
||||
|
||||
int _highlightedRow{-1};
|
||||
qreal _opacity{1.0};
|
||||
QTableView* _view{};
|
||||
|
||||
QPropertyAnimation* _animation{};
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user