16#ifndef QGSATTRIBUTESFORMTREEVIEWITEMDELEGATE_H
17#define QGSATTRIBUTESFORMTREEVIEWITEMDELEGATE_H
30#include <QStyledItemDelegate>
38class QgsAttributesFormTreeViewProxyStyle :
public QgsProxyStyle
46 explicit QgsAttributesFormTreeViewProxyStyle( QgsAttributesFormBaseView *treeView );
48 QRect subElementRect( SubElement element,
const QStyleOption *option,
const QWidget *widget )
const override;
50 static const auto SE_AttributesFormTreeItemIndicator = SE_CustomBase + 1;
53 QgsAttributesFormBaseView *mAttributesFormTreeView;
63class QgsAttributesFormTreeViewItemDelegate :
public QStyledItemDelegate
70 explicit QgsAttributesFormTreeViewItemDelegate( QgsAttributesFormBaseView *parent );
72 void paint( QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const override;
74 bool helpEvent( QHelpEvent *event, QAbstractItemView *view,
const QStyleOptionViewItem &option,
const QModelIndex &index )
override;
77 QgsAttributesFormBaseView *mAttributesFormTreeView;
A QProxyStyle subclass which correctly sets the base style to match the QGIS application style,...