mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-16 05:01:37 +03:00
Merge pull request #300 from Gelmir/uploaded_column
Main view column changes
This commit is contained in:
commit
6f88b072d1
4 changed files with 8 additions and 2 deletions
|
@ -190,7 +190,9 @@ QVariant TorrentModelItem::data(int column, int role) const
|
||||||
case TR_UPLIMIT:
|
case TR_UPLIMIT:
|
||||||
return m_torrent.upload_limit();
|
return m_torrent.upload_limit();
|
||||||
case TR_AMOUNT_DOWNLOADED:
|
case TR_AMOUNT_DOWNLOADED:
|
||||||
return static_cast<qlonglong>(m_torrent.total_wanted_done());
|
return static_cast<qlonglong>(m_torrent.all_time_download());
|
||||||
|
case TR_AMOUNT_UPLOADED:
|
||||||
|
return static_cast<qlonglong>(m_torrent.all_time_upload());
|
||||||
case TR_AMOUNT_LEFT:
|
case TR_AMOUNT_LEFT:
|
||||||
return static_cast<qlonglong>(m_torrent.total_wanted() - m_torrent.total_wanted_done());
|
return static_cast<qlonglong>(m_torrent.total_wanted() - m_torrent.total_wanted_done());
|
||||||
case TR_TIME_ELAPSED:
|
case TR_TIME_ELAPSED:
|
||||||
|
@ -261,6 +263,7 @@ QVariant TorrentModel::headerData(int section, Qt::Orientation orientation,
|
||||||
case TorrentModelItem::TR_DLLIMIT: return tr("Down Limit", "i.e: Download limit");
|
case TorrentModelItem::TR_DLLIMIT: return tr("Down Limit", "i.e: Download limit");
|
||||||
case TorrentModelItem::TR_UPLIMIT: return tr("Up Limit", "i.e: Upload limit");
|
case TorrentModelItem::TR_UPLIMIT: return tr("Up Limit", "i.e: Upload limit");
|
||||||
case TorrentModelItem::TR_AMOUNT_DOWNLOADED: return tr("Amount downloaded", "Amount of data downloaded (e.g. in MB)");
|
case TorrentModelItem::TR_AMOUNT_DOWNLOADED: return tr("Amount downloaded", "Amount of data downloaded (e.g. in MB)");
|
||||||
|
case TorrentModelItem::TR_AMOUNT_UPLOADED: return tr("Amount uploaded", "Amount of data uploaded (e.g. in MB)");
|
||||||
case TorrentModelItem::TR_AMOUNT_LEFT: return tr("Amount left", "Amount of data left to download (e.g. in MB)");
|
case TorrentModelItem::TR_AMOUNT_LEFT: return tr("Amount left", "Amount of data left to download (e.g. in MB)");
|
||||||
case TorrentModelItem::TR_TIME_ELAPSED: return tr("Time Active", "Time (duration) the torrent is active (not paused)");
|
case TorrentModelItem::TR_TIME_ELAPSED: return tr("Time Active", "Time (duration) the torrent is active (not paused)");
|
||||||
default:
|
default:
|
||||||
|
@ -279,6 +282,7 @@ QVariant TorrentModel::headerData(int section, Qt::Orientation orientation,
|
||||||
case TorrentModelItem::TR_DLLIMIT:
|
case TorrentModelItem::TR_DLLIMIT:
|
||||||
case TorrentModelItem::TR_UPLIMIT:
|
case TorrentModelItem::TR_UPLIMIT:
|
||||||
case TorrentModelItem::TR_AMOUNT_DOWNLOADED:
|
case TorrentModelItem::TR_AMOUNT_DOWNLOADED:
|
||||||
|
case TorrentModelItem::TR_AMOUNT_UPLOADED:
|
||||||
case TorrentModelItem::TR_AMOUNT_LEFT:
|
case TorrentModelItem::TR_AMOUNT_LEFT:
|
||||||
return Qt::AlignRight;
|
return Qt::AlignRight;
|
||||||
case TorrentModelItem::TR_PROGRESS:
|
case TorrentModelItem::TR_PROGRESS:
|
||||||
|
|
|
@ -49,7 +49,7 @@ Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum State {STATE_DOWNLOADING, STATE_STALLED_DL, STATE_STALLED_UP, STATE_SEEDING, STATE_PAUSED_DL, STATE_PAUSED_UP, STATE_QUEUED_DL, STATE_QUEUED_UP, STATE_CHECKING_UP, STATE_CHECKING_DL, STATE_INVALID};
|
enum State {STATE_DOWNLOADING, STATE_STALLED_DL, STATE_STALLED_UP, STATE_SEEDING, STATE_PAUSED_DL, STATE_PAUSED_UP, STATE_QUEUED_DL, STATE_QUEUED_UP, STATE_CHECKING_UP, STATE_CHECKING_DL, STATE_INVALID};
|
||||||
enum Column {TR_NAME, TR_PRIORITY, TR_SIZE, TR_PROGRESS, TR_STATUS, TR_SEEDS, TR_PEERS, TR_DLSPEED, TR_UPSPEED, TR_ETA, TR_RATIO, TR_LABEL, TR_ADD_DATE, TR_SEED_DATE, TR_TRACKER, TR_DLLIMIT, TR_UPLIMIT, TR_AMOUNT_DOWNLOADED, TR_AMOUNT_LEFT, TR_TIME_ELAPSED, NB_COLUMNS};
|
enum Column {TR_NAME, TR_PRIORITY, TR_SIZE, TR_PROGRESS, TR_STATUS, TR_SEEDS, TR_PEERS, TR_DLSPEED, TR_UPSPEED, TR_ETA, TR_RATIO, TR_LABEL, TR_ADD_DATE, TR_SEED_DATE, TR_TRACKER, TR_DLLIMIT, TR_UPLIMIT, TR_AMOUNT_DOWNLOADED, TR_AMOUNT_UPLOADED, TR_AMOUNT_LEFT, TR_TIME_ELAPSED, NB_COLUMNS};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TorrentModelItem(const QTorrentHandle& h);
|
TorrentModelItem(const QTorrentHandle& h);
|
||||||
|
|
|
@ -62,6 +62,7 @@ public:
|
||||||
painter->save();
|
painter->save();
|
||||||
switch(index.column()) {
|
switch(index.column()) {
|
||||||
case TorrentModelItem::TR_AMOUNT_DOWNLOADED:
|
case TorrentModelItem::TR_AMOUNT_DOWNLOADED:
|
||||||
|
case TorrentModelItem::TR_AMOUNT_UPLOADED:
|
||||||
case TorrentModelItem::TR_AMOUNT_LEFT:
|
case TorrentModelItem::TR_AMOUNT_LEFT:
|
||||||
case TorrentModelItem::TR_SIZE:{
|
case TorrentModelItem::TR_SIZE:{
|
||||||
QItemDelegate::drawBackground(painter, opt, index);
|
QItemDelegate::drawBackground(painter, opt, index);
|
||||||
|
|
|
@ -120,6 +120,7 @@ TransferListWidget::TransferListWidget(QWidget *parent, MainWindow *main_window,
|
||||||
setColumnHidden(TorrentModelItem::TR_DLLIMIT, true);
|
setColumnHidden(TorrentModelItem::TR_DLLIMIT, true);
|
||||||
setColumnHidden(TorrentModelItem::TR_TRACKER, true);
|
setColumnHidden(TorrentModelItem::TR_TRACKER, true);
|
||||||
setColumnHidden(TorrentModelItem::TR_AMOUNT_DOWNLOADED, true);
|
setColumnHidden(TorrentModelItem::TR_AMOUNT_DOWNLOADED, true);
|
||||||
|
setColumnHidden(TorrentModelItem::TR_AMOUNT_UPLOADED, true);
|
||||||
setColumnHidden(TorrentModelItem::TR_AMOUNT_LEFT, true);
|
setColumnHidden(TorrentModelItem::TR_AMOUNT_LEFT, true);
|
||||||
setColumnHidden(TorrentModelItem::TR_TIME_ELAPSED, true);
|
setColumnHidden(TorrentModelItem::TR_TIME_ELAPSED, true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue