update highlineview lastorder

This commit is contained in:
2025-08-31 23:07:06 +08:00
parent 4bf7977a30
commit 6ede3eff92
11 changed files with 145 additions and 36 deletions

View File

@@ -3,8 +3,15 @@
#include <QObject>
#include <QStyledItemDelegate>
#include <QSortFilterProxyModel>
#include <QPainter>
// 在文件顶部添加高亮角色定义
enum CustomRoles {
IsHighlightedRole = Qt::UserRole + 100
};
/* 订单类型单元格渲染委托 */
class OrderTypeDelegate : public QStyledItemDelegate
{
@@ -33,4 +40,19 @@ public:
QString displayText(const QVariant &value, const QLocale &locale) const override;
};
#endif // ORDERTYPEDELEGATE_H
// 新大单高亮委托
class HighlightDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
explicit HighlightDelegate(QObject *parent = nullptr);
void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
// 可选如果需要编辑器可以重写createEditor等方法
};
#endif // HIGHLIGHTDELEGATE_H