MCPcopy Create free account
hub / github.com/ckaiser/Lightscreen / notify

Method notify

lightscreenwindow.cpp:379–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377}
378
379void LightscreenWindow::notify(const Screenshot::Result &result)
380{
381 switch (result) {
382 case Screenshot::Success:
383 mTrayIcon->setIcon(QIcon(":/icons/lightscreen.yes"));
384
385 if (mHasTaskbarButton) {
386 mTaskbarButton->setOverlayIcon(os::icon("yes"));
387 }
388
389 setWindowTitle(tr("Success!"));
390 break;
391 case Screenshot::Failure:
392 mTrayIcon->setIcon(QIcon(":/icons/lightscreen.no"));
393 setWindowTitle(tr("Failed!"));
394
395 if (mHasTaskbarButton) {
396 mTaskbarButton->setOverlayIcon(os::icon("no"));
397 }
398
399 break;
400 case Screenshot::Cancel:
401 setWindowTitle(tr("Cancelled!"));
402 break;
403 }
404
405 QTimer::singleShot(2000, this, &LightscreenWindow::restoreNotification);
406}
407
408void LightscreenWindow::preview(Screenshot *screenshot)
409{

Callers

nothing calls this directly

Calls 1

QIconClass · 0.85

Tested by

no test coverage detected