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

Method updateStatus

lightscreenwindow.cpp:705–739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

703}
704
705void LightscreenWindow::updateStatus()
706{
707 int uploadCount = Uploader::instance()->uploading();
708 int activeCount = ScreenshotManager::instance()->activeCount();
709
710 if (mHasTaskbarButton) {
711 mTaskbarButton->progress()->setPaused(true);
712 mTaskbarButton->progress()->setVisible(true);
713 }
714
715 if (uploadCount > 0) {
716 setStatus(tr("%1 uploading").arg(uploadCount));
717
718 if (mHasTaskbarButton) {
719 mTaskbarButton->progress()->setRange(0, 100);
720 mTaskbarButton->progress()->resume();
721 }
722
723 emit uploading(true);
724 } else {
725 if (activeCount > 1) {
726 setStatus(tr("%1 processing").arg(activeCount));
727 } else if (activeCount == 1) {
728 setStatus(tr("processing"));
729 } else {
730 setStatus();
731
732 if (mHasTaskbarButton) {
733 mTaskbarButton->progress()->setVisible(false);
734 }
735 }
736
737 emit uploading(false);
738 }
739}
740
741void LightscreenWindow::updaterDone(bool result)
742{

Callers

nothing calls this directly

Calls 3

uploadingMethod · 0.80
activeCountMethod · 0.80
progressMethod · 0.45

Tested by

no test coverage detected