#ifndef GROUPSCREENDELEGATE_H #define GROUPSCREENDELEGATE_H #include "Common/BaseViewEx/buttondelegate.h" class GroupScreenDelegate : public ButtonDelegate { Q_OBJECT public: explicit GroupScreenDelegate(QObject *parent = nullptr); void SetDragTarget(int nTargetRow, bool bIsUpOn); public: void PaintText(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; private: QString GetCheckboxImage(Qt::CheckState state) const; private: // 目标行 int m_nTargetRow; // 指示线是否在目标行上方 bool m_bIsUpOn; // 指示线圆角 int m_nRadius; }; #endif // GROUPSCREENDELEGATE_H