mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-12 07:16:19 -05:00
Added proper sorting of DL files according to sources (Patch from Phenom)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6805 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f3f7a40ad7
commit
7cd9ca9f09
2 changed files with 16 additions and 3 deletions
|
|
@ -27,6 +27,7 @@
|
|||
#include <QApplication>
|
||||
#include <QDateTime>
|
||||
#include <limits>
|
||||
#include <math.h>
|
||||
|
||||
#include "DLListDelegate.h"
|
||||
|
||||
|
|
@ -186,6 +187,14 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
|
|||
}
|
||||
painter->drawText(option.rect, Qt::AlignCenter, newopt.text);
|
||||
break;
|
||||
case COLUMN_SOURCES:
|
||||
{
|
||||
double dblValue = index.data().toDouble();
|
||||
|
||||
temp = dblValue!=0 ? QString("%1 (%2)").arg((int)dblValue).arg((int)((fmod(dblValue,1)*1000)+0.5)) : "";
|
||||
painter->drawText(option.rect, Qt::AlignCenter, temp);
|
||||
}
|
||||
break;
|
||||
case COLUMN_DOWNLOADTIME:
|
||||
downloadtime = index.data().toLongLong();
|
||||
minutes = downloadtime / 60;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue