LIDL Soundboard  1.9.0
A simple soundboard, yet better than EXP Soundboard forsenE
StyledDelegate Class Reference

#include <StyledDelegate.h>

Inheritance diagram for StyledDelegate:
Inheritance graph
Collaboration diagram for StyledDelegate:
Collaboration graph

Public Member Functions

 StyledDelegate (LIDL::HoverBehavior behavior=LIDL::HoverBehavior::HoverRows, QObject *parent=0)
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 

Private Attributes

LIDL::HoverBehavior hoverBehavior
 

Constructor & Destructor Documentation

◆ StyledDelegate()

StyledDelegate::StyledDelegate ( LIDL::HoverBehavior  behavior = LIDL::HoverBehavior::HoverRows,
QObject *  parent = 0 
)
explicit

References hoverBehavior.

Member Function Documentation

◆ paint()

void StyledDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const

注意这里用的是index而不是idx,我们不处理当前的hover项,交给父类处理

[1] 设置文字对齐方式

[2] 设置图标

修正hover列时不及时绘制的bug

for

HoverItems 交给父类处理

else

if

References hoverBehavior, LIDL::HoverItems, and LIDL::HoverRows.

Member Data Documentation

◆ hoverBehavior

LIDL::HoverBehavior StyledDelegate::hoverBehavior
private

Referenced by paint(), and StyledDelegate().


The documentation for this class was generated from the following files: