- Added ratio column

This commit is contained in:
Christophe Dumez 2007-07-18 07:44:52 +00:00
parent eb3db365e7
commit 86a0e68f46
8 changed files with 110 additions and 27 deletions

View file

@ -37,7 +37,7 @@
#define DLSPEED 3
#define UPSPEED 4
#define SEEDSLEECH 5
#define STATUS 6
#define RATIO 6
#define ETA 7
#define HASH 8
@ -92,6 +92,12 @@ class DLListDelegate: public QAbstractItemDelegate {
painter->drawText(option.rect, Qt::AlignCenter, QString(tmp)+" "+tr("KiB/s"));
break;
}
case RATIO:{
float ratio = index.data().toDouble();
snprintf(tmp, MAX_CHAR_TMP, "%.1f", ratio);
painter->drawText(option.rect, Qt::AlignCenter, QString(tmp));
break;
}
case PROGRESS:{
QStyleOptionProgressBarV2 newopt;
float progress;