RCS file: /var/lib/mythcvs/mythtv/libs/libmyth/mythdialogs.cpp,v
retrieving revision 1.111
diff -u -r1.111 mythdialogs.cpp
|
|
|
1425 | 1425 | progress = new QProgressBar(totalSteps, vbox); |
1426 | 1426 | progress->setBackgroundOrigin(ParentOrigin); |
1427 | 1427 | progress->setProgress(0); |
1428 | | |
| 1428 | |
| 1429 | totalsteps = totalSteps; |
1429 | 1430 | steps = totalSteps / 1000; |
1430 | 1431 | if (steps == 0) |
1431 | 1432 | steps = 1; |
… |
… |
|
1463 | 1464 | |
1464 | 1465 | void MythProgressDialog::setProgress(int curprogress) |
1465 | 1466 | { |
1466 | | float fProgress = (float)curprogress / (steps * 1000.0); |
1467 | | if (class LCD * lcddev = LCD::Get()) |
1468 | | lcddev->setGenericProgress(fProgress); |
1469 | 1467 | progress->setProgress(curprogress); |
1470 | | if (curprogress % steps == 0) |
| 1468 | if (curprogress % steps == 0) { |
1471 | 1469 | qApp->processEvents(); |
| 1470 | if (class LCD * lcddev = LCD::Get()) { |
| 1471 | float fProgress = (float)curprogress / totalsteps; |
| 1472 | lcddev->setGenericProgress(fProgress); |
| 1473 | } |
| 1474 | } |
1472 | 1475 | } |
1473 | 1476 | |
1474 | 1477 | void MythProgressDialog::keyPressEvent(QKeyEvent *e) |
RCS file: /var/lib/mythcvs/mythtv/libs/libmyth/mythdialogs.h,v
retrieving revision 1.47
diff -u -r1.47 mythdialogs.h
|
|
|
232 | 232 | |
233 | 233 | private: |
234 | 234 | QProgressBar *progress; |
| 235 | int totalsteps; |
235 | 236 | int steps; |
236 | 237 | |
237 | 238 | QPtrList<class LCDTextItem> * textItems; |