MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / StartFireworks

Function StartFireworks

Telegram/SourceFiles/ui/boxes/boost_box.cpp:311–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309} // namespace
310
311void StartFireworks(not_null<QWidget*> parent) {
312 const auto result = Ui::CreateChild<RpWidget>(parent.get());
313 result->setAttribute(Qt::WA_TransparentForMouseEvents);
314 result->setGeometry(parent->rect());
315 result->show();
316
317 auto &lifetime = result->lifetime();
318 const auto animation = lifetime.make_state<FireworksAnimation>([=] {
319 result->update();
320 });
321 result->paintRequest() | rpl::on_next([=] {
322 auto p = QPainter(result);
323 if (!animation->paint(p, result->rect())) {
324 crl::on_main(result, [=] { delete result; });
325 }
326 }, lifetime);
327}
328
329void BoostBox(
330 not_null<GenericBox*> box,

Callers 8

StartCraftAnimationFunction · 0.85
UpgradeBoxFunction · 0.85
GiftCodeBoxFunction · 0.85
setupContentMethod · 0.85
setupValidateGoodMethod · 0.85
setupContentMethod · 0.85
BoostBoxFunction · 0.85
ProcessCreditsPaymentFunction · 0.85

Calls 7

QPainterClass · 0.50
getMethod · 0.45
setGeometryMethod · 0.45
rectMethod · 0.45
showMethod · 0.45
updateMethod · 0.45
paintMethod · 0.45

Tested by

no test coverage detected