changes to reflect download queue. not totally finished yet

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1433 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
alexandrut 2009-07-26 15:02:16 +00:00
parent c7ecf8c46d
commit 6f69a9edf3

View File

@ -139,20 +139,20 @@ TransfersDialog::TransfersDialog(QWidget *parent)
QHeaderView * upheader = ui.uploadsList->header () ;
upheader->setResizeMode (UNAME, QHeaderView::Interactive);
upheader->setResizeMode (USIZE, QHeaderView::Interactive);
upheader->setResizeMode (UTRANSFERRED, QHeaderView::Interactive);
upheader->setResizeMode (ULSPEED, QHeaderView::Interactive);
upheader->setResizeMode (UPROGRESS, QHeaderView::Interactive);
upheader->setResizeMode (USTATUS, QHeaderView::Interactive);
upheader->setResizeMode (USERNAME, QHeaderView::Interactive);
upheader->setResizeMode (UTRANSFERRED, QHeaderView::Interactive);
upheader->setResizeMode (ULSPEED, QHeaderView::Interactive);
upheader->setResizeMode (UPROGRESS, QHeaderView::Interactive);
upheader->setResizeMode (USTATUS, QHeaderView::Interactive);
upheader->setResizeMode (USERNAME, QHeaderView::Interactive);
upheader->resizeSection ( UNAME, 170 );
upheader->resizeSection ( UNAME, 170 );
upheader->resizeSection ( USIZE, 70 );
upheader->resizeSection ( UTRANSFERRED, 75 );
upheader->resizeSection ( ULSPEED, 75 );
upheader->resizeSection ( UPROGRESS, 170 );
upheader->resizeSection ( USTATUS, 100 );
upheader->resizeSection ( USERNAME, 75 );
upheader->resizeSection ( ULSPEED, 75 );
upheader->resizeSection ( UPROGRESS, 170 );
upheader->resizeSection ( USTATUS, 100 );
upheader->resizeSection ( USERNAME, 75 );
/* Hide platform specific features */
#ifdef Q_WS_WIN
@ -618,6 +618,34 @@ void TransfersDialog::insertTransfers()
status = tr("Unknown"); break;
}
/* a paused download remains with Downloading status;
* check to see if download is in download queue to
* update his status properly */
int priority;
if (rsFiles->getPriority(*it, priority)) {
QString spriority;
switch (priority) {
case 0:
spriority = tr("Low");
break;
case 1:
spriority = tr("Normal");
break;
case 2:
spriority = tr("High");
break;
case 3:
spriority = tr("Auto");
break;
default:
spriority = tr("");
break;
}
status = tr("Queued [") + spriority + tr("]");
}
completed = info.transfered;
remaining = (info.size - info.transfered) / (info.tfRate * 1024.0);