diff --git a/src/qtlibtorrent/torrentmodel.cpp b/src/qtlibtorrent/torrentmodel.cpp index b91e52450..2dde082b0 100644 --- a/src/qtlibtorrent/torrentmodel.cpp +++ b/src/qtlibtorrent/torrentmodel.cpp @@ -190,7 +190,9 @@ QVariant TorrentModelItem::data(int column, int role) const case TR_UPLIMIT: return m_torrent.upload_limit(); case TR_AMOUNT_DOWNLOADED: - return static_cast(m_torrent.total_wanted_done()); + return static_cast(m_torrent.all_time_download()); + case TR_AMOUNT_UPLOADED: + return static_cast(m_torrent.all_time_upload()); case TR_AMOUNT_LEFT: return static_cast(m_torrent.total_wanted() - m_torrent.total_wanted_done()); 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_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_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_TIME_ELAPSED: return tr("Time Active", "Time (duration) the torrent is active (not paused)"); default: @@ -279,6 +282,7 @@ QVariant TorrentModel::headerData(int section, Qt::Orientation orientation, case TorrentModelItem::TR_DLLIMIT: case TorrentModelItem::TR_UPLIMIT: case TorrentModelItem::TR_AMOUNT_DOWNLOADED: + case TorrentModelItem::TR_AMOUNT_UPLOADED: case TorrentModelItem::TR_AMOUNT_LEFT: return Qt::AlignRight; case TorrentModelItem::TR_PROGRESS: diff --git a/src/qtlibtorrent/torrentmodel.h b/src/qtlibtorrent/torrentmodel.h index 33057b28e..328e604c1 100644 --- a/src/qtlibtorrent/torrentmodel.h +++ b/src/qtlibtorrent/torrentmodel.h @@ -49,7 +49,7 @@ Q_OBJECT 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 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: TorrentModelItem(const QTorrentHandle& h); diff --git a/src/transferlistdelegate.h b/src/transferlistdelegate.h index 9926fa0c4..778d2e770 100644 --- a/src/transferlistdelegate.h +++ b/src/transferlistdelegate.h @@ -62,6 +62,7 @@ public: painter->save(); switch(index.column()) { case TorrentModelItem::TR_AMOUNT_DOWNLOADED: + case TorrentModelItem::TR_AMOUNT_UPLOADED: case TorrentModelItem::TR_AMOUNT_LEFT: case TorrentModelItem::TR_SIZE:{ QItemDelegate::drawBackground(painter, opt, index); diff --git a/src/transferlistwidget.cpp b/src/transferlistwidget.cpp index eca0135ff..abe5865d3 100644 --- a/src/transferlistwidget.cpp +++ b/src/transferlistwidget.cpp @@ -120,6 +120,7 @@ TransferListWidget::TransferListWidget(QWidget *parent, MainWindow *main_window, setColumnHidden(TorrentModelItem::TR_DLLIMIT, true); setColumnHidden(TorrentModelItem::TR_TRACKER, true); setColumnHidden(TorrentModelItem::TR_AMOUNT_DOWNLOADED, true); + setColumnHidden(TorrentModelItem::TR_AMOUNT_UPLOADED, true); setColumnHidden(TorrentModelItem::TR_AMOUNT_LEFT, true); setColumnHidden(TorrentModelItem::TR_TIME_ELAPSED, true); }