#ifndef ALLNOTEBUTTONTREEDELEGATEEDITOR_H
#define ALLNOTEBUTTONTREEDELEGATEEDITOR_H

#include <QWidget>
//用来描述书图像的显示选项
#include <QStyleOptionViewItem>
//用于在模型/视图架构中索引项
#include <QModelIndex>
//用于设置和管理字体
#include <QFont>
#include "editorsettingsoptions.h"

//用于显示树形视图的组件
class QTreeView;
//用于显示列表视图的组件
class QListView;

class AllNoteButtonTreeDelegateEditor : public QWidget
{
    Q_OBJECT
public:
    explicit AllNoteButtonTreeDelegateEditor(QTreeView *view, const QStyleOptionViewItem &option,
                                             const QModelIndex &index, QListView *listView,
                                             QWidget *parent = nullptr);
    void setTheme(Theme::Value theme);

private:
    QStyleOptionViewItem m_option;
    QModelIndex m_index;
    QString m_displayFont;
    QFont m_titleFont;
    QFont m_numberOfNotesFont;
    QColor m_titleColor;
    QColor m_titleSelectedColor;
    QColor m_activeColor;
    QColor m_hoverColor;
    QColor m_folderIconColor;
    QColor m_numberOfNotesColor;
    QColor m_numberOfNotesSelectedColor;
    QTreeView *m_view;
    QListView *m_listView;
    Theme::Value m_theme;
    // QWidget interface
protected:
    //重写QWidget的paintEvent函数，用于自定义绘制编辑器小部件的内容
    virtual void paintEvent(QPaintEvent *event) override;
};

#endif // ALLNOTEBUTTONTREEDELEGATEEDITOR_H
