MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / setLogo

Method setLogo

src/plugins/core/gui/loadingwidget.cpp:29–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void loadingWidget::setLogo()
30{
31 backgroundLogo = new DLabel(this);
32 backgroundLogo->setPixmap(QIcon::fromTheme("deepin_unioncode_backgroundLogo").pixmap(128));
33
34 logo = new DLabel(backgroundLogo);
35 logo->setPixmap(QIcon::fromTheme("deepin_unioncode_logo").pixmap(128));
36
37 QHBoxLayout *hlayout = new QHBoxLayout;
38 hlayout->addWidget(logo);
39 backgroundLogo->setLayout(hlayout);
40
41 opacityEffect = new QGraphicsOpacityEffect(this);
42
43 connect(&timer, &QTimer::timeout, this, [=]() {
44 opacity -= 0.1;
45
46 if (opacity < -0.9)
47 opacity = 1.0;
48
49 opacityEffect->setOpacity(qAbs(opacity));
50 logo->setGraphicsEffect(opacityEffect);
51 });
52 timer.start(150);
53}

Callers

nothing calls this directly

Calls 4

connectFunction · 0.85
addWidgetMethod · 0.45
setOpacityMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected