[Interest] How to properly show progress for a signal processing pipeline

Murphy, Sean smurphy at walbro.com
Mon Apr 8 18:02:10 CEST 2019


> I would just show one progress set to 3 * raw count.  Each stage
> periodically signals to the ui thread its progress, and whether it has
> processed the end-of-data signal from the previous stage.  In the ui
> thread slot:
> 
> int totalCount, rawCount;
> 
> QVector<int> stageProgress;
> 
> void stageProgressSlot(int stageIndex, int count, bool completed) {
> 
>      Q_ASSERT(count <= rawCount);
> 
>      auto thisCount = (if completed ? rawCount : count);
> 
>      Q_ASSERT(thisCount >= stageProgress[stageIndex]);
> 
>      totalCount += thisCount - stageProgress[stageIndex];
> 
>      stageProgress[stageIndex] = thisCount;
> 
>      ui->progress->setValue(totalCount);
> 
> }
> 
> It will always appear to start slowly then jump forward depending on the
> degree of filtering.  I can't see a way to avoid that other than Bill's
> idea.
> 
> Hope that helps,  Tony

I think it does, thank you. I can't really see any other way to do it to 
provide a somewhat meaningful progress bar - I'd like to avoid the
"busy" progress bar if possible since that doesn't offer the user any sort
of sense of how much longer they have to wait and your idea at least
gives them some sense of status, even if it's not 100% accurate at all times.

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com


More information about the Interest mailing list