void HelpersQmlWrapper::turnTaskbarProgressOff() { #if defined(Q_OS_WIN) && !defined(UI_TESTS) if (!m_WinTaskbarButtonApplicable) { return; } LOG_DEBUG << "Turning off taskbar button in Windows"; QWinTaskbarProgress *progress = m_TaskbarButton->progress(); progress->setVisible(false); #endif }
void ProgressDialog::finish() { accept(); progress->setValue(0); #ifdef WINEXTRAS taskbar->clearOverlayIcon(); QWinTaskbarProgress *taskProgress = taskbar->progress(); taskProgress->setVisible(false); taskProgress->reset(); #endif }
void ProgressDialog::reset() { progress->setValue(0); #ifdef WINEXTRAS if (isWinExtras) { taskbar->clearOverlayIcon(); QWinTaskbarProgress *taskProgress = taskbar->progress(); taskProgress->setVisible(false); taskProgress->reset(); } #endif }
void ProgressDialog::setProgress(short percentage, QString text) { label->setText(text); progress->setValue(percentage); #ifdef WINEXTRAS if (isWinExtras) { taskbar->setWindow(static_cast<QWidget*>(parent())->windowHandle()); if (icon->pixmap()) { taskbar->setOverlayIcon(*icon->pixmap()); } QWinTaskbarProgress *taskProgress = taskbar->progress(); taskProgress->setValue(percentage); taskProgress->setVisible(true); } #endif show(); }
void MainWindow::OnItemsManagerStatusUpdate(const ItemsFetchStatus &status) { QString str = QString("Receiving stash data, %1/%2").arg(status.fetched).arg(status.total); if (status.throttled) str += " (throttled, sleeping 60 seconds)"; if (status.fetched == status.total) str = "Received all tabs"; status_bar_label_->setText(str); #ifdef Q_OS_WIN32 QWinTaskbarProgress *progress = taskbar_button_->progress(); progress->setVisible(status.fetched != status.total); progress->setMinimum(0); progress->setMaximum(status.total); progress->setValue(status.fetched); progress->setPaused(status.throttled); #endif }