mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 21:28:07 -06:00
Merge pull request #4451 from netjunki/master
add a remaining column to the torrent content model
This commit is contained in:
@@ -67,6 +67,15 @@ void PropListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect, Utils::Misc::friendlyUnit(index.data().toLongLong()));
|
||||
break;
|
||||
case REMAINING:
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
if (index.sibling(index.row(), PRIORITY).data().toInt() == prio::IGNORED) {
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect, tr("N/A"));
|
||||
}
|
||||
else {
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect, Utils::Misc::friendlyUnit(index.data().toLongLong()));
|
||||
}
|
||||
break;
|
||||
case PROGRESS:
|
||||
if (index.data().toDouble() >= 0) {
|
||||
QStyleOptionProgressBarV2 newopt;
|
||||
|
||||
@@ -45,7 +45,8 @@ enum PropColumn
|
||||
NAME,
|
||||
PCSIZE,
|
||||
PROGRESS,
|
||||
PRIORITY
|
||||
PRIORITY,
|
||||
REMAINING
|
||||
};
|
||||
|
||||
class PropListDelegate : public QItemDelegate
|
||||
|
||||
Reference in New Issue
Block a user