17 #ifndef QGSDETAILEDITEMDELEGATE_H
18 #define QGSDETAILEDITEMDELEGATE_H
20 #include <QAbstractItemDelegate>
46 void paint( QPainter *painter,
47 const QStyleOptionViewItem &option,
48 const QModelIndex &index )
const override;
50 QSize sizeHint(
const QStyleOptionViewItem &option,
51 const QModelIndex &index )
const override;
53 void setVerticalSpacing(
int value );
55 int verticalSpacing()
const;
57 void setHorizontalSpacing(
int value );
59 int horizontalSpacing()
const;
62 QFont detailFont(
const QStyleOptionViewItem &option )
const;
63 QFont categoryFont(
const QStyleOptionViewItem &option )
const;
64 QFont titleFont(
const QStyleOptionViewItem &option )
const;
65 void drawHighlight(
const QStyleOptionViewItem &option,
66 QPainter *thepPainter,
69 QStringList wordWrap(
const QString &
string,
70 const QFontMetrics &metrics,
72 void paintManually( QPainter *painter,
73 const QStyleOptionViewItem &option,
75 void paintAsWidget( QPainter *painter,
76 const QStyleOptionViewItem &option,
78 int height(
const QStyleOptionViewItem &option,
81 QCheckBox *mpCheckBox =
nullptr;
83 int mHorizontalSpacing;
This class is the data only representation of a QgsDetailedItemWidget, designed to be used in custom ...
A custom model/view delegate that can display an icon, heading and detail sections.