//
// Created by uos on 2022/4/26.
//

#ifndef UOS_RECOVERY_SELECTFILETREEVIEW_H
#define UOS_RECOVERY_SELECTFILETREEVIEW_H

#include "BaseTableView.h"
#include "SelectFileItemDelegate.h"

DWIDGET_USE_NAMESPACE

class BaseItemDelegate;
class BaseHeaderView;
class QModelIndex;


class SelectFileTreeView : public BaseTableView
{
Q_OBJECT

public:
    explicit SelectFileTreeView(DWidget *parent = nullptr);
    void setAlwaysChecked(bool checked);

protected:
    void paintEvent(QPaintEvent *event) override;
    void drawRow(QPainter *painter, const QStyleOptionViewItem &options,
                 const QModelIndex &index) const override;
private:
    SelectFileItemDelegate *m_itemDelegate = nullptr;

    QModelIndex m_hover;
    QModelIndex m_pressed;
};


#endif //UOS_RECOVERY_SELECTFILETREEVIEW_H
