int Proc::getGlobalProgressPercent()
{
- list<ProgressWeight> weightList = getProgressWeight();
- int weightDone = 0;
- int weightTotal = 0;
- int progressPercent = 0;
- for(list<ProgressWeight>::const_iterator iter=weightList.begin();iter!=weightList.end();iter++)
- {
- weightDone += (*iter).weightDone;
- weightTotal += (*iter).weightTotal;
- }
+ list<ProgressWeight> weightList = getProgressWeight();
+ int weightDone = 0;
+ int weightTotal = 0;
+ int progressPercent = 0;
+ for(list<ProgressWeight>::const_iterator iter=weightList.begin();iter!=weightList.end();iter++)
+ {
+ weightDone += (*iter).weightDone;
+ weightTotal += (*iter).weightTotal;
+ }
if (weightTotal > 0)
- progressPercent = int(float(weightDone) / float(weightTotal) * 100);
+ progressPercent = int(float(weightDone) / float(weightTotal) * 100);
return progressPercent;
}