restaured priority queue methods, and made better context menues.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2135 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-01-26 23:25:00 +00:00
parent 7b35b7dc6a
commit 7fd5c7ad4b
12 changed files with 207 additions and 178 deletions

View file

@ -151,8 +151,19 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
// create a xProgressBar
FileProgressInfo pinfo = index.data().value<FileProgressInfo>() ;
xProgressBar progressBar(pinfo.cmap,option.rect, painter); // the 3rd param is the color schema (0 is the default value)
progressBar.setDisplayText(false); // should display % text?
progressBar.setValue(pinfo.progress); // set the progress value
if(pinfo.type == FileProgressInfo::DOWNLOAD_LINE)
{
progressBar.setDisplayText(true); // should display % text?
progressBar.setValue(pinfo.progress); // set the progress value
progressBar.setColorSchema(0) ;
}
else
{
progressBar.setDisplayText(false); // should display % text?
progressBar.setValue(pinfo.progress); // set the progress value
progressBar.setColorSchema(1) ;
}
progressBar.setVerticalSpan(1);
progressBar.paint(); // paint the progress bar
}