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

Method starAtPosition

custom_widgets/yacreader_table_view.cpp:420–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418}
419
420int StarEditor::starAtPosition(int x)
421{
422 int star = (x / (myStarRating.sizeHint().width() / myStarRating.maxStarCount())) + 1;
423 if (star <= 0 || star > myStarRating.maxStarCount())
424 return -1;
425
426 return star;
427}

Callers

nothing calls this directly

Calls 2

maxStarCountMethod · 0.80
sizeHintMethod · 0.45

Tested by

no test coverage detected