Download src/delegate.cc from dlxjj/goldendict-ng: direct link, hf CLI and curl.
- Browser
- Download file 641 Bytes
-
https://huggingface.co/datasets/dlxjj/goldendict-ng/resolve/main/src/delegate.cc
- Command line
-
hf download hf://datasets/dlxjj/goldendict-ng/src/delegate.cc
-
curl -L -o delegate.cc https://huggingface.co/datasets/dlxjj/goldendict-ng/resolve/main/src/delegate.cc
641 Bytes
| WordListItemDelegate::WordListItemDelegate( QAbstractItemDelegate * delegate ): | |
| QStyledItemDelegate() | |
| { | |
| mainDelegate = static_cast< QStyledItemDelegate * >( delegate ); | |
| } | |
| void WordListItemDelegate::paint( QPainter * painter, | |
| const QStyleOptionViewItem & option, | |
| const QModelIndex & index ) const | |
| { | |
| QStyleOptionViewItem opt = option; | |
| initStyleOption( &opt, index ); | |
| if ( opt.text.isRightToLeft() ) { | |
| opt.direction = Qt::RightToLeft; | |
| } | |
| else { | |
| opt.direction = Qt::LeftToRight; | |
| } | |
| mainDelegate->paint( painter, opt, index ); | |
| } | |