Rework itemdelegate, part I.

This commit is contained in:
2025-12-29 15:44:06 +01:00
parent 527f66759f
commit 0bb39a74fe
10 changed files with 64 additions and 147 deletions

View File

@@ -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: