MCPcopy Create free account
hub / github.com/YACReader/yacreader / setEditorData

Method setEditorData

custom_widgets/yacreader_table_view.cpp:236–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236void YACReaderRatingDelegate::setEditorData(QWidget *editor,
237 const QModelIndex &index) const
238{
239 int rating = ((ComicItem *)index.internalPointer())->data(ComicModel::Rating).toInt();
240
241 StarRating starRating(rating);
242
243 StarEditor *starEditor = qobject_cast<StarEditor *>(editor);
244 starEditor->setStarRating(starRating);
245}
246
247void YACReaderRatingDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
248 const QModelIndex &index) const

Callers

nothing calls this directly

Calls 2

setStarRatingMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected